]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
Correct documentation
[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 ##   @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
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         ## Create a sketcher wire, following the numerical description,
2409         #  passed through <VAR>theCoordinates</VAR> argument. \n
2410         #  @param theCoordinates double values, defining points to create a wire,
2411         #                                                      passing from it.
2412         #  @param theName Object name; when specified, this parameter is used
2413         #         for result publication in the study. Otherwise, if automatic
2414         #         publication is switched on, default value is used for result name.
2415         #
2416         #  @return New GEOM.GEOM_Object, containing the created wire.
2417         #
2418         #  @ref tui_3dsketcher_page "Example"
2419         def Make3DSketcher(self, theCoordinates, theName=None):
2420             """
2421             Create a sketcher wire, following the numerical description,
2422             passed through theCoordinates argument.
2423
2424             Parameters:
2425                 theCoordinates double values, defining points to create a wire,
2426                                passing from it.
2427                 theName Object name; when specified, this parameter is used
2428                         for result publication in the study. Otherwise, if automatic
2429                         publication is switched on, default value is used for result name.
2430
2431             Returns:
2432                 New GEOM_Object, containing the created wire.
2433             """
2434             theCoordinates,Parameters = ParseParameters(theCoordinates)
2435             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2436             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2437             anObj.SetParameters(Parameters)
2438             self._autoPublish(anObj, theName, "wire")
2439             return anObj
2440
2441         ## Obtain a 3D sketcher interface
2442         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2443         #
2444         #  @ref tui_3dsketcher_page "Example"
2445         def Sketcher3D (self):
2446             """
2447             Obtain a 3D sketcher interface.
2448
2449             Example of usage:
2450                 sk = geompy.Sketcher3D()
2451                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2452                 sk.addPointsRelative(0, 0, 130)
2453                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2454                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2455                 sk.close()
2456                 a3D_Sketcher_1 = sk.wire()
2457             """
2458             sk = Sketcher3D (self)
2459             return sk
2460
2461         # end of l3_sketcher
2462         ## @}
2463
2464         ## @addtogroup l3_3d_primitives
2465         ## @{
2466
2467         ## Create a box by coordinates of two opposite vertices.
2468         #
2469         #  @param x1,y1,z1 double values, defining first point it.
2470         #  @param x2,y2,z2 double values, defining first point it.
2471         #  @param theName Object name; when specified, this parameter is used
2472         #         for result publication in the study. Otherwise, if automatic
2473         #         publication is switched on, default value is used for result name.
2474         #
2475         #  @return New GEOM.GEOM_Object, containing the created box.
2476         #
2477         #  @ref tui_creation_box "Example"
2478         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2479             """
2480             Create a box by coordinates of two opposite vertices.
2481             
2482             Parameters:
2483                 x1,y1,z1 double values, defining first point.
2484                 x2,y2,z2 double values, defining second point.
2485                 theName Object name; when specified, this parameter is used
2486                         for result publication in the study. Otherwise, if automatic
2487                         publication is switched on, default value is used for result name.
2488                 
2489             Returns:
2490                 New GEOM.GEOM_Object, containing the created box.
2491             """
2492             # Example: see GEOM_TestAll.py
2493             pnt1 = self.MakeVertex(x1,y1,z1)
2494             pnt2 = self.MakeVertex(x2,y2,z2)
2495             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2496             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2497
2498         ## Create a box with specified dimensions along the coordinate axes
2499         #  and with edges, parallel to the coordinate axes.
2500         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2501         #  @param theDX Length of Box edges, parallel to OX axis.
2502         #  @param theDY Length of Box edges, parallel to OY axis.
2503         #  @param theDZ Length of Box edges, parallel to OZ axis.
2504         #  @param theName Object name; when specified, this parameter is used
2505         #         for result publication in the study. Otherwise, if automatic
2506         #         publication is switched on, default value is used for result name.
2507         #
2508         #  @return New GEOM.GEOM_Object, containing the created box.
2509         #
2510         #  @ref tui_creation_box "Example"
2511         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2512             """
2513             Create a box with specified dimensions along the coordinate axes
2514             and with edges, parallel to the coordinate axes.
2515             Center of the box will be at point (DX/2, DY/2, DZ/2).
2516
2517             Parameters:
2518                 theDX Length of Box edges, parallel to OX axis.
2519                 theDY Length of Box edges, parallel to OY axis.
2520                 theDZ Length of Box edges, parallel to OZ axis.
2521                 theName Object name; when specified, this parameter is used
2522                         for result publication in the study. Otherwise, if automatic
2523                         publication is switched on, default value is used for result name.
2524
2525             Returns:   
2526                 New GEOM.GEOM_Object, containing the created box.
2527             """
2528             # Example: see GEOM_TestAll.py
2529             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2530             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2531             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2532             anObj.SetParameters(Parameters)
2533             self._autoPublish(anObj, theName, "box")
2534             return anObj
2535
2536         ## Create a box with two specified opposite vertices,
2537         #  and with edges, parallel to the coordinate axes
2538         #  @param thePnt1 First of two opposite vertices.
2539         #  @param thePnt2 Second of two opposite vertices.
2540         #  @param theName Object name; when specified, this parameter is used
2541         #         for result publication in the study. Otherwise, if automatic
2542         #         publication is switched on, default value is used for result name.
2543         #
2544         #  @return New GEOM.GEOM_Object, containing the created box.
2545         #
2546         #  @ref tui_creation_box "Example"
2547         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2548             """
2549             Create a box with two specified opposite vertices,
2550             and with edges, parallel to the coordinate axes
2551
2552             Parameters:
2553                 thePnt1 First of two opposite vertices.
2554                 thePnt2 Second of two opposite vertices.
2555                 theName Object name; when specified, this parameter is used
2556                         for result publication in the study. Otherwise, if automatic
2557                         publication is switched on, default value is used for result name.
2558
2559             Returns:
2560                 New GEOM.GEOM_Object, containing the created box.
2561             """
2562             # Example: see GEOM_TestAll.py
2563             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2564             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2565             self._autoPublish(anObj, theName, "box")
2566             return anObj
2567
2568         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2569         #  @param theH height of Face.
2570         #  @param theW width of Face.
2571         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2572         #  @param theName Object name; when specified, this parameter is used
2573         #         for result publication in the study. Otherwise, if automatic
2574         #         publication is switched on, default value is used for result name.
2575         #
2576         #  @return New GEOM.GEOM_Object, containing the created face.
2577         #
2578         #  @ref tui_creation_face "Example"
2579         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2580             """
2581             Create a face with specified dimensions with edges parallel to coordinate axes.
2582
2583             Parameters:
2584                 theH height of Face.
2585                 theW width of Face.
2586                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2587                 theName Object name; when specified, this parameter is used
2588                         for result publication in the study. Otherwise, if automatic
2589                         publication is switched on, default value is used for result name.
2590
2591             Returns:
2592                 New GEOM.GEOM_Object, containing the created face.
2593             """
2594             # Example: see GEOM_TestAll.py
2595             theH,theW,Parameters = ParseParameters(theH, theW)
2596             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2597             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2598             anObj.SetParameters(Parameters)
2599             self._autoPublish(anObj, theName, "rectangle")
2600             return anObj
2601
2602         ## Create a face from another plane and two sizes,
2603         #  vertical size and horisontal size.
2604         #  @param theObj   Normale vector to the creating face or
2605         #  the face object.
2606         #  @param theH     Height (vertical size).
2607         #  @param theW     Width (horisontal size).
2608         #  @param theName Object name; when specified, this parameter is used
2609         #         for result publication in the study. Otherwise, if automatic
2610         #         publication is switched on, default value is used for result name.
2611         #
2612         #  @return New GEOM.GEOM_Object, containing the created face.
2613         #
2614         #  @ref tui_creation_face "Example"
2615         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2616             """
2617             Create a face from another plane and two sizes,
2618             vertical size and horisontal size.
2619
2620             Parameters:
2621                 theObj   Normale vector to the creating face or
2622                          the face object.
2623                 theH     Height (vertical size).
2624                 theW     Width (horisontal size).
2625                 theName Object name; when specified, this parameter is used
2626                         for result publication in the study. Otherwise, if automatic
2627                         publication is switched on, default value is used for result name.
2628
2629             Returns:
2630                 New GEOM_Object, containing the created face.
2631             """
2632             # Example: see GEOM_TestAll.py
2633             theH,theW,Parameters = ParseParameters(theH, theW)
2634             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2635             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2636             anObj.SetParameters(Parameters)
2637             self._autoPublish(anObj, theName, "rectangle")
2638             return anObj
2639
2640         ## Create a disk with given center, normal vector and radius.
2641         #  @param thePnt Disk center.
2642         #  @param theVec Vector, normal to the plane of the disk.
2643         #  @param theR Disk radius.
2644         #  @param theName Object name; when specified, this parameter is used
2645         #         for result publication in the study. Otherwise, if automatic
2646         #         publication is switched on, default value is used for result name.
2647         #
2648         #  @return New GEOM.GEOM_Object, containing the created disk.
2649         #
2650         #  @ref tui_creation_disk "Example"
2651         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2652             """
2653             Create a disk with given center, normal vector and radius.
2654
2655             Parameters:
2656                 thePnt Disk center.
2657                 theVec Vector, normal to the plane of the disk.
2658                 theR Disk radius.
2659                 theName Object name; when specified, this parameter is used
2660                         for result publication in the study. Otherwise, if automatic
2661                         publication is switched on, default value is used for result name.
2662
2663             Returns:    
2664                 New GEOM.GEOM_Object, containing the created disk.
2665             """
2666             # Example: see GEOM_TestAll.py
2667             theR,Parameters = ParseParameters(theR)
2668             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2669             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2670             anObj.SetParameters(Parameters)
2671             self._autoPublish(anObj, theName, "disk")
2672             return anObj
2673
2674         ## Create a disk, passing through three given points
2675         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2676         #  @param theName Object name; when specified, this parameter is used
2677         #         for result publication in the study. Otherwise, if automatic
2678         #         publication is switched on, default value is used for result name.
2679         #
2680         #  @return New GEOM.GEOM_Object, containing the created disk.
2681         #
2682         #  @ref tui_creation_disk "Example"
2683         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2684             """
2685             Create a disk, passing through three given points
2686
2687             Parameters:
2688                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2689                 theName Object name; when specified, this parameter is used
2690                         for result publication in the study. Otherwise, if automatic
2691                         publication is switched on, default value is used for result name.
2692
2693             Returns:    
2694                 New GEOM.GEOM_Object, containing the created disk.
2695             """
2696             # Example: see GEOM_TestAll.py
2697             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2698             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2699             self._autoPublish(anObj, theName, "disk")
2700             return anObj
2701
2702         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2703         #  @param theR Radius of Face.
2704         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2705         #  @param theName Object name; when specified, this parameter is used
2706         #         for result publication in the study. Otherwise, if automatic
2707         #         publication is switched on, default value is used for result name.
2708         #
2709         #  @return New GEOM.GEOM_Object, containing the created disk.
2710         #
2711         #  @ref tui_creation_face "Example"
2712         def MakeDiskR(self, theR, theOrientation, theName=None):
2713             """
2714             Create a disk with specified dimensions along OX-OY coordinate axes.
2715
2716             Parameters:
2717                 theR Radius of Face.
2718                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2719                 theName Object name; when specified, this parameter is used
2720                         for result publication in the study. Otherwise, if automatic
2721                         publication is switched on, default value is used for result name.
2722
2723             Returns: 
2724                 New GEOM.GEOM_Object, containing the created disk.
2725
2726             Example of usage:
2727                 Disk3 = geompy.MakeDiskR(100., 1)
2728             """
2729             # Example: see GEOM_TestAll.py
2730             theR,Parameters = ParseParameters(theR)
2731             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2732             RaiseIfFailed("MakeDiskR", self.PrimOp)
2733             anObj.SetParameters(Parameters)
2734             self._autoPublish(anObj, theName, "disk")
2735             return anObj
2736
2737         ## Create a cylinder with given base point, axis, radius and height.
2738         #  @param thePnt Central point of cylinder base.
2739         #  @param theAxis Cylinder axis.
2740         #  @param theR Cylinder radius.
2741         #  @param theH Cylinder height.
2742         #  @param theName Object name; when specified, this parameter is used
2743         #         for result publication in the study. Otherwise, if automatic
2744         #         publication is switched on, default value is used for result name.
2745         #
2746         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2747         #
2748         #  @ref tui_creation_cylinder "Example"
2749         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2750             """
2751             Create a cylinder with given base point, axis, radius and height.
2752
2753             Parameters:
2754                 thePnt Central point of cylinder base.
2755                 theAxis Cylinder axis.
2756                 theR Cylinder radius.
2757                 theH Cylinder height.
2758                 theName Object name; when specified, this parameter is used
2759                         for result publication in the study. Otherwise, if automatic
2760                         publication is switched on, default value is used for result name.
2761
2762             Returns: 
2763                 New GEOM.GEOM_Object, containing the created cylinder.
2764             """
2765             # Example: see GEOM_TestAll.py
2766             theR,theH,Parameters = ParseParameters(theR, theH)
2767             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2768             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2769             anObj.SetParameters(Parameters)
2770             self._autoPublish(anObj, theName, "cylinder")
2771             return anObj
2772
2773         ## Create a cylinder with given radius and height at
2774         #  the origin of coordinate system. Axis of the cylinder
2775         #  will be collinear to the OZ axis of the coordinate system.
2776         #  @param theR Cylinder radius.
2777         #  @param theH Cylinder height.
2778         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2783         #
2784         #  @ref tui_creation_cylinder "Example"
2785         def MakeCylinderRH(self, theR, theH, theName=None):
2786             """
2787             Create a cylinder with given radius and height at
2788             the origin of coordinate system. Axis of the cylinder
2789             will be collinear to the OZ axis of the coordinate system.
2790
2791             Parameters:
2792                 theR Cylinder radius.
2793                 theH Cylinder height.
2794                 theName Object name; when specified, this parameter is used
2795                         for result publication in the study. Otherwise, if automatic
2796                         publication is switched on, default value is used for result name.
2797
2798             Returns:    
2799                 New GEOM.GEOM_Object, containing the created cylinder.
2800             """
2801             # Example: see GEOM_TestAll.py
2802             theR,theH,Parameters = ParseParameters(theR, theH)
2803             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2804             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2805             anObj.SetParameters(Parameters)
2806             self._autoPublish(anObj, theName, "cylinder")
2807             return anObj
2808
2809         ## Create a sphere with given center and radius.
2810         #  @param thePnt Sphere center.
2811         #  @param theR Sphere radius.
2812         #  @param theName Object name; when specified, this parameter is used
2813         #         for result publication in the study. Otherwise, if automatic
2814         #         publication is switched on, default value is used for result name.
2815         #
2816         #  @return New GEOM.GEOM_Object, containing the created sphere.
2817         #
2818         #  @ref tui_creation_sphere "Example"
2819         def MakeSpherePntR(self, thePnt, theR, theName=None):
2820             """
2821             Create a sphere with given center and radius.
2822
2823             Parameters:
2824                 thePnt Sphere center.
2825                 theR Sphere radius.
2826                 theName Object name; when specified, this parameter is used
2827                         for result publication in the study. Otherwise, if automatic
2828                         publication is switched on, default value is used for result name.
2829
2830             Returns:    
2831                 New GEOM.GEOM_Object, containing the created sphere.            
2832             """
2833             # Example: see GEOM_TestAll.py
2834             theR,Parameters = ParseParameters(theR)
2835             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2836             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2837             anObj.SetParameters(Parameters)
2838             self._autoPublish(anObj, theName, "sphere")
2839             return anObj
2840
2841         ## Create a sphere with given center and radius.
2842         #  @param x,y,z Coordinates of sphere center.
2843         #  @param theR Sphere radius.
2844         #  @param theName Object name; when specified, this parameter is used
2845         #         for result publication in the study. Otherwise, if automatic
2846         #         publication is switched on, default value is used for result name.
2847         #
2848         #  @return New GEOM.GEOM_Object, containing the created sphere.
2849         #
2850         #  @ref tui_creation_sphere "Example"
2851         def MakeSphere(self, x, y, z, theR, theName=None):
2852             """
2853             Create a sphere with given center and radius.
2854
2855             Parameters: 
2856                 x,y,z Coordinates of sphere center.
2857                 theR Sphere radius.
2858                 theName Object name; when specified, this parameter is used
2859                         for result publication in the study. Otherwise, if automatic
2860                         publication is switched on, default value is used for result name.
2861
2862             Returns:
2863                 New GEOM.GEOM_Object, containing the created sphere.
2864             """
2865             # Example: see GEOM_TestAll.py
2866             point = self.MakeVertex(x, y, z)
2867             # note: auto-publishing is done in self.MakeSpherePntR()
2868             anObj = self.MakeSpherePntR(point, theR, theName)
2869             return anObj
2870
2871         ## Create a sphere with given radius at the origin of coordinate system.
2872         #  @param theR Sphere radius.
2873         #  @param theName Object name; when specified, this parameter is used
2874         #         for result publication in the study. Otherwise, if automatic
2875         #         publication is switched on, default value is used for result name.
2876         #
2877         #  @return New GEOM.GEOM_Object, containing the created sphere.
2878         #
2879         #  @ref tui_creation_sphere "Example"
2880         def MakeSphereR(self, theR, theName=None):
2881             """
2882             Create a sphere with given radius at the origin of coordinate system.
2883
2884             Parameters: 
2885                 theR Sphere radius.
2886                 theName Object name; when specified, this parameter is used
2887                         for result publication in the study. Otherwise, if automatic
2888                         publication is switched on, default value is used for result name.
2889
2890             Returns:
2891                 New GEOM.GEOM_Object, containing the created sphere.            
2892             """
2893             # Example: see GEOM_TestAll.py
2894             theR,Parameters = ParseParameters(theR)
2895             anObj = self.PrimOp.MakeSphereR(theR)
2896             RaiseIfFailed("MakeSphereR", self.PrimOp)
2897             anObj.SetParameters(Parameters)
2898             self._autoPublish(anObj, theName, "sphere")
2899             return anObj
2900
2901         ## Create a cone with given base point, axis, height and radiuses.
2902         #  @param thePnt Central point of the first cone base.
2903         #  @param theAxis Cone axis.
2904         #  @param theR1 Radius of the first cone base.
2905         #  @param theR2 Radius of the second cone base.
2906         #    \note If both radiuses are non-zero, the cone will be truncated.
2907         #    \note If the radiuses are equal, a cylinder will be created instead.
2908         #  @param theH Cone height.
2909         #  @param theName Object name; when specified, this parameter is used
2910         #         for result publication in the study. Otherwise, if automatic
2911         #         publication is switched on, default value is used for result name.
2912         #
2913         #  @return New GEOM.GEOM_Object, containing the created cone.
2914         #
2915         #  @ref tui_creation_cone "Example"
2916         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2917             """
2918             Create a cone with given base point, axis, height and radiuses.
2919
2920             Parameters: 
2921                 thePnt Central point of the first cone base.
2922                 theAxis Cone axis.
2923                 theR1 Radius of the first cone base.
2924                 theR2 Radius of the second cone base.
2925                 theH Cone height.
2926                 theName Object name; when specified, this parameter is used
2927                         for result publication in the study. Otherwise, if automatic
2928                         publication is switched on, default value is used for result name.
2929
2930             Note:
2931                 If both radiuses are non-zero, the cone will be truncated.
2932                 If the radiuses are equal, a cylinder will be created instead.
2933
2934             Returns:
2935                 New GEOM.GEOM_Object, containing the created cone.
2936             """
2937             # Example: see GEOM_TestAll.py
2938             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2939             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2940             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2941             anObj.SetParameters(Parameters)
2942             self._autoPublish(anObj, theName, "cone")
2943             return anObj
2944
2945         ## Create a cone with given height and radiuses at
2946         #  the origin of coordinate system. Axis of the cone will
2947         #  be collinear to the OZ axis of the coordinate system.
2948         #  @param theR1 Radius of the first cone base.
2949         #  @param theR2 Radius of the second cone base.
2950         #    \note If both radiuses are non-zero, the cone will be truncated.
2951         #    \note If the radiuses are equal, a cylinder will be created instead.
2952         #  @param theH Cone height.
2953         #  @param theName Object name; when specified, this parameter is used
2954         #         for result publication in the study. Otherwise, if automatic
2955         #         publication is switched on, default value is used for result name.
2956         #
2957         #  @return New GEOM.GEOM_Object, containing the created cone.
2958         #
2959         #  @ref tui_creation_cone "Example"
2960         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
2961             """
2962             Create a cone with given height and radiuses at
2963             the origin of coordinate system. Axis of the cone will
2964             be collinear to the OZ axis of the coordinate system.
2965
2966             Parameters: 
2967                 theR1 Radius of the first cone base.
2968                 theR2 Radius of the second cone base.
2969                 theH Cone height.
2970                 theName Object name; when specified, this parameter is used
2971                         for result publication in the study. Otherwise, if automatic
2972                         publication is switched on, default value is used for result name.
2973
2974             Note:
2975                 If both radiuses are non-zero, the cone will be truncated.
2976                 If the radiuses are equal, a cylinder will be created instead.
2977
2978             Returns:
2979                 New GEOM.GEOM_Object, containing the created cone.
2980             """
2981             # Example: see GEOM_TestAll.py
2982             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2983             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
2984             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
2985             anObj.SetParameters(Parameters)
2986             self._autoPublish(anObj, theName, "cone")
2987             return anObj
2988
2989         ## Create a torus with given center, normal vector and radiuses.
2990         #  @param thePnt Torus central point.
2991         #  @param theVec Torus axis of symmetry.
2992         #  @param theRMajor Torus major radius.
2993         #  @param theRMinor Torus minor radius.
2994         #  @param theName Object name; when specified, this parameter is used
2995         #         for result publication in the study. Otherwise, if automatic
2996         #         publication is switched on, default value is used for result name.
2997         #
2998         #  @return New GEOM.GEOM_Object, containing the created torus.
2999         #
3000         #  @ref tui_creation_torus "Example"
3001         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3002             """
3003             Create a torus with given center, normal vector and radiuses.
3004
3005             Parameters: 
3006                 thePnt Torus central point.
3007                 theVec Torus axis of symmetry.
3008                 theRMajor Torus major radius.
3009                 theRMinor Torus minor radius.
3010                 theName Object name; when specified, this parameter is used
3011                         for result publication in the study. Otherwise, if automatic
3012                         publication is switched on, default value is used for result name.
3013
3014            Returns:
3015                 New GEOM.GEOM_Object, containing the created torus.
3016             """
3017             # Example: see GEOM_TestAll.py
3018             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3019             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3020             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3021             anObj.SetParameters(Parameters)
3022             self._autoPublish(anObj, theName, "torus")
3023             return anObj
3024
3025         ## Create a torus with given radiuses at the origin of coordinate system.
3026         #  @param theRMajor Torus major radius.
3027         #  @param theRMinor Torus minor radius.
3028         #  @param theName Object name; when specified, this parameter is used
3029         #         for result publication in the study. Otherwise, if automatic
3030         #         publication is switched on, default value is used for result name.
3031         #
3032         #  @return New GEOM.GEOM_Object, containing the created torus.
3033         #
3034         #  @ref tui_creation_torus "Example"
3035         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3036             """
3037            Create a torus with given radiuses at the origin of coordinate system.
3038
3039            Parameters: 
3040                 theRMajor Torus major radius.
3041                 theRMinor Torus minor radius.
3042                 theName Object name; when specified, this parameter is used
3043                         for result publication in the study. Otherwise, if automatic
3044                         publication is switched on, default value is used for result name.
3045
3046            Returns:
3047                 New GEOM.GEOM_Object, containing the created torus.            
3048             """
3049             # Example: see GEOM_TestAll.py
3050             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3051             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3052             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3053             anObj.SetParameters(Parameters)
3054             self._autoPublish(anObj, theName, "torus")
3055             return anObj
3056
3057         # end of l3_3d_primitives
3058         ## @}
3059
3060         ## @addtogroup l3_complex
3061         ## @{
3062
3063         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3064         #  @param theBase Base shape to be extruded.
3065         #  @param thePoint1 First end of extrusion vector.
3066         #  @param thePoint2 Second end of extrusion vector.
3067         #  @param theScaleFactor Use it to make prism with scaled second base.
3068         #                        Nagative value means not scaled second base.
3069         #  @param theName Object name; when specified, this parameter is used
3070         #         for result publication in the study. Otherwise, if automatic
3071         #         publication is switched on, default value is used for result name.
3072         #
3073         #  @return New GEOM.GEOM_Object, containing the created prism.
3074         #
3075         #  @ref tui_creation_prism "Example"
3076         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3077             """
3078             Create a shape by extrusion of the base shape along a vector, defined by two points.
3079
3080             Parameters: 
3081                 theBase Base shape to be extruded.
3082                 thePoint1 First end of extrusion vector.
3083                 thePoint2 Second end of extrusion vector.
3084                 theScaleFactor Use it to make prism with scaled second base.
3085                                Nagative value means not scaled second base.
3086                 theName Object name; when specified, this parameter is used
3087                         for result publication in the study. Otherwise, if automatic
3088                         publication is switched on, default value is used for result name.
3089
3090             Returns:
3091                 New GEOM.GEOM_Object, containing the created prism.
3092             """
3093             # Example: see GEOM_TestAll.py
3094             anObj = None
3095             Parameters = ""
3096             if theScaleFactor > 0:
3097                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3098                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3099             else:
3100                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3101             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3102             anObj.SetParameters(Parameters)
3103             self._autoPublish(anObj, theName, "prism")
3104             return anObj
3105
3106         ## Create a shape by extrusion of the base shape along a
3107         #  vector, defined by two points, in 2 Ways (forward/backward).
3108         #  @param theBase Base shape to be extruded.
3109         #  @param thePoint1 First end of extrusion vector.
3110         #  @param thePoint2 Second end of extrusion vector.
3111         #  @param theName Object name; when specified, this parameter is used
3112         #         for result publication in the study. Otherwise, if automatic
3113         #         publication is switched on, default value is used for result name.
3114         #
3115         #  @return New GEOM.GEOM_Object, containing the created prism.
3116         #
3117         #  @ref tui_creation_prism "Example"
3118         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3119             """
3120             Create a shape by extrusion of the base shape along a
3121             vector, defined by two points, in 2 Ways (forward/backward).
3122
3123             Parameters: 
3124                 theBase Base shape to be extruded.
3125                 thePoint1 First end of extrusion vector.
3126                 thePoint2 Second end of extrusion vector.
3127                 theName Object name; when specified, this parameter is used
3128                         for result publication in the study. Otherwise, if automatic
3129                         publication is switched on, default value is used for result name.
3130
3131             Returns:
3132                 New GEOM.GEOM_Object, containing the created prism.
3133             """
3134             # Example: see GEOM_TestAll.py
3135             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3136             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3137             self._autoPublish(anObj, theName, "prism")
3138             return anObj
3139
3140         ## Create a shape by extrusion of the base shape along the vector,
3141         #  i.e. all the space, transfixed by the base shape during its translation
3142         #  along the vector on the given distance.
3143         #  @param theBase Base shape to be extruded.
3144         #  @param theVec Direction of extrusion.
3145         #  @param theH Prism dimension along theVec.
3146         #  @param theScaleFactor Use it to make prism with scaled second base.
3147         #                        Negative value means not scaled second base.
3148         #  @param theName Object name; when specified, this parameter is used
3149         #         for result publication in the study. Otherwise, if automatic
3150         #         publication is switched on, default value is used for result name.
3151         #
3152         #  @return New GEOM.GEOM_Object, containing the created prism.
3153         #
3154         #  @ref tui_creation_prism "Example"
3155         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3156             """
3157             Create a shape by extrusion of the base shape along the vector,
3158             i.e. all the space, transfixed by the base shape during its translation
3159             along the vector on the given distance.
3160
3161             Parameters: 
3162                 theBase Base shape to be extruded.
3163                 theVec Direction of extrusion.
3164                 theH Prism dimension along theVec.
3165                 theScaleFactor Use it to make prism with scaled second base.
3166                                Negative value means not scaled second base.
3167                 theName Object name; when specified, this parameter is used
3168                         for result publication in the study. Otherwise, if automatic
3169                         publication is switched on, default value is used for result name.
3170
3171             Returns:
3172                 New GEOM.GEOM_Object, containing the created prism.
3173             """
3174             # Example: see GEOM_TestAll.py
3175             anObj = None
3176             Parameters = ""
3177             if theScaleFactor > 0:
3178                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3179                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3180             else:
3181                 theH,Parameters = ParseParameters(theH)
3182                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3183             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3184             anObj.SetParameters(Parameters)
3185             self._autoPublish(anObj, theName, "prism")
3186             return anObj
3187
3188         ## Create a shape by extrusion of the base shape along the vector,
3189         #  i.e. all the space, transfixed by the base shape during its translation
3190         #  along the vector on the given distance in 2 Ways (forward/backward).
3191         #  @param theBase Base shape to be extruded.
3192         #  @param theVec Direction of extrusion.
3193         #  @param theH Prism dimension along theVec in forward direction.
3194         #  @param theName Object name; when specified, this parameter is used
3195         #         for result publication in the study. Otherwise, if automatic
3196         #         publication is switched on, default value is used for result name.
3197         #
3198         #  @return New GEOM.GEOM_Object, containing the created prism.
3199         #
3200         #  @ref tui_creation_prism "Example"
3201         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3202             """
3203             Create a shape by extrusion of the base shape along the vector,
3204             i.e. all the space, transfixed by the base shape during its translation
3205             along the vector on the given distance in 2 Ways (forward/backward).
3206
3207             Parameters:
3208                 theBase Base shape to be extruded.
3209                 theVec Direction of extrusion.
3210                 theH Prism dimension along theVec in forward direction.
3211                 theName Object name; when specified, this parameter is used
3212                         for result publication in the study. Otherwise, if automatic
3213                         publication is switched on, default value is used for result name.
3214
3215             Returns:
3216                 New GEOM.GEOM_Object, containing the created prism.
3217             """
3218             # Example: see GEOM_TestAll.py
3219             theH,Parameters = ParseParameters(theH)
3220             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3221             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3222             anObj.SetParameters(Parameters)
3223             self._autoPublish(anObj, theName, "prism")
3224             return anObj
3225
3226         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3227         #  @param theBase Base shape to be extruded.
3228         #  @param theDX, theDY, theDZ Directions of extrusion.
3229         #  @param theScaleFactor Use it to make prism with scaled second base.
3230         #                        Nagative value means not scaled second base.
3231         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created prism.
3236         #
3237         #  @ref tui_creation_prism "Example"
3238         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3239             """
3240             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3241
3242             Parameters:
3243                 theBase Base shape to be extruded.
3244                 theDX, theDY, theDZ Directions of extrusion.
3245                 theScaleFactor Use it to make prism with scaled second base.
3246                                Nagative value means not scaled second base.
3247                 theName Object name; when specified, this parameter is used
3248                         for result publication in the study. Otherwise, if automatic
3249                         publication is switched on, default value is used for result name.
3250
3251             Returns: 
3252                 New GEOM.GEOM_Object, containing the created prism.
3253             """
3254             # Example: see GEOM_TestAll.py
3255             anObj = None
3256             Parameters = ""
3257             if theScaleFactor > 0:
3258                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3259                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3260             else:
3261                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3262                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3263             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3264             anObj.SetParameters(Parameters)
3265             self._autoPublish(anObj, theName, "prism")
3266             return anObj
3267
3268         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3269         #  i.e. all the space, transfixed by the base shape during its translation
3270         #  along the vector on the given distance in 2 Ways (forward/backward).
3271         #  @param theBase Base shape to be extruded.
3272         #  @param theDX, theDY, theDZ Directions of extrusion.
3273         #  @param theName Object name; when specified, this parameter is used
3274         #         for result publication in the study. Otherwise, if automatic
3275         #         publication is switched on, default value is used for result name.
3276         #
3277         #  @return New GEOM.GEOM_Object, containing the created prism.
3278         #
3279         #  @ref tui_creation_prism "Example"
3280         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3281             """
3282             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3283             i.e. all the space, transfixed by the base shape during its translation
3284             along the vector on the given distance in 2 Ways (forward/backward).
3285
3286             Parameters:
3287                 theBase Base shape to be extruded.
3288                 theDX, theDY, theDZ Directions of extrusion.
3289                 theName Object name; when specified, this parameter is used
3290                         for result publication in the study. Otherwise, if automatic
3291                         publication is switched on, default value is used for result name.
3292
3293             Returns:
3294                 New GEOM.GEOM_Object, containing the created prism.
3295             """
3296             # Example: see GEOM_TestAll.py
3297             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3298             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3299             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3300             anObj.SetParameters(Parameters)
3301             self._autoPublish(anObj, theName, "prism")
3302             return anObj
3303
3304         ## Create a shape by revolution of the base shape around the axis
3305         #  on the given angle, i.e. all the space, transfixed by the base
3306         #  shape during its rotation around the axis on the given angle.
3307         #  @param theBase Base shape to be rotated.
3308         #  @param theAxis Rotation axis.
3309         #  @param theAngle Rotation angle in radians.
3310         #  @param theName Object name; when specified, this parameter is used
3311         #         for result publication in the study. Otherwise, if automatic
3312         #         publication is switched on, default value is used for result name.
3313         #
3314         #  @return New GEOM.GEOM_Object, containing the created revolution.
3315         #
3316         #  @ref tui_creation_revolution "Example"
3317         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3318             """
3319             Create a shape by revolution of the base shape around the axis
3320             on the given angle, i.e. all the space, transfixed by the base
3321             shape during its rotation around the axis on the given angle.
3322
3323             Parameters:
3324                 theBase Base shape to be rotated.
3325                 theAxis Rotation axis.
3326                 theAngle Rotation angle in radians.
3327                 theName Object name; when specified, this parameter is used
3328                         for result publication in the study. Otherwise, if automatic
3329                         publication is switched on, default value is used for result name.
3330
3331             Returns: 
3332                 New GEOM.GEOM_Object, containing the created revolution.
3333             """
3334             # Example: see GEOM_TestAll.py
3335             theAngle,Parameters = ParseParameters(theAngle)
3336             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3337             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3338             anObj.SetParameters(Parameters)
3339             self._autoPublish(anObj, theName, "revolution")
3340             return anObj
3341
3342         ## Create a shape by revolution of the base shape around the axis
3343         #  on the given angle, i.e. all the space, transfixed by the base
3344         #  shape during its rotation around the axis on the given angle in
3345         #  both directions (forward/backward)
3346         #  @param theBase Base shape to be rotated.
3347         #  @param theAxis Rotation axis.
3348         #  @param theAngle Rotation angle in radians.
3349         #  @param theName Object name; when specified, this parameter is used
3350         #         for result publication in the study. Otherwise, if automatic
3351         #         publication is switched on, default value is used for result name.
3352         #
3353         #  @return New GEOM.GEOM_Object, containing the created revolution.
3354         #
3355         #  @ref tui_creation_revolution "Example"
3356         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3357             """
3358             Create a shape by revolution of the base shape around the axis
3359             on the given angle, i.e. all the space, transfixed by the base
3360             shape during its rotation around the axis on the given angle in
3361             both directions (forward/backward).
3362
3363             Parameters:
3364                 theBase Base shape to be rotated.
3365                 theAxis Rotation axis.
3366                 theAngle Rotation angle in radians.
3367                 theName Object name; when specified, this parameter is used
3368                         for result publication in the study. Otherwise, if automatic
3369                         publication is switched on, default value is used for result name.
3370
3371             Returns: 
3372                 New GEOM.GEOM_Object, containing the created revolution.
3373             """
3374             theAngle,Parameters = ParseParameters(theAngle)
3375             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3376             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3377             anObj.SetParameters(Parameters)
3378             self._autoPublish(anObj, theName, "revolution")
3379             return anObj
3380
3381         ## Create a filling from the given compound of contours.
3382         #  @param theShape the compound of contours
3383         #  @param theMinDeg a minimal degree of BSpline surface to create
3384         #  @param theMaxDeg a maximal degree of BSpline surface to create
3385         #  @param theTol2D a 2d tolerance to be reached
3386         #  @param theTol3D a 3d tolerance to be reached
3387         #  @param theNbIter a number of iteration of approximation algorithm
3388         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3389         #  @param isApprox if True, BSpline curves are generated in the process
3390         #                  of surface construction. By default it is False, that means
3391         #                  the surface is created using given curves. The usage of
3392         #                  Approximation makes the algorithm work slower, but allows
3393         #                  building the surface for rather complex cases.
3394         #  @param theName Object name; when specified, this parameter is used
3395         #         for result publication in the study. Otherwise, if automatic
3396         #         publication is switched on, default value is used for result name.
3397         #
3398         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3399         #
3400         #  @ref tui_creation_filling "Example"
3401         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3402                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3403             """
3404             Create a filling from the given compound of contours.
3405
3406             Parameters:
3407                 theShape the compound of contours
3408                 theMinDeg a minimal degree of BSpline surface to create
3409                 theMaxDeg a maximal degree of BSpline surface to create
3410                 theTol2D a 2d tolerance to be reached
3411                 theTol3D a 3d tolerance to be reached
3412                 theNbIter a number of iteration of approximation algorithm
3413                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3414                 isApprox if True, BSpline curves are generated in the process
3415                          of surface construction. By default it is False, that means
3416                          the surface is created using given curves. The usage of
3417                          Approximation makes the algorithm work slower, but allows
3418                          building the surface for rather complex cases
3419                 theName Object name; when specified, this parameter is used
3420                         for result publication in the study. Otherwise, if automatic
3421                         publication is switched on, default value is used for result name.
3422
3423             Returns: 
3424                 New GEOM.GEOM_Object, containing the created filling surface.
3425
3426             Example of usage:
3427                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3428             """
3429             # Example: see GEOM_TestAll.py
3430             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3431             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3432                                             theTol2D, theTol3D, theNbIter,
3433                                             theMethod, isApprox)
3434             RaiseIfFailed("MakeFilling", self.PrimOp)
3435             anObj.SetParameters(Parameters)
3436             self._autoPublish(anObj, theName, "filling")
3437             return anObj
3438
3439
3440         ## Create a filling from the given compound of contours.
3441         #  This method corresponds to MakeFilling with isApprox=True
3442         #  @param theShape the compound of contours
3443         #  @param theMinDeg a minimal degree of BSpline surface to create
3444         #  @param theMaxDeg a maximal degree of BSpline surface to create
3445         #  @param theTol3D a 3d tolerance to be reached
3446         #  @param theName Object name; when specified, this parameter is used
3447         #         for result publication in the study. Otherwise, if automatic
3448         #         publication is switched on, default value is used for result name.
3449         #
3450         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3451         #
3452         #  @ref tui_creation_filling "Example"
3453         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3454             """
3455             Create a filling from the given compound of contours.
3456             This method corresponds to MakeFilling with isApprox=True
3457
3458             Parameters:
3459                 theShape the compound of contours
3460                 theMinDeg a minimal degree of BSpline surface to create
3461                 theMaxDeg a maximal degree of BSpline surface to create
3462                 theTol3D a 3d tolerance to be reached
3463                 theName Object name; when specified, this parameter is used
3464                         for result publication in the study. Otherwise, if automatic
3465                         publication is switched on, default value is used for result name.
3466
3467             Returns: 
3468                 New GEOM.GEOM_Object, containing the created filling surface.
3469
3470             Example of usage:
3471                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3472             """
3473             # Example: see GEOM_TestAll.py
3474             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3475             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3476                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3477             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3478             anObj.SetParameters(Parameters)
3479             self._autoPublish(anObj, theName, "filling")
3480             return anObj
3481
3482         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3483         #  @param theSeqSections - set of specified sections.
3484         #  @param theModeSolid - mode defining building solid or shell
3485         #  @param thePreci - precision 3D used for smoothing
3486         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3487         #  @param theName Object name; when specified, this parameter is used
3488         #         for result publication in the study. Otherwise, if automatic
3489         #         publication is switched on, default value is used for result name.
3490         #
3491         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3492         #
3493         #  @ref swig_todo "Example"
3494         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3495             """
3496             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3497
3498             Parameters:
3499                 theSeqSections - set of specified sections.
3500                 theModeSolid - mode defining building solid or shell
3501                 thePreci - precision 3D used for smoothing
3502                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3503                 theName Object name; when specified, this parameter is used
3504                         for result publication in the study. Otherwise, if automatic
3505                         publication is switched on, default value is used for result name.
3506
3507             Returns:
3508                 New GEOM.GEOM_Object, containing the created shell or solid.
3509             """
3510             # Example: see GEOM_TestAll.py
3511             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3512             RaiseIfFailed("MakeThruSections", self.PrimOp)
3513             self._autoPublish(anObj, theName, "filling")
3514             return anObj
3515
3516         ## Create a shape by extrusion of the base shape along
3517         #  the path shape. The path shape can be a wire or an edge.
3518         #  @param theBase Base shape to be extruded.
3519         #  @param thePath Path shape to extrude the base shape along it.
3520         #  @param theName Object name; when specified, this parameter is used
3521         #         for result publication in the study. Otherwise, if automatic
3522         #         publication is switched on, default value is used for result name.
3523         #
3524         #  @return New GEOM.GEOM_Object, containing the created pipe.
3525         #
3526         #  @ref tui_creation_pipe "Example"
3527         def MakePipe(self, theBase, thePath, theName=None):
3528             """
3529             Create a shape by extrusion of the base shape along
3530             the path shape. The path shape can be a wire or an edge.
3531
3532             Parameters:
3533                 theBase Base shape to be extruded.
3534                 thePath Path shape to extrude the base shape along it.
3535                 theName Object name; when specified, this parameter is used
3536                         for result publication in the study. Otherwise, if automatic
3537                         publication is switched on, default value is used for result name.
3538
3539             Returns:
3540                 New GEOM.GEOM_Object, containing the created pipe.
3541             """
3542             # Example: see GEOM_TestAll.py
3543             anObj = self.PrimOp.MakePipe(theBase, thePath)
3544             RaiseIfFailed("MakePipe", self.PrimOp)
3545             self._autoPublish(anObj, theName, "pipe")
3546             return anObj
3547
3548         ## Create a shape by extrusion of the profile shape along
3549         #  the path shape. The path shape can be a wire or an edge.
3550         #  the several profiles can be specified in the several locations of path.
3551         #  @param theSeqBases - list of  Bases shape to be extruded.
3552         #  @param theLocations - list of locations on the path corresponding
3553         #                        specified list of the Bases shapes. Number of locations
3554         #                        should be equal to number of bases or list of locations can be empty.
3555         #  @param thePath - Path shape to extrude the base shape along it.
3556         #  @param theWithContact - the mode defining that the section is translated to be in
3557         #                          contact with the spine.
3558         #  @param theWithCorrection - defining that the section is rotated to be
3559         #                             orthogonal to the spine tangent in the correspondent point
3560         #  @param theName Object name; when specified, this parameter is used
3561         #         for result publication in the study. Otherwise, if automatic
3562         #         publication is switched on, default value is used for result name.
3563         #
3564         #  @return New GEOM.GEOM_Object, containing the created pipe.
3565         #
3566         #  @ref tui_creation_pipe_with_diff_sec "Example"
3567         def MakePipeWithDifferentSections(self, theSeqBases,
3568                                           theLocations, thePath,
3569                                           theWithContact, theWithCorrection, theName=None):
3570             """
3571             Create a shape by extrusion of the profile shape along
3572             the path shape. The path shape can be a wire or an edge.
3573             the several profiles can be specified in the several locations of path.
3574
3575             Parameters:
3576                 theSeqBases - list of  Bases shape to be extruded.
3577                 theLocations - list of locations on the path corresponding
3578                                specified list of the Bases shapes. Number of locations
3579                                should be equal to number of bases or list of locations can be empty.
3580                 thePath - Path shape to extrude the base shape along it.
3581                 theWithContact - the mode defining that the section is translated to be in
3582                                  contact with the spine(0/1)
3583                 theWithCorrection - defining that the section is rotated to be
3584                                     orthogonal to the spine tangent in the correspondent point (0/1)
3585                 theName Object name; when specified, this parameter is used
3586                         for result publication in the study. Otherwise, if automatic
3587                         publication is switched on, default value is used for result name.
3588
3589             Returns:
3590                 New GEOM.GEOM_Object, containing the created pipe.
3591             """
3592             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3593                                                               theLocations, thePath,
3594                                                               theWithContact, theWithCorrection)
3595             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3596             self._autoPublish(anObj, theName, "pipe")
3597             return anObj
3598
3599         ## Create a shape by extrusion of the profile shape along
3600         #  the path shape. The path shape can be a wire or a edge.
3601         #  the several profiles can be specified in the several locations of path.
3602         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3603         #                       shell or face. If number of faces in neighbour sections
3604         #                       aren't coincided result solid between such sections will
3605         #                       be created using external boundaries of this shells.
3606         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3607         #                          This list is used for searching correspondences between
3608         #                          faces in the sections. Size of this list must be equal
3609         #                          to size of list of base shapes.
3610         #  @param theLocations - list of locations on the path corresponding
3611         #                        specified list of the Bases shapes. Number of locations
3612         #                        should be equal to number of bases. First and last
3613         #                        locations must be coincided with first and last vertexes
3614         #                        of path correspondingly.
3615         #  @param thePath - Path shape to extrude the base shape along it.
3616         #  @param theWithContact - the mode defining that the section is translated to be in
3617         #                          contact with the spine.
3618         #  @param theWithCorrection - defining that the section is rotated to be
3619         #                             orthogonal to the spine tangent in the correspondent point
3620         #  @param theName Object name; when specified, this parameter is used
3621         #         for result publication in the study. Otherwise, if automatic
3622         #         publication is switched on, default value is used for result name.
3623         #
3624         #  @return New GEOM.GEOM_Object, containing the created solids.
3625         #
3626         #  @ref tui_creation_pipe_with_shell_sec "Example"
3627         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3628                                       theLocations, thePath,
3629                                       theWithContact, theWithCorrection, theName=None):
3630             """
3631             Create a shape by extrusion of the profile shape along
3632             the path shape. The path shape can be a wire or a edge.
3633             the several profiles can be specified in the several locations of path.
3634
3635             Parameters:
3636                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3637                               shell or face. If number of faces in neighbour sections
3638                               aren't coincided result solid between such sections will
3639                               be created using external boundaries of this shells.
3640                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3641                                  This list is used for searching correspondences between
3642                                  faces in the sections. Size of this list must be equal
3643                                  to size of list of base shapes.
3644                 theLocations - list of locations on the path corresponding
3645                                specified list of the Bases shapes. Number of locations
3646                                should be equal to number of bases. First and last
3647                                locations must be coincided with first and last vertexes
3648                                of path correspondingly.
3649                 thePath - Path shape to extrude the base shape along it.
3650                 theWithContact - the mode defining that the section is translated to be in
3651                                  contact with the spine (0/1)
3652                 theWithCorrection - defining that the section is rotated to be
3653                                     orthogonal to the spine tangent in the correspondent point (0/1)
3654                 theName Object name; when specified, this parameter is used
3655                         for result publication in the study. Otherwise, if automatic
3656                         publication is switched on, default value is used for result name.
3657
3658             Returns:                           
3659                 New GEOM.GEOM_Object, containing the created solids.
3660             """
3661             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3662                                                           theLocations, thePath,
3663                                                           theWithContact, theWithCorrection)
3664             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3665             self._autoPublish(anObj, theName, "pipe")
3666             return anObj
3667
3668         ## Create a shape by extrusion of the profile shape along
3669         #  the path shape. This function is used only for debug pipe
3670         #  functionality - it is a version of function MakePipeWithShellSections()
3671         #  which give a possibility to recieve information about
3672         #  creating pipe between each pair of sections step by step.
3673         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3674                                              theLocations, thePath,
3675                                              theWithContact, theWithCorrection, theName=None):
3676             """
3677             Create a shape by extrusion of the profile shape along
3678             the path shape. This function is used only for debug pipe
3679             functionality - it is a version of previous function
3680             geompy.MakePipeWithShellSections() which give a possibility to
3681             recieve information about creating pipe between each pair of
3682             sections step by step.
3683             """
3684             res = []
3685             nbsect = len(theSeqBases)
3686             nbsubsect = len(theSeqSubBases)
3687             #print "nbsect = ",nbsect
3688             for i in range(1,nbsect):
3689                 #print "  i = ",i
3690                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3691                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3692                 tmpSeqSubBases = []
3693                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3694                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3695                                                               tmpLocations, thePath,
3696                                                               theWithContact, theWithCorrection)
3697                 if self.PrimOp.IsDone() == 0:
3698                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3699                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3700                     break
3701                 else:
3702                     print "Pipe between ",i," and ",i+1," sections is OK"
3703                     res.append(anObj)
3704                     pass
3705                 pass
3706
3707             resc = self.MakeCompound(res)
3708             #resc = self.MakeSewing(res, 0.001)
3709             #print "resc: ",resc
3710             self._autoPublish(resc, theName, "pipe")
3711             return resc
3712
3713         ## Create solids between given sections
3714         #  @param theSeqBases - list of sections (shell or face).
3715         #  @param theLocations - list of corresponding vertexes
3716         #  @param theName Object name; when specified, this parameter is used
3717         #         for result publication in the study. Otherwise, if automatic
3718         #         publication is switched on, default value is used for result name.
3719         #
3720         #  @return New GEOM.GEOM_Object, containing the created solids.
3721         #
3722         #  @ref tui_creation_pipe_without_path "Example"
3723         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3724             """
3725             Create solids between given sections
3726
3727             Parameters:
3728                 theSeqBases - list of sections (shell or face).
3729                 theLocations - list of corresponding vertexes
3730                 theName Object name; when specified, this parameter is used
3731                         for result publication in the study. Otherwise, if automatic
3732                         publication is switched on, default value is used for result name.
3733
3734             Returns:
3735                 New GEOM.GEOM_Object, containing the created solids.
3736             """
3737             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3738             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3739             self._autoPublish(anObj, theName, "pipe")
3740             return anObj
3741
3742         ## Create a shape by extrusion of the base shape along
3743         #  the path shape with constant bi-normal direction along the given vector.
3744         #  The path shape can be a wire or an edge.
3745         #  @param theBase Base shape to be extruded.
3746         #  @param thePath Path shape to extrude the base shape along it.
3747         #  @param theVec Vector defines a constant binormal direction to keep the
3748         #                same angle beetween the direction and the sections
3749         #                along the sweep surface.
3750         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created pipe.
3755         #
3756         #  @ref tui_creation_pipe "Example"
3757         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3758             """
3759             Create a shape by extrusion of the base shape along
3760             the path shape with constant bi-normal direction along the given vector.
3761             The path shape can be a wire or an edge.
3762
3763             Parameters:
3764                 theBase Base shape to be extruded.
3765                 thePath Path shape to extrude the base shape along it.
3766                 theVec Vector defines a constant binormal direction to keep the
3767                        same angle beetween the direction and the sections
3768                        along the sweep surface.
3769                 theName Object name; when specified, this parameter is used
3770                         for result publication in the study. Otherwise, if automatic
3771                         publication is switched on, default value is used for result name.
3772
3773             Returns:              
3774                 New GEOM.GEOM_Object, containing the created pipe.
3775             """
3776             # Example: see GEOM_TestAll.py
3777             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3778             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3779             self._autoPublish(anObj, theName, "pipe")
3780             return anObj
3781               
3782         ## Makes a thick solid from a face or a shell
3783         #  @param theShape Face or Shell to be thicken
3784         #  @param theThickness Thickness of the resulting solid
3785         #  @param theName Object name; when specified, this parameter is used
3786         #         for result publication in the study. Otherwise, if automatic
3787         #         publication is switched on, default value is used for result name.
3788         #
3789         #  @return New GEOM.GEOM_Object, containing the created solid
3790         #
3791         def MakeThickSolid(self, theShape, theThickness, theName=None):
3792             """
3793             Make a thick solid from a face or a shell
3794
3795             Parameters:
3796                  theShape Face or Shell to be thicken
3797                  theThickness Thickness of the resulting solid
3798                  theName Object name; when specified, this parameter is used
3799                  for result publication in the study. Otherwise, if automatic
3800                  publication is switched on, default value is used for result name.
3801                  
3802             Returns:
3803                 New GEOM.GEOM_Object, containing the created solid
3804             """
3805             # Example: see GEOM_TestAll.py
3806             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3807             RaiseIfFailed("MakeThickening", self.PrimOp)
3808             self._autoPublish(anObj, theName, "pipe")
3809             return anObj
3810             
3811
3812         ## Modifies a face or a shell to make it a thick solid
3813         #  @param theShape Face or Shell to be thicken
3814         #  @param theThickness Thickness of the resulting solid
3815         #
3816         #  @return The modified shape
3817         #
3818         def Thicken(self, theShape, theThickness):
3819             """
3820             Modifies a face or a shell to make it a thick solid
3821
3822             Parameters:
3823                 theBase Base shape to be extruded.
3824                 thePath Path shape to extrude the base shape along it.
3825                 theName Object name; when specified, this parameter is used
3826                         for result publication in the study. Otherwise, if automatic
3827                         publication is switched on, default value is used for result name.
3828
3829             Returns:
3830                 The modified shape
3831             """
3832             # Example: see GEOM_TestAll.py
3833             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3834             RaiseIfFailed("MakeThickening", self.PrimOp)
3835             return anObj
3836
3837         ## Build a middle path of a pipe-like shape.
3838         #  The path shape can be a wire or an edge.
3839         #  @param theShape It can be closed or unclosed pipe-like shell
3840         #                  or a pipe-like solid.
3841         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3842         #                            should be wires or faces of theShape.
3843         #  @param theName Object name; when specified, this parameter is used
3844         #         for result publication in the study. Otherwise, if automatic
3845         #         publication is switched on, default value is used for result name.
3846         #
3847         #  @note It is not assumed that exact or approximate copy of theShape
3848         #        can be obtained by applying existing Pipe operation on the
3849         #        resulting "Path" wire taking theBase1 as the base - it is not
3850         #        always possible; though in some particular cases it might work
3851         #        it is not guaranteed. Thus, RestorePath function should not be
3852         #        considered as an exact reverse operation of the Pipe.
3853         #
3854         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3855         #                                source pipe's "path".
3856         #
3857         #  @ref tui_creation_pipe_path "Example"
3858         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3859             """
3860             Build a middle path of a pipe-like shape.
3861             The path shape can be a wire or an edge.
3862
3863             Parameters:
3864                 theShape It can be closed or unclosed pipe-like shell
3865                          or a pipe-like solid.
3866                 theBase1, theBase2 Two bases of the supposed pipe. This
3867                                    should be wires or faces of theShape.
3868                 theName Object name; when specified, this parameter is used
3869                         for result publication in the study. Otherwise, if automatic
3870                         publication is switched on, default value is used for result name.
3871
3872             Returns:
3873                 New GEOM_Object, containing an edge or wire that represent
3874                                  source pipe's path.
3875             """
3876             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3877             RaiseIfFailed("RestorePath", self.PrimOp)
3878             self._autoPublish(anObj, theName, "path")
3879             return anObj
3880
3881         ## Build a middle path of a pipe-like shape.
3882         #  The path shape can be a wire or an edge.
3883         #  @param theShape It can be closed or unclosed pipe-like shell
3884         #                  or a pipe-like solid.
3885         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3886         #                                should be lists of edges of theShape.
3887         #  @param theName Object name; when specified, this parameter is used
3888         #         for result publication in the study. Otherwise, if automatic
3889         #         publication is switched on, default value is used for result name.
3890         #
3891         #  @note It is not assumed that exact or approximate copy of theShape
3892         #        can be obtained by applying existing Pipe operation on the
3893         #        resulting "Path" wire taking theBase1 as the base - it is not
3894         #        always possible; though in some particular cases it might work
3895         #        it is not guaranteed. Thus, RestorePath function should not be
3896         #        considered as an exact reverse operation of the Pipe.
3897         #
3898         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3899         #                                source pipe's "path".
3900         #
3901         #  @ref tui_creation_pipe_path "Example"
3902         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3903             """
3904             Build a middle path of a pipe-like shape.
3905             The path shape can be a wire or an edge.
3906
3907             Parameters:
3908                 theShape It can be closed or unclosed pipe-like shell
3909                          or a pipe-like solid.
3910                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3911                                        should be lists of edges of theShape.
3912                 theName Object name; when specified, this parameter is used
3913                         for result publication in the study. Otherwise, if automatic
3914                         publication is switched on, default value is used for result name.
3915
3916             Returns:
3917                 New GEOM_Object, containing an edge or wire that represent
3918                                  source pipe's path.
3919             """
3920             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3921             RaiseIfFailed("RestorePath", self.PrimOp)
3922             self._autoPublish(anObj, theName, "path")
3923             return anObj
3924
3925         # end of l3_complex
3926         ## @}
3927
3928         ## @addtogroup l3_advanced
3929         ## @{
3930
3931         ## Create a linear edge with specified ends.
3932         #  @param thePnt1 Point for the first end of edge.
3933         #  @param thePnt2 Point for the second end of edge.
3934         #  @param theName Object name; when specified, this parameter is used
3935         #         for result publication in the study. Otherwise, if automatic
3936         #         publication is switched on, default value is used for result name.
3937         #
3938         #  @return New GEOM.GEOM_Object, containing the created edge.
3939         #
3940         #  @ref tui_creation_edge "Example"
3941         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3942             """
3943             Create a linear edge with specified ends.
3944
3945             Parameters:
3946                 thePnt1 Point for the first end of edge.
3947                 thePnt2 Point for the second end of edge.
3948                 theName Object name; when specified, this parameter is used
3949                         for result publication in the study. Otherwise, if automatic
3950                         publication is switched on, default value is used for result name.
3951
3952             Returns:           
3953                 New GEOM.GEOM_Object, containing the created edge.
3954             """
3955             # Example: see GEOM_TestAll.py
3956             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
3957             RaiseIfFailed("MakeEdge", self.ShapesOp)
3958             self._autoPublish(anObj, theName, "edge")
3959             return anObj
3960
3961         ## Create a new edge, corresponding to the given length on the given curve.
3962         #  @param theRefCurve The referenced curve (edge).
3963         #  @param theLength Length on the referenced curve. It can be negative.
3964         #  @param theStartPoint Any point can be selected for it, the new edge will begin
3965         #                       at the end of \a theRefCurve, close to the selected point.
3966         #                       If None, start from the first point of \a theRefCurve.
3967         #  @param theName Object name; when specified, this parameter is used
3968         #         for result publication in the study. Otherwise, if automatic
3969         #         publication is switched on, default value is used for result name.
3970         #
3971         #  @return New GEOM.GEOM_Object, containing the created edge.
3972         #
3973         #  @ref tui_creation_edge "Example"
3974         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
3975             """
3976             Create a new edge, corresponding to the given length on the given curve.
3977
3978             Parameters:
3979                 theRefCurve The referenced curve (edge).
3980                 theLength Length on the referenced curve. It can be negative.
3981                 theStartPoint Any point can be selected for it, the new edge will begin
3982                               at the end of theRefCurve, close to the selected point.
3983                               If None, start from the first point of theRefCurve.
3984                 theName Object name; when specified, this parameter is used
3985                         for result publication in the study. Otherwise, if automatic
3986                         publication is switched on, default value is used for result name.
3987
3988             Returns:              
3989                 New GEOM.GEOM_Object, containing the created edge.
3990             """
3991             # Example: see GEOM_TestAll.py
3992             theLength, Parameters = ParseParameters(theLength)
3993             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
3994             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
3995             anObj.SetParameters(Parameters)
3996             self._autoPublish(anObj, theName, "edge")
3997             return anObj
3998
3999         ## Create an edge from specified wire.
4000         #  @param theWire source Wire
4001         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4002         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4003         #  @param theName Object name; when specified, this parameter is used
4004         #         for result publication in the study. Otherwise, if automatic
4005         #         publication is switched on, default value is used for result name.
4006         #
4007         #  @return New GEOM.GEOM_Object, containing the created edge.
4008         #
4009         #  @ref tui_creation_edge "Example"
4010         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4011             """
4012             Create an edge from specified wire.
4013
4014             Parameters:
4015                 theWire source Wire
4016                 theLinearTolerance linear tolerance value (default = 1e-07)
4017                 theAngularTolerance angular tolerance value (default = 1e-12)
4018                 theName Object name; when specified, this parameter is used
4019                         for result publication in the study. Otherwise, if automatic
4020                         publication is switched on, default value is used for result name.
4021
4022             Returns:
4023                 New GEOM.GEOM_Object, containing the created edge.
4024             """
4025             # Example: see GEOM_TestAll.py
4026             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4027             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4028             self._autoPublish(anObj, theName, "edge")
4029             return anObj
4030
4031         ## Create a wire from the set of edges and wires.
4032         #  @param theEdgesAndWires List of edges and/or wires.
4033         #  @param theTolerance Maximum distance between vertices, that will be merged.
4034         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4035         #  @param theName Object name; when specified, this parameter is used
4036         #         for result publication in the study. Otherwise, if automatic
4037         #         publication is switched on, default value is used for result name.
4038         #
4039         #  @return New GEOM.GEOM_Object, containing the created wire.
4040         #
4041         #  @ref tui_creation_wire "Example"
4042         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4043             """
4044             Create a wire from the set of edges and wires.
4045
4046             Parameters:
4047                 theEdgesAndWires List of edges and/or wires.
4048                 theTolerance Maximum distance between vertices, that will be merged.
4049                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4050                 theName Object name; when specified, this parameter is used
4051                         for result publication in the study. Otherwise, if automatic
4052                         publication is switched on, default value is used for result name.
4053
4054             Returns:                    
4055                 New GEOM.GEOM_Object, containing the created wire.
4056             """
4057             # Example: see GEOM_TestAll.py
4058             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4059             RaiseIfFailed("MakeWire", self.ShapesOp)
4060             self._autoPublish(anObj, theName, "wire")
4061             return anObj
4062
4063         ## Create a face on the given wire.
4064         #  @param theWire closed Wire or Edge to build the face on.
4065         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4066         #                        If the tolerance of the obtained planar face is less
4067         #                        than 1e-06, this face will be returned, otherwise the
4068         #                        algorithm tries to build any suitable face on the given
4069         #                        wire and prints a warning message.
4070         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created face.
4075         #
4076         #  @ref tui_creation_face "Example"
4077         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4078             """
4079             Create a face on the given wire.
4080
4081             Parameters:
4082                 theWire closed Wire or Edge to build the face on.
4083                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4084                                If the tolerance of the obtained planar face is less
4085                                than 1e-06, this face will be returned, otherwise the
4086                                algorithm tries to build any suitable face on the given
4087                                wire and prints a warning message.
4088                 theName Object name; when specified, this parameter is used
4089                         for result publication in the study. Otherwise, if automatic
4090                         publication is switched on, default value is used for result name.
4091
4092             Returns:
4093                 New GEOM.GEOM_Object, containing the created face.
4094             """
4095             # Example: see GEOM_TestAll.py
4096             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4097             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4098                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4099             else:
4100                 RaiseIfFailed("MakeFace", self.ShapesOp)
4101             self._autoPublish(anObj, theName, "face")
4102             return anObj
4103
4104         ## Create a face on the given wires set.
4105         #  @param theWires List of closed wires or edges to build the face on.
4106         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4107         #                        If the tolerance of the obtained planar face is less
4108         #                        than 1e-06, this face will be returned, otherwise the
4109         #                        algorithm tries to build any suitable face on the given
4110         #                        wire and prints a warning message.
4111         #  @param theName Object name; when specified, this parameter is used
4112         #         for result publication in the study. Otherwise, if automatic
4113         #         publication is switched on, default value is used for result name.
4114         #
4115         #  @return New GEOM.GEOM_Object, containing the created face.
4116         #
4117         #  @ref tui_creation_face "Example"
4118         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4119             """
4120             Create a face on the given wires set.
4121
4122             Parameters:
4123                 theWires List of closed wires or edges to build the face on.
4124                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4125                                If the tolerance of the obtained planar face is less
4126                                than 1e-06, this face will be returned, otherwise the
4127                                algorithm tries to build any suitable face on the given
4128                                wire and prints a warning message.
4129                 theName Object name; when specified, this parameter is used
4130                         for result publication in the study. Otherwise, if automatic
4131                         publication is switched on, default value is used for result name.
4132
4133             Returns: 
4134                 New GEOM.GEOM_Object, containing the created face.
4135             """
4136             # Example: see GEOM_TestAll.py
4137             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4138             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4139                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4140             else:
4141                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4142             self._autoPublish(anObj, theName, "face")
4143             return anObj
4144
4145         ## See MakeFaceWires() method for details.
4146         #
4147         #  @ref tui_creation_face "Example 1"
4148         #  \n @ref swig_MakeFaces  "Example 2"
4149         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4150             """
4151             See geompy.MakeFaceWires() method for details.
4152             """
4153             # Example: see GEOM_TestOthers.py
4154             # note: auto-publishing is done in self.MakeFaceWires()
4155             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4156             return anObj
4157
4158         ## Create a shell from the set of faces and shells.
4159         #  @param theFacesAndShells List of faces and/or shells.
4160         #  @param theName Object name; when specified, this parameter is used
4161         #         for result publication in the study. Otherwise, if automatic
4162         #         publication is switched on, default value is used for result name.
4163         #
4164         #  @return New GEOM.GEOM_Object, containing the created shell.
4165         #
4166         #  @ref tui_creation_shell "Example"
4167         def MakeShell(self, theFacesAndShells, theName=None):
4168             """
4169             Create a shell from the set of faces and shells.
4170
4171             Parameters:
4172                 theFacesAndShells List of faces and/or shells.
4173                 theName Object name; when specified, this parameter is used
4174                         for result publication in the study. Otherwise, if automatic
4175                         publication is switched on, default value is used for result name.
4176
4177             Returns:
4178                 New GEOM.GEOM_Object, containing the created shell.
4179             """
4180             # Example: see GEOM_TestAll.py
4181             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4182             RaiseIfFailed("MakeShell", self.ShapesOp)
4183             self._autoPublish(anObj, theName, "shell")
4184             return anObj
4185
4186         ## Create a solid, bounded by the given shells.
4187         #  @param theShells Sequence of bounding shells.
4188         #  @param theName Object name; when specified, this parameter is used
4189         #         for result publication in the study. Otherwise, if automatic
4190         #         publication is switched on, default value is used for result name.
4191         #
4192         #  @return New GEOM.GEOM_Object, containing the created solid.
4193         #
4194         #  @ref tui_creation_solid "Example"
4195         def MakeSolid(self, theShells, theName=None):
4196             """
4197             Create a solid, bounded by the given shells.
4198
4199             Parameters:
4200                 theShells Sequence of bounding shells.
4201                 theName Object name; when specified, this parameter is used
4202                         for result publication in the study. Otherwise, if automatic
4203                         publication is switched on, default value is used for result name.
4204
4205             Returns:
4206                 New GEOM.GEOM_Object, containing the created solid.
4207             """
4208             # Example: see GEOM_TestAll.py
4209             if len(theShells) == 1:
4210                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4211                 #if len(descr) > 0:
4212                 #    raise RuntimeError, "MakeSolidShells : " + descr
4213                 if descr == "WRN_SHAPE_UNCLOSED":
4214                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4215             anObj = self.ShapesOp.MakeSolidShells(theShells)
4216             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4217             self._autoPublish(anObj, theName, "solid")
4218             return anObj
4219
4220         ## Create a compound of the given shapes.
4221         #  @param theShapes List of shapes to put in compound.
4222         #  @param theName Object name; when specified, this parameter is used
4223         #         for result publication in the study. Otherwise, if automatic
4224         #         publication is switched on, default value is used for result name.
4225         #
4226         #  @return New GEOM.GEOM_Object, containing the created compound.
4227         #
4228         #  @ref tui_creation_compound "Example"
4229         def MakeCompound(self, theShapes, theName=None):
4230             """
4231             Create a compound of the given shapes.
4232
4233             Parameters:
4234                 theShapes List of shapes to put in compound.
4235                 theName Object name; when specified, this parameter is used
4236                         for result publication in the study. Otherwise, if automatic
4237                         publication is switched on, default value is used for result name.
4238
4239             Returns:
4240                 New GEOM.GEOM_Object, containing the created compound.
4241             """
4242             # Example: see GEOM_TestAll.py
4243             anObj = self.ShapesOp.MakeCompound(theShapes)
4244             RaiseIfFailed("MakeCompound", self.ShapesOp)
4245             self._autoPublish(anObj, theName, "compound")
4246             return anObj
4247
4248         # end of l3_advanced
4249         ## @}
4250
4251         ## @addtogroup l2_measure
4252         ## @{
4253
4254         ## Gives quantity of faces in the given shape.
4255         #  @param theShape Shape to count faces of.
4256         #  @return Quantity of faces.
4257         #
4258         #  @ref swig_NumberOf "Example"
4259         def NumberOfFaces(self, theShape):
4260             """
4261             Gives quantity of faces in the given shape.
4262
4263             Parameters:
4264                 theShape Shape to count faces of.
4265
4266             Returns:    
4267                 Quantity of faces.
4268             """
4269             # Example: see GEOM_TestOthers.py
4270             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4271             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4272             return nb_faces
4273
4274         ## Gives quantity of edges in the given shape.
4275         #  @param theShape Shape to count edges of.
4276         #  @return Quantity of edges.
4277         #
4278         #  @ref swig_NumberOf "Example"
4279         def NumberOfEdges(self, theShape):
4280             """
4281             Gives quantity of edges in the given shape.
4282
4283             Parameters:
4284                 theShape Shape to count edges of.
4285
4286             Returns:    
4287                 Quantity of edges.
4288             """
4289             # Example: see GEOM_TestOthers.py
4290             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4291             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4292             return nb_edges
4293
4294         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4295         #  @param theShape Shape to count sub-shapes of.
4296         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4297         #  @return Quantity of sub-shapes of given type.
4298         #
4299         #  @ref swig_NumberOf "Example"
4300         def NumberOfSubShapes(self, theShape, theShapeType):
4301             """
4302             Gives quantity of sub-shapes of type theShapeType in the given shape.
4303
4304             Parameters:
4305                 theShape Shape to count sub-shapes of.
4306                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4307
4308             Returns:
4309                 Quantity of sub-shapes of given type.
4310             """
4311             # Example: see GEOM_TestOthers.py
4312             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4313             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4314             return nb_ss
4315
4316         ## Gives quantity of solids in the given shape.
4317         #  @param theShape Shape to count solids in.
4318         #  @return Quantity of solids.
4319         #
4320         #  @ref swig_NumberOf "Example"
4321         def NumberOfSolids(self, theShape):
4322             """
4323             Gives quantity of solids in the given shape.
4324
4325             Parameters:
4326                 theShape Shape to count solids in.
4327
4328             Returns:
4329                 Quantity of solids.
4330             """
4331             # Example: see GEOM_TestOthers.py
4332             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4333             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4334             return nb_solids
4335
4336         # end of l2_measure
4337         ## @}
4338
4339         ## @addtogroup l3_healing
4340         ## @{
4341
4342         ## Reverses an orientation the given shape.
4343         #  @param theShape Shape to be reversed.
4344         #  @param theName Object name; when specified, this parameter is used
4345         #         for result publication in the study. Otherwise, if automatic
4346         #         publication is switched on, default value is used for result name.
4347         #
4348         #  @return The reversed copy of theShape.
4349         #
4350         #  @ref swig_ChangeOrientation "Example"
4351         def ChangeOrientation(self, theShape, theName=None):
4352             """
4353             Reverses an orientation the given shape.
4354
4355             Parameters:
4356                 theShape Shape to be reversed.
4357                 theName Object name; when specified, this parameter is used
4358                         for result publication in the study. Otherwise, if automatic
4359                         publication is switched on, default value is used for result name.
4360
4361             Returns:   
4362                 The reversed copy of theShape.
4363             """
4364             # Example: see GEOM_TestAll.py
4365             anObj = self.ShapesOp.ChangeOrientation(theShape)
4366             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4367             self._autoPublish(anObj, theName, "reversed")
4368             return anObj
4369
4370         ## See ChangeOrientation() method for details.
4371         #
4372         #  @ref swig_OrientationChange "Example"
4373         def OrientationChange(self, theShape, theName=None):
4374             """
4375             See geompy.ChangeOrientation method for details.
4376             """
4377             # Example: see GEOM_TestOthers.py
4378             # note: auto-publishing is done in self.ChangeOrientation()
4379             anObj = self.ChangeOrientation(theShape, theName)
4380             return anObj
4381
4382         # end of l3_healing
4383         ## @}
4384
4385         ## @addtogroup l4_obtain
4386         ## @{
4387
4388         ## Retrieve all free faces from the given shape.
4389         #  Free face is a face, which is not shared between two shells of the shape.
4390         #  @param theShape Shape to find free faces in.
4391         #  @return List of IDs of all free faces, contained in theShape.
4392         #
4393         #  @ref tui_measurement_tools_page "Example"
4394         def GetFreeFacesIDs(self,theShape):
4395             """
4396             Retrieve all free faces from the given shape.
4397             Free face is a face, which is not shared between two shells of the shape.
4398
4399             Parameters:
4400                 theShape Shape to find free faces in.
4401
4402             Returns:
4403                 List of IDs of all free faces, contained in theShape.
4404             """
4405             # Example: see GEOM_TestOthers.py
4406             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4407             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4408             return anIDs
4409
4410         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4411         #  @param theShape1 Shape to find sub-shapes in.
4412         #  @param theShape2 Shape to find shared sub-shapes with.
4413         #  @param theShapeType Type of sub-shapes to be retrieved.
4414         #  @param theName Object name; when specified, this parameter is used
4415         #         for result publication in the study. Otherwise, if automatic
4416         #         publication is switched on, default value is used for result name.
4417         #
4418         #  @return List of sub-shapes of theShape1, shared with theShape2.
4419         #
4420         #  @ref swig_GetSharedShapes "Example"
4421         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4422             """
4423             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4424
4425             Parameters:
4426                 theShape1 Shape to find sub-shapes in.
4427                 theShape2 Shape to find shared sub-shapes with.
4428                 theShapeType Type of sub-shapes to be retrieved.
4429                 theName Object name; when specified, this parameter is used
4430                         for result publication in the study. Otherwise, if automatic
4431                         publication is switched on, default value is used for result name.
4432
4433             Returns:
4434                 List of sub-shapes of theShape1, shared with theShape2.
4435             """
4436             # Example: see GEOM_TestOthers.py
4437             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4438             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4439             self._autoPublish(aList, theName, "shared")
4440             return aList
4441
4442         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4443         #  @param theShapes Shapes to find common sub-shapes of.
4444         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4445         #  @param theName Object name; when specified, this parameter is used
4446         #         for result publication in the study. Otherwise, if automatic
4447         #         publication is switched on, default value is used for result name.
4448         #
4449         #  @return List of objects, that are sub-shapes of all given shapes.
4450         #
4451         #  @ref swig_GetSharedShapes "Example"
4452         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4453             """
4454             Get all sub-shapes, shared by all shapes in the list theShapes.
4455
4456             Parameters:
4457                 theShapes Shapes to find common sub-shapes of.
4458                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4459                 theName Object name; when specified, this parameter is used
4460                         for result publication in the study. Otherwise, if automatic
4461                         publication is switched on, default value is used for result name.
4462
4463             Returns:    
4464                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4465             """
4466             # Example: see GEOM_TestOthers.py
4467             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4468             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4469             self._autoPublish(aList, theName, "shared")
4470             return aList
4471
4472         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4473         #  situated relatively the specified plane by the certain way,
4474         #  defined through <VAR>theState</VAR> parameter.
4475         #  @param theShape Shape to find sub-shapes of.
4476         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4477         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4478         #                direction and location of the plane to find shapes on.
4479         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4480         #  @param theName Object name; when specified, this parameter is used
4481         #         for result publication in the study. Otherwise, if automatic
4482         #         publication is switched on, default value is used for result name.
4483         #
4484         #  @return List of all found sub-shapes.
4485         #
4486         #  @ref swig_GetShapesOnPlane "Example"
4487         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4488             """
4489             Find in theShape all sub-shapes of type theShapeType,
4490             situated relatively the specified plane by the certain way,
4491             defined through theState parameter.
4492
4493             Parameters:
4494                 theShape Shape to find sub-shapes of.
4495                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4496                 theAx1 Vector (or line, or linear edge), specifying normal
4497                        direction and location of the plane to find shapes on.
4498                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4499                 theName Object name; when specified, this parameter is used
4500                         for result publication in the study. Otherwise, if automatic
4501                         publication is switched on, default value is used for result name.
4502
4503             Returns:
4504                 List of all found sub-shapes.
4505             """
4506             # Example: see GEOM_TestOthers.py
4507             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4508             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4509             self._autoPublish(aList, theName, "shapeOnPlane")
4510             return aList
4511
4512         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4513         #  situated relatively the specified plane by the certain way,
4514         #  defined through <VAR>theState</VAR> parameter.
4515         #  @param theShape Shape to find sub-shapes of.
4516         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4517         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4518         #                direction and location of the plane to find shapes on.
4519         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4520         #
4521         #  @return List of all found sub-shapes indices.
4522         #
4523         #  @ref swig_GetShapesOnPlaneIDs "Example"
4524         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4525             """
4526             Find in theShape all sub-shapes of type theShapeType,
4527             situated relatively the specified plane by the certain way,
4528             defined through theState parameter.
4529
4530             Parameters:
4531                 theShape Shape to find sub-shapes of.
4532                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4533                 theAx1 Vector (or line, or linear edge), specifying normal
4534                        direction and location of the plane to find shapes on.
4535                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4536
4537             Returns:
4538                 List of all found sub-shapes indices.
4539             """
4540             # Example: see GEOM_TestOthers.py
4541             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4542             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4543             return aList
4544
4545         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4546         #  situated relatively the specified plane by the certain way,
4547         #  defined through <VAR>theState</VAR> parameter.
4548         #  @param theShape Shape to find sub-shapes of.
4549         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4550         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4551         #                direction of the plane to find shapes on.
4552         #  @param thePnt Point specifying location of the plane to find shapes on.
4553         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4554         #  @param theName Object name; when specified, this parameter is used
4555         #         for result publication in the study. Otherwise, if automatic
4556         #         publication is switched on, default value is used for result name.
4557         #
4558         #  @return List of all found sub-shapes.
4559         #
4560         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4561         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4562             """
4563             Find in theShape all sub-shapes of type theShapeType,
4564             situated relatively the specified plane by the certain way,
4565             defined through theState parameter.
4566
4567             Parameters:
4568                 theShape Shape to find sub-shapes of.
4569                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4570                 theAx1 Vector (or line, or linear edge), specifying normal
4571                        direction and location of the plane to find shapes on.
4572                 thePnt Point specifying location of the plane to find shapes on.
4573                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4574                 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             Returns:
4579                 List of all found sub-shapes.
4580             """
4581             # Example: see GEOM_TestOthers.py
4582             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4583                                                                theAx1, thePnt, theState)
4584             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4585             self._autoPublish(aList, theName, "shapeOnPlane")
4586             return aList
4587
4588         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4589         #  situated relatively the specified plane by the certain way,
4590         #  defined through <VAR>theState</VAR> parameter.
4591         #  @param theShape Shape to find sub-shapes of.
4592         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4593         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4594         #                direction of the plane to find shapes on.
4595         #  @param thePnt Point specifying location of the plane to find shapes on.
4596         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4597         #
4598         #  @return List of all found sub-shapes indices.
4599         #
4600         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4601         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4602             """
4603             Find in theShape all sub-shapes of type theShapeType,
4604             situated relatively the specified plane by the certain way,
4605             defined through theState parameter.
4606
4607             Parameters:
4608                 theShape Shape to find sub-shapes of.
4609                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4610                 theAx1 Vector (or line, or linear edge), specifying normal
4611                        direction and location of the plane to find shapes on.
4612                 thePnt Point specifying location of the plane to find shapes on.
4613                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4614
4615             Returns:
4616                 List of all found sub-shapes indices.
4617             """
4618             # Example: see GEOM_TestOthers.py
4619             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4620                                                                   theAx1, thePnt, theState)
4621             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4622             return aList
4623
4624         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4625         #  the specified cylinder by the certain way, defined through \a theState parameter.
4626         #  @param theShape Shape to find sub-shapes of.
4627         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4628         #  @param theAxis Vector (or line, or linear edge), specifying
4629         #                 axis of the cylinder to find shapes on.
4630         #  @param theRadius Radius of the cylinder to find shapes on.
4631         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4632         #  @param theName Object name; when specified, this parameter is used
4633         #         for result publication in the study. Otherwise, if automatic
4634         #         publication is switched on, default value is used for result name.
4635         #
4636         #  @return List of all found sub-shapes.
4637         #
4638         #  @ref swig_GetShapesOnCylinder "Example"
4639         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4640             """
4641             Find in theShape all sub-shapes of type theShapeType, situated relatively
4642             the specified cylinder by the certain way, defined through theState parameter.
4643
4644             Parameters:
4645                 theShape Shape to find sub-shapes of.
4646                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4647                 theAxis Vector (or line, or linear edge), specifying
4648                         axis of the cylinder to find shapes on.
4649                 theRadius Radius of the cylinder to find shapes on.
4650                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4651                 theName Object name; when specified, this parameter is used
4652                         for result publication in the study. Otherwise, if automatic
4653                         publication is switched on, default value is used for result name.
4654
4655             Returns:
4656                 List of all found sub-shapes.
4657             """
4658             # Example: see GEOM_TestOthers.py
4659             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4660             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4661             self._autoPublish(aList, theName, "shapeOnCylinder")
4662             return aList
4663
4664         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4665         #  the specified cylinder by the certain way, defined through \a theState parameter.
4666         #  @param theShape Shape to find sub-shapes of.
4667         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4668         #  @param theAxis Vector (or line, or linear edge), specifying
4669         #                 axis of the cylinder to find shapes on.
4670         #  @param theRadius Radius of the cylinder to find shapes on.
4671         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4672         #
4673         #  @return List of all found sub-shapes indices.
4674         #
4675         #  @ref swig_GetShapesOnCylinderIDs "Example"
4676         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4677             """
4678             Find in theShape all sub-shapes of type theShapeType, situated relatively
4679             the specified cylinder by the certain way, defined through theState parameter.
4680
4681             Parameters:
4682                 theShape Shape to find sub-shapes of.
4683                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4684                 theAxis Vector (or line, or linear edge), specifying
4685                         axis of the cylinder to find shapes on.
4686                 theRadius Radius of the cylinder to find shapes on.
4687                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4688
4689             Returns:
4690                 List of all found sub-shapes indices.
4691             """
4692             # Example: see GEOM_TestOthers.py
4693             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4694             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4695             return aList
4696
4697         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4698         #  the specified cylinder by the certain way, defined through \a theState parameter.
4699         #  @param theShape Shape to find sub-shapes of.
4700         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4701         #  @param theAxis Vector (or line, or linear edge), specifying
4702         #                 axis of the cylinder to find shapes on.
4703         #  @param thePnt Point specifying location of the bottom of the cylinder.
4704         #  @param theRadius Radius of the cylinder to find shapes on.
4705         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4706         #  @param theName Object name; when specified, this parameter is used
4707         #         for result publication in the study. Otherwise, if automatic
4708         #         publication is switched on, default value is used for result name.
4709         #
4710         #  @return List of all found sub-shapes.
4711         #
4712         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4713         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4714             """
4715             Find in theShape all sub-shapes of type theShapeType, situated relatively
4716             the specified cylinder by the certain way, defined through theState parameter.
4717
4718             Parameters:
4719                 theShape Shape to find sub-shapes of.
4720                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4721                 theAxis Vector (or line, or linear edge), specifying
4722                         axis of the cylinder to find shapes on.
4723                 theRadius Radius of the cylinder to find shapes on.
4724                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4725                 theName Object name; when specified, this parameter is used
4726                         for result publication in the study. Otherwise, if automatic
4727                         publication is switched on, default value is used for result name.
4728
4729             Returns:
4730                 List of all found sub-shapes.
4731             """
4732             # Example: see GEOM_TestOthers.py
4733             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4734             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4735             self._autoPublish(aList, theName, "shapeOnCylinder")
4736             return aList
4737
4738         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4739         #  the specified cylinder by the certain way, defined through \a theState parameter.
4740         #  @param theShape Shape to find sub-shapes of.
4741         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4742         #  @param theAxis Vector (or line, or linear edge), specifying
4743         #                 axis of the cylinder to find shapes on.
4744         #  @param thePnt Point specifying location of the bottom of the cylinder.
4745         #  @param theRadius Radius of the cylinder to find shapes on.
4746         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4747         #
4748         #  @return List of all found sub-shapes indices
4749         #
4750         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4751         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4752             """
4753             Find in theShape all sub-shapes of type theShapeType, situated relatively
4754             the specified cylinder by the certain way, defined through theState parameter.
4755
4756             Parameters:
4757                 theShape Shape to find sub-shapes of.
4758                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4759                 theAxis Vector (or line, or linear edge), specifying
4760                         axis of the cylinder to find shapes on.
4761                 theRadius Radius of the cylinder to find shapes on.
4762                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4763
4764             Returns:
4765                 List of all found sub-shapes indices.            
4766             """
4767             # Example: see GEOM_TestOthers.py
4768             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4769             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4770             return aList
4771
4772         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4773         #  the specified sphere by the certain way, defined through \a theState parameter.
4774         #  @param theShape Shape to find sub-shapes of.
4775         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4776         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4777         #  @param theRadius Radius of the sphere to find shapes on.
4778         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4779         #  @param theName Object name; when specified, this parameter is used
4780         #         for result publication in the study. Otherwise, if automatic
4781         #         publication is switched on, default value is used for result name.
4782         #
4783         #  @return List of all found sub-shapes.
4784         #
4785         #  @ref swig_GetShapesOnSphere "Example"
4786         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4787             """
4788             Find in theShape all sub-shapes of type theShapeType, situated relatively
4789             the specified sphere by the certain way, defined through theState parameter.
4790
4791             Parameters:
4792                 theShape Shape to find sub-shapes of.
4793                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4794                 theCenter Point, specifying center of the sphere to find shapes on.
4795                 theRadius Radius of the sphere to find shapes on.
4796                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4797                 theName Object name; when specified, this parameter is used
4798                         for result publication in the study. Otherwise, if automatic
4799                         publication is switched on, default value is used for result name.
4800
4801             Returns:
4802                 List of all found sub-shapes.
4803             """
4804             # Example: see GEOM_TestOthers.py
4805             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4806             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4807             self._autoPublish(aList, theName, "shapeOnSphere")
4808             return aList
4809
4810         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4811         #  the specified sphere by the certain way, defined through \a theState parameter.
4812         #  @param theShape Shape to find sub-shapes of.
4813         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4814         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4815         #  @param theRadius Radius of the sphere to find shapes on.
4816         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4817         #
4818         #  @return List of all found sub-shapes indices.
4819         #
4820         #  @ref swig_GetShapesOnSphereIDs "Example"
4821         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4822             """
4823             Find in theShape all sub-shapes of type theShapeType, situated relatively
4824             the specified sphere by the certain way, defined through theState parameter.
4825
4826             Parameters:
4827                 theShape Shape to find sub-shapes of.
4828                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4829                 theCenter Point, specifying center of the sphere to find shapes on.
4830                 theRadius Radius of the sphere to find shapes on.
4831                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4832
4833             Returns:
4834                 List of all found sub-shapes indices.
4835             """
4836             # Example: see GEOM_TestOthers.py
4837             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4838             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4839             return aList
4840
4841         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4842         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4843         #  @param theShape Shape to find sub-shapes of.
4844         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4845         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4846         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4847         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4848         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4849         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4850         #  @param theName Object name; when specified, this parameter is used
4851         #         for result publication in the study. Otherwise, if automatic
4852         #         publication is switched on, default value is used for result name.
4853         #
4854         #  @return List of all found sub-shapes.
4855         #
4856         #  @ref swig_GetShapesOnQuadrangle "Example"
4857         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4858                                   theTopLeftPoint, theTopRigthPoint,
4859                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4860             """
4861             Find in theShape all sub-shapes of type theShapeType, situated relatively
4862             the specified quadrangle by the certain way, defined through theState parameter.
4863
4864             Parameters:
4865                 theShape Shape to find sub-shapes of.
4866                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4867                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4868                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4869                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4870                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4871                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4872                 theName Object name; when specified, this parameter is used
4873                         for result publication in the study. Otherwise, if automatic
4874                         publication is switched on, default value is used for result name.
4875
4876             Returns:
4877                 List of all found sub-shapes.
4878             """
4879             # Example: see GEOM_TestOthers.py
4880             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4881                                                         theTopLeftPoint, theTopRigthPoint,
4882                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4883             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4884             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4885             return aList
4886
4887         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4888         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4889         #  @param theShape Shape to find sub-shapes of.
4890         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4891         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4892         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4893         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4894         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4895         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4896         #
4897         #  @return List of all found sub-shapes indices.
4898         #
4899         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4900         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4901                                      theTopLeftPoint, theTopRigthPoint,
4902                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4903             """
4904             Find in theShape all sub-shapes of type theShapeType, situated relatively
4905             the specified quadrangle by the certain way, defined through theState parameter.
4906
4907             Parameters:
4908                 theShape Shape to find sub-shapes of.
4909                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4910                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4911                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4912                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4913                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4914                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4915
4916             Returns:
4917                 List of all found sub-shapes indices.
4918             """
4919
4920             # Example: see GEOM_TestOthers.py
4921             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4922                                                            theTopLeftPoint, theTopRigthPoint,
4923                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4924             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4925             return aList
4926
4927         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4928         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4929         #  @param theBox Shape for relative comparing.
4930         #  @param theShape Shape to find sub-shapes of.
4931         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4932         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4933         #  @param theName Object name; when specified, this parameter is used
4934         #         for result publication in the study. Otherwise, if automatic
4935         #         publication is switched on, default value is used for result name.
4936         #
4937         #  @return List of all found sub-shapes.
4938         #
4939         #  @ref swig_GetShapesOnBox "Example"
4940         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4941             """
4942             Find in theShape all sub-shapes of type theShapeType, situated relatively
4943             the specified theBox by the certain way, defined through theState parameter.
4944
4945             Parameters:
4946                 theBox Shape for relative comparing.
4947                 theShape Shape to find sub-shapes of.
4948                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4949                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4950                 theName Object name; when specified, this parameter is used
4951                         for result publication in the study. Otherwise, if automatic
4952                         publication is switched on, default value is used for result name.
4953
4954             Returns:
4955                 List of all found sub-shapes.
4956             """
4957             # Example: see GEOM_TestOthers.py
4958             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
4959             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
4960             self._autoPublish(aList, theName, "shapeOnBox")
4961             return aList
4962
4963         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4964         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4965         #  @param theBox Shape for relative comparing.
4966         #  @param theShape Shape to find sub-shapes of.
4967         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4968         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4969         #
4970         #  @return List of all found sub-shapes indices.
4971         #
4972         #  @ref swig_GetShapesOnBoxIDs "Example"
4973         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
4974             """
4975             Find in theShape all sub-shapes of type theShapeType, situated relatively
4976             the specified theBox by the certain way, defined through theState parameter.
4977
4978             Parameters:
4979                 theBox Shape for relative comparing.
4980                 theShape Shape to find sub-shapes of.
4981                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4982                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4983
4984             Returns:
4985                 List of all found sub-shapes indices.
4986             """
4987             # Example: see GEOM_TestOthers.py
4988             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
4989             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
4990             return aList
4991
4992         ## Find in \a theShape all sub-shapes of type \a theShapeType,
4993         #  situated relatively the specified \a theCheckShape by the
4994         #  certain way, defined through \a theState parameter.
4995         #  @param theCheckShape Shape for relative comparing. It must be a solid.
4996         #  @param theShape Shape to find sub-shapes of.
4997         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
4998         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4999         #  @param theName Object name; when specified, this parameter is used
5000         #         for result publication in the study. Otherwise, if automatic
5001         #         publication is switched on, default value is used for result name.
5002         #
5003         #  @return List of all found sub-shapes.
5004         #
5005         #  @ref swig_GetShapesOnShape "Example"
5006         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5007             """
5008             Find in theShape all sub-shapes of type theShapeType,
5009             situated relatively the specified theCheckShape by the
5010             certain way, defined through theState parameter.
5011
5012             Parameters:
5013                 theCheckShape Shape for relative comparing. It must be a solid.
5014                 theShape Shape to find sub-shapes of.
5015                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5016                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5017                 theName Object name; when specified, this parameter is used
5018                         for result publication in the study. Otherwise, if automatic
5019                         publication is switched on, default value is used for result name.
5020
5021             Returns:
5022                 List of all found sub-shapes.
5023             """
5024             # Example: see GEOM_TestOthers.py
5025             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5026                                                    theShapeType, theState)
5027             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5028             self._autoPublish(aList, theName, "shapeOnShape")
5029             return aList
5030
5031         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5032         #  situated relatively the specified \a theCheckShape by the
5033         #  certain way, defined through \a theState parameter.
5034         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5035         #  @param theShape Shape to find sub-shapes of.
5036         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5037         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5038         #  @param theName Object name; when specified, this parameter is used
5039         #         for result publication in the study. Otherwise, if automatic
5040         #         publication is switched on, default value is used for result name.
5041         #
5042         #  @return All found sub-shapes as compound.
5043         #
5044         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5045         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5046             """
5047             Find in theShape all sub-shapes of type theShapeType,
5048             situated relatively the specified theCheckShape by the
5049             certain way, defined through theState parameter.
5050
5051             Parameters:
5052                 theCheckShape Shape for relative comparing. It must be a solid.
5053                 theShape Shape to find sub-shapes of.
5054                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5055                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5056                 theName Object name; when specified, this parameter is used
5057                         for result publication in the study. Otherwise, if automatic
5058                         publication is switched on, default value is used for result name.
5059
5060             Returns:
5061                 All found sub-shapes as compound.
5062             """
5063             # Example: see GEOM_TestOthers.py
5064             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5065                                                              theShapeType, theState)
5066             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5067             self._autoPublish(anObj, theName, "shapeOnShape")
5068             return anObj
5069
5070         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5071         #  situated relatively the specified \a theCheckShape by the
5072         #  certain way, defined through \a theState parameter.
5073         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5074         #  @param theShape Shape to find sub-shapes of.
5075         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5076         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5077         #
5078         #  @return List of all found sub-shapes indices.
5079         #
5080         #  @ref swig_GetShapesOnShapeIDs "Example"
5081         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5082             """
5083             Find in theShape all sub-shapes of type theShapeType,
5084             situated relatively the specified theCheckShape by the
5085             certain way, defined through theState parameter.
5086
5087             Parameters:
5088                 theCheckShape Shape for relative comparing. It must be a solid.
5089                 theShape Shape to find sub-shapes of.
5090                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5091                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5092
5093             Returns:
5094                 List of all found sub-shapes indices.
5095             """
5096             # Example: see GEOM_TestOthers.py
5097             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5098                                                       theShapeType, theState)
5099             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5100             return aList
5101
5102         ## Get sub-shape(s) of theShapeWhere, which are
5103         #  coincident with \a theShapeWhat or could be a part of it.
5104         #  @param theShapeWhere Shape to find sub-shapes of.
5105         #  @param theShapeWhat Shape, specifying what to find.
5106         #  @param isNewImplementation implementation of GetInPlace functionality
5107         #             (default = False, old alghorithm based on shape properties)
5108         #  @param theName Object name; when specified, this parameter is used
5109         #         for result publication in the study. Otherwise, if automatic
5110         #         publication is switched on, default value is used for result name.
5111         #
5112         #  @return Group of all found sub-shapes or a single found sub-shape.
5113         #
5114         #  @note This function has a restriction on argument shapes.
5115         #        If \a theShapeWhere has curved parts with significantly
5116         #        outstanding centres (i.e. the mass centre of a part is closer to
5117         #        \a theShapeWhat than to the part), such parts will not be found.
5118         #        @image html get_in_place_lost_part.png
5119         #
5120         #  @ref swig_GetInPlace "Example"
5121         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5122             """
5123             Get sub-shape(s) of theShapeWhere, which are
5124             coincident with  theShapeWhat or could be a part of it.
5125
5126             Parameters:
5127                 theShapeWhere Shape to find sub-shapes of.
5128                 theShapeWhat Shape, specifying what to find.
5129                 isNewImplementation Implementation of GetInPlace functionality
5130                                     (default = False, old alghorithm based on shape properties)
5131                 theName Object name; when specified, this parameter is used
5132                         for result publication in the study. Otherwise, if automatic
5133                         publication is switched on, default value is used for result name.
5134
5135             Returns:
5136                 Group of all found sub-shapes or a single found sub-shape.
5137
5138                 
5139             Note:
5140                 This function has a restriction on argument shapes.
5141                 If theShapeWhere has curved parts with significantly
5142                 outstanding centres (i.e. the mass centre of a part is closer to
5143                 theShapeWhat than to the part), such parts will not be found.
5144             """
5145             # Example: see GEOM_TestOthers.py
5146             anObj = None
5147             if isNewImplementation:
5148                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5149             else:
5150                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5151                 pass
5152             RaiseIfFailed("GetInPlace", self.ShapesOp)
5153             self._autoPublish(anObj, theName, "inplace")
5154             return anObj
5155
5156         ## Get sub-shape(s) of \a theShapeWhere, which are
5157         #  coincident with \a theShapeWhat or could be a part of it.
5158         #
5159         #  Implementation of this method is based on a saved history of an operation,
5160         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5161         #  arguments (an argument shape or a sub-shape of an argument shape).
5162         #  The operation could be the Partition or one of boolean operations,
5163         #  performed on simple shapes (not on compounds).
5164         #
5165         #  @param theShapeWhere Shape to find sub-shapes of.
5166         #  @param theShapeWhat Shape, specifying what to find (must be in the
5167         #                      building history of the ShapeWhere).
5168         #  @param theName Object name; when specified, this parameter is used
5169         #         for result publication in the study. Otherwise, if automatic
5170         #         publication is switched on, default value is used for result name.
5171         #
5172         #  @return Group of all found sub-shapes or a single found sub-shape.
5173         #
5174         #  @ref swig_GetInPlace "Example"
5175         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5176             """
5177             Implementation of this method is based on a saved history of an operation,
5178             produced theShapeWhere. The theShapeWhat must be among this operation's
5179             arguments (an argument shape or a sub-shape of an argument shape).
5180             The operation could be the Partition or one of boolean operations,
5181             performed on simple shapes (not on compounds).
5182
5183             Parameters:
5184                 theShapeWhere Shape to find sub-shapes of.
5185                 theShapeWhat Shape, specifying what to find (must be in the
5186                                 building history of the ShapeWhere).
5187                 theName Object name; when specified, this parameter is used
5188                         for result publication in the study. Otherwise, if automatic
5189                         publication is switched on, default value is used for result name.
5190
5191             Returns:
5192                 Group of all found sub-shapes or a single found sub-shape.
5193             """
5194             # Example: see GEOM_TestOthers.py
5195             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5196             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5197             self._autoPublish(anObj, theName, "inplace")
5198             return anObj
5199
5200         ## Get sub-shape of theShapeWhere, which is
5201         #  equal to \a theShapeWhat.
5202         #  @param theShapeWhere Shape to find sub-shape of.
5203         #  @param theShapeWhat Shape, specifying what to find.
5204         #  @param theName Object name; when specified, this parameter is used
5205         #         for result publication in the study. Otherwise, if automatic
5206         #         publication is switched on, default value is used for result name.
5207         #
5208         #  @return New GEOM.GEOM_Object for found sub-shape.
5209         #
5210         #  @ref swig_GetSame "Example"
5211         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5212             """
5213             Get sub-shape of theShapeWhere, which is
5214             equal to theShapeWhat.
5215
5216             Parameters:
5217                 theShapeWhere Shape to find sub-shape of.
5218                 theShapeWhat Shape, specifying what to find.
5219                 theName Object name; when specified, this parameter is used
5220                         for result publication in the study. Otherwise, if automatic
5221                         publication is switched on, default value is used for result name.
5222
5223             Returns:
5224                 New GEOM.GEOM_Object for found sub-shape.
5225             """
5226             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5227             RaiseIfFailed("GetSame", self.ShapesOp)
5228             self._autoPublish(anObj, theName, "sameShape")
5229             return anObj
5230
5231
5232         ## Get sub-shape indices of theShapeWhere, which is
5233         #  equal to \a theShapeWhat.
5234         #  @param theShapeWhere Shape to find sub-shape of.
5235         #  @param theShapeWhat Shape, specifying what to find.
5236         #  @return List of all found sub-shapes indices. 
5237         #
5238         #  @ref swig_GetSame "Example"
5239         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5240             """
5241             Get sub-shape indices of theShapeWhere, which is
5242             equal to theShapeWhat.
5243
5244             Parameters:
5245                 theShapeWhere Shape to find sub-shape of.
5246                 theShapeWhat Shape, specifying what to find.
5247
5248             Returns:
5249                 List of all found sub-shapes indices.
5250             """
5251             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5252             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5253             return anObj
5254
5255
5256         # end of l4_obtain
5257         ## @}
5258
5259         ## @addtogroup l4_access
5260         ## @{
5261
5262         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5263         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5264         #  @param aShape Shape to get sub-shape of.
5265         #  @param ListOfID List of sub-shapes indices.
5266         #  @param theName Object name; when specified, this parameter is used
5267         #         for result publication in the study. Otherwise, if automatic
5268         #         publication is switched on, default value is used for result name.
5269         #
5270         #  @return Found sub-shape.
5271         #
5272         #  @ref swig_all_decompose "Example"
5273         def GetSubShape(self, aShape, ListOfID, theName=None):
5274             """
5275             Obtain a composite sub-shape of aShape, composed from sub-shapes
5276             of aShape, selected by their unique IDs inside aShape
5277
5278             Parameters:
5279                 aShape Shape to get sub-shape of.
5280                 ListOfID List of sub-shapes indices.
5281                 theName Object name; when specified, this parameter is used
5282                         for result publication in the study. Otherwise, if automatic
5283                         publication is switched on, default value is used for result name.
5284
5285             Returns:
5286                 Found sub-shape.
5287             """
5288             # Example: see GEOM_TestAll.py
5289             anObj = self.AddSubShape(aShape,ListOfID)
5290             self._autoPublish(anObj, theName, "subshape")
5291             return anObj
5292
5293         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5294         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5295         #  @param aShape Shape to get sub-shape of.
5296         #  @param aSubShape Sub-shapes of aShape.
5297         #  @return ID of found sub-shape.
5298         #
5299         #  @ref swig_all_decompose "Example"
5300         def GetSubShapeID(self, aShape, aSubShape):
5301             """
5302             Obtain unique ID of sub-shape aSubShape inside aShape
5303             of aShape, selected by their unique IDs inside aShape
5304
5305             Parameters:
5306                aShape Shape to get sub-shape of.
5307                aSubShape Sub-shapes of aShape.
5308
5309             Returns:
5310                ID of found sub-shape.
5311             """
5312             # Example: see GEOM_TestAll.py
5313             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5314             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5315             return anID
5316             
5317         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5318         #  This function is provided for performance purpose. The complexity is O(n) with n
5319         #  the number of subobjects of aShape
5320         #  @param aShape Shape to get sub-shape of.
5321         #  @param aSubShapes Sub-shapes of aShape.
5322         #  @return list of IDs of found sub-shapes.
5323         #
5324         #  @ref swig_all_decompose "Example"
5325         def GetSubShapesIDs(self, aShape, aSubShapes):
5326             """
5327             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5328             This function is provided for performance purpose. The complexity is O(n) with n
5329             the number of subobjects of aShape
5330
5331             Parameters:
5332                aShape Shape to get sub-shape of.
5333                aSubShapes Sub-shapes of aShape.
5334
5335             Returns:
5336                List of IDs of found sub-shape.
5337             """
5338             # Example: see GEOM_TestAll.py
5339             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5340             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5341             return anIDs
5342
5343         # end of l4_access
5344         ## @}
5345
5346         ## @addtogroup l4_decompose
5347         ## @{
5348
5349         ## Get all sub-shapes and groups of \a theShape,
5350         #  that were created already by any other methods.
5351         #  @param theShape Any shape.
5352         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5353         #                       returned, else all found sub-shapes and groups.
5354         #  @return List of existing sub-objects of \a theShape.
5355         #
5356         #  @ref swig_all_decompose "Example"
5357         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5358             """
5359             Get all sub-shapes and groups of theShape,
5360             that were created already by any other methods.
5361
5362             Parameters:
5363                 theShape Any shape.
5364                 theGroupsOnly If this parameter is TRUE, only groups will be
5365                                  returned, else all found sub-shapes and groups.
5366
5367             Returns:
5368                 List of existing sub-objects of theShape.
5369             """
5370             # Example: see GEOM_TestAll.py
5371             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5372             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5373             return ListObj
5374
5375         ## Get all groups of \a theShape,
5376         #  that were created already by any other methods.
5377         #  @param theShape Any shape.
5378         #  @return List of existing groups of \a theShape.
5379         #
5380         #  @ref swig_all_decompose "Example"
5381         def GetGroups(self, theShape):
5382             """
5383             Get all groups of theShape,
5384             that were created already by any other methods.
5385
5386             Parameters:
5387                 theShape Any shape.
5388
5389             Returns:
5390                 List of existing groups of theShape.
5391             """
5392             # Example: see GEOM_TestAll.py
5393             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5394             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5395             return ListObj
5396
5397         ## Explode a shape on sub-shapes of a given type.
5398         #  If the shape itself matches the type, it is also returned.
5399         #  @param aShape Shape to be exploded.
5400         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5401         #  @param theName Object name; when specified, this parameter is used
5402         #         for result publication in the study. Otherwise, if automatic
5403         #         publication is switched on, default value is used for result name.
5404         #
5405         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5406         #
5407         #  @ref swig_all_decompose "Example"
5408         def SubShapeAll(self, aShape, aType, theName=None):
5409             """
5410             Explode a shape on sub-shapes of a given type.
5411             If the shape itself matches the type, it is also returned.
5412
5413             Parameters:
5414                 aShape Shape to be exploded.
5415                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5416                 theName Object name; when specified, this parameter is used
5417                         for result publication in the study. Otherwise, if automatic
5418                         publication is switched on, default value is used for result name.
5419
5420             Returns:
5421                 List of sub-shapes of type theShapeType, contained in theShape.
5422             """
5423             # Example: see GEOM_TestAll.py
5424             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5425             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5426             self._autoPublish(ListObj, theName, "subshape")
5427             return ListObj
5428
5429         ## Explode a shape on sub-shapes of a given type.
5430         #  @param aShape Shape to be exploded.
5431         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5432         #  @return List of IDs of sub-shapes.
5433         #
5434         #  @ref swig_all_decompose "Example"
5435         def SubShapeAllIDs(self, aShape, aType):
5436             """
5437             Explode a shape on sub-shapes of a given type.
5438
5439             Parameters:
5440                 aShape Shape to be exploded (see geompy.ShapeType)
5441                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5442
5443             Returns:
5444                 List of IDs of sub-shapes.
5445             """
5446             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5447             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5448             return ListObj
5449
5450         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5451         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
5452         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5453         #  @param aShape Shape to get sub-shape of.
5454         #  @param ListOfInd List of sub-shapes indices.
5455         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5456         #  @param theName Object name; when specified, this parameter is used
5457         #         for result publication in the study. Otherwise, if automatic
5458         #         publication is switched on, default value is used for result name.
5459         #
5460         #  @return A compound of sub-shapes of aShape.
5461         #
5462         #  @ref swig_all_decompose "Example"
5463         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5464             """
5465             Obtain a compound of sub-shapes of aShape,
5466             selected by they indices in list of all sub-shapes of type aType.
5467             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5468             
5469             Parameters:
5470                 aShape Shape to get sub-shape of.
5471                 ListOfID List of sub-shapes indices.
5472                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5473                 theName Object name; when specified, this parameter is used
5474                         for result publication in the study. Otherwise, if automatic
5475                         publication is switched on, default value is used for result name.
5476
5477             Returns:
5478                 A compound of sub-shapes of aShape.
5479             """
5480             # Example: see GEOM_TestAll.py
5481             ListOfIDs = []
5482             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5483             for ind in ListOfInd:
5484                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5485             # note: auto-publishing is done in self.GetSubShape()
5486             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5487             return anObj
5488
5489         ## Explode a shape on sub-shapes of a given type.
5490         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5491         #  If the shape itself matches the type, it is also returned.
5492         #  @param aShape Shape to be exploded.
5493         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5494         #  @param theName Object name; when specified, this parameter is used
5495         #         for result publication in the study. Otherwise, if automatic
5496         #         publication is switched on, default value is used for result name.
5497         #
5498         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5499         #
5500         #  @ref swig_SubShapeAllSorted "Example"
5501         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5502             """
5503             Explode a shape on sub-shapes of a given type.
5504             Sub-shapes will be sorted by coordinates of their gravity centers.
5505             If the shape itself matches the type, it is also returned.
5506
5507             Parameters: 
5508                 aShape Shape to be exploded.
5509                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5510                 theName Object name; when specified, this parameter is used
5511                         for result publication in the study. Otherwise, if automatic
5512                         publication is switched on, default value is used for result name.
5513
5514             Returns: 
5515                 List of sub-shapes of type theShapeType, contained in theShape.
5516             """
5517             # Example: see GEOM_TestAll.py
5518             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5519             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5520             self._autoPublish(ListObj, theName, "subshape")
5521             return ListObj
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         #  @param aShape Shape to be exploded.
5526         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5527         #  @return List of IDs of sub-shapes.
5528         #
5529         #  @ref swig_all_decompose "Example"
5530         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5531             """
5532             Explode a shape on sub-shapes of a given type.
5533             Sub-shapes will be sorted by coordinates of their gravity centers.
5534
5535             Parameters: 
5536                 aShape Shape to be exploded.
5537                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5538
5539             Returns: 
5540                 List of IDs of sub-shapes.
5541             """
5542             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5543             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5544             return ListIDs
5545
5546         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5547         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5548         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5549         #  @param aShape Shape to get sub-shape of.
5550         #  @param ListOfInd List of sub-shapes indices.
5551         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5552         #  @param theName Object name; when specified, this parameter is used
5553         #         for result publication in the study. Otherwise, if automatic
5554         #         publication is switched on, default value is used for result name.
5555         #
5556         #  @return A compound of sub-shapes of aShape.
5557         #
5558         #  @ref swig_all_decompose "Example"
5559         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5560             """
5561             Obtain a compound of sub-shapes of aShape,
5562             selected by they indices in sorted list of all sub-shapes of type aType.
5563             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5564
5565             Parameters:
5566                 aShape Shape to get sub-shape of.
5567                 ListOfID List of sub-shapes indices.
5568                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5569                 theName Object name; when specified, this parameter is used
5570                         for result publication in the study. Otherwise, if automatic
5571                         publication is switched on, default value is used for result name.
5572
5573             Returns:
5574                 A compound of sub-shapes of aShape.
5575             """
5576             # Example: see GEOM_TestAll.py
5577             ListOfIDs = []
5578             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5579             for ind in ListOfInd:
5580                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5581             # note: auto-publishing is done in self.GetSubShape()
5582             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5583             return anObj
5584
5585         ## Extract shapes (excluding the main shape) of given type.
5586         #  @param aShape The shape.
5587         #  @param aType  The shape type (see ShapeType())
5588         #  @param isSorted Boolean flag to switch sorting on/off.
5589         #  @param 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         #  @return List of sub-shapes of type aType, contained in aShape.
5594         #
5595         #  @ref swig_FilletChamfer "Example"
5596         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5597             """
5598             Extract shapes (excluding the main shape) of given type.
5599
5600             Parameters:
5601                 aShape The shape.
5602                 aType  The shape type (see geompy.ShapeType)
5603                 isSorted Boolean flag to switch sorting on/off.
5604                 theName Object name; when specified, this parameter is used
5605                         for result publication in the study. Otherwise, if automatic
5606                         publication is switched on, default value is used for result name.
5607
5608             Returns:     
5609                 List of sub-shapes of type aType, contained in aShape.
5610             """
5611             # Example: see GEOM_TestAll.py
5612             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5613             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5614             self._autoPublish(ListObj, theName, "subshape")
5615             return ListObj
5616
5617         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5618         #  @param aShape Main shape.
5619         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5620         #  @param theName Object name; when specified, this parameter is used
5621         #         for result publication in the study. Otherwise, if automatic
5622         #         publication is switched on, default value is used for result name.
5623         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5624         #
5625         #  @ref swig_all_decompose "Example"
5626         def SubShapes(self, aShape, anIDs, theName=None):
5627             """
5628             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5629
5630             Parameters:
5631                 aShape Main shape.
5632                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5633                 theName Object name; when specified, this parameter is used
5634                         for result publication in the study. Otherwise, if automatic
5635                         publication is switched on, default value is used for result name.
5636
5637             Returns:      
5638                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5639             """
5640             # Example: see GEOM_TestAll.py
5641             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5642             RaiseIfFailed("SubShapes", self.ShapesOp)
5643             self._autoPublish(ListObj, theName, "subshape")
5644             return ListObj
5645
5646         # end of l4_decompose
5647         ## @}
5648
5649         ## @addtogroup l4_decompose_d
5650         ## @{
5651
5652         ## Deprecated method
5653         #  It works like SubShapeAllSortedCentres(), but wrongly
5654         #  defines centres of faces, shells and solids.
5655         def SubShapeAllSorted(self, aShape, aType, theName=None):
5656             """
5657             Deprecated method
5658             It works like geompy.SubShapeAllSortedCentres, but wrongly
5659             defines centres of faces, shells and solids.
5660             """
5661             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5662             RaiseIfFailed("MakeExplode", self.ShapesOp)
5663             self._autoPublish(ListObj, theName, "subshape")
5664             return ListObj
5665
5666         ## Deprecated method
5667         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5668         #  defines centres of faces, shells and solids.
5669         def SubShapeAllSortedIDs(self, aShape, aType):
5670             """
5671             Deprecated method
5672             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5673             defines centres of faces, shells and solids.
5674             """
5675             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5676             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5677             return ListIDs
5678
5679         ## Deprecated method
5680         #  It works like SubShapeSortedCentres(), but has a bug
5681         #  (wrongly defines centres of faces, shells and solids).
5682         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5683             """
5684             Deprecated method
5685             It works like geompy.SubShapeSortedCentres, but has a bug
5686             (wrongly defines centres of faces, shells and solids).
5687             """
5688             ListOfIDs = []
5689             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5690             for ind in ListOfInd:
5691                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5692             # note: auto-publishing is done in self.GetSubShape()
5693             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5694             return anObj
5695
5696         # end of l4_decompose_d
5697         ## @}
5698
5699         ## @addtogroup l3_healing
5700         ## @{
5701
5702         ## Apply a sequence of Shape Healing operators to the given object.
5703         #  @param theShape Shape to be processed.
5704         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5705         #  @param theParameters List of names of parameters
5706         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5707         #  @param theValues List of values of parameters, in the same order
5708         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5709         #  @param theName Object name; when specified, this parameter is used
5710         #         for result publication in the study. Otherwise, if automatic
5711         #         publication is switched on, default value is used for result name.
5712         #
5713         #  <b> Operators and Parameters: </b> \n
5714         #
5715         #  * \b FixShape - corrects invalid shapes. \n
5716         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5717         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5718         #
5719         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5720         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5721         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5722         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5723         #
5724         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5725         #    surfaces in segments using a certain angle. \n
5726         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5727         #    if Angle=180, four if Angle=90, etc). \n
5728         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5729         #
5730         #  * \b SplitClosedFaces - splits closed faces in segments.
5731         #    The number of segments depends on the number of splitting points.\n
5732         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5733         #
5734         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5735         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5736         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5737         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5738         #   This and the previous parameters can take the following values:\n
5739         #   \b Parametric \b Continuity \n
5740         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5741         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5742         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5743         #    ruling out sharp edges).\n
5744         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5745         #       are of the same magnitude).\n
5746         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5747         #    or surfaces (d/du C(u)) are the same at junction. \n
5748         #   \b Geometric \b Continuity \n
5749         #   \b G1: first derivatives are proportional at junction.\n
5750         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5751         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5752         #   \b G2: first and second derivatives are proportional at junction.
5753         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5754         #    continuity requires that the underlying parameterization was continuous as well.
5755         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5756         #
5757         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5758         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5759         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5760         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5761         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5762         #       with the specified parameters.\n
5763         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5764         #       with the specified parameters.\n
5765         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5766         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5767         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5768         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5769         #
5770         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5771         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5772         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5773         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5774         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5775         #
5776         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5777         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5778         #
5779         #
5780         #  @return New GEOM.GEOM_Object, containing processed shape.
5781         #
5782         #  \n @ref tui_shape_processing "Example"
5783         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5784             """
5785             Apply a sequence of Shape Healing operators to the given object.
5786
5787             Parameters:
5788                 theShape Shape to be processed.
5789                 theValues List of values of parameters, in the same order
5790                           as parameters are listed in theParameters list.
5791                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5792                 theParameters List of names of parameters
5793                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5794                 theName Object name; when specified, this parameter is used
5795                         for result publication in the study. Otherwise, if automatic
5796                         publication is switched on, default value is used for result name.
5797
5798                 Operators and Parameters:
5799
5800                  * FixShape - corrects invalid shapes.
5801                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5802                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5803                  * FixFaceSize - removes small faces, such as spots and strips.
5804                      * FixFaceSize.Tolerance - defines minimum possible face size.
5805                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5806                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5807                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5808                                 in segments using a certain angle.
5809                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5810                                           if Angle=180, four if Angle=90, etc).
5811                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5812                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5813                                       splitting points.
5814                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5815                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5816                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5817                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5818                      * SplitContinuity.CurveContinuity - required continuity for curves.
5819                        This and the previous parameters can take the following values:
5820                        
5821                        Parametric Continuity:
5822                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5823                                                    coincidental. The curves or surfaces may still meet at an angle,
5824                                                    giving rise to a sharp corner or edge).
5825                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5826                                                    are parallel, ruling out sharp edges).
5827                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5828                                                   or surfaces are of the same magnitude).
5829                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5830                           curves or surfaces (d/du C(u)) are the same at junction.
5831                           
5832                        Geometric Continuity:
5833                        G1: first derivatives are proportional at junction.
5834                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5835                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5836                        G2: first and second derivatives are proportional at junction. As the names imply,
5837                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5838                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5839                            geometric continuity of order n, but not vice-versa.
5840                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5841                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5842                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5843                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5844                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5845                                                         the specified parameters.
5846                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5847                                                         the specified parameters.
5848                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5849                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5850                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5851                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5852                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5853                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5854                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5855                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5856                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5857                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5858                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5859
5860             Returns:
5861                 New GEOM.GEOM_Object, containing processed shape.
5862
5863             Note: For more information look through SALOME Geometry User's Guide->
5864                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5865             """
5866             # Example: see GEOM_TestHealing.py
5867             theValues,Parameters = ParseList(theValues)
5868             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5869             # To avoid script failure in case of good argument shape
5870             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5871                 return theShape
5872             RaiseIfFailed("ProcessShape", self.HealOp)
5873             for string in (theOperators + theParameters):
5874                 Parameters = ":" + Parameters
5875                 pass
5876             anObj.SetParameters(Parameters)
5877             self._autoPublish(anObj, theName, "healed")
5878             return anObj
5879
5880         ## Remove faces from the given object (shape).
5881         #  @param theObject Shape to be processed.
5882         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5883         #                  removes ALL faces of the given object.
5884         #  @param theName Object name; when specified, this parameter is used
5885         #         for result publication in the study. Otherwise, if automatic
5886         #         publication is switched on, default value is used for result name.
5887         #
5888         #  @return New GEOM.GEOM_Object, containing processed shape.
5889         #
5890         #  @ref tui_suppress_faces "Example"
5891         def SuppressFaces(self, theObject, theFaces, theName=None):
5892             """
5893             Remove faces from the given object (shape).
5894
5895             Parameters:
5896                 theObject Shape to be processed.
5897                 theFaces Indices of faces to be removed, if EMPTY then the method
5898                          removes ALL faces of the given object.
5899                 theName Object name; when specified, this parameter is used
5900                         for result publication in the study. Otherwise, if automatic
5901                         publication is switched on, default value is used for result name.
5902
5903             Returns:
5904                 New GEOM.GEOM_Object, containing processed shape.
5905             """
5906             # Example: see GEOM_TestHealing.py
5907             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5908             RaiseIfFailed("SuppressFaces", self.HealOp)
5909             self._autoPublish(anObj, theName, "suppressFaces")
5910             return anObj
5911
5912         ## Sewing of some shapes into single shape.
5913         #  @param ListShape Shapes to be processed.
5914         #  @param theTolerance Required tolerance value.
5915         #  @param theName Object name; when specified, this parameter is used
5916         #         for result publication in the study. Otherwise, if automatic
5917         #         publication is switched on, default value is used for result name.
5918         #
5919         #  @return New GEOM.GEOM_Object, containing processed shape.
5920         #
5921         #  @ref tui_sewing "Example"
5922         def MakeSewing(self, ListShape, theTolerance, theName=None):
5923             """
5924             Sewing of some shapes into single shape.
5925
5926             Parameters:
5927                 ListShape Shapes to be processed.
5928                 theTolerance Required tolerance value.
5929                 theName Object name; when specified, this parameter is used
5930                         for result publication in the study. Otherwise, if automatic
5931                         publication is switched on, default value is used for result name.
5932
5933             Returns:
5934                 New GEOM.GEOM_Object, containing processed shape.
5935             """
5936             # Example: see GEOM_TestHealing.py
5937             comp = self.MakeCompound(ListShape)
5938             # note: auto-publishing is done in self.Sew()
5939             anObj = self.Sew(comp, theTolerance, theName)
5940             return anObj
5941
5942         ## Sewing of the given object.
5943         #  @param theObject Shape to be processed.
5944         #  @param theTolerance Required tolerance value.
5945         #  @param theName Object name; when specified, this parameter is used
5946         #         for result publication in the study. Otherwise, if automatic
5947         #         publication is switched on, default value is used for result name.
5948         #
5949         #  @return New GEOM.GEOM_Object, containing processed shape.
5950         def Sew(self, theObject, theTolerance, theName=None):
5951             """
5952             Sewing of the given object.
5953
5954             Parameters:
5955                 theObject Shape to be processed.
5956                 theTolerance Required tolerance value.
5957                 theName Object name; when specified, this parameter is used
5958                         for result publication in the study. Otherwise, if automatic
5959                         publication is switched on, default value is used for result name.
5960
5961             Returns:
5962                 New GEOM.GEOM_Object, containing processed shape.
5963             """
5964             # Example: see MakeSewing() above
5965             theTolerance,Parameters = ParseParameters(theTolerance)
5966             anObj = self.HealOp.Sew(theObject, theTolerance)
5967             RaiseIfFailed("Sew", self.HealOp)
5968             anObj.SetParameters(Parameters)
5969             self._autoPublish(anObj, theName, "sewed")
5970             return anObj
5971
5972         ## Remove internal wires and edges from the given object (face).
5973         #  @param theObject Shape to be processed.
5974         #  @param theWires Indices of wires to be removed, if EMPTY then the method
5975         #                  removes ALL internal wires of the given object.
5976         #  @param theName Object name; when specified, this parameter is used
5977         #         for result publication in the study. Otherwise, if automatic
5978         #         publication is switched on, default value is used for result name.
5979         #
5980         #  @return New GEOM.GEOM_Object, containing processed shape.
5981         #
5982         #  @ref tui_suppress_internal_wires "Example"
5983         def SuppressInternalWires(self, theObject, theWires, theName=None):
5984             """
5985             Remove internal wires and edges from the given object (face).
5986
5987             Parameters:
5988                 theObject Shape to be processed.
5989                 theWires Indices of wires to be removed, if EMPTY then the method
5990                          removes ALL internal wires of the given object.
5991                 theName Object name; when specified, this parameter is used
5992                         for result publication in the study. Otherwise, if automatic
5993                         publication is switched on, default value is used for result name.
5994
5995             Returns:                
5996                 New GEOM.GEOM_Object, containing processed shape.
5997             """
5998             # Example: see GEOM_TestHealing.py
5999             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6000             RaiseIfFailed("RemoveIntWires", self.HealOp)
6001             self._autoPublish(anObj, theName, "suppressWires")
6002             return anObj
6003
6004         ## Remove internal closed contours (holes) from the given object.
6005         #  @param theObject Shape to be processed.
6006         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6007         #                  removes ALL internal holes of the given object
6008         #  @param theName Object name; when specified, this parameter is used
6009         #         for result publication in the study. Otherwise, if automatic
6010         #         publication is switched on, default value is used for result name.
6011         #
6012         #  @return New GEOM.GEOM_Object, containing processed shape.
6013         #
6014         #  @ref tui_suppress_holes "Example"
6015         def SuppressHoles(self, theObject, theWires, theName=None):
6016             """
6017             Remove internal closed contours (holes) from the given object.
6018
6019             Parameters:
6020                 theObject Shape to be processed.
6021                 theWires Indices of wires to be removed, if EMPTY then the method
6022                          removes ALL internal holes of the given object
6023                 theName Object name; when specified, this parameter is used
6024                         for result publication in the study. Otherwise, if automatic
6025                         publication is switched on, default value is used for result name.
6026
6027             Returns:    
6028                 New GEOM.GEOM_Object, containing processed shape.
6029             """
6030             # Example: see GEOM_TestHealing.py
6031             anObj = self.HealOp.FillHoles(theObject, theWires)
6032             RaiseIfFailed("FillHoles", self.HealOp)
6033             self._autoPublish(anObj, theName, "suppressHoles")
6034             return anObj
6035
6036         ## Close an open wire.
6037         #  @param theObject Shape to be processed.
6038         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6039         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6040         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6041         #                        If False : closure by creation of an edge between ends.
6042         #  @param theName Object name; when specified, this parameter is used
6043         #         for result publication in the study. Otherwise, if automatic
6044         #         publication is switched on, default value is used for result name.
6045         #
6046         #  @return New GEOM.GEOM_Object, containing processed shape.
6047         #
6048         #  @ref tui_close_contour "Example"
6049         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6050             """
6051             Close an open wire.
6052
6053             Parameters: 
6054                 theObject Shape to be processed.
6055                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6056                          if [ ], then theObject itself is a wire.
6057                 isCommonVertex If True  : closure by creation of a common vertex,
6058                                If False : closure by creation of an edge between ends.
6059                 theName Object name; when specified, this parameter is used
6060                         for result publication in the study. Otherwise, if automatic
6061                         publication is switched on, default value is used for result name.
6062
6063             Returns:                      
6064                 New GEOM.GEOM_Object, containing processed shape. 
6065             """
6066             # Example: see GEOM_TestHealing.py
6067             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6068             RaiseIfFailed("CloseContour", self.HealOp)
6069             self._autoPublish(anObj, theName, "closeContour")
6070             return anObj
6071
6072         ## Addition of a point to a given edge object.
6073         #  @param theObject Shape to be processed.
6074         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6075         #                      if -1, then theObject itself is the edge.
6076         #  @param theValue Value of parameter on edge or length parameter,
6077         #                  depending on \a isByParameter.
6078         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6079         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6080         #  @param 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         #  @return New GEOM.GEOM_Object, containing processed shape.
6085         #
6086         #  @ref tui_add_point_on_edge "Example"
6087         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6088             """
6089             Addition of a point to a given edge object.
6090
6091             Parameters: 
6092                 theObject Shape to be processed.
6093                 theEdgeIndex Index of edge to be divided within theObject's shape,
6094                              if -1, then theObject itself is the edge.
6095                 theValue Value of parameter on edge or length parameter,
6096                          depending on isByParameter.
6097                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6098                               if FALSE : theValue is treated as a length parameter [0..1]
6099                 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             Returns:  
6104                 New GEOM.GEOM_Object, containing processed shape.
6105             """
6106             # Example: see GEOM_TestHealing.py
6107             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6108             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6109             RaiseIfFailed("DivideEdge", self.HealOp)
6110             anObj.SetParameters(Parameters)
6111             self._autoPublish(anObj, theName, "divideEdge")
6112             return anObj
6113
6114         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6115         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6116         #  @param theVertices A list of vertices to suppress. If the list
6117         #                     is empty, all vertices in a wire will be assumed.
6118         #  @param theName Object name; when specified, this parameter is used
6119         #         for result publication in the study. Otherwise, if automatic
6120         #         publication is switched on, default value is used for result name.
6121         #
6122         #  @return New GEOM.GEOM_Object with modified wire.
6123         #
6124         #  @ref tui_fuse_collinear_edges "Example"
6125         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6126             """
6127             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6128
6129             Parameters: 
6130                 theWire Wire to minimize the number of C1 continuous edges in.
6131                 theVertices A list of vertices to suppress. If the list
6132                             is empty, all vertices in a wire will be assumed.
6133                 theName Object name; when specified, this parameter is used
6134                         for result publication in the study. Otherwise, if automatic
6135                         publication is switched on, default value is used for result name.
6136
6137             Returns:  
6138                 New GEOM.GEOM_Object with modified wire.
6139             """
6140             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6141             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6142             self._autoPublish(anObj, theName, "fuseEdges")
6143             return anObj
6144
6145         ## Change orientation of the given object. Updates given shape.
6146         #  @param theObject Shape to be processed.
6147         #  @return Updated <var>theObject</var>
6148         #
6149         #  @ref swig_todo "Example"
6150         def ChangeOrientationShell(self,theObject):
6151             """
6152             Change orientation of the given object. Updates given shape.
6153
6154             Parameters: 
6155                 theObject Shape to be processed.
6156
6157             Returns:  
6158                 Updated theObject
6159             """
6160             theObject = self.HealOp.ChangeOrientation(theObject)
6161             RaiseIfFailed("ChangeOrientation", self.HealOp)
6162             pass
6163
6164         ## Change orientation of the given object.
6165         #  @param theObject Shape to be processed.
6166         #  @param theName Object name; when specified, this parameter is used
6167         #         for result publication in the study. Otherwise, if automatic
6168         #         publication is switched on, default value is used for result name.
6169         #
6170         #  @return New GEOM.GEOM_Object, containing processed shape.
6171         #
6172         #  @ref swig_todo "Example"
6173         def ChangeOrientationShellCopy(self, theObject, theName=None):
6174             """
6175             Change orientation of the given object.
6176
6177             Parameters:
6178                 theObject Shape to be processed.
6179                 theName Object name; when specified, this parameter is used
6180                         for result publication in the study. Otherwise, if automatic
6181                         publication is switched on, default value is used for result name.
6182
6183             Returns:   
6184                 New GEOM.GEOM_Object, containing processed shape.
6185             """
6186             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6187             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6188             self._autoPublish(anObj, theName, "reversed")
6189             return anObj
6190
6191         ## Try to limit tolerance of the given object by value \a theTolerance.
6192         #  @param theObject Shape to be processed.
6193         #  @param theTolerance Required tolerance value.
6194         #  @param theName Object name; when specified, this parameter is used
6195         #         for result publication in the study. Otherwise, if automatic
6196         #         publication is switched on, default value is used for result name.
6197         #
6198         #  @return New GEOM.GEOM_Object, containing processed shape.
6199         #
6200         #  @ref tui_limit_tolerance "Example"
6201         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6202             """
6203             Try to limit tolerance of the given object by value theTolerance.
6204
6205             Parameters:
6206                 theObject Shape to be processed.
6207                 theTolerance Required tolerance value.
6208                 theName Object name; when specified, this parameter is used
6209                         for result publication in the study. Otherwise, if automatic
6210                         publication is switched on, default value is used for result name.
6211
6212             Returns:   
6213                 New GEOM.GEOM_Object, containing processed shape.
6214             """
6215             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6216             RaiseIfFailed("LimitTolerance", self.HealOp)
6217             self._autoPublish(anObj, theName, "limitTolerance")
6218             return anObj
6219
6220         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6221         #  that constitute a free boundary of the given shape.
6222         #  @param theObject Shape to get free boundary of.
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 [\a status, \a theClosedWires, \a theOpenWires]
6228         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6229         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6230         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6231         #
6232         #  @ref tui_measurement_tools_page "Example"
6233         def GetFreeBoundary(self, theObject, theName=None):
6234             """
6235             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6236             that constitute a free boundary of the given shape.
6237
6238             Parameters:
6239                 theObject Shape to get free boundary of.
6240                 theName Object name; when specified, this parameter is used
6241                         for result publication in the study. Otherwise, if automatic
6242                         publication is switched on, default value is used for result name.
6243
6244             Returns: 
6245                 [status, theClosedWires, theOpenWires]
6246                  status: FALSE, if an error(s) occured during the method execution.
6247                  theClosedWires: Closed wires on the free boundary of the given shape.
6248                  theOpenWires: Open wires on the free boundary of the given shape.
6249             """
6250             # Example: see GEOM_TestHealing.py
6251             anObj = self.HealOp.GetFreeBoundary(theObject)
6252             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6253             self._autoPublish(anObj[1], theName, "closedWire")
6254             self._autoPublish(anObj[2], theName, "openWire")
6255             return anObj
6256
6257         ## Replace coincident faces in theShape by one face.
6258         #  @param theShape Initial shape.
6259         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6260         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6261         #                         otherwise all initial shapes.
6262         #  @param theName Object name; when specified, this parameter is used
6263         #         for result publication in the study. Otherwise, if automatic
6264         #         publication is switched on, default value is used for result name.
6265         #
6266         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6267         #
6268         #  @ref tui_glue_faces "Example"
6269         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6270             """
6271             Replace coincident faces in theShape by one face.
6272
6273             Parameters:
6274                 theShape Initial shape.
6275                 theTolerance Maximum distance between faces, which can be considered as coincident.
6276                 doKeepNonSolids If FALSE, only solids will present in the result,
6277                                 otherwise all initial shapes.
6278                 theName Object name; when specified, this parameter is used
6279                         for result publication in the study. Otherwise, if automatic
6280                         publication is switched on, default value is used for result name.
6281
6282             Returns:
6283                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6284             """
6285             # Example: see GEOM_Spanner.py
6286             theTolerance,Parameters = ParseParameters(theTolerance)
6287             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6288             if anObj is None:
6289                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6290             anObj.SetParameters(Parameters)
6291             self._autoPublish(anObj, theName, "glueFaces")
6292             return anObj
6293
6294         ## Find coincident faces in theShape for possible gluing.
6295         #  @param theShape Initial shape.
6296         #  @param theTolerance Maximum distance between faces,
6297         #                      which can be considered as coincident.
6298         #  @param theName Object name; when specified, this parameter is used
6299         #         for result publication in the study. Otherwise, if automatic
6300         #         publication is switched on, default value is used for result name.
6301         #
6302         #  @return GEOM.ListOfGO
6303         #
6304         #  @ref tui_glue_faces "Example"
6305         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6306             """
6307             Find coincident faces in theShape for possible gluing.
6308
6309             Parameters:
6310                 theShape Initial shape.
6311                 theTolerance Maximum distance between faces,
6312                              which can be considered as coincident.
6313                 theName Object name; when specified, this parameter is used
6314                         for result publication in the study. Otherwise, if automatic
6315                         publication is switched on, default value is used for result name.
6316
6317             Returns:                    
6318                 GEOM.ListOfGO
6319             """
6320             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6321             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6322             self._autoPublish(anObj, theName, "facesToGlue")
6323             return anObj
6324
6325         ## Replace coincident faces in theShape by one face
6326         #  in compliance with given list of faces
6327         #  @param theShape Initial shape.
6328         #  @param theTolerance Maximum distance between faces,
6329         #                      which can be considered as coincident.
6330         #  @param theFaces List of faces for gluing.
6331         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6332         #                         otherwise all initial shapes.
6333         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6334         #                        will be glued, otherwise only the edges,
6335         #                        belonging to <VAR>theFaces</VAR>.
6336         #  @param theName Object name; when specified, this parameter is used
6337         #         for result publication in the study. Otherwise, if automatic
6338         #         publication is switched on, default value is used for result name.
6339         #
6340         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6341         #          without some faces.
6342         #
6343         #  @ref tui_glue_faces "Example"
6344         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6345                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6346             """
6347             Replace coincident faces in theShape by one face
6348             in compliance with given list of faces
6349
6350             Parameters:
6351                 theShape Initial shape.
6352                 theTolerance Maximum distance between faces,
6353                              which can be considered as coincident.
6354                 theFaces List of faces for gluing.
6355                 doKeepNonSolids If FALSE, only solids will present in the result,
6356                                 otherwise all initial shapes.
6357                 doGlueAllEdges If TRUE, all coincident edges of theShape
6358                                will be glued, otherwise only the edges,
6359                                belonging to theFaces.
6360                 theName Object name; when specified, this parameter is used
6361                         for result publication in the study. Otherwise, if automatic
6362                         publication is switched on, default value is used for result name.
6363
6364             Returns:
6365                 New GEOM.GEOM_Object, containing a copy of theShape
6366                     without some faces.
6367             """
6368             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6369                                                       doKeepNonSolids, doGlueAllEdges)
6370             if anObj is None:
6371                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6372             self._autoPublish(anObj, theName, "glueFaces")
6373             return anObj
6374
6375         ## Replace coincident edges in theShape by one edge.
6376         #  @param theShape Initial shape.
6377         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6378         #  @param theName Object name; when specified, this parameter is used
6379         #         for result publication in the study. Otherwise, if automatic
6380         #         publication is switched on, default value is used for result name.
6381         #
6382         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6383         #
6384         #  @ref tui_glue_edges "Example"
6385         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6386             """
6387             Replace coincident edges in theShape by one edge.
6388
6389             Parameters:
6390                 theShape Initial shape.
6391                 theTolerance Maximum distance between edges, which can be considered as coincident.
6392                 theName Object name; when specified, this parameter is used
6393                         for result publication in the study. Otherwise, if automatic
6394                         publication is switched on, default value is used for result name.
6395
6396             Returns:    
6397                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6398             """
6399             theTolerance,Parameters = ParseParameters(theTolerance)
6400             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6401             if anObj is None:
6402                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6403             anObj.SetParameters(Parameters)
6404             self._autoPublish(anObj, theName, "glueEdges")
6405             return anObj
6406
6407         ## Find coincident edges in theShape for possible gluing.
6408         #  @param theShape Initial shape.
6409         #  @param theTolerance Maximum distance between edges,
6410         #                      which can be considered as coincident.
6411         #  @param theName Object name; when specified, this parameter is used
6412         #         for result publication in the study. Otherwise, if automatic
6413         #         publication is switched on, default value is used for result name.
6414         #
6415         #  @return GEOM.ListOfGO
6416         #
6417         #  @ref tui_glue_edges "Example"
6418         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6419             """
6420             Find coincident edges in theShape for possible gluing.
6421
6422             Parameters:
6423                 theShape Initial shape.
6424                 theTolerance Maximum distance between edges,
6425                              which can be considered as coincident.
6426                 theName Object name; when specified, this parameter is used
6427                         for result publication in the study. Otherwise, if automatic
6428                         publication is switched on, default value is used for result name.
6429
6430             Returns:                         
6431                 GEOM.ListOfGO
6432             """
6433             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6434             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6435             self._autoPublish(anObj, theName, "edgesToGlue")
6436             return anObj
6437
6438         ## Replace coincident edges in theShape by one edge
6439         #  in compliance with given list of edges.
6440         #  @param theShape Initial shape.
6441         #  @param theTolerance Maximum distance between edges,
6442         #                      which can be considered as coincident.
6443         #  @param theEdges List of edges for gluing.
6444         #  @param theName Object name; when specified, this parameter is used
6445         #         for result publication in the study. Otherwise, if automatic
6446         #         publication is switched on, default value is used for result name.
6447         #
6448         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6449         #          without some edges.
6450         #
6451         #  @ref tui_glue_edges "Example"
6452         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6453             """
6454             Replace coincident edges in theShape by one edge
6455             in compliance with given list of edges.
6456
6457             Parameters:
6458                 theShape Initial shape.
6459                 theTolerance Maximum distance between edges,
6460                              which can be considered as coincident.
6461                 theEdges List of edges for gluing.
6462                 theName Object name; when specified, this parameter is used
6463                         for result publication in the study. Otherwise, if automatic
6464                         publication is switched on, default value is used for result name.
6465
6466             Returns:  
6467                 New GEOM.GEOM_Object, containing a copy of theShape
6468                 without some edges.
6469             """
6470             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6471             if anObj is None:
6472                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6473             self._autoPublish(anObj, theName, "glueEdges")
6474             return anObj
6475
6476         # end of l3_healing
6477         ## @}
6478
6479         ## @addtogroup l3_boolean Boolean Operations
6480         ## @{
6481
6482         # -----------------------------------------------------------------------------
6483         # Boolean (Common, Cut, Fuse, Section)
6484         # -----------------------------------------------------------------------------
6485
6486         ## Perform one of boolean operations on two given shapes.
6487         #  @param theShape1 First argument for boolean operation.
6488         #  @param theShape2 Second argument for boolean operation.
6489         #  @param theOperation Indicates the operation to be done:\n
6490         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6491         #  @param theName Object name; when specified, this parameter is used
6492         #         for result publication in the study. Otherwise, if automatic
6493         #         publication is switched on, default value is used for result name.
6494         #
6495         #  @return New GEOM.GEOM_Object, containing the result shape.
6496         #
6497         #  @ref tui_fuse "Example"
6498         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6499             """
6500             Perform one of boolean operations on two given shapes.
6501
6502             Parameters: 
6503                 theShape1 First argument for boolean operation.
6504                 theShape2 Second argument for boolean operation.
6505                 theOperation Indicates the operation to be done:
6506                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6507                 theName Object name; when specified, this parameter is used
6508                         for result publication in the study. Otherwise, if automatic
6509                         publication is switched on, default value is used for result name.
6510
6511             Returns:   
6512                 New GEOM.GEOM_Object, containing the result shape.
6513             """
6514             # Example: see GEOM_TestAll.py
6515             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6516             RaiseIfFailed("MakeBoolean", self.BoolOp)
6517             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6518             self._autoPublish(anObj, theName, def_names[theOperation])
6519             return anObj
6520
6521         ## Perform Common boolean operation on two given shapes.
6522         #  @param theShape1 First argument for boolean operation.
6523         #  @param theShape2 Second argument for boolean operation.
6524         #  @param theName Object name; when specified, this parameter is used
6525         #         for result publication in the study. Otherwise, if automatic
6526         #         publication is switched on, default value is used for result name.
6527         #
6528         #  @return New GEOM.GEOM_Object, containing the result shape.
6529         #
6530         #  @ref tui_common "Example 1"
6531         #  \n @ref swig_MakeCommon "Example 2"
6532         def MakeCommon(self, theShape1, theShape2, theName=None):
6533             """
6534             Perform Common boolean operation on two given shapes.
6535
6536             Parameters: 
6537                 theShape1 First argument for boolean operation.
6538                 theShape2 Second argument for boolean operation.
6539                 theName Object name; when specified, this parameter is used
6540                         for result publication in the study. Otherwise, if automatic
6541                         publication is switched on, default value is used for result name.
6542
6543             Returns:   
6544                 New GEOM.GEOM_Object, containing the result shape.
6545             """
6546             # Example: see GEOM_TestOthers.py
6547             # note: auto-publishing is done in self.MakeBoolean()
6548             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6549
6550         ## Perform Cut boolean operation on two given shapes.
6551         #  @param theShape1 First argument for boolean operation.
6552         #  @param theShape2 Second argument for boolean operation.
6553         #  @param theName Object name; when specified, this parameter is used
6554         #         for result publication in the study. Otherwise, if automatic
6555         #         publication is switched on, default value is used for result name.
6556         #
6557         #  @return New GEOM.GEOM_Object, containing the result shape.
6558         #
6559         #  @ref tui_cut "Example 1"
6560         #  \n @ref swig_MakeCommon "Example 2"
6561         def MakeCut(self, theShape1, theShape2, theName=None):
6562             """
6563             Perform Cut boolean operation on two given shapes.
6564
6565             Parameters: 
6566                 theShape1 First argument for boolean operation.
6567                 theShape2 Second argument for boolean operation.
6568                 theName Object name; when specified, this parameter is used
6569                         for result publication in the study. Otherwise, if automatic
6570                         publication is switched on, default value is used for result name.
6571
6572             Returns:   
6573                 New GEOM.GEOM_Object, containing the result shape.
6574             
6575             """
6576             # Example: see GEOM_TestOthers.py
6577             # note: auto-publishing is done in self.MakeBoolean()
6578             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6579
6580         ## Perform Fuse boolean operation on two given shapes.
6581         #  @param theShape1 First argument for boolean operation.
6582         #  @param theShape2 Second argument for boolean operation.
6583         #  @param theName Object name; when specified, this parameter is used
6584         #         for result publication in the study. Otherwise, if automatic
6585         #         publication is switched on, default value is used for result name.
6586         #
6587         #  @return New GEOM.GEOM_Object, containing the result shape.
6588         #
6589         #  @ref tui_fuse "Example 1"
6590         #  \n @ref swig_MakeCommon "Example 2"
6591         def MakeFuse(self, theShape1, theShape2, theName=None):
6592             """
6593             Perform Fuse boolean operation on two given shapes.
6594
6595             Parameters: 
6596                 theShape1 First argument for boolean operation.
6597                 theShape2 Second argument for boolean operation.
6598                 theName Object name; when specified, this parameter is used
6599                         for result publication in the study. Otherwise, if automatic
6600                         publication is switched on, default value is used for result name.
6601
6602             Returns:   
6603                 New GEOM.GEOM_Object, containing the result shape.
6604             
6605             """
6606             # Example: see GEOM_TestOthers.py
6607             # note: auto-publishing is done in self.MakeBoolean()
6608             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6609
6610         ## Perform Section boolean operation on two given shapes.
6611         #  @param theShape1 First argument for boolean operation.
6612         #  @param theShape2 Second argument for boolean operation.
6613         #  @param theName Object name; when specified, this parameter is used
6614         #         for result publication in the study. Otherwise, if automatic
6615         #         publication is switched on, default value is used for result name.
6616         #
6617         #  @return New GEOM.GEOM_Object, containing the result shape.
6618         #
6619         #  @ref tui_section "Example 1"
6620         #  \n @ref swig_MakeCommon "Example 2"
6621         def MakeSection(self, theShape1, theShape2, theName=None):
6622             """
6623             Perform Section boolean operation on two given shapes.
6624
6625             Parameters: 
6626                 theShape1 First argument for boolean operation.
6627                 theShape2 Second argument for boolean operation.
6628                 theName Object name; when specified, this parameter is used
6629                         for result publication in the study. Otherwise, if automatic
6630                         publication is switched on, default value is used for result name.
6631
6632             Returns:   
6633                 New GEOM.GEOM_Object, containing the result shape.
6634             
6635             """
6636             # Example: see GEOM_TestOthers.py
6637             # note: auto-publishing is done in self.MakeBoolean()
6638             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6639
6640         # end of l3_boolean
6641         ## @}
6642
6643         ## @addtogroup l3_basic_op
6644         ## @{
6645
6646         ## Perform partition operation.
6647         #  @param ListShapes Shapes to be intersected.
6648         #  @param ListTools Shapes to intersect theShapes.
6649         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6650         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6651         #         type will be detected automatically.
6652         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6653         #                             target type (equal to Limit) are kept in the result,
6654         #                             else standalone shapes of lower dimension
6655         #                             are kept also (if they exist).
6656         #  @param theName Object name; when specified, this parameter is used
6657         #         for result publication in the study. Otherwise, if automatic
6658         #         publication is switched on, default value is used for result name.
6659         #
6660         #  @note Each compound from ListShapes and ListTools will be exploded
6661         #        in order to avoid possible intersection between shapes from this compound.
6662         #
6663         #  After implementation new version of PartitionAlgo (October 2006)
6664         #  other parameters are ignored by current functionality. They are kept
6665         #  in this function only for support old versions.
6666         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6667         #         Each shape from theKeepInside must belong to theShapes also.
6668         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6669         #         Each shape from theRemoveInside must belong to theShapes also.
6670         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6671         #      @param ListMaterials Material indices for each shape. Make sence,
6672         #         only if theRemoveWebs is TRUE.
6673         #
6674         #  @return New GEOM.GEOM_Object, containing the result shapes.
6675         #
6676         #  @ref tui_partition "Example"
6677         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6678                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6679                           KeepNonlimitShapes=0, theName=None):
6680             """
6681             Perform partition operation.
6682
6683             Parameters: 
6684                 ListShapes Shapes to be intersected.
6685                 ListTools Shapes to intersect theShapes.
6686                 Limit Type of resulting shapes (see geompy.ShapeType)
6687                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6688                       type will be detected automatically.
6689                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6690                                     target type (equal to Limit) are kept in the result,
6691                                     else standalone shapes of lower dimension
6692                                     are kept also (if they exist).
6693                 theName Object name; when specified, this parameter is used
6694                         for result publication in the study. Otherwise, if automatic
6695                         publication is switched on, default value is used for result name.
6696             Note:
6697                     Each compound from ListShapes and ListTools will be exploded
6698                     in order to avoid possible intersection between shapes from
6699                     this compound.
6700                     
6701             After implementation new version of PartitionAlgo (October 2006) other
6702             parameters are ignored by current functionality. They are kept in this
6703             function only for support old versions.
6704             
6705             Ignored parameters:
6706                 ListKeepInside Shapes, outside which the results will be deleted.
6707                                Each shape from theKeepInside must belong to theShapes also.
6708                 ListRemoveInside Shapes, inside which the results will be deleted.
6709                                  Each shape from theRemoveInside must belong to theShapes also.
6710                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6711                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6712
6713             Returns:   
6714                 New GEOM.GEOM_Object, containing the result shapes.
6715             """
6716             # Example: see GEOM_TestAll.py
6717             if Limit == self.ShapeType["AUTO"]:
6718                 # automatic detection of the most appropriate shape limit type
6719                 lim = GEOM.SHAPE
6720                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6721                 Limit = EnumToLong(lim)
6722                 pass
6723             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6724                                               ListKeepInside, ListRemoveInside,
6725                                               Limit, RemoveWebs, ListMaterials,
6726                                               KeepNonlimitShapes);
6727             RaiseIfFailed("MakePartition", self.BoolOp)
6728             self._autoPublish(anObj, theName, "partition")
6729             return anObj
6730
6731         ## Perform partition operation.
6732         #  This method may be useful if it is needed to make a partition for
6733         #  compound contains nonintersected shapes. Performance will be better
6734         #  since intersection between shapes from compound is not performed.
6735         #
6736         #  Description of all parameters as in previous method MakePartition()
6737         #
6738         #  @note Passed compounds (via ListShapes or via ListTools)
6739         #           have to consist of nonintersecting shapes.
6740         #
6741         #  @return New GEOM.GEOM_Object, containing the result shapes.
6742         #
6743         #  @ref swig_todo "Example"
6744         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6745                                                  ListKeepInside=[], ListRemoveInside=[],
6746                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6747                                                  ListMaterials=[], KeepNonlimitShapes=0,
6748                                                  theName=None):
6749             """
6750             Perform partition operation.
6751             This method may be useful if it is needed to make a partition for
6752             compound contains nonintersected shapes. Performance will be better
6753             since intersection between shapes from compound is not performed.
6754
6755             Parameters: 
6756                 Description of all parameters as in method geompy.MakePartition
6757         
6758             NOTE:
6759                 Passed compounds (via ListShapes or via ListTools)
6760                 have to consist of nonintersecting shapes.
6761
6762             Returns:   
6763                 New GEOM.GEOM_Object, containing the result shapes.
6764             """
6765             if Limit == self.ShapeType["AUTO"]:
6766                 # automatic detection of the most appropriate shape limit type
6767                 lim = GEOM.SHAPE
6768                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6769                 Limit = EnumToLong(lim)
6770                 pass
6771             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6772                                                                      ListKeepInside, ListRemoveInside,
6773                                                                      Limit, RemoveWebs, ListMaterials,
6774                                                                      KeepNonlimitShapes);
6775             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6776             self._autoPublish(anObj, theName, "partition")
6777             return anObj
6778
6779         ## See method MakePartition() for more information.
6780         #
6781         #  @ref tui_partition "Example 1"
6782         #  \n @ref swig_Partition "Example 2"
6783         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6784                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6785                       KeepNonlimitShapes=0, theName=None):
6786             """
6787             See method geompy.MakePartition for more information.
6788             """
6789             # Example: see GEOM_TestOthers.py
6790             # note: auto-publishing is done in self.MakePartition()
6791             anObj = self.MakePartition(ListShapes, ListTools,
6792                                        ListKeepInside, ListRemoveInside,
6793                                        Limit, RemoveWebs, ListMaterials,
6794                                        KeepNonlimitShapes, theName);
6795             return anObj
6796
6797         ## Perform partition of the Shape with the Plane
6798         #  @param theShape Shape to be intersected.
6799         #  @param thePlane Tool shape, to intersect theShape.
6800         #  @param theName Object name; when specified, this parameter is used
6801         #         for result publication in the study. Otherwise, if automatic
6802         #         publication is switched on, default value is used for result name.
6803         #
6804         #  @return New GEOM.GEOM_Object, containing the result shape.
6805         #
6806         #  @ref tui_partition "Example"
6807         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6808             """
6809             Perform partition of the Shape with the Plane
6810
6811             Parameters: 
6812                 theShape Shape to be intersected.
6813                 thePlane Tool shape, to intersect theShape.
6814                 theName Object name; when specified, this parameter is used
6815                         for result publication in the study. Otherwise, if automatic
6816                         publication is switched on, default value is used for result name.
6817
6818             Returns:  
6819                 New GEOM.GEOM_Object, containing the result shape.
6820             """
6821             # Example: see GEOM_TestAll.py
6822             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
6823             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
6824             self._autoPublish(anObj, theName, "partition")
6825             return anObj
6826
6827         # end of l3_basic_op
6828         ## @}
6829
6830         ## @addtogroup l3_transform
6831         ## @{
6832
6833         ## Translate the given object along the vector, specified
6834         #  by its end points.
6835         #  @param theObject The object to be translated.
6836         #  @param thePoint1 Start point of translation vector.
6837         #  @param thePoint2 End point of translation vector.
6838         #  @param theCopy Flag used to translate object itself or create a copy.
6839         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6840         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6841         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
6842             """
6843             Translate the given object along the vector, specified by its end points.
6844
6845             Parameters: 
6846                 theObject The object to be translated.
6847                 thePoint1 Start point of translation vector.
6848                 thePoint2 End point of translation vector.
6849                 theCopy Flag used to translate object itself or create a copy.
6850
6851             Returns: 
6852                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6853                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6854             """
6855             if theCopy:
6856                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6857             else:
6858                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
6859             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
6860             return anObj
6861
6862         ## Translate the given object along the vector, specified
6863         #  by its end points, creating its copy before the translation.
6864         #  @param theObject The object to be translated.
6865         #  @param thePoint1 Start point of translation vector.
6866         #  @param thePoint2 End point of translation vector.
6867         #  @param theName Object name; when specified, this parameter is used
6868         #         for result publication in the study. Otherwise, if automatic
6869         #         publication is switched on, default value is used for result name.
6870         #
6871         #  @return New GEOM.GEOM_Object, containing the translated object.
6872         #
6873         #  @ref tui_translation "Example 1"
6874         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
6875         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
6876             """
6877             Translate the given object along the vector, specified
6878             by its end points, creating its copy before the translation.
6879
6880             Parameters: 
6881                 theObject The object to be translated.
6882                 thePoint1 Start point of translation vector.
6883                 thePoint2 End point of translation vector.
6884                 theName Object name; when specified, this parameter is used
6885                         for result publication in the study. Otherwise, if automatic
6886                         publication is switched on, default value is used for result name.
6887
6888             Returns:  
6889                 New GEOM.GEOM_Object, containing the translated object.
6890             """
6891             # Example: see GEOM_TestAll.py
6892             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6893             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
6894             self._autoPublish(anObj, theName, "translated")
6895             return anObj
6896
6897         ## Translate the given object along the vector, specified by its components.
6898         #  @param theObject The object to be translated.
6899         #  @param theDX,theDY,theDZ Components of translation vector.
6900         #  @param theCopy Flag used to translate object itself or create a copy.
6901         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6902         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6903         #
6904         #  @ref tui_translation "Example"
6905         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
6906             """
6907             Translate the given object along the vector, specified by its components.
6908
6909             Parameters: 
6910                 theObject The object to be translated.
6911                 theDX,theDY,theDZ Components of translation vector.
6912                 theCopy Flag used to translate object itself or create a copy.
6913
6914             Returns: 
6915                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6916                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6917             """
6918             # Example: see GEOM_TestAll.py
6919             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
6920             if theCopy:
6921                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
6922             else:
6923                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
6924             anObj.SetParameters(Parameters)
6925             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
6926             return anObj
6927
6928         ## Translate the given object along the vector, specified
6929         #  by its components, creating its copy before the translation.
6930         #  @param theObject The object to be translated.
6931         #  @param theDX,theDY,theDZ Components of translation vector.
6932         #  @param theName Object name; when specified, this parameter is used
6933         #         for result publication in the study. Otherwise, if automatic
6934         #         publication is switched on, default value is used for result name.
6935         #
6936         #  @return New GEOM.GEOM_Object, containing the translated object.
6937         #
6938         #  @ref tui_translation "Example"
6939         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
6940             """
6941             Translate the given object along the vector, specified
6942             by its components, creating its copy before the translation.
6943
6944             Parameters: 
6945                 theObject The object to be translated.
6946                 theDX,theDY,theDZ Components of translation vector.
6947                 theName Object name; when specified, this parameter is used
6948                         for result publication in the study. Otherwise, if automatic
6949                         publication is switched on, default value is used for result name.
6950
6951             Returns: 
6952                 New GEOM.GEOM_Object, containing the translated object.
6953             """
6954             # Example: see GEOM_TestAll.py
6955             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
6956             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
6957             anObj.SetParameters(Parameters)
6958             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
6959             self._autoPublish(anObj, theName, "translated")
6960             return anObj
6961
6962         ## Translate the given object along the given vector.
6963         #  @param theObject The object to be translated.
6964         #  @param theVector The translation vector.
6965         #  @param theCopy Flag used to translate object itself or create a copy.
6966         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6967         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6968         def TranslateVector(self, theObject, theVector, theCopy=False):
6969             """
6970             Translate the given object along the given vector.
6971
6972             Parameters: 
6973                 theObject The object to be translated.
6974                 theVector The translation vector.
6975                 theCopy Flag used to translate object itself or create a copy.
6976
6977             Returns: 
6978                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6979                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6980             """
6981             if theCopy:
6982                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
6983             else:
6984                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
6985             RaiseIfFailed("TranslateVector", self.TrsfOp)
6986             return anObj
6987
6988         ## Translate the given object along the given vector,
6989         #  creating its copy before the translation.
6990         #  @param theObject The object to be translated.
6991         #  @param theVector The translation vector.
6992         #  @param theName Object name; when specified, this parameter is used
6993         #         for result publication in the study. Otherwise, if automatic
6994         #         publication is switched on, default value is used for result name.
6995         #
6996         #  @return New GEOM.GEOM_Object, containing the translated object.
6997         #
6998         #  @ref tui_translation "Example"
6999         def MakeTranslationVector(self, theObject, theVector, theName=None):
7000             """
7001             Translate the given object along the given vector,
7002             creating its copy before the translation.
7003
7004             Parameters: 
7005                 theObject The object to be translated.
7006                 theVector The translation vector.
7007                 theName Object name; when specified, this parameter is used
7008                         for result publication in the study. Otherwise, if automatic
7009                         publication is switched on, default value is used for result name.
7010
7011             Returns: 
7012                 New GEOM.GEOM_Object, containing the translated object.
7013             """
7014             # Example: see GEOM_TestAll.py
7015             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7016             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7017             self._autoPublish(anObj, theName, "translated")
7018             return anObj
7019
7020         ## Translate the given object along the given vector on given distance.
7021         #  @param theObject The object to be translated.
7022         #  @param theVector The translation vector.
7023         #  @param theDistance The translation distance.
7024         #  @param theCopy Flag used to translate object itself or create a copy.
7025         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7026         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7027         #
7028         #  @ref tui_translation "Example"
7029         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7030             """
7031             Translate the given object along the given vector on given distance.
7032
7033             Parameters: 
7034                 theObject The object to be translated.
7035                 theVector The translation vector.
7036                 theDistance The translation distance.
7037                 theCopy Flag used to translate object itself or create a copy.
7038
7039             Returns: 
7040                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7041                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7042             """
7043             # Example: see GEOM_TestAll.py
7044             theDistance,Parameters = ParseParameters(theDistance)
7045             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7046             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7047             anObj.SetParameters(Parameters)
7048             return anObj
7049
7050         ## Translate the given object along the given vector on given distance,
7051         #  creating its copy before the translation.
7052         #  @param theObject The object to be translated.
7053         #  @param theVector The translation vector.
7054         #  @param theDistance The translation distance.
7055         #  @param theName Object name; when specified, this parameter is used
7056         #         for result publication in the study. Otherwise, if automatic
7057         #         publication is switched on, default value is used for result name.
7058         #
7059         #  @return New GEOM.GEOM_Object, containing the translated object.
7060         #
7061         #  @ref tui_translation "Example"
7062         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7063             """
7064             Translate the given object along the given vector on given distance,
7065             creating its copy before the translation.
7066
7067             Parameters:
7068                 theObject The object to be translated.
7069                 theVector The translation vector.
7070                 theDistance The translation distance.
7071                 theName Object name; when specified, this parameter is used
7072                         for result publication in the study. Otherwise, if automatic
7073                         publication is switched on, default value is used for result name.
7074
7075             Returns: 
7076                 New GEOM.GEOM_Object, containing the translated object.
7077             """
7078             # Example: see GEOM_TestAll.py
7079             theDistance,Parameters = ParseParameters(theDistance)
7080             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7081             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7082             anObj.SetParameters(Parameters)
7083             self._autoPublish(anObj, theName, "translated")
7084             return anObj
7085
7086         ## Rotate the given object around the given axis on the given angle.
7087         #  @param theObject The object to be rotated.
7088         #  @param theAxis Rotation axis.
7089         #  @param theAngle Rotation angle in radians.
7090         #  @param theCopy Flag used to rotate object itself or create a copy.
7091         #
7092         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7093         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7094         #
7095         #  @ref tui_rotation "Example"
7096         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7097             """
7098             Rotate the given object around the given axis on the given angle.
7099
7100             Parameters:
7101                 theObject The object to be rotated.
7102                 theAxis Rotation axis.
7103                 theAngle Rotation angle in radians.
7104                 theCopy Flag used to rotate object itself or create a copy.
7105
7106             Returns:
7107                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7108                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7109             """
7110             # Example: see GEOM_TestAll.py
7111             flag = False
7112             if isinstance(theAngle,str):
7113                 flag = True
7114             theAngle, Parameters = ParseParameters(theAngle)
7115             if flag:
7116                 theAngle = theAngle*math.pi/180.0
7117             if theCopy:
7118                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7119             else:
7120                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7121             RaiseIfFailed("Rotate", self.TrsfOp)
7122             anObj.SetParameters(Parameters)
7123             return anObj
7124
7125         ## Rotate the given object around the given axis
7126         #  on the given angle, creating its copy before the rotatation.
7127         #  @param theObject The object to be rotated.
7128         #  @param theAxis Rotation axis.
7129         #  @param theAngle Rotation angle in radians.
7130         #  @param theName Object name; when specified, this parameter is used
7131         #         for result publication in the study. Otherwise, if automatic
7132         #         publication is switched on, default value is used for result name.
7133         #
7134         #  @return New GEOM.GEOM_Object, containing the rotated object.
7135         #
7136         #  @ref tui_rotation "Example"
7137         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7138             """
7139             Rotate the given object around the given axis
7140             on the given angle, creating its copy before the rotatation.
7141
7142             Parameters:
7143                 theObject The object to be rotated.
7144                 theAxis Rotation axis.
7145                 theAngle Rotation angle in radians.
7146                 theName Object name; when specified, this parameter is used
7147                         for result publication in the study. Otherwise, if automatic
7148                         publication is switched on, default value is used for result name.
7149
7150             Returns:
7151                 New GEOM.GEOM_Object, containing the rotated object.
7152             """
7153             # Example: see GEOM_TestAll.py
7154             flag = False
7155             if isinstance(theAngle,str):
7156                 flag = True
7157             theAngle, Parameters = ParseParameters(theAngle)
7158             if flag:
7159                 theAngle = theAngle*math.pi/180.0
7160             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7161             RaiseIfFailed("RotateCopy", self.TrsfOp)
7162             anObj.SetParameters(Parameters)
7163             self._autoPublish(anObj, theName, "rotated")
7164             return anObj
7165
7166         ## Rotate given object around vector perpendicular to plane
7167         #  containing three points.
7168         #  @param theObject The object to be rotated.
7169         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7170         #  containing the three points.
7171         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7172         #  @param theCopy Flag used to rotate object itself or create a copy.
7173         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7174         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7175         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7176             """
7177             Rotate given object around vector perpendicular to plane
7178             containing three points.
7179
7180             Parameters:
7181                 theObject The object to be rotated.
7182                 theCentPoint central point  the axis is the vector perpendicular to the plane
7183                              containing the three points.
7184                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7185                 theCopy Flag used to rotate object itself or create a copy.
7186
7187             Returns:
7188                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7189                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7190             """
7191             if theCopy:
7192                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7193             else:
7194                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7195             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7196             return anObj
7197
7198         ## Rotate given object around vector perpendicular to plane
7199         #  containing three points, creating its copy before the rotatation.
7200         #  @param theObject The object to be rotated.
7201         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7202         #  containing the three points.
7203         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
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 rotated object.
7209         #
7210         #  @ref tui_rotation "Example"
7211         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7212             """
7213             Rotate given object around vector perpendicular to plane
7214             containing three points, creating its copy before the rotatation.
7215
7216             Parameters:
7217                 theObject The object to be rotated.
7218                 theCentPoint central point  the axis is the vector perpendicular to the plane
7219                              containing the three points.
7220                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7221                 theName Object name; when specified, this parameter is used
7222                         for result publication in the study. Otherwise, if automatic
7223                         publication is switched on, default value is used for result name.
7224
7225             Returns:
7226                 New GEOM.GEOM_Object, containing the rotated object.
7227             """
7228             # Example: see GEOM_TestAll.py
7229             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7230             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7231             self._autoPublish(anObj, theName, "rotated")
7232             return anObj
7233
7234         ## Scale the given object by the specified factor.
7235         #  @param theObject The object to be scaled.
7236         #  @param thePoint Center point for scaling.
7237         #                  Passing None for it means scaling relatively the origin of global CS.
7238         #  @param theFactor Scaling factor value.
7239         #  @param theCopy Flag used to scale object itself or create a copy.
7240         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7241         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7242         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7243             """
7244             Scale the given object by the specified factor.
7245
7246             Parameters:
7247                 theObject The object to be scaled.
7248                 thePoint Center point for scaling.
7249                          Passing None for it means scaling relatively the origin of global CS.
7250                 theFactor Scaling factor value.
7251                 theCopy Flag used to scale object itself or create a copy.
7252
7253             Returns:    
7254                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7255                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7256             """
7257             # Example: see GEOM_TestAll.py
7258             theFactor, Parameters = ParseParameters(theFactor)
7259             if theCopy:
7260                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7261             else:
7262                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7263             RaiseIfFailed("Scale", self.TrsfOp)
7264             anObj.SetParameters(Parameters)
7265             return anObj
7266
7267         ## Scale the given object by the factor, creating its copy before the scaling.
7268         #  @param theObject The object to be scaled.
7269         #  @param thePoint Center point for scaling.
7270         #                  Passing None for it means scaling relatively the origin of global CS.
7271         #  @param theFactor Scaling factor value.
7272         #  @param theName Object name; when specified, this parameter is used
7273         #         for result publication in the study. Otherwise, if automatic
7274         #         publication is switched on, default value is used for result name.
7275         #
7276         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7277         #
7278         #  @ref tui_scale "Example"
7279         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7280             """
7281             Scale the given object by the factor, creating its copy before the scaling.
7282
7283             Parameters:
7284                 theObject The object to be scaled.
7285                 thePoint Center point for scaling.
7286                          Passing None for it means scaling relatively the origin of global CS.
7287                 theFactor Scaling factor value.
7288                 theName Object name; when specified, this parameter is used
7289                         for result publication in the study. Otherwise, if automatic
7290                         publication is switched on, default value is used for result name.
7291
7292             Returns:    
7293                 New GEOM.GEOM_Object, containing the scaled shape.
7294             """
7295             # Example: see GEOM_TestAll.py
7296             theFactor, Parameters = ParseParameters(theFactor)
7297             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7298             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7299             anObj.SetParameters(Parameters)
7300             self._autoPublish(anObj, theName, "scaled")
7301             return anObj
7302
7303         ## Scale the given object by different factors along coordinate axes.
7304         #  @param theObject The object to be scaled.
7305         #  @param thePoint Center point for scaling.
7306         #                  Passing None for it means scaling relatively the origin of global CS.
7307         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7308         #  @param theCopy Flag used to scale object itself or create a copy.
7309         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7310         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7311         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7312             """
7313             Scale the given object by different factors along coordinate axes.
7314
7315             Parameters:
7316                 theObject The object to be scaled.
7317                 thePoint Center point for scaling.
7318                             Passing None for it means scaling relatively the origin of global CS.
7319                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7320                 theCopy Flag used to scale object itself or create a copy.
7321
7322             Returns:    
7323                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7324                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7325             """
7326             # Example: see GEOM_TestAll.py
7327             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7328             if theCopy:
7329                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7330                                                             theFactorX, theFactorY, theFactorZ)
7331             else:
7332                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7333                                                         theFactorX, theFactorY, theFactorZ)
7334             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7335             anObj.SetParameters(Parameters)
7336             return anObj
7337
7338         ## Scale the given object by different factors along coordinate axes,
7339         #  creating its copy before the scaling.
7340         #  @param theObject The object to be scaled.
7341         #  @param thePoint Center point for scaling.
7342         #                  Passing None for it means scaling relatively the origin of global CS.
7343         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7344         #  @param theName Object name; when specified, this parameter is used
7345         #         for result publication in the study. Otherwise, if automatic
7346         #         publication is switched on, default value is used for result name.
7347         #
7348         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7349         #
7350         #  @ref swig_scale "Example"
7351         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7352             """
7353             Scale the given object by different factors along coordinate axes,
7354             creating its copy before the scaling.
7355
7356             Parameters:
7357                 theObject The object to be scaled.
7358                 thePoint Center point for scaling.
7359                             Passing None for it means scaling relatively the origin of global CS.
7360                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7361                 theName Object name; when specified, this parameter is used
7362                         for result publication in the study. Otherwise, if automatic
7363                         publication is switched on, default value is used for result name.
7364
7365             Returns:
7366                 New GEOM.GEOM_Object, containing the scaled shape.
7367             """
7368             # Example: see GEOM_TestAll.py
7369             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7370             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7371                                                         theFactorX, theFactorY, theFactorZ)
7372             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7373             anObj.SetParameters(Parameters)
7374             self._autoPublish(anObj, theName, "scaled")
7375             return anObj
7376
7377         ## Mirror an object relatively the given plane.
7378         #  @param theObject The object to be mirrored.
7379         #  @param thePlane Plane of symmetry.
7380         #  @param theCopy Flag used to mirror object itself or create a copy.
7381         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7382         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7383         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7384             """
7385             Mirror an object relatively the given plane.
7386
7387             Parameters:
7388                 theObject The object to be mirrored.
7389                 thePlane Plane of symmetry.
7390                 theCopy Flag used to mirror object itself or create a copy.
7391
7392             Returns:
7393                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7394                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7395             """
7396             if theCopy:
7397                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7398             else:
7399                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7400             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7401             return anObj
7402
7403         ## Create an object, symmetrical
7404         #  to the given one relatively the given plane.
7405         #  @param theObject The object to be mirrored.
7406         #  @param thePlane Plane of symmetry.
7407         #  @param theName Object name; when specified, this parameter is used
7408         #         for result publication in the study. Otherwise, if automatic
7409         #         publication is switched on, default value is used for result name.
7410         #
7411         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7412         #
7413         #  @ref tui_mirror "Example"
7414         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7415             """
7416             Create an object, symmetrical to the given one relatively the given plane.
7417
7418             Parameters:
7419                 theObject The object to be mirrored.
7420                 thePlane Plane of symmetry.
7421                 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             Returns:
7426                 New GEOM.GEOM_Object, containing the mirrored shape.
7427             """
7428             # Example: see GEOM_TestAll.py
7429             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7430             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7431             self._autoPublish(anObj, theName, "mirrored")
7432             return anObj
7433
7434         ## Mirror an object relatively the given axis.
7435         #  @param theObject The object to be mirrored.
7436         #  @param theAxis Axis of symmetry.
7437         #  @param theCopy Flag used to mirror object itself or create a copy.
7438         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7439         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7440         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7441             """
7442             Mirror an object relatively the given axis.
7443
7444             Parameters:
7445                 theObject The object to be mirrored.
7446                 theAxis Axis of symmetry.
7447                 theCopy Flag used to mirror object itself or create a copy.
7448
7449             Returns:
7450                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7451                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7452             """
7453             if theCopy:
7454                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7455             else:
7456                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7457             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7458             return anObj
7459
7460         ## Create an object, symmetrical
7461         #  to the given one relatively the given axis.
7462         #  @param theObject The object to be mirrored.
7463         #  @param theAxis Axis of symmetry.
7464         #  @param theName Object name; when specified, this parameter is used
7465         #         for result publication in the study. Otherwise, if automatic
7466         #         publication is switched on, default value is used for result name.
7467         #
7468         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7469         #
7470         #  @ref tui_mirror "Example"
7471         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7472             """
7473             Create an object, symmetrical to the given one relatively the given axis.
7474
7475             Parameters:
7476                 theObject The object to be mirrored.
7477                 theAxis Axis of symmetry.
7478                 theName Object name; when specified, this parameter is used
7479                         for result publication in the study. Otherwise, if automatic
7480                         publication is switched on, default value is used for result name.
7481
7482             Returns: 
7483                 New GEOM.GEOM_Object, containing the mirrored shape.
7484             """
7485             # Example: see GEOM_TestAll.py
7486             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7487             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7488             self._autoPublish(anObj, theName, "mirrored")
7489             return anObj
7490
7491         ## Mirror an object relatively the given point.
7492         #  @param theObject The object to be mirrored.
7493         #  @param thePoint Point of symmetry.
7494         #  @param theCopy Flag used to mirror object itself or create a copy.
7495         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7496         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7497         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7498             """
7499             Mirror an object relatively the given point.
7500
7501             Parameters:
7502                 theObject The object to be mirrored.
7503                 thePoint Point of symmetry.
7504                 theCopy Flag used to mirror object itself or create a copy.
7505
7506             Returns:
7507                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7508                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7509             """
7510             # Example: see GEOM_TestAll.py
7511             if theCopy:
7512                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7513             else:
7514                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7515             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7516             return anObj
7517
7518         ## Create an object, symmetrical
7519         #  to the given one relatively the given point.
7520         #  @param theObject The object to be mirrored.
7521         #  @param thePoint Point of symmetry.
7522         #  @param theName Object name; when specified, this parameter is used
7523         #         for result publication in the study. Otherwise, if automatic
7524         #         publication is switched on, default value is used for result name.
7525         #
7526         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7527         #
7528         #  @ref tui_mirror "Example"
7529         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7530             """
7531             Create an object, symmetrical
7532             to the given one relatively the given point.
7533
7534             Parameters:
7535                 theObject The object to be mirrored.
7536                 thePoint Point of symmetry.
7537                 theName Object name; when specified, this parameter is used
7538                         for result publication in the study. Otherwise, if automatic
7539                         publication is switched on, default value is used for result name.
7540
7541             Returns:  
7542                 New GEOM.GEOM_Object, containing the mirrored shape.
7543             """
7544             # Example: see GEOM_TestAll.py
7545             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7546             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7547             self._autoPublish(anObj, theName, "mirrored")
7548             return anObj
7549
7550         ## Modify the location of the given object.
7551         #  @param theObject The object to be displaced.
7552         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7553         #                     If \a theStartLCS is NULL, displacement
7554         #                     will be performed from global CS.\n
7555         #                     If \a theObject itself is used as \a theStartLCS,
7556         #                     its location will be changed to \a theEndLCS.
7557         #  @param theEndLCS Coordinate system to perform displacement to it.
7558         #  @param theCopy Flag used to displace object itself or create a copy.
7559         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7560         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7561         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7562             """
7563             Modify the Location of the given object by LCS, creating its copy before the setting.
7564
7565             Parameters:
7566                 theObject The object to be displaced.
7567                 theStartLCS Coordinate system to perform displacement from it.
7568                             If theStartLCS is NULL, displacement
7569                             will be performed from global CS.
7570                             If theObject itself is used as theStartLCS,
7571                             its location will be changed to theEndLCS.
7572                 theEndLCS Coordinate system to perform displacement to it.
7573                 theCopy Flag used to displace object itself or create a copy.
7574
7575             Returns:
7576                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7577                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7578             """
7579             # Example: see GEOM_TestAll.py
7580             if theCopy:
7581                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7582             else:
7583                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7584             RaiseIfFailed("Displace", self.TrsfOp)
7585             return anObj
7586
7587         ## Modify the Location of the given object by LCS,
7588         #  creating its copy before the setting.
7589         #  @param theObject The object to be displaced.
7590         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7591         #                     If \a theStartLCS is NULL, displacement
7592         #                     will be performed from global CS.\n
7593         #                     If \a theObject itself is used as \a theStartLCS,
7594         #                     its location will be changed to \a theEndLCS.
7595         #  @param theEndLCS Coordinate system to perform displacement to it.
7596         #  @param theName Object name; when specified, this parameter is used
7597         #         for result publication in the study. Otherwise, if automatic
7598         #         publication is switched on, default value is used for result name.
7599         #
7600         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7601         #
7602         #  @ref tui_modify_location "Example"
7603         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7604             """
7605             Modify the Location of the given object by LCS, creating its copy before the setting.
7606
7607             Parameters:
7608                 theObject The object to be displaced.
7609                 theStartLCS Coordinate system to perform displacement from it.
7610                             If theStartLCS is NULL, displacement
7611                             will be performed from global CS.
7612                             If theObject itself is used as theStartLCS,
7613                             its location will be changed to theEndLCS.
7614                 theEndLCS Coordinate system to perform displacement to it.
7615                 theName Object name; when specified, this parameter is used
7616                         for result publication in the study. Otherwise, if automatic
7617                         publication is switched on, default value is used for result name.
7618
7619             Returns:  
7620                 New GEOM.GEOM_Object, containing the displaced shape.
7621
7622             Example of usage:
7623                 # create local coordinate systems
7624                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7625                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7626                 # modify the location of the given object
7627                 position = geompy.MakePosition(cylinder, cs1, cs2)
7628             """
7629             # Example: see GEOM_TestAll.py
7630             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7631             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7632             self._autoPublish(anObj, theName, "displaced")
7633             return anObj
7634
7635         ## Modify the Location of the given object by Path.
7636         #  @param  theObject The object to be displaced.
7637         #  @param  thePath Wire or Edge along that the object will be translated.
7638         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7639         #  @param  theCopy is to create a copy objects if true.
7640         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7641         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7642         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7643         #
7644         #  @ref tui_modify_location "Example"
7645         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7646             """
7647             Modify the Location of the given object by Path.
7648
7649             Parameters:
7650                  theObject The object to be displaced.
7651                  thePath Wire or Edge along that the object will be translated.
7652                  theDistance progress of Path (0 = start location, 1 = end of path location).
7653                  theCopy is to create a copy objects if true.
7654                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7655
7656             Returns:  
7657                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7658                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7659
7660             Example of usage:
7661                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7662             """
7663             # Example: see GEOM_TestAll.py
7664             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7665             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7666             return anObj
7667
7668         ## Modify the Location of the given object by Path, creating its copy before the operation.
7669         #  @param theObject The object to be displaced.
7670         #  @param thePath Wire or Edge along that the object will be translated.
7671         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7672         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7673         #  @param theName Object name; when specified, this parameter is used
7674         #         for result publication in the study. Otherwise, if automatic
7675         #         publication is switched on, default value is used for result name.
7676         #
7677         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7678         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7679             """
7680             Modify the Location of the given object by Path, creating its copy before the operation.
7681
7682             Parameters:
7683                  theObject The object to be displaced.
7684                  thePath Wire or Edge along that the object will be translated.
7685                  theDistance progress of Path (0 = start location, 1 = end of path location).
7686                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7687                  theName Object name; when specified, this parameter is used
7688                          for result publication in the study. Otherwise, if automatic
7689                          publication is switched on, default value is used for result name.
7690
7691             Returns:  
7692                 New GEOM.GEOM_Object, containing the displaced shape.
7693             """
7694             # Example: see GEOM_TestAll.py
7695             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7696             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7697             self._autoPublish(anObj, theName, "displaced")
7698             return anObj
7699
7700         ## Offset given shape.
7701         #  @param theObject The base object for the offset.
7702         #  @param theOffset Offset value.
7703         #  @param theCopy Flag used to offset object itself or create a copy.
7704         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7705         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7706         def Offset(self, theObject, theOffset, theCopy=False):
7707             """
7708             Offset given shape.
7709
7710             Parameters:
7711                 theObject The base object for the offset.
7712                 theOffset Offset value.
7713                 theCopy Flag used to offset object itself or create a copy.
7714
7715             Returns: 
7716                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7717                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7718             """
7719             theOffset, Parameters = ParseParameters(theOffset)
7720             if theCopy:
7721                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7722             else:
7723                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7724             RaiseIfFailed("Offset", self.TrsfOp)
7725             anObj.SetParameters(Parameters)
7726             return anObj
7727
7728         ## Create new object as offset of the given one.
7729         #  @param theObject The base object for the offset.
7730         #  @param theOffset Offset value.
7731         #  @param theName Object name; when specified, this parameter is used
7732         #         for result publication in the study. Otherwise, if automatic
7733         #         publication is switched on, default value is used for result name.
7734         #
7735         #  @return New GEOM.GEOM_Object, containing the offset object.
7736         #
7737         #  @ref tui_offset "Example"
7738         def MakeOffset(self, theObject, theOffset, theName=None):
7739             """
7740             Create new object as offset of the given one.
7741
7742             Parameters:
7743                 theObject The base object for the offset.
7744                 theOffset Offset value.
7745                 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             Returns:  
7750                 New GEOM.GEOM_Object, containing the offset object.
7751
7752             Example of usage:
7753                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7754                  # create a new object as offset of the given object
7755                  offset = geompy.MakeOffset(box, 70.)
7756             """
7757             # Example: see GEOM_TestAll.py
7758             theOffset, Parameters = ParseParameters(theOffset)
7759             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7760             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7761             anObj.SetParameters(Parameters)
7762             self._autoPublish(anObj, theName, "offset")
7763             return anObj
7764
7765         ## Create new object as projection of the given one on a 2D surface.
7766         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7767         #  @param theTarget The target object. It can be planar or cylindrical face.
7768         #  @param theName Object name; when specified, this parameter is used
7769         #         for result publication in the study. Otherwise, if automatic
7770         #         publication is switched on, default value is used for result name.
7771         #
7772         #  @return New GEOM.GEOM_Object, containing the projection.
7773         #
7774         #  @ref tui_projection "Example"
7775         def MakeProjection(self, theSource, theTarget, theName=None):
7776             """
7777             Create new object as projection of the given one on a 2D surface.
7778
7779             Parameters:
7780                 theSource The source object for the projection. It can be a point, edge or wire.
7781                 theTarget The target object. It can be planar or cylindrical face.
7782                 theName Object name; when specified, this parameter is used
7783                         for result publication in the study. Otherwise, if automatic
7784                         publication is switched on, default value is used for result name.
7785
7786             Returns:  
7787                 New GEOM.GEOM_Object, containing the projection.
7788             """
7789             # Example: see GEOM_TestAll.py
7790             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7791             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7792             self._autoPublish(anObj, theName, "projection")
7793             return anObj
7794
7795         # -----------------------------------------------------------------------------
7796         # Patterns
7797         # -----------------------------------------------------------------------------
7798
7799         ## Translate the given object along the given vector a given number times
7800         #  @param theObject The object to be translated.
7801         #  @param theVector Direction of the translation. DX if None.
7802         #  @param theStep Distance to translate on.
7803         #  @param theNbTimes Quantity of translations to be done.
7804         #  @param theName Object name; when specified, this parameter is used
7805         #         for result publication in the study. Otherwise, if automatic
7806         #         publication is switched on, default value is used for result name.
7807         #
7808         #  @return New GEOM.GEOM_Object, containing compound of all
7809         #          the shapes, obtained after each translation.
7810         #
7811         #  @ref tui_multi_translation "Example"
7812         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7813             """
7814             Translate the given object along the given vector a given number times
7815
7816             Parameters:
7817                 theObject The object to be translated.
7818                 theVector Direction of the translation. DX if None.
7819                 theStep Distance to translate on.
7820                 theNbTimes Quantity of translations to be done.
7821                 theName Object name; when specified, this parameter is used
7822                         for result publication in the study. Otherwise, if automatic
7823                         publication is switched on, default value is used for result name.
7824
7825             Returns:     
7826                 New GEOM.GEOM_Object, containing compound of all
7827                 the shapes, obtained after each translation.
7828
7829             Example of usage:
7830                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
7831             """
7832             # Example: see GEOM_TestAll.py
7833             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
7834             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
7835             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
7836             anObj.SetParameters(Parameters)
7837             self._autoPublish(anObj, theName, "multitranslation")
7838             return anObj
7839
7840         ## Conseqently apply two specified translations to theObject specified number of times.
7841         #  @param theObject The object to be translated.
7842         #  @param theVector1 Direction of the first translation. DX if None.
7843         #  @param theStep1 Step of the first translation.
7844         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
7845         #  @param theVector2 Direction of the second translation. DY if None.
7846         #  @param theStep2 Step of the second translation.
7847         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
7848         #  @param theName Object name; when specified, this parameter is used
7849         #         for result publication in the study. Otherwise, if automatic
7850         #         publication is switched on, default value is used for result name.
7851         #
7852         #  @return New GEOM.GEOM_Object, containing compound of all
7853         #          the shapes, obtained after each translation.
7854         #
7855         #  @ref tui_multi_translation "Example"
7856         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
7857                                    theVector2, theStep2, theNbTimes2, theName=None):
7858             """
7859             Conseqently apply two specified translations to theObject specified number of times.
7860
7861             Parameters:
7862                 theObject The object to be translated.
7863                 theVector1 Direction of the first translation. DX if None.
7864                 theStep1 Step of the first translation.
7865                 theNbTimes1 Quantity of translations to be done along theVector1.
7866                 theVector2 Direction of the second translation. DY if None.
7867                 theStep2 Step of the second translation.
7868                 theNbTimes2 Quantity of translations to be done along theVector2.
7869                 theName Object name; when specified, this parameter is used
7870                         for result publication in the study. Otherwise, if automatic
7871                         publication is switched on, default value is used for result name.
7872
7873             Returns:
7874                 New GEOM.GEOM_Object, containing compound of all
7875                 the shapes, obtained after each translation.
7876
7877             Example of usage:
7878                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
7879             """
7880             # Example: see GEOM_TestAll.py
7881             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
7882             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
7883                                                  theVector2, theStep2, theNbTimes2)
7884             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
7885             anObj.SetParameters(Parameters)
7886             self._autoPublish(anObj, theName, "multitranslation")
7887             return anObj
7888
7889         ## Rotate the given object around the given axis a given number times.
7890         #  Rotation angle will be 2*PI/theNbTimes.
7891         #  @param theObject The object to be rotated.
7892         #  @param theAxis The rotation axis. DZ if None.
7893         #  @param theNbTimes Quantity of rotations to be done.
7894         #  @param 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         #  @return New GEOM.GEOM_Object, containing compound of all the
7899         #          shapes, obtained after each rotation.
7900         #
7901         #  @ref tui_multi_rotation "Example"
7902         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
7903             """
7904             Rotate the given object around the given axis a given number times.
7905             Rotation angle will be 2*PI/theNbTimes.
7906
7907             Parameters:
7908                 theObject The object to be rotated.
7909                 theAxis The rotation axis. DZ if None.
7910                 theNbTimes Quantity of rotations to be done.
7911                 theName Object name; when specified, this parameter is used
7912                         for result publication in the study. Otherwise, if automatic
7913                         publication is switched on, default value is used for result name.
7914
7915             Returns:     
7916                 New GEOM.GEOM_Object, containing compound of all the
7917                 shapes, obtained after each rotation.
7918
7919             Example of usage:
7920                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
7921             """
7922             # Example: see GEOM_TestAll.py
7923             theNbTimes, Parameters = ParseParameters(theNbTimes)
7924             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
7925             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
7926             anObj.SetParameters(Parameters)
7927             self._autoPublish(anObj, theName, "multirotation")
7928             return anObj
7929
7930         ## Rotate the given object around the given axis
7931         #  a given number times on the given angle.
7932         #  @param theObject The object to be rotated.
7933         #  @param theAxis The rotation axis. DZ if None.
7934         #  @param theAngleStep Rotation angle in radians.
7935         #  @param theNbTimes Quantity of rotations to be done.
7936         #  @param theName Object name; when specified, this parameter is used
7937         #         for result publication in the study. Otherwise, if automatic
7938         #         publication is switched on, default value is used for result name.
7939         #
7940         #  @return New GEOM.GEOM_Object, containing compound of all the
7941         #          shapes, obtained after each rotation.
7942         #
7943         #  @ref tui_multi_rotation "Example"
7944         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
7945             """
7946             Rotate the given object around the given axis
7947             a given number times on the given angle.
7948
7949             Parameters:
7950                 theObject The object to be rotated.
7951                 theAxis The rotation axis. DZ if None.
7952                 theAngleStep Rotation angle in radians.
7953                 theNbTimes Quantity of rotations to be done.
7954                 theName Object name; when specified, this parameter is used
7955                         for result publication in the study. Otherwise, if automatic
7956                         publication is switched on, default value is used for result name.
7957
7958             Returns:     
7959                 New GEOM.GEOM_Object, containing compound of all the
7960                 shapes, obtained after each rotation.
7961
7962             Example of usage:
7963                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
7964             """
7965             # Example: see GEOM_TestAll.py
7966             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
7967             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
7968             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
7969             anObj.SetParameters(Parameters)
7970             self._autoPublish(anObj, theName, "multirotation")
7971             return anObj
7972
7973         ## Rotate the given object around the given axis a given
7974         #  number times and multi-translate each rotation result.
7975         #  Rotation angle will be 2*PI/theNbTimes1.
7976         #  Translation direction passes through center of gravity
7977         #  of rotated shape and its projection on the rotation axis.
7978         #  @param theObject The object to be rotated.
7979         #  @param theAxis Rotation axis. DZ if None.
7980         #  @param theNbTimes1 Quantity of rotations to be done.
7981         #  @param theRadialStep Translation distance.
7982         #  @param theNbTimes2 Quantity of translations to be done.
7983         #  @param theName Object name; when specified, this parameter is used
7984         #         for result publication in the study. Otherwise, if automatic
7985         #         publication is switched on, default value is used for result name.
7986         #
7987         #  @return New GEOM.GEOM_Object, containing compound of all the
7988         #          shapes, obtained after each transformation.
7989         #
7990         #  @ref tui_multi_rotation "Example"
7991         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
7992             """
7993             Rotate the given object around the
7994             given axis on the given angle a given number
7995             times and multi-translate each rotation result.
7996             Translation direction passes through center of gravity
7997             of rotated shape and its projection on the rotation axis.
7998
7999             Parameters:
8000                 theObject The object to be rotated.
8001                 theAxis Rotation axis. DZ if None.
8002                 theNbTimes1 Quantity of rotations to be done.
8003                 theRadialStep Translation distance.
8004                 theNbTimes2 Quantity of translations to be done.
8005                 theName Object name; when specified, this parameter is used
8006                         for result publication in the study. Otherwise, if automatic
8007                         publication is switched on, default value is used for result name.
8008
8009             Returns:    
8010                 New GEOM.GEOM_Object, containing compound of all the
8011                 shapes, obtained after each transformation.
8012
8013             Example of usage:
8014                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8015             """
8016             # Example: see GEOM_TestAll.py
8017             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8018             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8019             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8020             anObj.SetParameters(Parameters)
8021             self._autoPublish(anObj, theName, "multirotation")
8022             return anObj
8023
8024         ## Rotate the given object around the
8025         #  given axis on the given angle a given number
8026         #  times and multi-translate each rotation result.
8027         #  Translation direction passes through center of gravity
8028         #  of rotated shape and its projection on the rotation axis.
8029         #  @param theObject The object to be rotated.
8030         #  @param theAxis Rotation axis. DZ if None.
8031         #  @param theAngleStep Rotation angle in radians.
8032         #  @param theNbTimes1 Quantity of rotations to be done.
8033         #  @param theRadialStep Translation distance.
8034         #  @param theNbTimes2 Quantity of translations to be done.
8035         #  @param theName Object name; when specified, this parameter is used
8036         #         for result publication in the study. Otherwise, if automatic
8037         #         publication is switched on, default value is used for result name.
8038         #
8039         #  @return New GEOM.GEOM_Object, containing compound of all the
8040         #          shapes, obtained after each transformation.
8041         #
8042         #  @ref tui_multi_rotation "Example"
8043         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8044             """
8045             Rotate the given object around the
8046             given axis on the given angle a given number
8047             times and multi-translate each rotation result.
8048             Translation direction passes through center of gravity
8049             of rotated shape and its projection on the rotation axis.
8050
8051             Parameters:
8052                 theObject The object to be rotated.
8053                 theAxis Rotation axis. DZ if None.
8054                 theAngleStep Rotation angle in radians.
8055                 theNbTimes1 Quantity of rotations to be done.
8056                 theRadialStep Translation distance.
8057                 theNbTimes2 Quantity of translations to be done.
8058                 theName Object name; when specified, this parameter is used
8059                         for result publication in the study. Otherwise, if automatic
8060                         publication is switched on, default value is used for result name.
8061
8062             Returns:    
8063                 New GEOM.GEOM_Object, containing compound of all the
8064                 shapes, obtained after each transformation.
8065
8066             Example of usage:
8067                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8068             """
8069             # Example: see GEOM_TestAll.py
8070             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8071             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8072             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8073             anObj.SetParameters(Parameters)
8074             self._autoPublish(anObj, theName, "multirotation")
8075             return anObj
8076
8077         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8078         #
8079         #  @ref swig_MakeMultiRotation "Example"
8080         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8081             """
8082             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8083
8084             Example of usage:
8085                 pz = geompy.MakeVertex(0, 0, 100)
8086                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8087                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8088             """
8089             # Example: see GEOM_TestOthers.py
8090             aVec = self.MakeLine(aPoint,aDir)
8091             # note: auto-publishing is done in self.MultiRotate1D()
8092             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8093             return anObj
8094
8095         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8096         #
8097         #  @ref swig_MakeMultiRotation "Example"
8098         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8099             """
8100             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8101
8102             Example of usage:
8103                 pz = geompy.MakeVertex(0, 0, 100)
8104                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8105                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8106             """
8107             # Example: see GEOM_TestOthers.py
8108             aVec = self.MakeLine(aPoint,aDir)
8109             # note: auto-publishing is done in self.MultiRotate1D()
8110             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8111             return anObj
8112
8113         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8114         #
8115         #  @ref swig_MakeMultiRotation "Example"
8116         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8117             """
8118             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8119             
8120             Example of usage:
8121                 pz = geompy.MakeVertex(0, 0, 100)
8122                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8123                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8124             """
8125             # Example: see GEOM_TestOthers.py
8126             aVec = self.MakeLine(aPoint,aDir)
8127             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8128             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8129             return anObj
8130
8131         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8132         #
8133         #  @ref swig_MakeMultiRotation "Example"
8134         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8135             """
8136             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8137             
8138             Example of usage:
8139                 pz = geompy.MakeVertex(0, 0, 100)
8140                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8141                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8142             """
8143             # Example: see GEOM_TestOthers.py
8144             aVec = self.MakeLine(aPoint,aDir)
8145             # note: auto-publishing is done in self.MultiRotate2D()
8146             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8147             return anObj
8148
8149         # end of l3_transform
8150         ## @}
8151
8152         ## @addtogroup l3_transform_d
8153         ## @{
8154
8155         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8156         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8157             """
8158             Deprecated method. Use MultiRotate1DNbTimes instead.
8159             """
8160             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8161             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8162
8163         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8164         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8165         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8166             """
8167             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8168             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8169
8170             Example of usage:
8171                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8172             """
8173             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8174             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8175             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8176             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8177             anObj.SetParameters(Parameters)
8178             self._autoPublish(anObj, theName, "multirotation")
8179             return anObj
8180
8181         ## The same, as MultiRotate1D(), but axis is given by direction and point
8182         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8183         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8184             """
8185             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8186             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8187
8188             Example of usage:
8189                 pz = geompy.MakeVertex(0, 0, 100)
8190                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8191                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8192             """
8193             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8194             aVec = self.MakeLine(aPoint,aDir)
8195             # note: auto-publishing is done in self.MultiRotate1D()
8196             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8197             return anObj
8198
8199         ## The same, as MultiRotate2D(), but axis is given by direction and point
8200         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8201         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8202             """
8203             The same, as MultiRotate2D(), but axis is given by direction and point
8204             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8205             
8206             Example of usage:
8207                 pz = geompy.MakeVertex(0, 0, 100)
8208                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8209                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8210             """
8211             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8212             aVec = self.MakeLine(aPoint,aDir)
8213             # note: auto-publishing is done in self.MultiRotate2D()
8214             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8215             return anObj
8216
8217         # end of l3_transform_d
8218         ## @}
8219
8220         ## @addtogroup l3_local
8221         ## @{
8222
8223         ## Perform a fillet on all edges of the given shape.
8224         #  @param theShape Shape, to perform fillet on.
8225         #  @param theR Fillet radius.
8226         #  @param theName Object name; when specified, this parameter is used
8227         #         for result publication in the study. Otherwise, if automatic
8228         #         publication is switched on, default value is used for result name.
8229         #
8230         #  @return New GEOM.GEOM_Object, containing the result shape.
8231         #
8232         #  @ref tui_fillet "Example 1"
8233         #  \n @ref swig_MakeFilletAll "Example 2"
8234         def MakeFilletAll(self, theShape, theR, theName=None):
8235             """
8236             Perform a fillet on all edges of the given shape.
8237
8238             Parameters:
8239                 theShape Shape, to perform fillet on.
8240                 theR Fillet radius.
8241                 theName Object name; when specified, this parameter is used
8242                         for result publication in the study. Otherwise, if automatic
8243                         publication is switched on, default value is used for result name.
8244
8245             Returns: 
8246                 New GEOM.GEOM_Object, containing the result shape.
8247
8248             Example of usage: 
8249                filletall = geompy.MakeFilletAll(prism, 10.)
8250             """
8251             # Example: see GEOM_TestOthers.py
8252             theR,Parameters = ParseParameters(theR)
8253             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8254             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8255             anObj.SetParameters(Parameters)
8256             self._autoPublish(anObj, theName, "fillet")
8257             return anObj
8258
8259         ## Perform a fillet on the specified edges/faces of the given shape
8260         #  @param theShape Shape, to perform fillet on.
8261         #  @param theR Fillet radius.
8262         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8263         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8264         #  @param theName Object name; when specified, this parameter is used
8265         #         for result publication in the study. Otherwise, if automatic
8266         #         publication is switched on, default value is used for result name.
8267         #
8268         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8269         #
8270         #  @return New GEOM.GEOM_Object, containing the result shape.
8271         #
8272         #  @ref tui_fillet "Example"
8273         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8274             """
8275             Perform a fillet on the specified edges/faces of the given shape
8276
8277             Parameters:
8278                 theShape Shape, to perform fillet on.
8279                 theR Fillet radius.
8280                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8281                 theListShapes Global indices of edges/faces to perform fillet on.
8282                 theName Object name; when specified, this parameter is used
8283                         for result publication in the study. Otherwise, if automatic
8284                         publication is switched on, default value is used for result name.
8285
8286             Note:
8287                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8288
8289             Returns: 
8290                 New GEOM.GEOM_Object, containing the result shape.
8291
8292             Example of usage:
8293                 # get the list of IDs (IDList) for the fillet
8294                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8295                 IDlist_e = []
8296                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8297                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8298                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8299                 # make a fillet on the specified edges of the given shape
8300                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8301             """
8302             # Example: see GEOM_TestAll.py
8303             theR,Parameters = ParseParameters(theR)
8304             anObj = None
8305             if theShapeType == self.ShapeType["EDGE"]:
8306                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8307                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8308             else:
8309                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8310                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8311             anObj.SetParameters(Parameters)
8312             self._autoPublish(anObj, theName, "fillet")
8313             return anObj
8314
8315         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8316         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8317             """
8318             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8319
8320             Example of usage:
8321                 # get the list of IDs (IDList) for the fillet
8322                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8323                 IDlist_e = []
8324                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8325                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8326                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8327                 # make a fillet on the specified edges of the given shape
8328                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8329             """
8330             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8331             anObj = None
8332             if theShapeType == self.ShapeType["EDGE"]:
8333                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8334                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8335             else:
8336                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8337                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8338             anObj.SetParameters(Parameters)
8339             self._autoPublish(anObj, theName, "fillet")
8340             return anObj
8341
8342         ## Perform a fillet on the specified edges of the given shape
8343         #  @param theShape  Wire Shape to perform fillet on.
8344         #  @param theR  Fillet radius.
8345         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8346         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8347         #    \note The list of vertices could be empty,
8348         #          in this case fillet will done done at all vertices in wire
8349         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8350         #         by the length of the edges, nearest to the fillet vertex.
8351         #         But sometimes the next edge is C1 continuous with the one, nearest to
8352         #         the fillet point, and such two (or more) edges can be united to allow
8353         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8354         #         thus ignoring the secant vertex (vertices).
8355         #  @param theName Object name; when specified, this parameter is used
8356         #         for result publication in the study. Otherwise, if automatic
8357         #         publication is switched on, default value is used for result name.
8358         #
8359         #  @return New GEOM.GEOM_Object, containing the result shape.
8360         #
8361         #  @ref tui_fillet2d "Example"
8362         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8363             """
8364             Perform a fillet on the specified edges of the given shape
8365
8366             Parameters:
8367                 theShape  Wire Shape to perform fillet on.
8368                 theR  Fillet radius.
8369                 theListOfVertexes Global indices of vertexes to perform fillet on.
8370                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8371                     by the length of the edges, nearest to the fillet vertex.
8372                     But sometimes the next edge is C1 continuous with the one, nearest to
8373                     the fillet point, and such two (or more) edges can be united to allow
8374                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8375                     thus ignoring the secant vertex (vertices).
8376                 theName Object name; when specified, this parameter is used
8377                         for result publication in the study. Otherwise, if automatic
8378                         publication is switched on, default value is used for result name.
8379             Note:
8380                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8381
8382                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8383
8384             Returns: 
8385                 New GEOM.GEOM_Object, containing the result shape.
8386
8387             Example of usage:  
8388                 # create wire
8389                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8390                 # make fillet at given wire vertices with giver radius
8391                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8392             """
8393             # Example: see GEOM_TestAll.py
8394             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8395             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8396             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8397             anObj.SetParameters(Parameters)
8398             self._autoPublish(anObj, theName, "fillet")
8399             return anObj
8400
8401         ## Perform a fillet at the specified vertices of the given face/shell.
8402         #  @param theShape Face or Shell shape to perform fillet on.
8403         #  @param theR Fillet radius.
8404         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8405         #  @param theName Object name; when specified, this parameter is used
8406         #         for result publication in the study. Otherwise, if automatic
8407         #         publication is switched on, default value is used for result name.
8408         #
8409         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8410         #
8411         #  @return New GEOM.GEOM_Object, containing the result shape.
8412         #
8413         #  @ref tui_fillet2d "Example"
8414         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8415             """
8416             Perform a fillet at the specified vertices of the given face/shell.
8417
8418             Parameters:
8419                 theShape  Face or Shell shape to perform fillet on.
8420                 theR  Fillet radius.
8421                 theListOfVertexes Global indices of vertexes to perform fillet on.
8422                 theName Object name; when specified, this parameter is used
8423                         for result publication in the study. Otherwise, if automatic
8424                         publication is switched on, default value is used for result name.
8425             Note:
8426                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8427
8428             Returns: 
8429                 New GEOM.GEOM_Object, containing the result shape.
8430
8431             Example of usage:
8432                 face = geompy.MakeFaceHW(100, 100, 1)
8433                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8434             """
8435             # Example: see GEOM_TestAll.py
8436             theR,Parameters = ParseParameters(theR)
8437             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8438             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8439             anObj.SetParameters(Parameters)
8440             self._autoPublish(anObj, theName, "fillet")
8441             return anObj
8442
8443         ## Perform a symmetric chamfer on all edges of the given shape.
8444         #  @param theShape Shape, to perform chamfer on.
8445         #  @param theD Chamfer size along each face.
8446         #  @param theName Object name; when specified, this parameter is used
8447         #         for result publication in the study. Otherwise, if automatic
8448         #         publication is switched on, default value is used for result name.
8449         #
8450         #  @return New GEOM.GEOM_Object, containing the result shape.
8451         #
8452         #  @ref tui_chamfer "Example 1"
8453         #  \n @ref swig_MakeChamferAll "Example 2"
8454         def MakeChamferAll(self, theShape, theD, theName=None):
8455             """
8456             Perform a symmetric chamfer on all edges of the given shape.
8457
8458             Parameters:
8459                 theShape Shape, to perform chamfer on.
8460                 theD Chamfer size along each face.
8461                 theName Object name; when specified, this parameter is used
8462                         for result publication in the study. Otherwise, if automatic
8463                         publication is switched on, default value is used for result name.
8464
8465             Returns:     
8466                 New GEOM.GEOM_Object, containing the result shape.
8467
8468             Example of usage:
8469                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8470             """
8471             # Example: see GEOM_TestOthers.py
8472             theD,Parameters = ParseParameters(theD)
8473             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8474             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8475             anObj.SetParameters(Parameters)
8476             self._autoPublish(anObj, theName, "chamfer")
8477             return anObj
8478
8479         ## Perform a chamfer on edges, common to the specified faces,
8480         #  with distance D1 on the Face1
8481         #  @param theShape Shape, to perform chamfer on.
8482         #  @param theD1 Chamfer size along \a theFace1.
8483         #  @param theD2 Chamfer size along \a theFace2.
8484         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8485         #  @param theName Object name; when specified, this parameter is used
8486         #         for result publication in the study. Otherwise, if automatic
8487         #         publication is switched on, default value is used for result name.
8488         #
8489         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8490         #
8491         #  @return New GEOM.GEOM_Object, containing the result shape.
8492         #
8493         #  @ref tui_chamfer "Example"
8494         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8495             """
8496             Perform a chamfer on edges, common to the specified faces,
8497             with distance D1 on the Face1
8498
8499             Parameters:
8500                 theShape Shape, to perform chamfer on.
8501                 theD1 Chamfer size along theFace1.
8502                 theD2 Chamfer size along theFace2.
8503                 theFace1,theFace2 Global indices of two faces of theShape.
8504                 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             Note:
8509                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8510
8511             Returns:      
8512                 New GEOM.GEOM_Object, containing the result shape.
8513
8514             Example of usage:
8515                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8516                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8517                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8518                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8519             """
8520             # Example: see GEOM_TestAll.py
8521             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8522             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8523             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8524             anObj.SetParameters(Parameters)
8525             self._autoPublish(anObj, theName, "chamfer")
8526             return anObj
8527
8528         ## Perform a chamfer on edges
8529         #  @param theShape Shape, to perform chamfer on.
8530         #  @param theD Chamfer length
8531         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8532         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8533         #  @param theName Object name; when specified, this parameter is used
8534         #         for result publication in the study. Otherwise, if automatic
8535         #         publication is switched on, default value is used for result name.
8536         #
8537         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8538         #
8539         #  @return New GEOM.GEOM_Object, containing the result shape.
8540         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8541             """
8542             Perform a chamfer on edges
8543
8544             Parameters:
8545                 theShape Shape, to perform chamfer on.
8546                 theD1 Chamfer size along theFace1.
8547                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8548                 theFace1,theFace2 Global indices of two faces of theShape.
8549                 theName Object name; when specified, this parameter is used
8550                         for result publication in the study. Otherwise, if automatic
8551                         publication is switched on, default value is used for result name.
8552
8553             Note:
8554                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8555
8556             Returns:      
8557                 New GEOM.GEOM_Object, containing the result shape.
8558
8559             Example of usage:
8560                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8561                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8562                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8563                 ang = 30
8564                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8565             """
8566             flag = False
8567             if isinstance(theAngle,str):
8568                 flag = True
8569             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8570             if flag:
8571                 theAngle = theAngle*math.pi/180.0
8572             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8573             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8574             anObj.SetParameters(Parameters)
8575             self._autoPublish(anObj, theName, "chamfer")
8576             return anObj
8577
8578         ## Perform a chamfer on all edges of the specified faces,
8579         #  with distance D1 on the first specified face (if several for one edge)
8580         #  @param theShape Shape, to perform chamfer on.
8581         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8582         #               connected to the edge, are in \a theFaces, \a theD1
8583         #               will be get along face, which is nearer to \a theFaces beginning.
8584         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8585         #  @param theFaces Sequence of global indices of faces of \a theShape.
8586         #  @param theName Object name; when specified, this parameter is used
8587         #         for result publication in the study. Otherwise, if automatic
8588         #         publication is switched on, default value is used for result name.
8589         #
8590         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8591         #
8592         #  @return New GEOM.GEOM_Object, containing the result shape.
8593         #
8594         #  @ref tui_chamfer "Example"
8595         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8596             """
8597             Perform a chamfer on all edges of the specified faces,
8598             with distance D1 on the first specified face (if several for one edge)
8599
8600             Parameters:
8601                 theShape Shape, to perform chamfer on.
8602                 theD1 Chamfer size along face from  theFaces. If both faces,
8603                       connected to the edge, are in theFaces, theD1
8604                       will be get along face, which is nearer to theFaces beginning.
8605                 theD2 Chamfer size along another of two faces, connected to the edge.
8606                 theFaces Sequence of global indices of faces of theShape.
8607                 theName Object name; when specified, this parameter is used
8608                         for result publication in the study. Otherwise, if automatic
8609                         publication is switched on, default value is used for result name.
8610                 
8611             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8612
8613             Returns:  
8614                 New GEOM.GEOM_Object, containing the result shape.
8615             """
8616             # Example: see GEOM_TestAll.py
8617             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8618             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8619             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8620             anObj.SetParameters(Parameters)
8621             self._autoPublish(anObj, theName, "chamfer")
8622             return anObj
8623
8624         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8625         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8626         #
8627         #  @ref swig_FilletChamfer "Example"
8628         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8629             """
8630             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8631             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8632             """
8633             flag = False
8634             if isinstance(theAngle,str):
8635                 flag = True
8636             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8637             if flag:
8638                 theAngle = theAngle*math.pi/180.0
8639             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8640             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8641             anObj.SetParameters(Parameters)
8642             self._autoPublish(anObj, theName, "chamfer")
8643             return anObj
8644
8645         ## Perform a chamfer on edges,
8646         #  with distance D1 on the first specified face (if several for one edge)
8647         #  @param theShape Shape, to perform chamfer on.
8648         #  @param theD1,theD2 Chamfer size
8649         #  @param theEdges Sequence of edges of \a theShape.
8650         #  @param theName Object name; when specified, this parameter is used
8651         #         for result publication in the study. Otherwise, if automatic
8652         #         publication is switched on, default value is used for result name.
8653         #
8654         #  @return New GEOM.GEOM_Object, containing the result shape.
8655         #
8656         #  @ref swig_FilletChamfer "Example"
8657         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8658             """
8659             Perform a chamfer on edges,
8660             with distance D1 on the first specified face (if several for one edge)
8661             
8662             Parameters:
8663                 theShape Shape, to perform chamfer on.
8664                 theD1,theD2 Chamfer size
8665                 theEdges Sequence of edges of theShape.
8666                 theName Object name; when specified, this parameter is used
8667                         for result publication in the study. Otherwise, if automatic
8668                         publication is switched on, default value is used for result name.
8669
8670             Returns:
8671                 New GEOM.GEOM_Object, containing the result shape.
8672             """
8673             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8674             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8675             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8676             anObj.SetParameters(Parameters)
8677             self._autoPublish(anObj, theName, "chamfer")
8678             return anObj
8679
8680         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8681         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8682         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8683             """
8684             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8685             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8686             """
8687             flag = False
8688             if isinstance(theAngle,str):
8689                 flag = True
8690             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8691             if flag:
8692                 theAngle = theAngle*math.pi/180.0
8693             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8694             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8695             anObj.SetParameters(Parameters)
8696             self._autoPublish(anObj, theName, "chamfer")
8697             return anObj
8698
8699         ## @sa MakeChamferEdge(), MakeChamferFaces()
8700         #
8701         #  @ref swig_MakeChamfer "Example"
8702         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8703             """
8704             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8705             """
8706             # Example: see GEOM_TestOthers.py
8707             anObj = None
8708             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8709             if aShapeType == self.ShapeType["EDGE"]:
8710                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8711             else:
8712                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8713             return anObj
8714             
8715         ## Remove material from a solid by extrusion of the base shape on the given distance.
8716         #  @param theInit Shape to remove material from. It must be a solid or 
8717         #  a compound made of a single solid.
8718         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8719         #  @param theH Prism dimension along the normal to theBase
8720         #  @param theAngle Draft angle in degrees.
8721         #  @param theName Object name; when specified, this parameter is used
8722         #         for result publication in the study. Otherwise, if automatic
8723         #         publication is switched on, default value is used for result name.
8724         #
8725         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8726         #
8727         #  @ref tui_creation_prism "Example"
8728         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8729             """
8730             Add material to a solid by extrusion of the base shape on the given distance.
8731
8732             Parameters:
8733                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8734                 theBase Closed edge or wire defining the base shape to be extruded.
8735                 theH Prism dimension along the normal  to theBase
8736                 theAngle Draft angle in degrees.
8737                 theName Object name; when specified, this parameter is used
8738                         for result publication in the study. Otherwise, if automatic
8739                         publication is switched on, default value is used for result name.
8740
8741             Returns:
8742                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8743             """
8744             # Example: see GEOM_TestAll.py
8745             #theH,Parameters = ParseParameters(theH)
8746             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8747             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8748             #anObj.SetParameters(Parameters)
8749             self._autoPublish(anObj, theName, "extrudedCut")
8750             return anObj   
8751             
8752         ## Add material to a solid by extrusion of the base shape on the given distance.
8753         #  @param theInit Shape to add material to. It must be a solid or 
8754         #  a compound made of a single solid.
8755         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8756         #  @param theH Prism dimension along the normal to theBase
8757         #  @param theAngle Draft angle in degrees.
8758         #  @param theName Object name; when specified, this parameter is used
8759         #         for result publication in the study. Otherwise, if automatic
8760         #         publication is switched on, default value is used for result name.
8761         #
8762         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8763         #
8764         #  @ref tui_creation_prism "Example"
8765         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8766             """
8767             Add material to a solid by extrusion of the base shape on the given distance.
8768
8769             Parameters:
8770                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8771                 theBase Closed edge or wire defining the base shape to be extruded.
8772                 theH Prism dimension along the normal  to theBase
8773                 theAngle Draft angle in degrees.
8774                 theName Object name; when specified, this parameter is used
8775                         for result publication in the study. Otherwise, if automatic
8776                         publication is switched on, default value is used for result name.
8777
8778             Returns:
8779                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8780             """
8781             # Example: see GEOM_TestAll.py
8782             #theH,Parameters = ParseParameters(theH)
8783             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8784             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8785             #anObj.SetParameters(Parameters)
8786             self._autoPublish(anObj, theName, "extrudedBoss")
8787             return anObj   
8788
8789         # end of l3_local
8790         ## @}
8791
8792         ## @addtogroup l3_basic_op
8793         ## @{
8794
8795         ## Perform an Archimde operation on the given shape with given parameters.
8796         #  The object presenting the resulting face is returned.
8797         #  @param theShape Shape to be put in water.
8798         #  @param theWeight Weight og the shape.
8799         #  @param theWaterDensity Density of the water.
8800         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8801         #  @param theName Object name; when specified, this parameter is used
8802         #         for result publication in the study. Otherwise, if automatic
8803         #         publication is switched on, default value is used for result name.
8804         #
8805         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8806         #          by a plane, corresponding to water level.
8807         #
8808         #  @ref tui_archimede "Example"
8809         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8810             """
8811             Perform an Archimde operation on the given shape with given parameters.
8812             The object presenting the resulting face is returned.
8813
8814             Parameters: 
8815                 theShape Shape to be put in water.
8816                 theWeight Weight og the shape.
8817                 theWaterDensity Density of the water.
8818                 theMeshDeflection Deflection of the mesh, using to compute the section.
8819                 theName Object name; when specified, this parameter is used
8820                         for result publication in the study. Otherwise, if automatic
8821                         publication is switched on, default value is used for result name.
8822
8823             Returns: 
8824                 New GEOM.GEOM_Object, containing a section of theShape
8825                 by a plane, corresponding to water level.
8826             """
8827             # Example: see GEOM_TestAll.py
8828             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
8829               theWeight,theWaterDensity,theMeshDeflection)
8830             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
8831             RaiseIfFailed("MakeArchimede", self.LocalOp)
8832             anObj.SetParameters(Parameters)
8833             self._autoPublish(anObj, theName, "archimede")
8834             return anObj
8835
8836         # end of l3_basic_op
8837         ## @}
8838
8839         ## @addtogroup l2_measure
8840         ## @{
8841
8842         ## Get point coordinates
8843         #  @return [x, y, z]
8844         #
8845         #  @ref tui_measurement_tools_page "Example"
8846         def PointCoordinates(self,Point):
8847             """
8848             Get point coordinates
8849
8850             Returns:
8851                 [x, y, z]
8852             """
8853             # Example: see GEOM_TestMeasures.py
8854             aTuple = self.MeasuOp.PointCoordinates(Point)
8855             RaiseIfFailed("PointCoordinates", self.MeasuOp)
8856             return aTuple 
8857         
8858         ## Get vector coordinates
8859         #  @return [x, y, z]
8860         #
8861         #  @ref tui_measurement_tools_page "Example"
8862         def VectorCoordinates(self,Vector):
8863             """
8864             Get vector coordinates
8865
8866             Returns:
8867                 [x, y, z]
8868             """
8869
8870             p1=self.GetFirstVertex(Vector)
8871             p2=self.GetLastVertex(Vector)
8872             
8873             X1=self.PointCoordinates(p1)
8874             X2=self.PointCoordinates(p2)
8875
8876             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
8877
8878
8879         ## Compute cross product
8880         #  @return vector w=u^v
8881         #
8882         #  @ref tui_measurement_tools_page "Example"
8883         def CrossProduct(self, Vector1, Vector2):
8884             """ 
8885             Compute cross product
8886             
8887             Returns: vector w=u^v
8888             """
8889             u=self.VectorCoordinates(Vector1)
8890             v=self.VectorCoordinates(Vector2)
8891             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])
8892             
8893             return w
8894         
8895         ## Compute cross product
8896         #  @return dot product  p=u.v
8897         #
8898         #  @ref tui_measurement_tools_page "Example"
8899         def DotProduct(self, Vector1, Vector2):
8900             """ 
8901             Compute cross product
8902             
8903             Returns: dot product  p=u.v
8904             """
8905             u=self.VectorCoordinates(Vector1)
8906             v=self.VectorCoordinates(Vector2)
8907             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
8908             
8909             return p
8910
8911
8912         ## Get summarized length of all wires,
8913         #  area of surface and volume of the given shape.
8914         #  @param theShape Shape to define properties of.
8915         #  @return [theLength, theSurfArea, theVolume]\n
8916         #  theLength:   Summarized length of all wires of the given shape.\n
8917         #  theSurfArea: Area of surface of the given shape.\n
8918         #  theVolume:   Volume of the given shape.
8919         #
8920         #  @ref tui_measurement_tools_page "Example"
8921         def BasicProperties(self,theShape):
8922             """
8923             Get summarized length of all wires,
8924             area of surface and volume of the given shape.
8925
8926             Parameters: 
8927                 theShape Shape to define properties of.
8928
8929             Returns:
8930                 [theLength, theSurfArea, theVolume]
8931                  theLength:   Summarized length of all wires of the given shape.
8932                  theSurfArea: Area of surface of the given shape.
8933                  theVolume:   Volume of the given shape.
8934             """
8935             # Example: see GEOM_TestMeasures.py
8936             aTuple = self.MeasuOp.GetBasicProperties(theShape)
8937             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
8938             return aTuple
8939
8940         ## Get parameters of bounding box of the given shape
8941         #  @param theShape Shape to obtain bounding box of.
8942         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
8943         #  Xmin,Xmax: Limits of shape along OX axis.
8944         #  Ymin,Ymax: Limits of shape along OY axis.
8945         #  Zmin,Zmax: Limits of shape along OZ axis.
8946         #
8947         #  @ref tui_measurement_tools_page "Example"
8948         def BoundingBox (self, theShape):
8949             """
8950             Get parameters of bounding box of the given shape
8951
8952             Parameters: 
8953                 theShape Shape to obtain bounding box of.
8954
8955             Returns:
8956                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
8957                  Xmin,Xmax: Limits of shape along OX axis.
8958                  Ymin,Ymax: Limits of shape along OY axis.
8959                  Zmin,Zmax: Limits of shape along OZ axis.
8960             """
8961             # Example: see GEOM_TestMeasures.py
8962             aTuple = self.MeasuOp.GetBoundingBox(theShape)
8963             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
8964             return aTuple
8965
8966         ## Get bounding box of the given shape
8967         #  @param theShape Shape to obtain bounding box of.
8968         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created box.
8973         #
8974         #  @ref tui_measurement_tools_page "Example"
8975         def MakeBoundingBox (self, theShape, theName=None):
8976             """
8977             Get bounding box of the given shape
8978
8979             Parameters: 
8980                 theShape Shape to obtain bounding box of.
8981                 theName Object name; when specified, this parameter is used
8982                         for result publication in the study. Otherwise, if automatic
8983                         publication is switched on, default value is used for result name.
8984
8985             Returns:
8986                 New GEOM.GEOM_Object, containing the created box.
8987             """
8988             # Example: see GEOM_TestMeasures.py
8989             anObj = self.MeasuOp.MakeBoundingBox(theShape)
8990             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
8991             self._autoPublish(anObj, theName, "bndbox")
8992             return anObj
8993
8994         ## Get inertia matrix and moments of inertia of theShape.
8995         #  @param theShape Shape to calculate inertia of.
8996         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
8997         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
8998         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
8999         #
9000         #  @ref tui_measurement_tools_page "Example"
9001         def Inertia(self,theShape):
9002             """
9003             Get inertia matrix and moments of inertia of theShape.
9004
9005             Parameters: 
9006                 theShape Shape to calculate inertia of.
9007
9008             Returns:
9009                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9010                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9011                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9012             """
9013             # Example: see GEOM_TestMeasures.py
9014             aTuple = self.MeasuOp.GetInertia(theShape)
9015             RaiseIfFailed("GetInertia", self.MeasuOp)
9016             return aTuple
9017
9018         ## Get if coords are included in the shape (ST_IN or ST_ON)
9019         #  @param theShape Shape
9020         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9021         #  @param tolerance to be used (default is 1.0e-7)
9022         #  @return list_of_boolean = [res1, res2, ...]
9023         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9024             """
9025             Get if coords are included in the shape (ST_IN or ST_ON)
9026             
9027             Parameters: 
9028                 theShape Shape
9029                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9030                 tolerance to be used (default is 1.0e-7)
9031
9032             Returns:
9033                 list_of_boolean = [res1, res2, ...]
9034             """
9035             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9036
9037         ## Get minimal distance between the given shapes.
9038         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9039         #  @return Value of the minimal distance between the given shapes.
9040         #
9041         #  @ref tui_measurement_tools_page "Example"
9042         def MinDistance(self, theShape1, theShape2):
9043             """
9044             Get minimal distance between the given shapes.
9045             
9046             Parameters: 
9047                 theShape1,theShape2 Shapes to find minimal distance between.
9048
9049             Returns:    
9050                 Value of the minimal distance between the given shapes.
9051             """
9052             # Example: see GEOM_TestMeasures.py
9053             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9054             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9055             return aTuple[0]
9056
9057         ## Get minimal distance between the given shapes.
9058         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9059         #  @return Value of the minimal distance between the given shapes, in form of list
9060         #          [Distance, DX, DY, DZ].
9061         #
9062         #  @ref swig_all_measure "Example"
9063         def MinDistanceComponents(self, theShape1, theShape2):
9064             """
9065             Get minimal distance between the given shapes.
9066
9067             Parameters: 
9068                 theShape1,theShape2 Shapes to find minimal distance between.
9069
9070             Returns:  
9071                 Value of the minimal distance between the given shapes, in form of list
9072                 [Distance, DX, DY, DZ]
9073             """
9074             # Example: see GEOM_TestMeasures.py
9075             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9076             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9077             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9078             return aRes
9079
9080         ## Get closest points of the given shapes.
9081         #  @param theShape1,theShape2 Shapes to find closest points of.
9082         #  @return The number of found solutions (-1 in case of infinite number of
9083         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9084         #
9085         #  @ref tui_measurement_tools_page "Example"
9086         def ClosestPoints (self, theShape1, theShape2):
9087             """
9088             Get closest points of the given shapes.
9089
9090             Parameters: 
9091                 theShape1,theShape2 Shapes to find closest points of.
9092
9093             Returns:    
9094                 The number of found solutions (-1 in case of infinite number of
9095                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9096             """
9097             # Example: see GEOM_TestMeasures.py
9098             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9099             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9100             return aTuple
9101
9102         ## Get angle between the given shapes in degrees.
9103         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9104         #  @note If both arguments are vectors, the angle is computed in accordance
9105         #        with their orientations, otherwise the minimum angle is computed.
9106         #  @return Value of the angle between the given shapes in degrees.
9107         #
9108         #  @ref tui_measurement_tools_page "Example"
9109         def GetAngle(self, theShape1, theShape2):
9110             """
9111             Get angle between the given shapes in degrees.
9112
9113             Parameters: 
9114                 theShape1,theShape2 Lines or linear edges to find angle between.
9115
9116             Note:
9117                 If both arguments are vectors, the angle is computed in accordance
9118                 with their orientations, otherwise the minimum angle is computed.
9119
9120             Returns:  
9121                 Value of the angle between the given shapes in degrees.
9122             """
9123             # Example: see GEOM_TestMeasures.py
9124             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9125             RaiseIfFailed("GetAngle", self.MeasuOp)
9126             return anAngle
9127
9128         ## Get angle between the given shapes in radians.
9129         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9130         #  @note If both arguments are vectors, the angle is computed in accordance
9131         #        with their orientations, otherwise the minimum angle is computed.
9132         #  @return Value of the angle between the given shapes in radians.
9133         #
9134         #  @ref tui_measurement_tools_page "Example"
9135         def GetAngleRadians(self, theShape1, theShape2):
9136             """
9137             Get angle between the given shapes in radians.
9138
9139             Parameters: 
9140                 theShape1,theShape2 Lines or linear edges to find angle between.
9141
9142                 
9143             Note:
9144                 If both arguments are vectors, the angle is computed in accordance
9145                 with their orientations, otherwise the minimum angle is computed.
9146
9147             Returns:  
9148                 Value of the angle between the given shapes in radians.
9149             """
9150             # Example: see GEOM_TestMeasures.py
9151             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9152             RaiseIfFailed("GetAngle", self.MeasuOp)
9153             return anAngle
9154
9155         ## Get angle between the given vectors in degrees.
9156         #  @param theShape1,theShape2 Vectors to find angle between.
9157         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9158         #                 if False, the opposite vector to the normal vector is used.
9159         #  @return Value of the angle between the given vectors in degrees.
9160         #
9161         #  @ref tui_measurement_tools_page "Example"
9162         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9163             """
9164             Get angle between the given vectors in degrees.
9165
9166             Parameters: 
9167                 theShape1,theShape2 Vectors to find angle between.
9168                 theFlag If True, the normal vector is defined by the two vectors cross,
9169                         if False, the opposite vector to the normal vector is used.
9170
9171             Returns:  
9172                 Value of the angle between the given vectors in degrees.
9173             """
9174             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9175             if not theFlag:
9176                 anAngle = 360. - anAngle
9177             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9178             return anAngle
9179
9180         ## The same as GetAngleVectors, but the result is in radians.
9181         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9182             """
9183             Get angle between the given vectors in radians.
9184
9185             Parameters: 
9186                 theShape1,theShape2 Vectors to find angle between.
9187                 theFlag If True, the normal vector is defined by the two vectors cross,
9188                         if False, the opposite vector to the normal vector is used.
9189
9190             Returns:  
9191                 Value of the angle between the given vectors in radians.
9192             """
9193             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9194             return anAngle
9195
9196         ## @name Curve Curvature Measurement
9197         #  Methods for receiving radius of curvature of curves
9198         #  in the given point
9199         ## @{
9200
9201         ## Measure curvature of a curve at a point, set by parameter.
9202         #  @param theCurve a curve.
9203         #  @param theParam parameter.
9204         #  @return radius of curvature of \a theCurve.
9205         #
9206         #  @ref swig_todo "Example"
9207         def CurveCurvatureByParam(self, theCurve, theParam):
9208             """
9209             Measure curvature of a curve at a point, set by parameter.
9210
9211             Parameters: 
9212                 theCurve a curve.
9213                 theParam parameter.
9214
9215             Returns: 
9216                 radius of curvature of theCurve.
9217             """
9218             # Example: see GEOM_TestMeasures.py
9219             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9220             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9221             return aCurv
9222
9223         ## Measure curvature of a curve at a point.
9224         #  @param theCurve a curve.
9225         #  @param thePoint given point.
9226         #  @return radius of curvature of \a theCurve.
9227         #
9228         #  @ref swig_todo "Example"
9229         def CurveCurvatureByPoint(self, theCurve, thePoint):
9230             """
9231             Measure curvature of a curve at a point.
9232
9233             Parameters: 
9234                 theCurve a curve.
9235                 thePoint given point.
9236
9237             Returns: 
9238                 radius of curvature of theCurve.           
9239             """
9240             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9241             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9242             return aCurv
9243         ## @}
9244
9245         ## @name Surface Curvature Measurement
9246         #  Methods for receiving max and min radius of curvature of surfaces
9247         #  in the given point
9248         ## @{
9249
9250         ## Measure max radius of curvature of surface.
9251         #  @param theSurf the given surface.
9252         #  @param theUParam Value of U-parameter on the referenced surface.
9253         #  @param theVParam Value of V-parameter on the referenced surface.
9254         #  @return max radius of curvature of theSurf.
9255         #
9256         ## @ref swig_todo "Example"
9257         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9258             """
9259             Measure max radius of curvature of surface.
9260
9261             Parameters: 
9262                 theSurf the given surface.
9263                 theUParam Value of U-parameter on the referenced surface.
9264                 theVParam Value of V-parameter on the referenced surface.
9265                 
9266             Returns:     
9267                 max radius of curvature of theSurf.
9268             """
9269             # Example: see GEOM_TestMeasures.py
9270             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9271             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9272             return aSurf
9273
9274         ## Measure max radius of curvature of surface in the given point
9275         #  @param theSurf the given surface.
9276         #  @param thePoint given point.
9277         #  @return max radius of curvature of theSurf.
9278         #
9279         ## @ref swig_todo "Example"
9280         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9281             """
9282             Measure max radius of curvature of surface in the given point.
9283
9284             Parameters: 
9285                 theSurf the given surface.
9286                 thePoint given point.
9287                 
9288             Returns:     
9289                 max radius of curvature of theSurf.          
9290             """
9291             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9292             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9293             return aSurf
9294
9295         ## Measure min radius of curvature of surface.
9296         #  @param theSurf the given surface.
9297         #  @param theUParam Value of U-parameter on the referenced surface.
9298         #  @param theVParam Value of V-parameter on the referenced surface.
9299         #  @return min radius of curvature of theSurf.
9300         #   
9301         ## @ref swig_todo "Example"
9302         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9303             """
9304             Measure min radius of curvature of surface.
9305
9306             Parameters: 
9307                 theSurf the given surface.
9308                 theUParam Value of U-parameter on the referenced surface.
9309                 theVParam Value of V-parameter on the referenced surface.
9310                 
9311             Returns:     
9312                 Min radius of curvature of theSurf.
9313             """
9314             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9315             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9316             return aSurf
9317
9318         ## Measure min radius of curvature of surface in the given point
9319         #  @param theSurf the given surface.
9320         #  @param thePoint given point.
9321         #  @return min radius of curvature of theSurf.
9322         #
9323         ## @ref swig_todo "Example"
9324         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9325             """
9326             Measure min radius of curvature of surface in the given point.
9327
9328             Parameters: 
9329                 theSurf the given surface.
9330                 thePoint given point.
9331                 
9332             Returns:     
9333                 Min radius of curvature of theSurf.          
9334             """
9335             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9336             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9337             return aSurf
9338         ## @}
9339
9340         ## Get min and max tolerances of sub-shapes of theShape
9341         #  @param theShape Shape, to get tolerances of.
9342         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9343         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9344         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9345         #  VertMin,VertMax: Min and max tolerances of the vertices.
9346         #
9347         #  @ref tui_measurement_tools_page "Example"
9348         def Tolerance(self,theShape):
9349             """
9350             Get min and max tolerances of sub-shapes of theShape
9351
9352             Parameters: 
9353                 theShape Shape, to get tolerances of.
9354
9355             Returns:    
9356                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9357                  FaceMin,FaceMax: Min and max tolerances of the faces.
9358                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9359                  VertMin,VertMax: Min and max tolerances of the vertices.
9360             """
9361             # Example: see GEOM_TestMeasures.py
9362             aTuple = self.MeasuOp.GetTolerance(theShape)
9363             RaiseIfFailed("GetTolerance", self.MeasuOp)
9364             return aTuple
9365
9366         ## Obtain description of the given shape (number of sub-shapes of each type)
9367         #  @param theShape Shape to be described.
9368         #  @return Description of the given shape.
9369         #
9370         #  @ref tui_measurement_tools_page "Example"
9371         def WhatIs(self,theShape):
9372             """
9373             Obtain description of the given shape (number of sub-shapes of each type)
9374
9375             Parameters:
9376                 theShape Shape to be described.
9377
9378             Returns:
9379                 Description of the given shape.
9380             """
9381             # Example: see GEOM_TestMeasures.py
9382             aDescr = self.MeasuOp.WhatIs(theShape)
9383             RaiseIfFailed("WhatIs", self.MeasuOp)
9384             return aDescr
9385
9386         ## Obtain quantity of shapes of the given type in \a theShape.
9387         #  If \a theShape is of type \a theType, it is also counted.
9388         #  @param theShape Shape to be described.
9389         #  @param theType the given ShapeType().
9390         #  @return Quantity of shapes of type \a theType in \a theShape.
9391         #
9392         #  @ref tui_measurement_tools_page "Example"
9393         def NbShapes (self, theShape, theType):
9394             """
9395             Obtain quantity of shapes of the given type in theShape.
9396             If theShape is of type theType, it is also counted.
9397
9398             Parameters:
9399                 theShape Shape to be described.
9400                 theType the given geompy.ShapeType
9401
9402             Returns:
9403                 Quantity of shapes of type theType in theShape.
9404             """
9405             # Example: see GEOM_TestMeasures.py
9406             listSh = self.SubShapeAllIDs(theShape, theType)
9407             Nb = len(listSh)
9408             t       = EnumToLong(theShape.GetShapeType())
9409             theType = EnumToLong(theType)
9410             if t == theType:
9411                 Nb = Nb + 1
9412                 pass
9413             return Nb
9414
9415         ## Obtain quantity of shapes of each type in \a theShape.
9416         #  The \a theShape is also counted.
9417         #  @param theShape Shape to be described.
9418         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9419         #
9420         #  @ref tui_measurement_tools_page "Example"
9421         def ShapeInfo (self, theShape):
9422             """
9423             Obtain quantity of shapes of each type in theShape.
9424             The theShape is also counted.
9425
9426             Parameters:
9427                 theShape Shape to be described.
9428
9429             Returns:
9430                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9431             """
9432             # Example: see GEOM_TestMeasures.py
9433             aDict = {}
9434             for typeSh in self.ShapeType:
9435                 if typeSh in ( "AUTO", "SHAPE" ): continue
9436                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9437                 Nb = len(listSh)
9438                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9439                     Nb = Nb + 1
9440                     pass
9441                 aDict[typeSh] = Nb
9442                 pass
9443             return aDict
9444
9445         ## Get a point, situated at the centre of mass of theShape.
9446         #  @param theShape Shape to define centre of mass of.
9447         #  @param theName Object name; when specified, this parameter is used
9448         #         for result publication in the study. Otherwise, if automatic
9449         #         publication is switched on, default value is used for result name.
9450         #
9451         #  @return New GEOM.GEOM_Object, containing the created point.
9452         #
9453         #  @ref tui_measurement_tools_page "Example"
9454         def MakeCDG(self, theShape, theName=None):
9455             """
9456             Get a point, situated at the centre of mass of theShape.
9457
9458             Parameters:
9459                 theShape Shape to define centre of mass of.
9460                 theName Object name; when specified, this parameter is used
9461                         for result publication in the study. Otherwise, if automatic
9462                         publication is switched on, default value is used for result name.
9463
9464             Returns:
9465                 New GEOM.GEOM_Object, containing the created point.
9466             """
9467             # Example: see GEOM_TestMeasures.py
9468             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9469             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9470             self._autoPublish(anObj, theName, "centerOfMass")
9471             return anObj
9472
9473         ## Get a vertex sub-shape by index depended with orientation.
9474         #  @param theShape Shape to find sub-shape.
9475         #  @param theIndex Index to find vertex by this index (starting from zero)
9476         #  @param theName Object name; when specified, this parameter is used
9477         #         for result publication in the study. Otherwise, if automatic
9478         #         publication is switched on, default value is used for result name.
9479         #
9480         #  @return New GEOM.GEOM_Object, containing the created vertex.
9481         #
9482         #  @ref tui_measurement_tools_page "Example"
9483         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9484             """
9485             Get a vertex sub-shape by index depended with orientation.
9486
9487             Parameters:
9488                 theShape Shape to find sub-shape.
9489                 theIndex Index to find vertex by this index (starting from zero)
9490                 theName Object name; when specified, this parameter is used
9491                         for result publication in the study. Otherwise, if automatic
9492                         publication is switched on, default value is used for result name.
9493
9494             Returns:
9495                 New GEOM.GEOM_Object, containing the created vertex.
9496             """
9497             # Example: see GEOM_TestMeasures.py
9498             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9499             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9500             self._autoPublish(anObj, theName, "vertex")
9501             return anObj
9502
9503         ## Get the first vertex of wire/edge depended orientation.
9504         #  @param theShape Shape to find first vertex.
9505         #  @param theName Object name; when specified, this parameter is used
9506         #         for result publication in the study. Otherwise, if automatic
9507         #         publication is switched on, default value is used for result name.
9508         #
9509         #  @return New GEOM.GEOM_Object, containing the created vertex.
9510         #
9511         #  @ref tui_measurement_tools_page "Example"
9512         def GetFirstVertex(self, theShape, theName=None):
9513             """
9514             Get the first vertex of wire/edge depended orientation.
9515
9516             Parameters:
9517                 theShape Shape to find first vertex.
9518                 theName Object name; when specified, this parameter is used
9519                         for result publication in the study. Otherwise, if automatic
9520                         publication is switched on, default value is used for result name.
9521
9522             Returns:    
9523                 New GEOM.GEOM_Object, containing the created vertex.
9524             """
9525             # Example: see GEOM_TestMeasures.py
9526             # note: auto-publishing is done in self.GetVertexByIndex()
9527             anObj = self.GetVertexByIndex(theShape, 0, theName)
9528             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9529             return anObj
9530
9531         ## Get the last vertex of wire/edge depended orientation.
9532         #  @param theShape Shape to find last vertex.
9533         #  @param theName Object name; when specified, this parameter is used
9534         #         for result publication in the study. Otherwise, if automatic
9535         #         publication is switched on, default value is used for result name.
9536         #
9537         #  @return New GEOM.GEOM_Object, containing the created vertex.
9538         #
9539         #  @ref tui_measurement_tools_page "Example"
9540         def GetLastVertex(self, theShape, theName=None):
9541             """
9542             Get the last vertex of wire/edge depended orientation.
9543
9544             Parameters: 
9545                 theShape Shape to find last vertex.
9546                 theName Object name; when specified, this parameter is used
9547                         for result publication in the study. Otherwise, if automatic
9548                         publication is switched on, default value is used for result name.
9549
9550             Returns:   
9551                 New GEOM.GEOM_Object, containing the created vertex.
9552             """
9553             # Example: see GEOM_TestMeasures.py
9554             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9555             # note: auto-publishing is done in self.GetVertexByIndex()
9556             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9557             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9558             return anObj
9559
9560         ## Get a normale to the given face. If the point is not given,
9561         #  the normale is calculated at the center of mass.
9562         #  @param theFace Face to define normale of.
9563         #  @param theOptionalPoint Point to compute the normale at.
9564         #  @param theName Object name; when specified, this parameter is used
9565         #         for result publication in the study. Otherwise, if automatic
9566         #         publication is switched on, default value is used for result name.
9567         #
9568         #  @return New GEOM.GEOM_Object, containing the created vector.
9569         #
9570         #  @ref swig_todo "Example"
9571         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9572             """
9573             Get a normale to the given face. If the point is not given,
9574             the normale is calculated at the center of mass.
9575             
9576             Parameters: 
9577                 theFace Face to define normale of.
9578                 theOptionalPoint Point to compute the normale at.
9579                 theName Object name; when specified, this parameter is used
9580                         for result publication in the study. Otherwise, if automatic
9581                         publication is switched on, default value is used for result name.
9582
9583             Returns:   
9584                 New GEOM.GEOM_Object, containing the created vector.
9585             """
9586             # Example: see GEOM_TestMeasures.py
9587             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9588             RaiseIfFailed("GetNormal", self.MeasuOp)
9589             self._autoPublish(anObj, theName, "normal")
9590             return anObj
9591
9592         ## Check a topology of the given shape.
9593         #  @param theShape Shape to check validity of.
9594         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9595         #                        if TRUE, the shape's geometry will be checked also.
9596         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9597         #                        of problem is printed.
9598         #                        if TRUE and if theShape is invalid, the description 
9599         #                        of problem is also returned.
9600         #  @return TRUE, if the shape "seems to be valid".
9601         #
9602         #  @ref tui_measurement_tools_page "Example"
9603         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9604             """
9605             Check a topology of the given shape.
9606
9607             Parameters: 
9608                 theShape Shape to check validity of.
9609                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9610                                if TRUE, the shape's geometry will be checked also.
9611                 theReturnStatus If FALSE and if theShape is invalid, a description
9612                                 of problem is printed.
9613                                 if TRUE and if theShape is invalid, the description 
9614                                 of problem is returned.
9615
9616             Returns:   
9617                 TRUE, if the shape "seems to be valid".
9618                 If theShape is invalid, prints a description of problem.
9619                 This description can also be returned.
9620             """
9621             # Example: see GEOM_TestMeasures.py
9622             if theIsCheckGeom:
9623                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9624                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9625             else:
9626                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9627                 RaiseIfFailed("CheckShape", self.MeasuOp)
9628             if IsValid == 0:
9629                 if theReturnStatus == 0:
9630                     print Status
9631             if theReturnStatus == 1:
9632               return (IsValid, Status)
9633             return IsValid
9634
9635         ## Detect self-intersections in the given shape.
9636         #  @param theShape Shape to check.
9637         #  @return TRUE, if the shape contains no self-intersections.
9638         #
9639         #  @ref tui_measurement_tools_page "Example"
9640         def CheckSelfIntersections(self, theShape):
9641             """
9642             Detect self-intersections in the given shape.
9643
9644             Parameters: 
9645                 theShape Shape to check.
9646
9647             Returns:   
9648                 TRUE, if the shape contains no self-intersections.
9649             """
9650             # Example: see GEOM_TestMeasures.py
9651             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9652             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9653             return IsValid
9654
9655         ## Get position (LCS) of theShape.
9656         #
9657         #  Origin of the LCS is situated at the shape's center of mass.
9658         #  Axes of the LCS are obtained from shape's location or,
9659         #  if the shape is a planar face, from position of its plane.
9660         #
9661         #  @param theShape Shape to calculate position of.
9662         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9663         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9664         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9665         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9666         #
9667         #  @ref swig_todo "Example"
9668         def GetPosition(self,theShape):
9669             """
9670             Get position (LCS) of theShape.
9671             Origin of the LCS is situated at the shape's center of mass.
9672             Axes of the LCS are obtained from shape's location or,
9673             if the shape is a planar face, from position of its plane.
9674
9675             Parameters: 
9676                 theShape Shape to calculate position of.
9677
9678             Returns:  
9679                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9680                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9681                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9682                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9683             """
9684             # Example: see GEOM_TestMeasures.py
9685             aTuple = self.MeasuOp.GetPosition(theShape)
9686             RaiseIfFailed("GetPosition", self.MeasuOp)
9687             return aTuple
9688
9689         ## Get kind of theShape.
9690         #
9691         #  @param theShape Shape to get a kind of.
9692         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9693         #          and a list of parameters, describing the shape.
9694         #  @note  Concrete meaning of each value, returned via \a theIntegers
9695         #         or \a theDoubles list depends on the kind() of the shape.
9696         #
9697         #  @ref swig_todo "Example"
9698         def KindOfShape(self,theShape):
9699             """
9700             Get kind of theShape.
9701          
9702             Parameters: 
9703                 theShape Shape to get a kind of.
9704
9705             Returns:
9706                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9707                     and a list of parameters, describing the shape.
9708             Note:
9709                 Concrete meaning of each value, returned via theIntegers
9710                 or theDoubles list depends on the geompy.kind of the shape
9711             """
9712             # Example: see GEOM_TestMeasures.py
9713             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9714             RaiseIfFailed("KindOfShape", self.MeasuOp)
9715
9716             aKind  = aRoughTuple[0]
9717             anInts = aRoughTuple[1]
9718             aDbls  = aRoughTuple[2]
9719
9720             # Now there is no exception from this rule:
9721             aKindTuple = [aKind] + aDbls + anInts
9722
9723             # If they are we will regroup parameters for such kind of shape.
9724             # For example:
9725             #if aKind == kind.SOME_KIND:
9726             #    #  SOME_KIND     int int double int double double
9727             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9728
9729             return aKindTuple
9730
9731         # end of l2_measure
9732         ## @}
9733
9734         ## @addtogroup l2_import_export
9735         ## @{
9736
9737         ## Import a shape from the BREP or IGES or STEP file
9738         #  (depends on given format) with given name.
9739         #  @param theFileName The file, containing the shape.
9740         #  @param theFormatName Specify format for the file reading.
9741         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9742         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9743         #            format 'STEP_SCALE' is used instead of 'STEP',
9744         #            length unit will be set to 'meter' and result model will be scaled.
9745         #  @param theName Object name; when specified, this parameter is used
9746         #         for result publication in the study. Otherwise, if automatic
9747         #         publication is switched on, default value is used for result name.
9748         #
9749         #  @return New GEOM.GEOM_Object, containing the imported shape.
9750         #
9751         #  @ref swig_Import_Export "Example"
9752         def ImportFile(self, theFileName, theFormatName, theName=None):
9753             """
9754             Import a shape from the BREP or IGES or STEP file
9755             (depends on given format) with given name.
9756
9757             Parameters: 
9758                 theFileName The file, containing the shape.
9759                 theFormatName Specify format for the file reading.
9760                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9761                     If format 'IGES_SCALE' is used instead of 'IGES' or
9762                        format 'STEP_SCALE' is used instead of 'STEP',
9763                        length unit will be set to 'meter' and result model will be scaled.
9764                 theName Object name; when specified, this parameter is used
9765                         for result publication in the study. Otherwise, if automatic
9766                         publication is switched on, default value is used for result name.
9767
9768             Returns:
9769                 New GEOM.GEOM_Object, containing the imported shape.
9770             """
9771             # Example: see GEOM_TestOthers.py
9772             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9773             RaiseIfFailed("ImportFile", self.InsertOp)
9774             self._autoPublish(anObj, theName, "imported")
9775             return anObj
9776
9777         ## Deprecated analog of ImportFile()
9778         def Import(self, theFileName, theFormatName, theName=None):
9779             """
9780             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9781             """
9782             print "WARNING: Function Import is deprecated, use ImportFile instead"
9783             # note: auto-publishing is done in self.ImportFile()
9784             return self.ImportFile(theFileName, theFormatName, theName)
9785
9786         ## Shortcut to ImportFile() for BREP format.
9787         #  Import a shape from the BREP file with given name.
9788         #  @param theFileName The file, containing the shape.
9789         #  @param theName Object name; when specified, this parameter is used
9790         #         for result publication in the study. Otherwise, if automatic
9791         #         publication is switched on, default value is used for result name.
9792         #
9793         #  @return New GEOM.GEOM_Object, containing the imported shape.
9794         #
9795         #  @ref swig_Import_Export "Example"
9796         def ImportBREP(self, theFileName, theName=None):
9797             """
9798             geompy.ImportFile(...) function for BREP format
9799             Import a shape from the BREP file with given name.
9800
9801             Parameters: 
9802                 theFileName The file, containing the shape.
9803                 theName Object name; when specified, this parameter is used
9804                         for result publication in the study. Otherwise, if automatic
9805                         publication is switched on, default value is used for result name.
9806
9807             Returns:
9808                 New GEOM.GEOM_Object, containing the imported shape.
9809             """
9810             # Example: see GEOM_TestOthers.py
9811             # note: auto-publishing is done in self.ImportFile()
9812             return self.ImportFile(theFileName, "BREP", theName)
9813
9814         ## Shortcut to ImportFile() for IGES format
9815         #  Import a shape from the IGES file with given name.
9816         #  @param theFileName The file, containing the shape.
9817         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9818         #                     and result model will be scaled, if its units are not meters.
9819         #                     If False (default), file length units will be taken into account.
9820         #  @param theName Object name; when specified, this parameter is used
9821         #         for result publication in the study. Otherwise, if automatic
9822         #         publication is switched on, default value is used for result name.
9823         #
9824         #  @return New GEOM.GEOM_Object, containing the imported shape.
9825         #
9826         #  @ref swig_Import_Export "Example"
9827         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
9828             """
9829             geompy.ImportFile(...) function for IGES format
9830
9831             Parameters:
9832                 theFileName The file, containing the shape.
9833                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9834                             and result model will be scaled, if its units are not meters.
9835                             If False (default), file length units will be taken into account.
9836                 theName Object name; when specified, this parameter is used
9837                         for result publication in the study. Otherwise, if automatic
9838                         publication is switched on, default value is used for result name.
9839
9840             Returns:
9841                 New GEOM.GEOM_Object, containing the imported shape.
9842             """
9843             # Example: see GEOM_TestOthers.py
9844             # note: auto-publishing is done in self.ImportFile()
9845             if ignoreUnits:
9846                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
9847             return self.ImportFile(theFileName, "IGES", theName)
9848
9849         ## Return length unit from given IGES file
9850         #  @param theFileName The file, containing the shape.
9851         #  @return String, containing the units name.
9852         #
9853         #  @ref swig_Import_Export "Example"
9854         def GetIGESUnit(self, theFileName):
9855             """
9856             Return length units from given IGES file
9857
9858             Parameters:
9859                 theFileName The file, containing the shape.
9860
9861             Returns:
9862                 String, containing the units name.
9863             """
9864             # Example: see GEOM_TestOthers.py
9865             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
9866             return aUnitName
9867
9868         ## Shortcut to ImportFile() for STEP format
9869         #  Import a shape from the STEP file with given name.
9870         #  @param theFileName The file, containing the shape.
9871         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9872         #                     and result model will be scaled, if its units are not meters.
9873         #                     If False (default), file length units will be taken into account.
9874         #  @param theName Object name; when specified, this parameter is used
9875         #         for result publication in the study. Otherwise, if automatic
9876         #         publication is switched on, default value is used for result name.
9877         #
9878         #  @return New GEOM.GEOM_Object, containing the imported shape.
9879         #
9880         #  @ref swig_Import_Export "Example"
9881         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
9882             """
9883             geompy.ImportFile(...) function for STEP format
9884
9885             Parameters:
9886                 theFileName The file, containing the shape.
9887                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9888                             and result model will be scaled, if its units are not meters.
9889                             If False (default), file length units will be taken into account.
9890                 theName Object name; when specified, this parameter is used
9891                         for result publication in the study. Otherwise, if automatic
9892                         publication is switched on, default value is used for result name.
9893
9894             Returns:
9895                 New GEOM.GEOM_Object, containing the imported shape.
9896             """
9897             # Example: see GEOM_TestOthers.py
9898             # note: auto-publishing is done in self.ImportFile()
9899             if ignoreUnits:
9900                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
9901             return self.ImportFile(theFileName, "STEP", theName)
9902
9903         ## Return length unit from given IGES or STEP file
9904         #  @param theFileName The file, containing the shape.
9905         #  @return String, containing the units name.
9906         #
9907         #  @ref swig_Import_Export "Example"
9908         def GetSTEPUnit(self, theFileName):
9909             """
9910             Return length units from given STEP file
9911
9912             Parameters:
9913                 theFileName The file, containing the shape.
9914
9915             Returns:
9916                 String, containing the units name.
9917             """
9918             # Example: see GEOM_TestOthers.py
9919             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
9920             return aUnitName
9921
9922         ## Read a shape from the binary stream, containing its bounding representation (BRep).
9923         #  @note This method will not be dumped to the python script by DumpStudy functionality.
9924         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
9925         #  @param theStream The BRep binary stream.
9926         #  @param theName Object name; when specified, this parameter is used
9927         #         for result publication in the study. Otherwise, if automatic
9928         #         publication is switched on, default value is used for result name.
9929         #
9930         #  @return New GEOM_Object, containing the shape, read from theStream.
9931         #
9932         #  @ref swig_Import_Export "Example"
9933         def RestoreShape (self, theStream, theName=None):
9934             """
9935             Read a shape from the binary stream, containing its bounding representation (BRep).
9936
9937             Note:
9938                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
9939
9940             Parameters: 
9941                 theStream The BRep binary stream.
9942                 theName Object name; when specified, this parameter is used
9943                         for result publication in the study. Otherwise, if automatic
9944                         publication is switched on, default value is used for result name.
9945
9946             Returns:
9947                 New GEOM_Object, containing the shape, read from theStream.
9948             """
9949             # Example: see GEOM_TestOthers.py
9950             anObj = self.InsertOp.RestoreShape(theStream)
9951             RaiseIfFailed("RestoreShape", self.InsertOp)
9952             self._autoPublish(anObj, theName, "restored")
9953             return anObj
9954
9955         ## Export the given shape into a file with given name.
9956         #  @param theObject Shape to be stored in the file.
9957         #  @param theFileName Name of the file to store the given shape in.
9958         #  @param theFormatName Specify format for the shape storage.
9959         #         Available formats can be obtained with
9960         #         geompy.InsertOp.ExportTranslators()[0] method.
9961         #
9962         #  @ref swig_Import_Export "Example"
9963         def Export(self, theObject, theFileName, theFormatName):
9964             """
9965             Export the given shape into a file with given name.
9966
9967             Parameters: 
9968                 theObject Shape to be stored in the file.
9969                 theFileName Name of the file to store the given shape in.
9970                 theFormatName Specify format for the shape storage.
9971                               Available formats can be obtained with
9972                               geompy.InsertOp.ExportTranslators()[0] method.
9973             """
9974             # Example: see GEOM_TestOthers.py
9975             self.InsertOp.Export(theObject, theFileName, theFormatName)
9976             if self.InsertOp.IsDone() == 0:
9977                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
9978                 pass
9979             pass
9980
9981         ## Shortcut to Export() for BREP format
9982         #
9983         #  @ref swig_Import_Export "Example"
9984         def ExportBREP(self,theObject, theFileName):
9985             """
9986             geompy.Export(...) function for BREP format
9987             """
9988             # Example: see GEOM_TestOthers.py
9989             return self.Export(theObject, theFileName, "BREP")
9990
9991         ## Shortcut to Export() for IGES format
9992         #
9993         #  @ref swig_Import_Export "Example"
9994         def ExportIGES(self,theObject, theFileName):
9995             """
9996             geompy.Export(...) function for IGES format
9997             """
9998             # Example: see GEOM_TestOthers.py
9999             return self.Export(theObject, theFileName, "IGES")
10000
10001         ## Shortcut to Export() for STEP format
10002         #
10003         #  @ref swig_Import_Export "Example"
10004         def ExportSTEP(self,theObject, theFileName):
10005             """
10006             geompy.Export(...) function for STEP format
10007             """
10008             # Example: see GEOM_TestOthers.py
10009             return self.Export(theObject, theFileName, "STEP")
10010
10011         # end of l2_import_export
10012         ## @}
10013
10014         ## @addtogroup l3_blocks
10015         ## @{
10016
10017         ## Create a quadrangle face from four edges. Order of Edges is not
10018         #  important. It is  not necessary that edges share the same vertex.
10019         #  @param E1,E2,E3,E4 Edges for the face bound.
10020         #  @param theName Object name; when specified, this parameter is used
10021         #         for result publication in the study. Otherwise, if automatic
10022         #         publication is switched on, default value is used for result name.
10023         #
10024         #  @return New GEOM.GEOM_Object, containing the created face.
10025         #
10026         #  @ref tui_building_by_blocks_page "Example"
10027         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10028             """
10029             Create a quadrangle face from four edges. Order of Edges is not
10030             important. It is  not necessary that edges share the same vertex.
10031
10032             Parameters: 
10033                 E1,E2,E3,E4 Edges for the face bound.
10034                 theName Object name; when specified, this parameter is used
10035                         for result publication in the study. Otherwise, if automatic
10036                         publication is switched on, default value is used for result name.
10037
10038             Returns: 
10039                 New GEOM.GEOM_Object, containing the created face.
10040
10041             Example of usage:               
10042                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10043             """
10044             # Example: see GEOM_Spanner.py
10045             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10046             RaiseIfFailed("MakeQuad", self.BlocksOp)
10047             self._autoPublish(anObj, theName, "quad")
10048             return anObj
10049
10050         ## Create a quadrangle face on two edges.
10051         #  The missing edges will be built by creating the shortest ones.
10052         #  @param E1,E2 Two opposite edges for the face.
10053         #  @param theName Object name; when specified, this parameter is used
10054         #         for result publication in the study. Otherwise, if automatic
10055         #         publication is switched on, default value is used for result name.
10056         #
10057         #  @return New GEOM.GEOM_Object, containing the created face.
10058         #
10059         #  @ref tui_building_by_blocks_page "Example"
10060         def MakeQuad2Edges(self, E1, E2, theName=None):
10061             """
10062             Create a quadrangle face on two edges.
10063             The missing edges will be built by creating the shortest ones.
10064
10065             Parameters: 
10066                 E1,E2 Two opposite edges for the face.
10067                 theName Object name; when specified, this parameter is used
10068                         for result publication in the study. Otherwise, if automatic
10069                         publication is switched on, default value is used for result name.
10070
10071             Returns: 
10072                 New GEOM.GEOM_Object, containing the created face.
10073             
10074             Example of usage:
10075                 # create vertices
10076                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10077                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10078                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10079                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10080                 # create edges
10081                 edge1 = geompy.MakeEdge(p1, p2)
10082                 edge2 = geompy.MakeEdge(p3, p4)
10083                 # create a quadrangle face from two edges
10084                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10085             """
10086             # Example: see GEOM_Spanner.py
10087             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10088             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10089             self._autoPublish(anObj, theName, "quad")
10090             return anObj
10091
10092         ## Create a quadrangle face with specified corners.
10093         #  The missing edges will be built by creating the shortest ones.
10094         #  @param V1,V2,V3,V4 Corner vertices for the face.
10095         #  @param theName Object name; when specified, this parameter is used
10096         #         for result publication in the study. Otherwise, if automatic
10097         #         publication is switched on, default value is used for result name.
10098         #
10099         #  @return New GEOM.GEOM_Object, containing the created face.
10100         #
10101         #  @ref tui_building_by_blocks_page "Example 1"
10102         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10103         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10104             """
10105             Create a quadrangle face with specified corners.
10106             The missing edges will be built by creating the shortest ones.
10107
10108             Parameters: 
10109                 V1,V2,V3,V4 Corner vertices for the face.
10110                 theName Object name; when specified, this parameter is used
10111                         for result publication in the study. Otherwise, if automatic
10112                         publication is switched on, default value is used for result name.
10113
10114             Returns: 
10115                 New GEOM.GEOM_Object, containing the created face.
10116
10117             Example of usage:
10118                 # create vertices
10119                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10120                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10121                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10122                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10123                 # create a quadrangle from four points in its corners
10124                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10125             """
10126             # Example: see GEOM_Spanner.py
10127             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10128             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10129             self._autoPublish(anObj, theName, "quad")
10130             return anObj
10131
10132         ## Create a hexahedral solid, bounded by the six given faces. Order of
10133         #  faces is not important. It is  not necessary that Faces share the same edge.
10134         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10135         #  @param theName Object name; when specified, this parameter is used
10136         #         for result publication in the study. Otherwise, if automatic
10137         #         publication is switched on, default value is used for result name.
10138         #
10139         #  @return New GEOM.GEOM_Object, containing the created solid.
10140         #
10141         #  @ref tui_building_by_blocks_page "Example 1"
10142         #  \n @ref swig_MakeHexa "Example 2"
10143         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10144             """
10145             Create a hexahedral solid, bounded by the six given faces. Order of
10146             faces is not important. It is  not necessary that Faces share the same edge.
10147
10148             Parameters: 
10149                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10150                 theName Object name; when specified, this parameter is used
10151                         for result publication in the study. Otherwise, if automatic
10152                         publication is switched on, default value is used for result name.
10153
10154             Returns:    
10155                 New GEOM.GEOM_Object, containing the created solid.
10156
10157             Example of usage:
10158                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10159             """
10160             # Example: see GEOM_Spanner.py
10161             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10162             RaiseIfFailed("MakeHexa", self.BlocksOp)
10163             self._autoPublish(anObj, theName, "hexa")
10164             return anObj
10165
10166         ## Create a hexahedral solid between two given faces.
10167         #  The missing faces will be built by creating the smallest ones.
10168         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10169         #  @param theName Object name; when specified, this parameter is used
10170         #         for result publication in the study. Otherwise, if automatic
10171         #         publication is switched on, default value is used for result name.
10172         #
10173         #  @return New GEOM.GEOM_Object, containing the created solid.
10174         #
10175         #  @ref tui_building_by_blocks_page "Example 1"
10176         #  \n @ref swig_MakeHexa2Faces "Example 2"
10177         def MakeHexa2Faces(self, F1, F2, theName=None):
10178             """
10179             Create a hexahedral solid between two given faces.
10180             The missing faces will be built by creating the smallest ones.
10181
10182             Parameters: 
10183                 F1,F2 Two opposite faces for the hexahedral solid.
10184                 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             Returns:
10189                 New GEOM.GEOM_Object, containing the created solid.
10190
10191             Example of usage:
10192                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10193             """
10194             # Example: see GEOM_Spanner.py
10195             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10196             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10197             self._autoPublish(anObj, theName, "hexa")
10198             return anObj
10199
10200         # end of l3_blocks
10201         ## @}
10202
10203         ## @addtogroup l3_blocks_op
10204         ## @{
10205
10206         ## Get a vertex, found in the given shape by its coordinates.
10207         #  @param theShape Block or a compound of blocks.
10208         #  @param theX,theY,theZ Coordinates of the sought vertex.
10209         #  @param theEpsilon Maximum allowed distance between the resulting
10210         #                    vertex and point with the given coordinates.
10211         #  @param theName Object name; when specified, this parameter is used
10212         #         for result publication in the study. Otherwise, if automatic
10213         #         publication is switched on, default value is used for result name.
10214         #
10215         #  @return New GEOM.GEOM_Object, containing the found vertex.
10216         #
10217         #  @ref swig_GetPoint "Example"
10218         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10219             """
10220             Get a vertex, found in the given shape by its coordinates.
10221
10222             Parameters: 
10223                 theShape Block or a compound of blocks.
10224                 theX,theY,theZ Coordinates of the sought vertex.
10225                 theEpsilon Maximum allowed distance between the resulting
10226                            vertex and point with the given coordinates.
10227                 theName Object name; when specified, this parameter is used
10228                         for result publication in the study. Otherwise, if automatic
10229                         publication is switched on, default value is used for result name.
10230
10231             Returns:                  
10232                 New GEOM.GEOM_Object, containing the found vertex.
10233
10234             Example of usage:
10235                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10236             """
10237             # Example: see GEOM_TestOthers.py
10238             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10239             RaiseIfFailed("GetPoint", self.BlocksOp)
10240             self._autoPublish(anObj, theName, "vertex")
10241             return anObj
10242
10243         ## Find a vertex of the given shape, which has minimal distance to the given point.
10244         #  @param theShape Any shape.
10245         #  @param thePoint Point, close to the desired vertex.
10246         #  @param theName Object name; when specified, this parameter is used
10247         #         for result publication in the study. Otherwise, if automatic
10248         #         publication is switched on, default value is used for result name.
10249         #
10250         #  @return New GEOM.GEOM_Object, containing the found vertex.
10251         #
10252         #  @ref swig_GetVertexNearPoint "Example"
10253         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10254             """
10255             Find a vertex of the given shape, which has minimal distance to the given point.
10256
10257             Parameters: 
10258                 theShape Any shape.
10259                 thePoint Point, close to the desired vertex.
10260                 theName Object name; when specified, this parameter is used
10261                         for result publication in the study. Otherwise, if automatic
10262                         publication is switched on, default value is used for result name.
10263
10264             Returns:
10265                 New GEOM.GEOM_Object, containing the found vertex.
10266
10267             Example of usage:
10268                 pmidle = geompy.MakeVertex(50, 0, 50)
10269                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10270             """
10271             # Example: see GEOM_TestOthers.py
10272             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10273             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10274             self._autoPublish(anObj, theName, "vertex")
10275             return anObj
10276
10277         ## Get an edge, found in the given shape by two given vertices.
10278         #  @param theShape Block or a compound of blocks.
10279         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10280         #  @param theName Object name; when specified, this parameter is used
10281         #         for result publication in the study. Otherwise, if automatic
10282         #         publication is switched on, default value is used for result name.
10283         #
10284         #  @return New GEOM.GEOM_Object, containing the found edge.
10285         #
10286         #  @ref swig_GetEdge "Example"
10287         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10288             """
10289             Get an edge, found in the given shape by two given vertices.
10290
10291             Parameters: 
10292                 theShape Block or a compound of blocks.
10293                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10294                 theName Object name; when specified, this parameter is used
10295                         for result publication in the study. Otherwise, if automatic
10296                         publication is switched on, default value is used for result name.
10297
10298             Returns:
10299                 New GEOM.GEOM_Object, containing the found edge.
10300             """
10301             # Example: see GEOM_Spanner.py
10302             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10303             RaiseIfFailed("GetEdge", self.BlocksOp)
10304             self._autoPublish(anObj, theName, "edge")
10305             return anObj
10306
10307         ## Find an edge of the given shape, which has minimal distance to the given point.
10308         #  @param theShape Block or a compound of blocks.
10309         #  @param thePoint Point, close to the desired edge.
10310         #  @param theName Object name; when specified, this parameter is used
10311         #         for result publication in the study. Otherwise, if automatic
10312         #         publication is switched on, default value is used for result name.
10313         #
10314         #  @return New GEOM.GEOM_Object, containing the found edge.
10315         #
10316         #  @ref swig_GetEdgeNearPoint "Example"
10317         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10318             """
10319             Find an edge of the given shape, which has minimal distance to the given point.
10320
10321             Parameters: 
10322                 theShape Block or a compound of blocks.
10323                 thePoint Point, close to the desired edge.
10324                 theName Object name; when specified, this parameter is used
10325                         for result publication in the study. Otherwise, if automatic
10326                         publication is switched on, default value is used for result name.
10327
10328             Returns:
10329                 New GEOM.GEOM_Object, containing the found edge.
10330             """
10331             # Example: see GEOM_TestOthers.py
10332             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10333             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10334             self._autoPublish(anObj, theName, "edge")
10335             return anObj
10336
10337         ## Returns a face, found in the given shape by four given corner vertices.
10338         #  @param theShape Block or a compound of blocks.
10339         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10340         #  @param theName Object name; when specified, this parameter is used
10341         #         for result publication in the study. Otherwise, if automatic
10342         #         publication is switched on, default value is used for result name.
10343         #
10344         #  @return New GEOM.GEOM_Object, containing the found face.
10345         #
10346         #  @ref swig_todo "Example"
10347         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10348             """
10349             Returns a face, found in the given shape by four given corner vertices.
10350
10351             Parameters:
10352                 theShape Block or a compound of blocks.
10353                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10354                 theName Object name; when specified, this parameter is used
10355                         for result publication in the study. Otherwise, if automatic
10356                         publication is switched on, default value is used for result name.
10357
10358             Returns:
10359                 New GEOM.GEOM_Object, containing the found face.
10360             """
10361             # Example: see GEOM_Spanner.py
10362             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10363             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10364             self._autoPublish(anObj, theName, "face")
10365             return anObj
10366
10367         ## Get a face of block, found in the given shape by two given edges.
10368         #  @param theShape Block or a compound of blocks.
10369         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10370         #  @param theName Object name; when specified, this parameter is used
10371         #         for result publication in the study. Otherwise, if automatic
10372         #         publication is switched on, default value is used for result name.
10373         #
10374         #  @return New GEOM.GEOM_Object, containing the found face.
10375         #
10376         #  @ref swig_todo "Example"
10377         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10378             """
10379             Get a face of block, found in the given shape by two given edges.
10380
10381             Parameters:
10382                 theShape Block or a compound of blocks.
10383                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10384                 theName Object name; when specified, this parameter is used
10385                         for result publication in the study. Otherwise, if automatic
10386                         publication is switched on, default value is used for result name.
10387
10388             Returns:
10389                 New GEOM.GEOM_Object, containing the found face.
10390             """
10391             # Example: see GEOM_Spanner.py
10392             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10393             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10394             self._autoPublish(anObj, theName, "face")
10395             return anObj
10396
10397         ## Find a face, opposite to the given one in the given block.
10398         #  @param theBlock Must be a hexahedral solid.
10399         #  @param theFace Face of \a theBlock, opposite to the desired face.
10400         #  @param theName Object name; when specified, this parameter is used
10401         #         for result publication in the study. Otherwise, if automatic
10402         #         publication is switched on, default value is used for result name.
10403         #
10404         #  @return New GEOM.GEOM_Object, containing the found face.
10405         #
10406         #  @ref swig_GetOppositeFace "Example"
10407         def GetOppositeFace(self, theBlock, theFace, theName=None):
10408             """
10409             Find a face, opposite to the given one in the given block.
10410
10411             Parameters:
10412                 theBlock Must be a hexahedral solid.
10413                 theFace Face of theBlock, opposite to the desired face.
10414                 theName Object name; when specified, this parameter is used
10415                         for result publication in the study. Otherwise, if automatic
10416                         publication is switched on, default value is used for result name.
10417
10418             Returns: 
10419                 New GEOM.GEOM_Object, containing the found face.
10420             """
10421             # Example: see GEOM_Spanner.py
10422             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10423             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10424             self._autoPublish(anObj, theName, "face")
10425             return anObj
10426
10427         ## Find a face of the given shape, which has minimal distance to the given point.
10428         #  @param theShape Block or a compound of blocks.
10429         #  @param thePoint Point, close to the desired face.
10430         #  @param theName Object name; when specified, this parameter is used
10431         #         for result publication in the study. Otherwise, if automatic
10432         #         publication is switched on, default value is used for result name.
10433         #
10434         #  @return New GEOM.GEOM_Object, containing the found face.
10435         #
10436         #  @ref swig_GetFaceNearPoint "Example"
10437         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10438             """
10439             Find a face of the given shape, which has minimal distance to the given point.
10440
10441             Parameters:
10442                 theShape Block or a compound of blocks.
10443                 thePoint Point, close to the desired face.
10444                 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             Returns:
10449                 New GEOM.GEOM_Object, containing the found face.
10450             """
10451             # Example: see GEOM_Spanner.py
10452             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10453             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10454             self._autoPublish(anObj, theName, "face")
10455             return anObj
10456
10457         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10458         #  @param theBlock Block or a compound of blocks.
10459         #  @param theVector Vector, close to the normale of the desired face.
10460         #  @param theName Object name; when specified, this parameter is used
10461         #         for result publication in the study. Otherwise, if automatic
10462         #         publication is switched on, default value is used for result name.
10463         #
10464         #  @return New GEOM.GEOM_Object, containing the found face.
10465         #
10466         #  @ref swig_todo "Example"
10467         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10468             """
10469             Find a face of block, whose outside normale has minimal angle with the given vector.
10470
10471             Parameters:
10472                 theBlock Block or a compound of blocks.
10473                 theVector Vector, close to the normale of the desired face.
10474                 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             Returns:
10479                 New GEOM.GEOM_Object, containing the found face.
10480             """
10481             # Example: see GEOM_Spanner.py
10482             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10483             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10484             self._autoPublish(anObj, theName, "face")
10485             return anObj
10486
10487         ## Find all sub-shapes of type \a theShapeType of the given shape,
10488         #  which have minimal distance to the given point.
10489         #  @param theShape Any shape.
10490         #  @param thePoint Point, close to the desired shape.
10491         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10492         #  @param theTolerance The tolerance for distances comparison. All shapes
10493         #                      with distances to the given point in interval
10494         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10495         #  @param theName Object name; when specified, this parameter is used
10496         #         for result publication in the study. Otherwise, if automatic
10497         #         publication is switched on, default value is used for result name.
10498         #
10499         #  @return New GEOM_Object, containing a group of all found shapes.
10500         #
10501         #  @ref swig_GetShapesNearPoint "Example"
10502         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10503             """
10504             Find all sub-shapes of type theShapeType of the given shape,
10505             which have minimal distance to the given point.
10506
10507             Parameters:
10508                 theShape Any shape.
10509                 thePoint Point, close to the desired shape.
10510                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10511                 theTolerance The tolerance for distances comparison. All shapes
10512                                 with distances to the given point in interval
10513                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10514                 theName Object name; when specified, this parameter is used
10515                         for result publication in the study. Otherwise, if automatic
10516                         publication is switched on, default value is used for result name.
10517
10518             Returns:
10519                 New GEOM_Object, containing a group of all found shapes.
10520             """
10521             # Example: see GEOM_TestOthers.py
10522             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10523             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10524             self._autoPublish(anObj, theName, "group")
10525             return anObj
10526
10527         # end of l3_blocks_op
10528         ## @}
10529
10530         ## @addtogroup l4_blocks_measure
10531         ## @{
10532
10533         ## Check, if the compound of blocks is given.
10534         #  To be considered as a compound of blocks, the
10535         #  given shape must satisfy the following conditions:
10536         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10537         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10538         #  - The compound should be connexe.
10539         #  - The glue between two quadrangle faces should be applied.
10540         #  @param theCompound The compound to check.
10541         #  @return TRUE, if the given shape is a compound of blocks.
10542         #  If theCompound is not valid, prints all discovered errors.
10543         #
10544         #  @ref tui_measurement_tools_page "Example 1"
10545         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10546         def CheckCompoundOfBlocks(self,theCompound):
10547             """
10548             Check, if the compound of blocks is given.
10549             To be considered as a compound of blocks, the
10550             given shape must satisfy the following conditions:
10551             - Each element of the compound should be a Block (6 faces and 12 edges).
10552             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10553             - The compound should be connexe.
10554             - The glue between two quadrangle faces should be applied.
10555
10556             Parameters:
10557                 theCompound The compound to check.
10558
10559             Returns:
10560                 TRUE, if the given shape is a compound of blocks.
10561                 If theCompound is not valid, prints all discovered errors.            
10562             """
10563             # Example: see GEOM_Spanner.py
10564             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10565             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10566             if IsValid == 0:
10567                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10568                 print Descr
10569             return IsValid
10570
10571         ## Retrieve all non blocks solids and faces from \a theShape.
10572         #  @param theShape The shape to explore.
10573         #  @param theName Object name; when specified, this parameter is used
10574         #         for result publication in the study. Otherwise, if automatic
10575         #         publication is switched on, default value is used for result name.
10576         #
10577         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10578         #          non block solids (= not 6 faces, or with 6 faces, but with the
10579         #          presence of non-quadrangular faces). The second object is a
10580         #          group of all non quadrangular faces.
10581         #
10582         #  @ref tui_measurement_tools_page "Example 1"
10583         #  \n @ref swig_GetNonBlocks "Example 2"
10584         def GetNonBlocks (self, theShape, theName=None):
10585             """
10586             Retrieve all non blocks solids and faces from theShape.
10587
10588             Parameters:
10589                 theShape The shape to explore.
10590                 theName Object name; when specified, this parameter is used
10591                         for result publication in the study. Otherwise, if automatic
10592                         publication is switched on, default value is used for result name.
10593
10594             Returns:
10595                 A tuple of two GEOM_Objects. The first object is a group of all
10596                 non block solids (= not 6 faces, or with 6 faces, but with the
10597                 presence of non-quadrangular faces). The second object is a
10598                 group of all non quadrangular faces.
10599
10600             Usage:
10601                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10602             """
10603             # Example: see GEOM_Spanner.py
10604             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10605             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10606             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10607             return aTuple
10608
10609         ## Remove all seam and degenerated edges from \a theShape.
10610         #  Unite faces and edges, sharing one surface. It means that
10611         #  this faces must have references to one C++ surface object (handle).
10612         #  @param theShape The compound or single solid to remove irregular edges from.
10613         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10614         #         do not unite faces.
10615         #  @param theName Object name; when specified, this parameter is used
10616         #         for result publication in the study. Otherwise, if automatic
10617         #         publication is switched on, default value is used for result name.
10618         #
10619         #  @return Improved shape.
10620         #
10621         #  @ref swig_RemoveExtraEdges "Example"
10622         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10623             """
10624             Remove all seam and degenerated edges from theShape.
10625             Unite faces and edges, sharing one surface. It means that
10626             this faces must have references to one C++ surface object (handle).
10627
10628             Parameters:
10629                 theShape The compound or single solid to remove irregular edges from.
10630                 doUnionFaces If True, then unite faces. If False (the default value),
10631                              do not unite faces.
10632                 theName Object name; when specified, this parameter is used
10633                         for result publication in the study. Otherwise, if automatic
10634                         publication is switched on, default value is used for result name.
10635
10636             Returns: 
10637                 Improved shape.
10638             """
10639             # Example: see GEOM_TestOthers.py
10640             nbFacesOptimum = -1 # -1 means do not unite faces
10641             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10642             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10643             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10644             self._autoPublish(anObj, theName, "removeExtraEdges")
10645             return anObj
10646
10647         ## Check, if the given shape is a blocks compound.
10648         #  Fix all detected errors.
10649         #    \note Single block can be also fixed by this method.
10650         #  @param theShape The compound to check and improve.
10651         #  @param theName Object name; when specified, this parameter is used
10652         #         for result publication in the study. Otherwise, if automatic
10653         #         publication is switched on, default value is used for result name.
10654         #
10655         #  @return Improved compound.
10656         #
10657         #  @ref swig_CheckAndImprove "Example"
10658         def CheckAndImprove(self, theShape, theName=None):
10659             """
10660             Check, if the given shape is a blocks compound.
10661             Fix all detected errors.
10662
10663             Note:
10664                 Single block can be also fixed by this method.
10665
10666             Parameters:
10667                 theShape The compound to check and improve.
10668                 theName Object name; when specified, this parameter is used
10669                         for result publication in the study. Otherwise, if automatic
10670                         publication is switched on, default value is used for result name.
10671
10672             Returns: 
10673                 Improved compound.
10674             """
10675             # Example: see GEOM_TestOthers.py
10676             anObj = self.BlocksOp.CheckAndImprove(theShape)
10677             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10678             self._autoPublish(anObj, theName, "improved")
10679             return anObj
10680
10681         # end of l4_blocks_measure
10682         ## @}
10683
10684         ## @addtogroup l3_blocks_op
10685         ## @{
10686
10687         ## Get all the blocks, contained in the given compound.
10688         #  @param theCompound The compound to explode.
10689         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10690         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10691         #  @param theName Object name; when specified, this parameter is used
10692         #         for result publication in the study. Otherwise, if automatic
10693         #         publication is switched on, default value is used for result name.
10694         #
10695         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10696         #
10697         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10698         #
10699         #  @ref tui_explode_on_blocks "Example 1"
10700         #  \n @ref swig_MakeBlockExplode "Example 2"
10701         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10702             """
10703             Get all the blocks, contained in the given compound.
10704
10705             Parameters:
10706                 theCompound The compound to explode.
10707                 theMinNbFaces If solid has lower number of faces, it is not a block.
10708                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10709                 theName Object name; when specified, this parameter is used
10710                         for result publication in the study. Otherwise, if automatic
10711                         publication is switched on, default value is used for result name.
10712
10713             Note:
10714                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10715
10716             Returns:  
10717                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10718             """
10719             # Example: see GEOM_TestOthers.py
10720             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10721             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10722             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10723             for anObj in aList:
10724                 anObj.SetParameters(Parameters)
10725                 pass
10726             self._autoPublish(aList, theName, "block")
10727             return aList
10728
10729         ## Find block, containing the given point inside its volume or on boundary.
10730         #  @param theCompound Compound, to find block in.
10731         #  @param thePoint Point, close to the desired block. If the point lays on
10732         #         boundary between some blocks, we return block with nearest center.
10733         #  @param theName Object name; when specified, this parameter is used
10734         #         for result publication in the study. Otherwise, if automatic
10735         #         publication is switched on, default value is used for result name.
10736         #
10737         #  @return New GEOM.GEOM_Object, containing the found block.
10738         #
10739         #  @ref swig_todo "Example"
10740         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10741             """
10742             Find block, containing the given point inside its volume or on boundary.
10743
10744             Parameters:
10745                 theCompound Compound, to find block in.
10746                 thePoint Point, close to the desired block. If the point lays on
10747                          boundary between some blocks, we return block with nearest center.
10748                 theName Object name; when specified, this parameter is used
10749                         for result publication in the study. Otherwise, if automatic
10750                         publication is switched on, default value is used for result name.
10751
10752             Returns:
10753                 New GEOM.GEOM_Object, containing the found block.
10754             """
10755             # Example: see GEOM_Spanner.py
10756             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10757             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10758             self._autoPublish(anObj, theName, "block")
10759             return anObj
10760
10761         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10762         #  @param theCompound Compound, to find block in.
10763         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10764         #  @param theName Object name; when specified, this parameter is used
10765         #         for result publication in the study. Otherwise, if automatic
10766         #         publication is switched on, default value is used for result name.
10767         #
10768         #  @return New GEOM.GEOM_Object, containing the found block.
10769         #
10770         #  @ref swig_GetBlockByParts "Example"
10771         def GetBlockByParts(self, theCompound, theParts, theName=None):
10772             """
10773              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10774
10775              Parameters:
10776                 theCompound Compound, to find block in.
10777                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
10778                 theName Object name; when specified, this parameter is used
10779                         for result publication in the study. Otherwise, if automatic
10780                         publication is switched on, default value is used for result name.
10781
10782             Returns: 
10783                 New GEOM_Object, containing the found block.
10784             """
10785             # Example: see GEOM_TestOthers.py
10786             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
10787             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
10788             self._autoPublish(anObj, theName, "block")
10789             return anObj
10790
10791         ## Return all blocks, containing all the elements, passed as the parts.
10792         #  @param theCompound Compound, to find blocks in.
10793         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10794         #  @param theName Object name; when specified, this parameter is used
10795         #         for result publication in the study. Otherwise, if automatic
10796         #         publication is switched on, default value is used for result name.
10797         #
10798         #  @return List of GEOM.GEOM_Object, containing the found blocks.
10799         #
10800         #  @ref swig_todo "Example"
10801         def GetBlocksByParts(self, theCompound, theParts, theName=None):
10802             """
10803             Return all blocks, containing all the elements, passed as the parts.
10804
10805             Parameters:
10806                 theCompound Compound, to find blocks in.
10807                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10808                 theName Object name; when specified, this parameter is used
10809                         for result publication in the study. Otherwise, if automatic
10810                         publication is switched on, default value is used for result name.
10811
10812             Returns:
10813                 List of GEOM.GEOM_Object, containing the found blocks.
10814             """
10815             # Example: see GEOM_Spanner.py
10816             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
10817             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
10818             self._autoPublish(aList, theName, "block")
10819             return aList
10820
10821         ## Multi-transformate block and glue the result.
10822         #  Transformation is defined so, as to superpose direction faces.
10823         #  @param Block Hexahedral solid to be multi-transformed.
10824         #  @param DirFace1 ID of First direction face.
10825         #  @param DirFace2 ID of Second direction face.
10826         #  @param NbTimes Quantity of transformations to be done.
10827         #  @param theName Object name; when specified, this parameter is used
10828         #         for result publication in the study. Otherwise, if automatic
10829         #         publication is switched on, default value is used for result name.
10830         #
10831         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10832         #
10833         #  @return New GEOM.GEOM_Object, containing the result shape.
10834         #
10835         #  @ref tui_multi_transformation "Example"
10836         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
10837             """
10838             Multi-transformate block and glue the result.
10839             Transformation is defined so, as to superpose direction faces.
10840
10841             Parameters:
10842                 Block Hexahedral solid to be multi-transformed.
10843                 DirFace1 ID of First direction face.
10844                 DirFace2 ID of Second direction face.
10845                 NbTimes Quantity of transformations to be done.
10846                 theName Object name; when specified, this parameter is used
10847                         for result publication in the study. Otherwise, if automatic
10848                         publication is switched on, default value is used for result name.
10849
10850             Note:
10851                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10852
10853             Returns:
10854                 New GEOM.GEOM_Object, containing the result shape.
10855             """
10856             # Example: see GEOM_Spanner.py
10857             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
10858             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
10859             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
10860             anObj.SetParameters(Parameters)
10861             self._autoPublish(anObj, theName, "transformed")
10862             return anObj
10863
10864         ## Multi-transformate block and glue the result.
10865         #  @param Block Hexahedral solid to be multi-transformed.
10866         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
10867         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
10868         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
10869         #  @param theName Object name; when specified, this parameter is used
10870         #         for result publication in the study. Otherwise, if automatic
10871         #         publication is switched on, default value is used for result name.
10872         #
10873         #  @return New GEOM.GEOM_Object, containing the result shape.
10874         #
10875         #  @ref tui_multi_transformation "Example"
10876         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
10877                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
10878             """
10879             Multi-transformate block and glue the result.
10880
10881             Parameters:
10882                 Block Hexahedral solid to be multi-transformed.
10883                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
10884                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
10885                 NbTimesU,NbTimesV Quantity of transformations to be done.
10886                 theName Object name; when specified, this parameter is used
10887                         for result publication in the study. Otherwise, if automatic
10888                         publication is switched on, default value is used for result name.
10889
10890             Returns:
10891                 New GEOM.GEOM_Object, containing the result shape.
10892             """
10893             # Example: see GEOM_Spanner.py
10894             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
10895               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
10896             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
10897                                                             DirFace1V, DirFace2V, NbTimesV)
10898             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
10899             anObj.SetParameters(Parameters)
10900             self._autoPublish(anObj, theName, "transformed")
10901             return anObj
10902
10903         ## Build all possible propagation groups.
10904         #  Propagation group is a set of all edges, opposite to one (main)
10905         #  edge of this group directly or through other opposite edges.
10906         #  Notion of Opposite Edge make sence only on quadrangle face.
10907         #  @param theShape Shape to build propagation groups on.
10908         #  @param theName Object name; when specified, this parameter is used
10909         #         for result publication in the study. Otherwise, if automatic
10910         #         publication is switched on, default value is used for result name.
10911         #
10912         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
10913         #
10914         #  @ref swig_Propagate "Example"
10915         def Propagate(self, theShape, theName=None):
10916             """
10917             Build all possible propagation groups.
10918             Propagation group is a set of all edges, opposite to one (main)
10919             edge of this group directly or through other opposite edges.
10920             Notion of Opposite Edge make sence only on quadrangle face.
10921
10922             Parameters:
10923                 theShape Shape to build propagation groups on.
10924                 theName Object name; when specified, this parameter is used
10925                         for result publication in the study. Otherwise, if automatic
10926                         publication is switched on, default value is used for result name.
10927
10928             Returns:
10929                 List of GEOM.GEOM_Object, each of them is a propagation group.
10930             """
10931             # Example: see GEOM_TestOthers.py
10932             listChains = self.BlocksOp.Propagate(theShape)
10933             RaiseIfFailed("Propagate", self.BlocksOp)
10934             self._autoPublish(listChains, theName, "propagate")
10935             return listChains
10936
10937         # end of l3_blocks_op
10938         ## @}
10939
10940         ## @addtogroup l3_groups
10941         ## @{
10942
10943         ## Creates a new group which will store sub-shapes of theMainShape
10944         #  @param theMainShape is a GEOM object on which the group is selected
10945         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
10946         #  @param 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         #  @return a newly created GEOM group (GEOM.GEOM_Object)
10951         #
10952         #  @ref tui_working_with_groups_page "Example 1"
10953         #  \n @ref swig_CreateGroup "Example 2"
10954         def CreateGroup(self, theMainShape, theShapeType, theName=None):
10955             """
10956             Creates a new group which will store sub-shapes of theMainShape
10957
10958             Parameters:
10959                theMainShape is a GEOM object on which the group is selected
10960                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
10961                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
10962                 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             Returns:
10967                a newly created GEOM group
10968
10969             Example of usage:
10970                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
10971                 
10972             """
10973             # Example: see GEOM_TestOthers.py
10974             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
10975             RaiseIfFailed("CreateGroup", self.GroupOp)
10976             self._autoPublish(anObj, theName, "group")
10977             return anObj
10978
10979         ## Adds a sub-object with ID theSubShapeId to the group
10980         #  @param theGroup is a GEOM group to which the new sub-shape is added
10981         #  @param theSubShapeID is a sub-shape ID in the main object.
10982         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
10983         #
10984         #  @ref tui_working_with_groups_page "Example"
10985         def AddObject(self,theGroup, theSubShapeID):
10986             """
10987             Adds a sub-object with ID theSubShapeId to the group
10988
10989             Parameters:
10990                 theGroup       is a GEOM group to which the new sub-shape is added
10991                 theSubShapeID  is a sub-shape ID in the main object.
10992
10993             Note:
10994                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
10995             """
10996             # Example: see GEOM_TestOthers.py
10997             self.GroupOp.AddObject(theGroup, theSubShapeID)
10998             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
10999                 RaiseIfFailed("AddObject", self.GroupOp)
11000                 pass
11001             pass
11002
11003         ## Removes a sub-object with ID \a theSubShapeId from the group
11004         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11005         #  @param theSubShapeID is a sub-shape ID in the main object.
11006         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11007         #
11008         #  @ref tui_working_with_groups_page "Example"
11009         def RemoveObject(self,theGroup, theSubShapeID):
11010             """
11011             Removes a sub-object with ID theSubShapeId from the group
11012
11013             Parameters:
11014                 theGroup is a GEOM group from which the new sub-shape is removed
11015                 theSubShapeID is a sub-shape ID in the main object.
11016
11017             Note:
11018                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11019             """
11020             # Example: see GEOM_TestOthers.py
11021             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11022             RaiseIfFailed("RemoveObject", self.GroupOp)
11023             pass
11024
11025         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11026         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11027         #  @param theSubShapes is a list of sub-shapes to be added.
11028         #
11029         #  @ref tui_working_with_groups_page "Example"
11030         def UnionList (self,theGroup, theSubShapes):
11031             """
11032             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11033
11034             Parameters:
11035                 theGroup is a GEOM group to which the new sub-shapes are added.
11036                 theSubShapes is a list of sub-shapes to be added.
11037             """
11038             # Example: see GEOM_TestOthers.py
11039             self.GroupOp.UnionList(theGroup, theSubShapes)
11040             RaiseIfFailed("UnionList", self.GroupOp)
11041             pass
11042
11043         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11044         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11045         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11046         #
11047         #  @ref swig_UnionIDs "Example"
11048         def UnionIDs(self,theGroup, theSubShapes):
11049             """
11050             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11051
11052             Parameters:
11053                 theGroup is a GEOM group to which the new sub-shapes are added.
11054                 theSubShapes is a list of indices of sub-shapes to be added.
11055             """
11056             # Example: see GEOM_TestOthers.py
11057             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11058             RaiseIfFailed("UnionIDs", self.GroupOp)
11059             pass
11060
11061         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11062         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11063         #  @param theSubShapes is a list of sub-shapes to be removed.
11064         #
11065         #  @ref tui_working_with_groups_page "Example"
11066         def DifferenceList (self,theGroup, theSubShapes):
11067             """
11068             Removes from the group all the given shapes. No errors, if some shapes are not included.
11069
11070             Parameters:
11071                 theGroup is a GEOM group from which the sub-shapes are removed.
11072                 theSubShapes is a list of sub-shapes to be removed.
11073             """
11074             # Example: see GEOM_TestOthers.py
11075             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11076             RaiseIfFailed("DifferenceList", self.GroupOp)
11077             pass
11078
11079         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11080         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11081         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11082         #
11083         #  @ref swig_DifferenceIDs "Example"
11084         def DifferenceIDs(self,theGroup, theSubShapes):
11085             """
11086             Removes from the group all the given shapes. No errors, if some shapes are not included.
11087
11088             Parameters:
11089                 theGroup is a GEOM group from which the sub-shapes are removed.
11090                 theSubShapes is a list of indices of sub-shapes to be removed.
11091             """            
11092             # Example: see GEOM_TestOthers.py
11093             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11094             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11095             pass
11096
11097         ## Union of two groups.
11098         #  New group is created. It will contain all entities
11099         #  which are present in groups theGroup1 and theGroup2.
11100         #  @param theGroup1, theGroup2 are the initial GEOM groups
11101         #                              to create the united group from.
11102         #  @param theName Object name; when specified, this parameter is used
11103         #         for result publication in the study. Otherwise, if automatic
11104         #         publication is switched on, default value is used for result name.
11105         #
11106         #  @return a newly created GEOM group.
11107         #
11108         #  @ref tui_union_groups_anchor "Example"
11109         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11110             """
11111             Union of two groups.
11112             New group is created. It will contain all entities
11113             which are present in groups theGroup1 and theGroup2.
11114
11115             Parameters:
11116                 theGroup1, theGroup2 are the initial GEOM groups
11117                                      to create the united group from.
11118                 theName Object name; when specified, this parameter is used
11119                         for result publication in the study. Otherwise, if automatic
11120                         publication is switched on, default value is used for result name.
11121
11122             Returns:
11123                 a newly created GEOM group.
11124             """
11125             # Example: see GEOM_TestOthers.py
11126             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11127             RaiseIfFailed("UnionGroups", self.GroupOp)
11128             self._autoPublish(aGroup, theName, "group")
11129             return aGroup
11130
11131         ## Intersection of two groups.
11132         #  New group is created. It will contain only those entities
11133         #  which are present in both groups theGroup1 and theGroup2.
11134         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11135         #  @param theName Object name; when specified, this parameter is used
11136         #         for result publication in the study. Otherwise, if automatic
11137         #         publication is switched on, default value is used for result name.
11138         #
11139         #  @return a newly created GEOM group.
11140         #
11141         #  @ref tui_intersect_groups_anchor "Example"
11142         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11143             """
11144             Intersection of two groups.
11145             New group is created. It will contain only those entities
11146             which are present in both groups theGroup1 and theGroup2.
11147
11148             Parameters:
11149                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11150                 theName Object name; when specified, this parameter is used
11151                         for result publication in the study. Otherwise, if automatic
11152                         publication is switched on, default value is used for result name.
11153
11154             Returns:
11155                 a newly created GEOM group.
11156             """
11157             # Example: see GEOM_TestOthers.py
11158             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11159             RaiseIfFailed("IntersectGroups", self.GroupOp)
11160             self._autoPublish(aGroup, theName, "group")
11161             return aGroup
11162
11163         ## Cut of two groups.
11164         #  New group is created. It will contain entities which are
11165         #  present in group theGroup1 but are not present in group theGroup2.
11166         #  @param theGroup1 is a GEOM group to include elements of.
11167         #  @param theGroup2 is a GEOM group to exclude elements of.
11168         #  @param theName Object name; when specified, this parameter is used
11169         #         for result publication in the study. Otherwise, if automatic
11170         #         publication is switched on, default value is used for result name.
11171         #
11172         #  @return a newly created GEOM group.
11173         #
11174         #  @ref tui_cut_groups_anchor "Example"
11175         def CutGroups (self, theGroup1, theGroup2, theName=None):
11176             """
11177             Cut of two groups.
11178             New group is created. It will contain entities which are
11179             present in group theGroup1 but are not present in group theGroup2.
11180
11181             Parameters:
11182                 theGroup1 is a GEOM group to include elements of.
11183                 theGroup2 is a GEOM group to exclude elements of.
11184                 theName Object name; when specified, this parameter is used
11185                         for result publication in the study. Otherwise, if automatic
11186                         publication is switched on, default value is used for result name.
11187
11188             Returns:
11189                 a newly created GEOM group.
11190             """
11191             # Example: see GEOM_TestOthers.py
11192             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11193             RaiseIfFailed("CutGroups", self.GroupOp)
11194             self._autoPublish(aGroup, theName, "group")
11195             return aGroup
11196
11197         ## Union of list of groups.
11198         #  New group is created. It will contain all entities that are
11199         #  present in groups listed in theGList.
11200         #  @param theGList is a list of GEOM groups to create the united group from.
11201         #  @param theName Object name; when specified, this parameter is used
11202         #         for result publication in the study. Otherwise, if automatic
11203         #         publication is switched on, default value is used for result name.
11204         #
11205         #  @return a newly created GEOM group.
11206         #
11207         #  @ref tui_union_groups_anchor "Example"
11208         def UnionListOfGroups (self, theGList, theName=None):
11209             """
11210             Union of list of groups.
11211             New group is created. It will contain all entities that are
11212             present in groups listed in theGList.
11213
11214             Parameters:
11215                 theGList is a list of GEOM groups to create the united group from.
11216                 theName Object name; when specified, this parameter is used
11217                         for result publication in the study. Otherwise, if automatic
11218                         publication is switched on, default value is used for result name.
11219
11220             Returns:
11221                 a newly created GEOM group.
11222             """
11223             # Example: see GEOM_TestOthers.py
11224             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11225             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11226             self._autoPublish(aGroup, theName, "group")
11227             return aGroup
11228
11229         ## Cut of lists of groups.
11230         #  New group is created. It will contain only entities
11231         #  which are present in groups listed in theGList1 but 
11232         #  are not present in groups from theGList2.
11233         #  @param theGList1 is a list of GEOM groups to include elements of.
11234         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11235         #  @param theName Object name; when specified, this parameter is used
11236         #         for result publication in the study. Otherwise, if automatic
11237         #         publication is switched on, default value is used for result name.
11238         #
11239         #  @return a newly created GEOM group.
11240         #
11241         #  @ref tui_intersect_groups_anchor "Example"
11242         def IntersectListOfGroups (self, theGList, theName=None):
11243             """
11244             Cut of lists of groups.
11245             New group is created. It will contain only entities
11246             which are present in groups listed in theGList1 but 
11247             are not present in groups from theGList2.
11248
11249             Parameters:
11250                 theGList1 is a list of GEOM groups to include elements of.
11251                 theGList2 is a list of GEOM groups to exclude elements of.
11252                 theName Object name; when specified, this parameter is used
11253                         for result publication in the study. Otherwise, if automatic
11254                         publication is switched on, default value is used for result name.
11255
11256             Returns:
11257                 a newly created GEOM group.
11258             """
11259             # Example: see GEOM_TestOthers.py
11260             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11261             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11262             self._autoPublish(aGroup, theName, "group")
11263             return aGroup
11264
11265         ## Cut of lists of groups.
11266         #  New group is created. It will contain only entities
11267         #  which are present in groups listed in theGList1 but 
11268         #  are not present in groups from theGList2.
11269         #  @param theGList1 is a list of GEOM groups to include elements of.
11270         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11271         #  @param theName Object name; when specified, this parameter is used
11272         #         for result publication in the study. Otherwise, if automatic
11273         #         publication is switched on, default value is used for result name.
11274         #
11275         #  @return a newly created GEOM group.
11276         #
11277         #  @ref tui_cut_groups_anchor "Example"
11278         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11279             """
11280             Cut of lists of groups.
11281             New group is created. It will contain only entities
11282             which are present in groups listed in theGList1 but 
11283             are not present in groups from theGList2.
11284
11285             Parameters:
11286                 theGList1 is a list of GEOM groups to include elements of.
11287                 theGList2 is a list of GEOM groups to exclude elements of.
11288                 theName Object name; when specified, this parameter is used
11289                         for result publication in the study. Otherwise, if automatic
11290                         publication is switched on, default value is used for result name.
11291
11292             Returns:
11293                 a newly created GEOM group.
11294             """
11295             # Example: see GEOM_TestOthers.py
11296             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11297             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11298             self._autoPublish(aGroup, theName, "group")
11299             return aGroup
11300
11301         ## Returns a list of sub-objects ID stored in the group
11302         #  @param theGroup is a GEOM group for which a list of IDs is requested
11303         #
11304         #  @ref swig_GetObjectIDs "Example"
11305         def GetObjectIDs(self,theGroup):
11306             """
11307             Returns a list of sub-objects ID stored in the group
11308
11309             Parameters:
11310                 theGroup is a GEOM group for which a list of IDs is requested
11311             """
11312             # Example: see GEOM_TestOthers.py
11313             ListIDs = self.GroupOp.GetObjects(theGroup)
11314             RaiseIfFailed("GetObjects", self.GroupOp)
11315             return ListIDs
11316
11317         ## Returns a type of sub-objects stored in the group
11318         #  @param theGroup is a GEOM group which type is returned.
11319         #
11320         #  @ref swig_GetType "Example"
11321         def GetType(self,theGroup):
11322             """
11323             Returns a type of sub-objects stored in the group
11324
11325             Parameters:
11326                 theGroup is a GEOM group which type is returned.
11327             """
11328             # Example: see GEOM_TestOthers.py
11329             aType = self.GroupOp.GetType(theGroup)
11330             RaiseIfFailed("GetType", self.GroupOp)
11331             return aType
11332
11333         ## Convert a type of geom object from id to string value
11334         #  @param theId is a GEOM obect type id.
11335         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11336         #  @ref swig_GetType "Example"
11337         def ShapeIdToType(self, theId):
11338             """
11339             Convert a type of geom object from id to string value
11340
11341             Parameters:
11342                 theId is a GEOM obect type id.
11343                 
11344             Returns:
11345                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11346             """
11347             if theId == 0:
11348                 return "COPY"
11349             if theId == 1:
11350                 return "IMPORT"
11351             if theId == 2:
11352                 return "POINT"
11353             if theId == 3:
11354                 return "VECTOR"
11355             if theId == 4:
11356                 return "PLANE"
11357             if theId == 5:
11358                 return "LINE"
11359             if theId == 6:
11360                 return "TORUS"
11361             if theId == 7:
11362                 return "BOX"
11363             if theId == 8:
11364                 return "CYLINDER"
11365             if theId == 9:
11366                 return "CONE"
11367             if theId == 10:
11368                 return "SPHERE"
11369             if theId == 11:
11370                 return "PRISM"
11371             if theId == 12:
11372                 return "REVOLUTION"
11373             if theId == 13:
11374                 return "BOOLEAN"
11375             if theId == 14:
11376                 return "PARTITION"
11377             if theId == 15:
11378                 return "POLYLINE"
11379             if theId == 16:
11380                 return "CIRCLE"
11381             if theId == 17:
11382                 return "SPLINE"
11383             if theId == 18:
11384                 return "ELLIPSE"
11385             if theId == 19:
11386                 return "CIRC_ARC"
11387             if theId == 20:
11388                 return "FILLET"
11389             if theId == 21:
11390                 return "CHAMFER"
11391             if theId == 22:
11392                 return "EDGE"
11393             if theId == 23:
11394                 return "WIRE"
11395             if theId == 24:
11396                 return "FACE"
11397             if theId == 25:
11398                 return "SHELL"
11399             if theId == 26:
11400                 return "SOLID"
11401             if theId == 27:
11402                 return "COMPOUND"
11403             if theId == 28:
11404                 return "SUBSHAPE"
11405             if theId == 29:
11406                 return "PIPE"
11407             if theId == 30:
11408                 return "ARCHIMEDE"
11409             if theId == 31:
11410                 return "FILLING"
11411             if theId == 32:
11412                 return "EXPLODE"
11413             if theId == 33:
11414                 return "GLUED"
11415             if theId == 34:
11416                 return "SKETCHER"
11417             if theId == 35:
11418                 return "CDG"
11419             if theId == 36:
11420                 return "FREE_BOUNDS"
11421             if theId == 37:
11422                 return "GROUP"
11423             if theId == 38:
11424                 return "BLOCK"
11425             if theId == 39:
11426                 return "MARKER"
11427             if theId == 40:
11428                 return "THRUSECTIONS"
11429             if theId == 41:
11430                 return "COMPOUNDFILTER"
11431             if theId == 42:
11432                 return "SHAPES_ON_SHAPE"
11433             if theId == 43:
11434                 return "ELLIPSE_ARC"
11435             if theId == 44:
11436                 return "3DSKETCHER"
11437             if theId == 45:
11438                 return "FILLET_2D"
11439             if theId == 46:
11440                 return "FILLET_1D"
11441             if theId == 201:
11442                 return "PIPETSHAPE"
11443             return "Shape Id not exist."
11444
11445         ## Returns a main shape associated with the group
11446         #  @param theGroup is a GEOM group for which a main shape object is requested
11447         #  @return a GEOM object which is a main shape for theGroup
11448         #
11449         #  @ref swig_GetMainShape "Example"
11450         def GetMainShape(self,theGroup):
11451             """
11452             Returns a main shape associated with the group
11453
11454             Parameters:
11455                 theGroup is a GEOM group for which a main shape object is requested
11456
11457             Returns:
11458                 a GEOM object which is a main shape for theGroup
11459
11460             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11461             """
11462             # Example: see GEOM_TestOthers.py
11463             anObj = self.GroupOp.GetMainShape(theGroup)
11464             RaiseIfFailed("GetMainShape", self.GroupOp)
11465             return anObj
11466
11467         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11468         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11469         #  @param theShape given shape (see GEOM.GEOM_Object)
11470         #  @param min_length minimum length of edges of theShape
11471         #  @param max_length maximum length of edges of theShape
11472         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11473         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11474         #  @param theName Object name; when specified, this parameter is used
11475         #         for result publication in the study. Otherwise, if automatic
11476         #         publication is switched on, default value is used for result name.
11477         #
11478         #  @return a newly created GEOM group of edges
11479         #
11480         #  @@ref swig_todo "Example"
11481         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11482             """
11483             Create group of edges of theShape, whose length is in range [min_length, max_length].
11484             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11485
11486             Parameters:
11487                 theShape given shape
11488                 min_length minimum length of edges of theShape
11489                 max_length maximum length of edges of theShape
11490                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11491                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11492                 theName Object name; when specified, this parameter is used
11493                         for result publication in the study. Otherwise, if automatic
11494                         publication is switched on, default value is used for result name.
11495
11496              Returns:
11497                 a newly created GEOM group of edges.
11498             """
11499             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11500             edges_in_range = []
11501             for edge in edges:
11502                 Props = self.BasicProperties(edge)
11503                 if min_length <= Props[0] and Props[0] <= max_length:
11504                     if (not include_min) and (min_length == Props[0]):
11505                         skip = 1
11506                     else:
11507                         if (not include_max) and (Props[0] == max_length):
11508                             skip = 1
11509                         else:
11510                             edges_in_range.append(edge)
11511
11512             if len(edges_in_range) <= 0:
11513                 print "No edges found by given criteria"
11514                 return None
11515
11516             # note: auto-publishing is done in self.CreateGroup()
11517             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11518             self.UnionList(group_edges, edges_in_range)
11519
11520             return group_edges
11521
11522         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11523         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11524         #  @param min_length minimum length of edges of selected shape
11525         #  @param max_length maximum length of edges of selected shape
11526         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11527         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11528         #  @return a newly created GEOM group of edges
11529         #  @ref swig_todo "Example"
11530         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11531             """
11532             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11533             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11534
11535             Parameters:
11536                 min_length minimum length of edges of selected shape
11537                 max_length maximum length of edges of selected shape
11538                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11539                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11540
11541              Returns:
11542                 a newly created GEOM group of edges.
11543             """
11544             nb_selected = sg.SelectedCount()
11545             if nb_selected < 1:
11546                 print "Select a shape before calling this function, please."
11547                 return 0
11548             if nb_selected > 1:
11549                 print "Only one shape must be selected"
11550                 return 0
11551
11552             id_shape = sg.getSelected(0)
11553             shape = IDToObject( id_shape )
11554
11555             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11556
11557             left_str  = " < "
11558             right_str = " < "
11559             if include_min: left_str  = " <= "
11560             if include_max: right_str  = " <= "
11561
11562             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11563                                     + left_str + "length" + right_str + `max_length`)
11564
11565             sg.updateObjBrowser(1)
11566
11567             return group_edges
11568
11569         # end of l3_groups
11570         ## @}
11571
11572         ## @addtogroup l4_advanced
11573         ## @{
11574
11575         ## Create a T-shape object with specified caracteristics for the main
11576         #  and the incident pipes (radius, width, half-length).
11577         #  The extremities of the main pipe are located on junctions points P1 and P2.
11578         #  The extremity of the incident pipe is located on junction point P3.
11579         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11580         #  the main plane of the T-shape is XOY.
11581         #
11582         #  @param theR1 Internal radius of main pipe
11583         #  @param theW1 Width of main pipe
11584         #  @param theL1 Half-length of main pipe
11585         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11586         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11587         #  @param theL2 Half-length of incident pipe
11588         #
11589         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11590         #  @param theP1 1st junction point of main pipe
11591         #  @param theP2 2nd junction point of main pipe
11592         #  @param theP3 Junction point of incident pipe
11593         #
11594         #  @param theRL Internal radius of left thickness reduction
11595         #  @param theWL Width of left thickness reduction
11596         #  @param theLtransL Length of left transition part
11597         #  @param theLthinL Length of left thin part
11598         #
11599         #  @param theRR Internal radius of right thickness reduction
11600         #  @param theWR Width of right thickness reduction
11601         #  @param theLtransR Length of right transition part
11602         #  @param theLthinR Length of right thin part
11603         #
11604         #  @param theRI Internal radius of incident thickness reduction
11605         #  @param theWI Width of incident thickness reduction
11606         #  @param theLtransI Length of incident transition part
11607         #  @param theLthinI Length of incident thin part
11608         #
11609         #  @param theName Object name; when specified, this parameter is used
11610         #         for result publication in the study. Otherwise, if automatic
11611         #         publication is switched on, default value is used for result name.
11612         #
11613         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11614         #
11615         #  @ref tui_creation_pipetshape "Example"
11616         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11617                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11618                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11619                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11620                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11621                             theName=None):
11622             """
11623             Create a T-shape object with specified caracteristics for the main
11624             and the incident pipes (radius, width, half-length).
11625             The extremities of the main pipe are located on junctions points P1 and P2.
11626             The extremity of the incident pipe is located on junction point P3.
11627             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11628             the main plane of the T-shape is XOY.
11629
11630             Parameters:
11631                 theR1 Internal radius of main pipe
11632                 theW1 Width of main pipe
11633                 theL1 Half-length of main pipe
11634                 theR2 Internal radius of incident pipe (R2 < R1)
11635                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11636                 theL2 Half-length of incident pipe
11637                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11638                 theP1 1st junction point of main pipe
11639                 theP2 2nd junction point of main pipe
11640                 theP3 Junction point of incident pipe
11641
11642                 theRL Internal radius of left thickness reduction
11643                 theWL Width of left thickness reduction
11644                 theLtransL Length of left transition part
11645                 theLthinL Length of left thin part
11646
11647                 theRR Internal radius of right thickness reduction
11648                 theWR Width of right thickness reduction
11649                 theLtransR Length of right transition part
11650                 theLthinR Length of right thin part
11651
11652                 theRI Internal radius of incident thickness reduction
11653                 theWI Width of incident thickness reduction
11654                 theLtransI Length of incident transition part
11655                 theLthinI Length of incident thin part
11656
11657                 theName Object name; when specified, this parameter is used
11658                         for result publication in the study. Otherwise, if automatic
11659                         publication is switched on, default value is used for result name.
11660
11661             Returns:
11662                 List of GEOM_Object, containing the created shape and propagation groups.
11663
11664             Example of usage:
11665                 # create PipeTShape object
11666                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11667                 # create PipeTShape object with position
11668                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11669                 # create PipeTShape object with left thickness reduction
11670                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11671             """
11672             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)
11673             if (theP1 and theP2 and theP3):
11674                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11675                                                                 theRL, theWL, theLtransL, theLthinL,
11676                                                                 theRR, theWR, theLtransR, theLthinR,
11677                                                                 theRI, theWI, theLtransI, theLthinI,
11678                                                                 theHexMesh, theP1, theP2, theP3)
11679             else:
11680                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11681                                                     theRL, theWL, theLtransL, theLthinL,
11682                                                     theRR, theWR, theLtransR, theLthinR,
11683                                                     theRI, theWI, theLtransI, theLthinI,
11684                                                     theHexMesh)
11685             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11686             if Parameters: anObj[0].SetParameters(Parameters)
11687             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11688             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11689             return anObj
11690
11691         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11692         #  and the incident pipes (radius, width, half-length). The chamfer is
11693         #  created on the junction of the pipes.
11694         #  The extremities of the main pipe are located on junctions points P1 and P2.
11695         #  The extremity of the incident pipe is located on junction point P3.
11696         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11697         #  the main plane of the T-shape is XOY.
11698         #  @param theR1 Internal radius of main pipe
11699         #  @param theW1 Width of main pipe
11700         #  @param theL1 Half-length of main pipe
11701         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11702         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11703         #  @param theL2 Half-length of incident pipe
11704         #  @param theH Height of the chamfer.
11705         #  @param theW Width of the chamfer.
11706         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11707         #  @param theP1 1st junction point of main pipe
11708         #  @param theP2 2nd junction point of main pipe
11709         #  @param theP3 Junction point of incident pipe
11710         #
11711         #  @param theRL Internal radius of left thickness reduction
11712         #  @param theWL Width of left thickness reduction
11713         #  @param theLtransL Length of left transition part
11714         #  @param theLthinL Length of left thin part
11715         #
11716         #  @param theRR Internal radius of right thickness reduction
11717         #  @param theWR Width of right thickness reduction
11718         #  @param theLtransR Length of right transition part
11719         #  @param theLthinR Length of right thin part
11720         #
11721         #  @param theRI Internal radius of incident thickness reduction
11722         #  @param theWI Width of incident thickness reduction
11723         #  @param theLtransI Length of incident transition part
11724         #  @param theLthinI Length of incident thin part
11725         #
11726         #  @param theName Object name; when specified, this parameter is used
11727         #         for result publication in the study. Otherwise, if automatic
11728         #         publication is switched on, default value is used for result name.
11729         #
11730         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11731         #
11732         #  @ref tui_creation_pipetshape "Example"
11733         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11734                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11735                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11736                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11737                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11738                                    theName=None):
11739             """
11740             Create a T-shape object with chamfer and with specified caracteristics for the main
11741             and the incident pipes (radius, width, half-length). The chamfer is
11742             created on the junction of the pipes.
11743             The extremities of the main pipe are located on junctions points P1 and P2.
11744             The extremity of the incident pipe is located on junction point P3.
11745             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11746             the main plane of the T-shape is XOY.
11747
11748             Parameters:
11749                 theR1 Internal radius of main pipe
11750                 theW1 Width of main pipe
11751                 theL1 Half-length of main pipe
11752                 theR2 Internal radius of incident pipe (R2 < R1)
11753                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11754                 theL2 Half-length of incident pipe
11755                 theH Height of the chamfer.
11756                 theW Width of the chamfer.
11757                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11758                 theP1 1st junction point of main pipe
11759                 theP2 2nd junction point of main pipe
11760                 theP3 Junction point of incident pipe
11761
11762                 theRL Internal radius of left thickness reduction
11763                 theWL Width of left thickness reduction
11764                 theLtransL Length of left transition part
11765                 theLthinL Length of left thin part
11766
11767                 theRR Internal radius of right thickness reduction
11768                 theWR Width of right thickness reduction
11769                 theLtransR Length of right transition part
11770                 theLthinR Length of right thin part
11771
11772                 theRI Internal radius of incident thickness reduction
11773                 theWI Width of incident thickness reduction
11774                 theLtransI Length of incident transition part
11775                 theLthinI Length of incident thin part
11776
11777                 theName Object name; when specified, this parameter is used
11778                         for result publication in the study. Otherwise, if automatic
11779                         publication is switched on, default value is used for result name.
11780
11781             Returns:
11782                 List of GEOM_Object, containing the created shape and propagation groups.
11783
11784             Example of usage:
11785                 # create PipeTShape with chamfer object
11786                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
11787                 # create PipeTShape with chamfer object with position
11788                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
11789                 # create PipeTShape with chamfer object with left thickness reduction
11790                 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)
11791             """
11792             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)
11793             if (theP1 and theP2 and theP3):
11794               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11795                                                                      theRL, theWL, theLtransL, theLthinL,
11796                                                                      theRR, theWR, theLtransR, theLthinR,
11797                                                                      theRI, theWI, theLtransI, theLthinI,
11798                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
11799             else:
11800               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
11801                                                          theRL, theWL, theLtransL, theLthinL,
11802                                                          theRR, theWR, theLtransR, theLthinR,
11803                                                          theRI, theWI, theLtransI, theLthinI,
11804                                                          theH, theW, theHexMesh)
11805             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
11806             if Parameters: anObj[0].SetParameters(Parameters)
11807             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11808             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11809             return anObj
11810
11811         ## Create a T-shape object with fillet and with specified caracteristics for the main
11812         #  and the incident pipes (radius, width, half-length). The fillet is
11813         #  created on the junction of the pipes.
11814         #  The extremities of the main pipe are located on junctions points P1 and P2.
11815         #  The extremity of the incident pipe is located on junction point P3.
11816         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11817         #  the main plane of the T-shape is XOY.
11818         #  @param theR1 Internal radius of main pipe
11819         #  @param theW1 Width of main pipe
11820         #  @param theL1 Half-length of main pipe
11821         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11822         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11823         #  @param theL2 Half-length of incident pipe
11824         #  @param theRF Radius of curvature of fillet.
11825         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11826         #  @param theP1 1st junction point of main pipe
11827         #  @param theP2 2nd junction point of main pipe
11828         #  @param theP3 Junction point of incident pipe
11829         #
11830         #  @param theRL Internal radius of left thickness reduction
11831         #  @param theWL Width of left thickness reduction
11832         #  @param theLtransL Length of left transition part
11833         #  @param theLthinL Length of left thin part
11834         #
11835         #  @param theRR Internal radius of right thickness reduction
11836         #  @param theWR Width of right thickness reduction
11837         #  @param theLtransR Length of right transition part
11838         #  @param theLthinR Length of right thin part
11839         #
11840         #  @param theRI Internal radius of incident thickness reduction
11841         #  @param theWI Width of incident thickness reduction
11842         #  @param theLtransI Length of incident transition part
11843         #  @param theLthinI Length of incident thin part
11844         #
11845         #  @param theName Object name; when specified, this parameter is used
11846         #         for result publication in the study. Otherwise, if automatic
11847         #         publication is switched on, default value is used for result name.
11848         #
11849         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11850         #
11851         #  @ref tui_creation_pipetshape "Example"
11852         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
11853                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11854                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11855                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11856                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11857                                   theName=None):
11858             """
11859             Create a T-shape object with fillet and with specified caracteristics for the main
11860             and the incident pipes (radius, width, half-length). The fillet is
11861             created on the junction of the pipes.
11862             The extremities of the main pipe are located on junctions points P1 and P2.
11863             The extremity of the incident pipe is located on junction point P3.
11864
11865             Parameters:
11866                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11867                 the main plane of the T-shape is XOY.
11868                 theR1 Internal radius of main pipe
11869                 theW1 Width of main pipe
11870                 heL1 Half-length of main pipe
11871                 theR2 Internal radius of incident pipe (R2 < R1)
11872                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11873                 theL2 Half-length of incident pipe
11874                 theRF Radius of curvature of fillet.
11875                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11876                 theP1 1st junction point of main pipe
11877                 theP2 2nd junction point of main pipe
11878                 theP3 Junction point of incident pipe
11879
11880                 theRL Internal radius of left thickness reduction
11881                 theWL Width of left thickness reduction
11882                 theLtransL Length of left transition part
11883                 theLthinL Length of left thin part
11884
11885                 theRR Internal radius of right thickness reduction
11886                 theWR Width of right thickness reduction
11887                 theLtransR Length of right transition part
11888                 theLthinR Length of right thin part
11889
11890                 theRI Internal radius of incident thickness reduction
11891                 theWI Width of incident thickness reduction
11892                 theLtransI Length of incident transition part
11893                 theLthinI Length of incident thin part
11894
11895                 theName Object name; when specified, this parameter is used
11896                         for result publication in the study. Otherwise, if automatic
11897                         publication is switched on, default value is used for result name.
11898                 
11899             Returns:
11900                 List of GEOM_Object, containing the created shape and propagation groups.
11901                 
11902             Example of usage:
11903                 # create PipeTShape with fillet object
11904                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
11905                 # create PipeTShape with fillet object with position
11906                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
11907                 # create PipeTShape with fillet object with left thickness reduction
11908                 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)
11909             """
11910             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)
11911             if (theP1 and theP2 and theP3):
11912               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11913                                                                     theRL, theWL, theLtransL, theLthinL,
11914                                                                     theRR, theWR, theLtransR, theLthinR,
11915                                                                     theRI, theWI, theLtransI, theLthinI,
11916                                                                     theRF, theHexMesh, theP1, theP2, theP3)
11917             else:
11918               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
11919                                                         theRL, theWL, theLtransL, theLthinL,
11920                                                         theRR, theWR, theLtransR, theLthinR,
11921                                                         theRI, theWI, theLtransI, theLthinI,
11922                                                         theRF, theHexMesh)
11923             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
11924             if Parameters: anObj[0].SetParameters(Parameters)
11925             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11926             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11927             return anObj
11928
11929         ## This function allows creating a disk already divided into blocks. It
11930         #  can be used to create divided pipes for later meshing in hexaedra.
11931         #  @param theR Radius of the disk
11932         #  @param theOrientation Orientation of the plane on which the disk will be built
11933         #         1 = XOY, 2 = OYZ, 3 = OZX
11934         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11935         #  @param theName Object name; when specified, this parameter is used
11936         #         for result publication in the study. Otherwise, if automatic
11937         #         publication is switched on, default value is used for result name.
11938         #
11939         #  @return New GEOM_Object, containing the created shape.
11940         #
11941         #  @ref tui_creation_divideddisk "Example"
11942         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
11943             """
11944             Creates a disk, divided into blocks. It can be used to create divided pipes
11945             for later meshing in hexaedra.
11946
11947             Parameters:
11948                 theR Radius of the disk
11949                 theOrientation Orientation of the plane on which the disk will be built:
11950                                1 = XOY, 2 = OYZ, 3 = OZX
11951                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11952                 theName Object name; when specified, this parameter is used
11953                         for result publication in the study. Otherwise, if automatic
11954                         publication is switched on, default value is used for result name.
11955
11956             Returns:
11957                 New GEOM_Object, containing the created shape.
11958             """
11959             theR, Parameters = ParseParameters(theR)
11960             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
11961             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
11962             if Parameters: anObj.SetParameters(Parameters)
11963             self._autoPublish(anObj, theName, "dividedDisk")
11964             return anObj
11965             
11966         ## This function allows creating a disk already divided into blocks. It
11967         #  can be used to create divided pipes for later meshing in hexaedra.
11968         #  @param theCenter Center of the disk
11969         #  @param theVector Normal vector to the plane of the created disk
11970         #  @param theRadius Radius of the disk
11971         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11972         #  @param theName Object name; when specified, this parameter is used
11973         #         for result publication in the study. Otherwise, if automatic
11974         #         publication is switched on, default value is used for result name.
11975         #
11976         #  @return New GEOM_Object, containing the created shape.
11977         #
11978         #  @ref tui_creation_divideddisk "Example"
11979         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
11980             """
11981             Creates a disk already divided into blocks. It can be used to create divided pipes
11982             for later meshing in hexaedra.
11983
11984             Parameters:
11985                 theCenter Center of the disk
11986                 theVector Normal vector to the plane of the created disk
11987                 theRadius Radius of the disk
11988                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11989                 theName Object name; when specified, this parameter is used
11990                         for result publication in the study. Otherwise, if automatic
11991                         publication is switched on, default value is used for result name.
11992
11993             Returns:
11994                 New GEOM_Object, containing the created shape.
11995             """
11996             theRadius, Parameters = ParseParameters(theRadius)
11997             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
11998             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
11999             if Parameters: anObj.SetParameters(Parameters)
12000             self._autoPublish(anObj, theName, "dividedDisk")
12001             return anObj
12002
12003         ## Builds a cylinder prepared for hexa meshes
12004         #  @param theR Radius of the cylinder
12005         #  @param theH Height of the cylinder
12006         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12007         #  @param theName Object name; when specified, this parameter is used
12008         #         for result publication in the study. Otherwise, if automatic
12009         #         publication is switched on, default value is used for result name.
12010         #
12011         #  @return New GEOM_Object, containing the created shape.
12012         #
12013         #  @ref tui_creation_dividedcylinder "Example"
12014         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12015             """
12016             Builds a cylinder prepared for hexa meshes
12017
12018             Parameters:
12019                 theR Radius of the cylinder
12020                 theH Height of the cylinder
12021                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12022                 theName Object name; when specified, this parameter is used
12023                         for result publication in the study. Otherwise, if automatic
12024                         publication is switched on, default value is used for result name.
12025
12026             Returns:
12027                 New GEOM_Object, containing the created shape.
12028             """
12029             theR, theH, Parameters = ParseParameters(theR, theH)
12030             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12031             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12032             if Parameters: anObj.SetParameters(Parameters)
12033             self._autoPublish(anObj, theName, "dividedCylinder")
12034             return anObj
12035
12036         #@@ insert new functions before this line @@ do not remove this line @@#
12037
12038         # end of l4_advanced
12039         ## @}
12040
12041         ## Create a copy of the given object
12042         #
12043         #  @param theOriginal geometry object for copy
12044         #  @param theName Object name; when specified, this parameter is used
12045         #         for result publication in the study. Otherwise, if automatic
12046         #         publication is switched on, default value is used for result name.
12047         #
12048         #  @return New GEOM_Object, containing the copied shape.
12049         #
12050         #  @ingroup l1_geomBuilder_auxiliary
12051         #  @ref swig_MakeCopy "Example"
12052         def MakeCopy(self, theOriginal, theName=None):
12053             """
12054             Create a copy of the given object
12055
12056             Parameters:
12057                 theOriginal geometry object for copy
12058                 theName Object name; when specified, this parameter is used
12059                         for result publication in the study. Otherwise, if automatic
12060                         publication is switched on, default value is used for result name.
12061
12062             Returns:
12063                 New GEOM_Object, containing the copied shape.
12064
12065             Example of usage: Copy = geompy.MakeCopy(Box)
12066             """
12067             # Example: see GEOM_TestAll.py
12068             anObj = self.InsertOp.MakeCopy(theOriginal)
12069             RaiseIfFailed("MakeCopy", self.InsertOp)
12070             self._autoPublish(anObj, theName, "copy")
12071             return anObj
12072
12073         ## Add Path to load python scripts from
12074         #  @param Path a path to load python scripts from
12075         #  @ingroup l1_geomBuilder_auxiliary
12076         def addPath(self,Path):
12077             """
12078             Add Path to load python scripts from
12079
12080             Parameters:
12081                 Path a path to load python scripts from
12082             """
12083             if (sys.path.count(Path) < 1):
12084                 sys.path.append(Path)
12085                 pass
12086             pass
12087
12088         ## Load marker texture from the file
12089         #  @param Path a path to the texture file
12090         #  @return unique texture identifier
12091         #  @ingroup l1_geomBuilder_auxiliary
12092         def LoadTexture(self, Path):
12093             """
12094             Load marker texture from the file
12095             
12096             Parameters:
12097                 Path a path to the texture file
12098                 
12099             Returns:
12100                 unique texture identifier
12101             """
12102             # Example: see GEOM_TestAll.py
12103             ID = self.InsertOp.LoadTexture(Path)
12104             RaiseIfFailed("LoadTexture", self.InsertOp)
12105             return ID
12106
12107         ## Get internal name of the object based on its study entry
12108         #  @note This method does not provide an unique identifier of the geometry object.
12109         #  @note This is internal function of GEOM component, though it can be used outside it for 
12110         #  appropriate reason (e.g. for identification of geometry object).
12111         #  @param obj geometry object
12112         #  @return unique object identifier
12113         #  @ingroup l1_geomBuilder_auxiliary
12114         def getObjectID(self, obj):
12115             """
12116             Get internal name of the object based on its study entry.
12117             Note: this method does not provide an unique identifier of the geometry object.
12118             It is an internal function of GEOM component, though it can be used outside GEOM for 
12119             appropriate reason (e.g. for identification of geometry object).
12120
12121             Parameters:
12122                 obj geometry object
12123
12124             Returns:
12125                 unique object identifier
12126             """
12127             ID = ""
12128             entry = salome.ObjectToID(obj)
12129             if entry is not None:
12130                 lst = entry.split(":")
12131                 if len(lst) > 0:
12132                     ID = lst[-1] # -1 means last item in the list            
12133                     return "GEOM_" + ID
12134             return ID
12135                 
12136             
12137
12138         ## Add marker texture. @a Width and @a Height parameters
12139         #  specify width and height of the texture in pixels.
12140         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12141         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12142         #  parameter should be unpacked string, in which '1' symbols represent opaque
12143         #  pixels and '0' represent transparent pixels of the texture bitmap.
12144         #
12145         #  @param Width texture width in pixels
12146         #  @param Height texture height in pixels
12147         #  @param Texture texture data
12148         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12149         #  @return unique texture identifier
12150         #  @ingroup l1_geomBuilder_auxiliary
12151         def AddTexture(self, Width, Height, Texture, RowData=False):
12152             """
12153             Add marker texture. Width and Height parameters
12154             specify width and height of the texture in pixels.
12155             If RowData is True, Texture parameter should represent texture data
12156             packed into the byte array. If RowData is False (default), Texture
12157             parameter should be unpacked string, in which '1' symbols represent opaque
12158             pixels and '0' represent transparent pixels of the texture bitmap.
12159
12160             Parameters:
12161                 Width texture width in pixels
12162                 Height texture height in pixels
12163                 Texture texture data
12164                 RowData if True, Texture data are packed in the byte stream
12165
12166             Returns:
12167                 return unique texture identifier
12168             """
12169             if not RowData: Texture = PackData(Texture)
12170             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12171             RaiseIfFailed("AddTexture", self.InsertOp)
12172             return ID
12173
12174 import omniORB
12175 # Register the new proxy for GEOM_Gen
12176 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12177
12178 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12179 #  interface to GEOM operations.
12180 #
12181 #  Typical use is:
12182 #  \code
12183 #    import salome
12184 #    salome.salome_init()
12185 #    from salome.geom import geomBuilder
12186 #    geompy = geomBuilder.New(salome.myStudy)
12187 #  \endcode
12188 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12189 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12190 #  @return geomBuilder instance
12191 def New( study, instance=None):
12192     """
12193     Create a new geomBuilder instance.The geomBuilder class provides the Python
12194     interface to GEOM operations.
12195
12196     Typical use is:
12197         import salome
12198         salome.salome_init()
12199         from salome.geom import geomBuilder
12200         geompy = geomBuilder.New(salome.myStudy)
12201
12202     Parameters:
12203         study     SALOME study, generally obtained by salome.myStudy.
12204         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12205     Returns:
12206         geomBuilder instance
12207     """
12208     #print "New geomBuilder ", study, instance
12209     global engine
12210     global geom
12211     global doLcc
12212     engine = instance
12213     if engine is None:
12214       doLcc = True
12215     geom = geomBuilder()
12216     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12217     geom.init_geom(study)
12218     return geom