]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geompyDC.py
Salome HOME
aab86866e032632a88a0e520a0d7e1814d750730
[modules/geom.git] / src / GEOM_SWIG / geompyDC.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2012  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   : geompyDC.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geompyDC
28     \brief Module geompyDC
29 """
30
31 ##
32 ## @defgroup l1_publish_data Publishing results in SALOME study
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geompy.py Python interface do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of geompy.addToStudy() or geompy.addToStudyInFather()
40 ## functions.
41 ## 
42 ## However, it is possible to publish result data in the study
43 ## automatically. For this, almost each function of geompy.py module has
44 ## an additional @a theName parameter (@c None by default).
45 ## As soon as non-empty string value is passed to this parameter,
46 ## the result object is published in the study automatically.
47 ## 
48 ## For example,
49 ## 
50 ## @code
51 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
52 ## geompy.addToStudy(box, "box")             # explicit publishing
53 ## @endcode
54 ## 
55 ## can be replaced by one-line instruction
56 ## 
57 ## @code
58 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
59 ## @endcode
60 ## 
61 ## ... or simply
62 ## 
63 ## @code
64 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
65 ## @endcode
66 ##
67 ## Note, that some functions produce more than one geometrical objects. For example,
68 ## geompy.GetNonBlocks() function returns two objects: group of all non-hexa solids and group of
69 ## all non-quad faces. For such functions it is possible to specify separate names for results.
70 ##
71 ## For example
72 ##
73 ## @code
74 ## # create and publish cylinder
75 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
76 ## # get non blocks from cylinder
77 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
78 ## @endcode
79 ##
80 ## Above example will publish both result compounds (first with non-hexa solids and
81 ## second with non-quad faces) as two items, both named "nonblock".
82 ## However, if second command is invoked as
83 ##
84 ## @code
85 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
86 ## @endcode
87 ##
88 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
89 ##
90 ## Automatic publication of all results can be also enabled/disabled by means of the function
91 ## geompy.addToStudyAuto(). The automatic publishing is managed by the numeric parameter passed
92 ## to this function:
93 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
94 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
95 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
96 ##   value passed as parameter has the same effect.
97 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
98 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
99 ## 
100 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
101 ## to the functions creating objects, instead default names will be used. However, you
102 ## can always change the behavior, by passing explicit name to the @a theName parameter
103 ## and it will be used instead default one.
104 ## The publishing of the collections of objects will be done according to the above
105 ## mentioned rules (maximum allowed number of sub-shapes).
106 ##
107 ## For example:
108 ##
109 ## @code
110 ## geompy.addToStudyAuto() # enable automatic publication
111 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
112 ## # the box is created and published in the study with default name
113 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
114 ## vertices = geompy.SubShapeAll(box, geompy.ShapeType['VERTEX'])
115 ## # only 5 first vertices will be published, with default names
116 ## print len(vertices)
117 ## # note, that result value still containes all 8 vertices
118 ## geompy.addToStudyAuto(-1) # disable automatic publication
119 ## @endcode
120 ##
121 ## This feature can be used, for example, for debugging purposes.
122 ##
123 ## @note
124 ## - Use automatic publication feature with caution. When it is enabled, any function of geompy.py module
125 ##   publishes the results in the study, that can lead to the huge size of the study data tree.
126 ##   For example, repeating call of geompy.SubShapeAll() command on the same main shape each time will
127 ##   publish all child objects, that will lead to a lot of duplicated items in the study.
128 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
129 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
130 ## - Not that some functions of geompy.py module do not have @theName parameter (and, thus, do not support
131 ##   automatic publication). For example, some transformation operations like geompy.TranslateDXDYDZ().
132 ##   Refer to the documentation to check if some function has such possibility.
133 ##
134 ## @}
135
136
137 ## @defgroup l1_geompy_auxiliary Auxiliary data structures and methods
138
139 ## @defgroup l1_geompyDC_purpose   All package methods, grouped by their purpose
140 ## @{
141 ##   @defgroup l2_import_export Importing/exporting geometrical objects
142 ##   @defgroup l2_creating      Creating geometrical objects
143 ##   @{
144 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
145 ##     @{
146 ##       @defgroup l4_curves        Creating Curves
147
148 ##     @}
149 ##     @defgroup l3_3d_primitives Creating 3D Primitives
150 ##     @defgroup l3_complex       Creating Complex Objects
151 ##     @defgroup l3_groups        Working with groups
152 ##     @defgroup l3_blocks        Building by blocks
153 ##     @{
154 ##       @defgroup l4_blocks_measure Check and Improve
155
156 ##     @}
157 ##     @defgroup l3_sketcher      Sketcher
158 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
159 ##     @{
160 ##       @defgroup l4_decompose     Decompose objects
161 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
162 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
163 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
164 ##       @defgroup l4_advanced      Advanced objects creation functions
165
166 ##     @}
167
168 ##   @}
169 ##   @defgroup l2_transforming  Transforming geometrical objects
170 ##   @{
171 ##     @defgroup l3_basic_op      Basic Operations
172 ##     @defgroup l3_boolean       Boolean Operations
173 ##     @defgroup l3_transform     Transformation Operations
174 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
175 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
176 ##     @defgroup l3_blocks_op     Blocks Operations
177 ##     @defgroup l3_healing       Repairing Operations
178 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
179
180 ##   @}
181 ##   @defgroup l2_measure       Using measurement tools
182
183 ## @}
184
185 # initialize SALOME session in try/except block
186 # to avoid problems in some cases, e.g. when generating documentation
187 try:
188     import salome
189     salome.salome_init()
190     from salome import *
191 except:
192     pass
193
194 from salome_notebook import *
195
196 import GEOM
197 import math
198 import os
199
200 from gsketcher import Sketcher3D
201
202 ## Enumeration ShapeType as a dictionary. \n
203 ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
204 #  @ingroup l1_geompyDC_auxiliary
205 ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
206
207 # service function
208 def _toListOfNames(_names, _size=-1):
209     l = []
210     import types
211     if type(_names) in [types.ListType, types.TupleType]:
212         for i in _names: l.append(i)
213     elif _names:
214         l.append(_names)
215     if l and len(l) < _size:
216         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
217     return l
218
219 ## Raise an Error, containing the Method_name, if Operation is Failed
220 ## @ingroup l1_geompyDC_auxiliary
221 def RaiseIfFailed (Method_name, Operation):
222     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
223         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
224
225 ## Return list of variables value from salome notebook
226 ## @ingroup l1_geompyDC_auxiliary
227 def ParseParameters(*parameters):
228     Result = []
229     StringResult = []
230     for parameter in parameters:
231         if isinstance(parameter, list):
232             lResults = ParseParameters(*parameter)
233             if len(lResults) > 0:
234                 Result.append(lResults[:-1])
235                 StringResult += lResults[-1].split(":")
236                 pass
237             pass
238         else:
239             if isinstance(parameter,str):
240                 if notebook.isVariable(parameter):
241                     Result.append(notebook.get(parameter))
242                 else:
243                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
244                 pass
245             else:
246                 Result.append(parameter)
247                 pass
248             StringResult.append(str(parameter))
249             pass
250         pass
251     if Result:
252         Result.append(":".join(StringResult))
253     else:
254         Result = ":".join(StringResult)
255     return Result
256
257 ## Return list of variables value from salome notebook
258 ## @ingroup l1_geompyDC_auxiliary
259 def ParseList(list):
260     Result = []
261     StringResult = ""
262     for parameter in list:
263         if isinstance(parameter,str) and notebook.isVariable(parameter):
264             Result.append(str(notebook.get(parameter)))
265             pass
266         else:
267             Result.append(str(parameter))
268             pass
269
270         StringResult = StringResult + str(parameter)
271         StringResult = StringResult + ":"
272         pass
273     StringResult = StringResult[:len(StringResult)-1]
274     return Result, StringResult
275
276 ## Return list of variables value from salome notebook
277 ## @ingroup l1_geompyDC_auxiliary
278 def ParseSketcherCommand(command):
279     Result = ""
280     StringResult = ""
281     sections = command.split(":")
282     for section in sections:
283         parameters = section.split(" ")
284         paramIndex = 1
285         for parameter in parameters:
286             if paramIndex > 1 and parameter.find("'") != -1:
287                 parameter = parameter.replace("'","")
288                 if notebook.isVariable(parameter):
289                     Result = Result + str(notebook.get(parameter)) + " "
290                     pass
291                 else:
292                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
293                     pass
294                 pass
295             else:
296                 Result = Result + str(parameter) + " "
297                 pass
298             if paramIndex > 1:
299                 StringResult = StringResult + parameter
300                 StringResult = StringResult + ":"
301                 pass
302             paramIndex = paramIndex + 1
303             pass
304         Result = Result[:len(Result)-1] + ":"
305         pass
306     Result = Result[:len(Result)-1]
307     return Result, StringResult
308
309 ## Helper function which can be used to pack the passed string to the byte data.
310 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
311 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
312 ## For example,
313 ## \code
314 ## val = PackData("10001110") # val = 0xAE
315 ## val = PackData("1")        # val = 0x80
316 ## \endcode
317 ## @param data unpacked data - a string containing '1' and '0' symbols
318 ## @return data packed to the byte stream
319 ## @ingroup l1_geompyDC_auxiliary
320 def PackData(data):
321     """
322     Helper function which can be used to pack the passed string to the byte data.
323     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
324     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
325
326     Parameters:
327         data unpacked data - a string containing '1' and '0' symbols
328
329     Returns:
330         data packed to the byte stream
331         
332     Example of usage:
333         val = PackData("10001110") # val = 0xAE
334         val = PackData("1")        # val = 0x80
335     """
336     bytes = len(data)/8
337     if len(data)%8: bytes += 1
338     res = ""
339     for b in range(bytes):
340         d = data[b*8:(b+1)*8]
341         val = 0
342         for i in range(8):
343             val *= 2
344             if i < len(d):
345                 if d[i] == "1": val += 1
346                 elif d[i] != "0":
347                     raise "Invalid symbol %s" % d[i]
348                 pass
349             pass
350         res += chr(val)
351         pass
352     return res
353
354 ## Read bitmap texture from the text file.
355 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
356 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
357 ## The function returns width and height of the pixmap in pixels and byte stream representing
358 ## texture bitmap itself.
359 ##
360 ## This function can be used to read the texture to the byte stream in order to pass it to
361 ## the AddTexture() function of geompyDC class.
362 ## For example,
363 ## \code
364 ## import geompyDC
365 ## geompy = geompyDC.geomInstance(salome.myStudy)
366 ## texture = geompy.readtexture('mytexture.dat')
367 ## texture = geompy.AddTexture(*texture)
368 ## obj.SetMarkerTexture(texture)
369 ## \endcode
370 ## @param fname texture file name
371 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
372 ## @ingroup l1_geompyDC_auxiliary
373 def ReadTexture(fname):
374     """
375     Read bitmap texture from the text file.
376     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
377     A zero symbol ('0') represents transparent pixel of the texture bitmap.
378     The function returns width and height of the pixmap in pixels and byte stream representing
379     texture bitmap itself.
380     This function can be used to read the texture to the byte stream in order to pass it to
381     the AddTexture() function of geompyDC class.
382     
383     Parameters:
384         fname texture file name
385
386     Returns:
387         sequence of tree values: texture's width, height in pixels and its byte stream
388     
389     Example of usage:
390         import geompyDC
391         geompy = geompyDC.geomInstance(salome.myStudy)
392         texture = geompy.readtexture('mytexture.dat')
393         texture = geompy.AddTexture(*texture)
394         obj.SetMarkerTexture(texture)
395     """
396     try:
397         f = open(fname)
398         lines = [ l.strip() for l in f.readlines()]
399         f.close()
400         maxlen = 0
401         if lines: maxlen = max([len(x) for x in lines])
402         lenbytes = maxlen/8
403         if maxlen%8: lenbytes += 1
404         bytedata=""
405         for line in lines:
406             if len(line)%8:
407                 lenline = (len(line)/8+1)*8
408                 pass
409             else:
410                 lenline = (len(line)/8)*8
411                 pass
412             for i in range(lenline/8):
413                 byte=""
414                 for j in range(8):
415                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
416                     else: byte += "0"
417                     pass
418                 bytedata += PackData(byte)
419                 pass
420             for i in range(lenline/8, lenbytes):
421                 bytedata += PackData("0")
422             pass
423         return lenbytes*8, len(lines), bytedata
424     except:
425         pass
426     return 0, 0, ""
427
428 ## Returns a long value from enumeration type
429 #  Can be used for CORBA enumerator types like GEOM.shape_type
430 #  @param theItem enumeration type
431 #  @ingroup l1_geompyDC_auxiliary
432 def EnumToLong(theItem):
433     """
434     Returns a long value from enumeration type
435     Can be used for CORBA enumerator types like geompyDC.ShapeType
436
437     Parameters:
438         theItem enumeration type
439     """
440     ret = theItem
441     if hasattr(theItem, "_v"): ret = theItem._v
442     return ret
443
444 ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
445 #  and a list of parameters, describing the shape.
446 #  List of parameters, describing the shape:
447 #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
448 #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
449 #
450 #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
451 #
452 #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
453 #
454 #  - SPHERE:       [xc yc zc            R]
455 #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
456 #  - BOX:          [xc yc zc                      ax ay az]
457 #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
458 #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
459 #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
460 #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
461 #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
462 #
463 #  - SPHERE2D:     [xc yc zc            R]
464 #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
465 #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
466 #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
467 #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
468 #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
469 #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
470 #  - PLANE:        [xo yo zo  dx dy dz]
471 #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
472 #  - FACE:                                       [nb_edges  nb_vertices]
473 #
474 #  - CIRCLE:       [xc yc zc  dx dy dz  R]
475 #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
476 #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
477 #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
478 #  - LINE:         [xo yo zo  dx dy dz]
479 #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
480 #  - EDGE:                                                 [nb_vertices]
481 #
482 #  - VERTEX:       [x  y  z]
483 #  @ingroup l1_geompyDC_auxiliary
484 kind = GEOM.GEOM_IKindOfShape
485
486 ## Information about closed/unclosed state of shell or wire
487 #  @ingroup l1_geompyDC_auxiliary
488 class info:
489     """
490     Information about closed/unclosed state of shell or wire
491     """
492     UNKNOWN  = 0
493     CLOSED   = 1
494     UNCLOSED = 2
495
496 # Warning: geom is a singleton
497 geom = None
498 engine = None
499 doLcc = False
500 created = False
501
502 class geompyDC(object, GEOM._objref_GEOM_Gen):
503
504         def __new__(cls):
505             global engine
506             global geom
507             global doLcc
508             global created
509             print "__new__ ", engine, geom, doLcc, created
510             if geom is None:
511                 # geom engine is either retrieved from engine, or created
512                 geom = engine
513                 # Following test avoids a recursive loop
514                 if doLcc:
515                     if geom is not None:
516                         # geom engine not created: existing engine found
517                         doLcc = False
518                     if doLcc and not created:
519                         doLcc = False
520                         created = True
521                         # FindOrLoadComponent called:
522                         # 1. CORBA resolution of server
523                         # 2. the __new__ method is called again
524                         print "FindOrLoadComponent ", engine, geom, doLcc, created
525                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
526                 else:
527                     # FindOrLoadComponent not called
528                     if geom is None:
529                         # geompyDC instance is created from lcc.FindOrLoadComponent
530                         created = True
531                         print "super ", engine, geom, doLcc, created
532                         geom = super(geompyDC,cls).__new__(cls)
533                     else:
534                         # geom engine not created: existing engine found
535                         print "existing ", engine, geom, doLcc, created
536                         pass
537
538                 return geom
539
540             return geom
541
542         def __init__(self):
543             #global created
544             #print "-------- geompyDC __init__ --- ", created, self
545             GEOM._objref_GEOM_Gen.__init__(self)
546             self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
547             self.myBuilder = None
548             self.myStudyId = 0
549             self.father    = None
550
551             self.BasicOp  = None
552             self.CurvesOp = None
553             self.PrimOp   = None
554             self.ShapesOp = None
555             self.HealOp   = None
556             self.InsertOp = None
557             self.BoolOp   = None
558             self.TrsfOp   = None
559             self.LocalOp  = None
560             self.MeasuOp  = None
561             self.BlocksOp = None
562             self.GroupOp  = None
563             self.AdvOp    = None
564             pass
565
566         ## @addtogroup l1_geompyDC_auxiliary
567         ## Process object publication in the study, as follows:
568         #  - if @a theName is specified (not None), the object is published in the study
569         #    with this name, not taking into account "auto-publishing" option;
570         #  - if @a theName is NOT specified, the object is published in the study
571         #    (using default name, which can be customized using @a theDefaultName parameter)
572         #    only if auto-publishing is switched on.
573         #
574         #  @param theObj  object, a subject for publishing
575         #  @param theName object name for study
576         #  @param theDefaultName default name for the auto-publishing
577         #
578         #  @sa addToStudyAuto()
579         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
580             # ---
581             def _item_name(_names, _defname, _idx=-1):
582                 if not _names: _names = _defname
583                 if type(_names) in [types.ListType, types.TupleType]:
584                     if _idx >= 0:
585                         if _idx >= len(_names) or not _names[_idx]:
586                             if type(_defname) not in [types.ListType, types.TupleType]:
587                                 _name = "%s_%d"%(_defname, _idx+1)
588                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
589                                 _name = _defname[_idx]
590                             else:
591                                 _name = "%noname_%d"%(dn, _idx+1)
592                             pass
593                         else:
594                             _name = _names[_idx]
595                         pass
596                     else:
597                         # must be wrong  usage
598                         _name = _names[0]
599                     pass
600                 else:
601                     if _idx >= 0:
602                         _name = "%s_%d"%(_names, _idx+1)
603                     else:
604                         _name = _names
605                     pass
606                 return _name
607             # ---
608             if not theObj:
609                 return # null object
610             if not theName and not self.myMaxNbSubShapesAllowed:
611                 return # nothing to do: auto-publishing is disabled
612             if not theName and not theDefaultName:
613                 return # neither theName nor theDefaultName is given
614             import types
615             if type(theObj) in [types.ListType, types.TupleType]:
616                 # list of objects is being published
617                 idx = 0
618                 for obj in theObj:
619                     if not obj: continue # bad object
620                     ###if obj.GetStudyEntry(): continue # already published
621                     name = _item_name(theName, theDefaultName, idx)
622                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
623                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
624                     else:
625                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
626                         pass
627                     idx = idx+1
628                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
629                     pass
630                 pass
631             else:
632                 # single object is published
633                 ###if theObj.GetStudyEntry(): return # already published
634                 name = _item_name(theName, theDefaultName)
635                 if theObj.IsMainShape():
636                     self.addToStudy(theObj, name)
637                 else:
638                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
639                     pass
640                 pass
641             pass
642
643         ## @addtogroup l1_geompy_auxiliary
644         ## @{
645         def init_geom(self,theStudy):
646             self.myStudy = theStudy
647             self.myStudyId = self.myStudy._get_StudyId()
648             self.myBuilder = self.myStudy.NewBuilder()
649             self.father = self.myStudy.FindComponent("GEOM")
650             if self.father is None:
651                 self.father = self.myBuilder.NewComponent("GEOM")
652                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
653                 FName = A1._narrow(SALOMEDS.AttributeName)
654                 FName.SetValue("Geometry")
655                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
656                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
657                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
658                 self.myBuilder.DefineComponentInstance(self.father,self)
659                 pass
660             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
661             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
662             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
663             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
664             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
665             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
666             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
667             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
668             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
669             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
670             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
671             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
672             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
673             pass
674
675         ## Enable / disable results auto-publishing
676         # 
677         #  The automatic publishing is managed in the following way:
678         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
679         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
680         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
681         #  value passed as parameter has the same effect.
682         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
683         #  maximum number of sub-shapes allowed for publishing is set to specified value.
684         #
685         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
686         #  @ingroup l1_publish_data
687         def addToStudyAuto(self, maxNbSubShapes=-1):
688             """
689             Enable / disable results auto-publishing
690
691             The automatic publishing is managed in the following way:
692             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
693             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
694             maximum number of sub-shapes allowed for publishing is unlimited; any negative
695             value passed as parameter has the same effect.
696             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
697             maximum number of sub-shapes allowed for publishing is set to this value.
698
699             Parameters:
700                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
701
702             Example of usage:
703                 geompy.addToStudyAuto()   # enable auto-publishing
704                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
705                 geompy.addToStudyAuto(0)  # disable auto-publishing
706             """
707             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
708             pass
709
710         ## Dump component to the Python script
711         #  This method overrides IDL function to allow default values for the parameters.
712         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
713             """
714             Dump component to the Python script
715             This method overrides IDL function to allow default values for the parameters.
716             """
717             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
718
719         ## Get name for sub-shape aSubObj of shape aMainObj
720         #
721         # @ref swig_SubShapeName "Example"
722         def SubShapeName(self,aSubObj, aMainObj):
723             """
724             Get name for sub-shape aSubObj of shape aMainObj
725             """
726             # Example: see GEOM_TestAll.py
727
728             #aSubId  = orb.object_to_string(aSubObj)
729             #aMainId = orb.object_to_string(aMainObj)
730             #index = gg.getIndexTopology(aSubId, aMainId)
731             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
732             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
733             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
734             return name
735
736         ## Publish in study aShape with name aName
737         #
738         #  \param aShape the shape to be published
739         #  \param aName  the name for the shape
740         #  \param doRestoreSubShapes if True, finds and publishes also
741         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
742         #         and published sub-shapes of arguments
743         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
744         #                                                  these arguments description
745         #  \return study entry of the published shape in form of string
746         #
747         #  @ingroup l1_publish_data
748         #  @ref swig_all_addtostudy "Example"
749         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
750                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
751             """
752             Publish in study aShape with name aName
753
754             Parameters:
755                 aShape the shape to be published
756                 aName  the name for the shape
757                 doRestoreSubShapes if True, finds and publishes also
758                                    sub-shapes of aShape, corresponding to its arguments
759                                    and published sub-shapes of arguments
760                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
761                                                          these arguments description
762
763             Returns:
764                 study entry of the published shape in form of string
765
766             Example of usage:
767                 id_block1 = geompy.addToStudy(Block1, "Block 1")
768             """
769             # Example: see GEOM_TestAll.py
770             try:
771                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
772                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
773                 if doRestoreSubShapes:
774                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
775                                             theFindMethod, theInheritFirstArg, True )
776             except:
777                 print "addToStudy() failed"
778                 return ""
779             return aShape.GetStudyEntry()
780
781         ## Publish in study aShape with name aName as sub-object of previously published aFather
782         #  \param aFather previously published object
783         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
784         #  \param aName  the name for the shape
785         #
786         #  \return study entry of the published shape in form of string
787         #
788         #  @ingroup l1_publish_data
789         #  @ref swig_all_addtostudyInFather "Example"
790         def addToStudyInFather(self, aFather, aShape, aName):
791             """
792             Publish in study aShape with name aName as sub-object of previously published aFather
793
794             Parameters:
795                 aFather previously published object
796                 aShape the shape to be published as sub-object of aFather
797                 aName  the name for the shape
798
799             Returns:
800                 study entry of the published shape in form of string
801             """
802             # Example: see GEOM_TestAll.py
803             try:
804                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
805                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
806             except:
807                 print "addToStudyInFather() failed"
808                 return ""
809             return aShape.GetStudyEntry()
810
811         ## Unpublish object in study
812         #
813         #  \param obj the object to be unpublished
814         def hideInStudy(self, obj):
815             """
816             Unpublish object in study
817
818             Parameters:
819                 obj the object to be unpublished
820             """
821             ior = salome.orb.object_to_string(obj)
822             aSObject = self.myStudy.FindObjectIOR(ior)
823             if aSObject is not None:
824                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
825                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
826                 drwAttribute.SetDrawable(False)
827                 pass
828
829         # end of l1_geompyDC_auxiliary
830         ## @}
831
832         ## @addtogroup l3_restore_ss
833         ## @{
834
835         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
836         #  To be used from python scripts out of addToStudy() (non-default usage)
837         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
838         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
839         #                   If this list is empty, all operation arguments will be published
840         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
841         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
842         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
843         #                            Do not publish sub-shapes in place of arguments, but only
844         #                            in place of sub-shapes of the first argument,
845         #                            because the whole shape corresponds to the first argument.
846         #                            Mainly to be used after transformations, but it also can be
847         #                            usefull after partition with one object shape, and some other
848         #                            operations, where only the first argument has to be considered.
849         #                            If theObject has only one argument shape, this flag is automatically
850         #                            considered as True, not regarding really passed value.
851         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
852         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
853         #  \return list of published sub-shapes
854         #
855         #  @ref tui_restore_prs_params "Example"
856         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
857                               theInheritFirstArg=False, theAddPrefix=True):
858             """
859             Publish sub-shapes, standing for arguments and sub-shapes of arguments
860             To be used from python scripts out of geompy.addToStudy (non-default usage)
861
862             Parameters:
863                 theObject published GEOM.GEOM_Object, arguments of which will be published
864                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
865                           If this list is empty, all operation arguments will be published
866                 theFindMethod method to search sub-shapes, corresponding to arguments and
867                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
868                 theInheritFirstArg set properties of the first argument for theObject.
869                                    Do not publish sub-shapes in place of arguments, but only
870                                    in place of sub-shapes of the first argument,
871                                    because the whole shape corresponds to the first argument.
872                                    Mainly to be used after transformations, but it also can be
873                                    usefull after partition with one object shape, and some other
874                                    operations, where only the first argument has to be considered.
875                                    If theObject has only one argument shape, this flag is automatically
876                                    considered as True, not regarding really passed value.
877                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
878                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
879             Returns:
880                 list of published sub-shapes
881             """
882             # Example: see GEOM_TestAll.py
883             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
884                                           theFindMethod, theInheritFirstArg, theAddPrefix)
885
886         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
887         #  To be used from python scripts out of addToStudy() (non-default usage)
888         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
889         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
890         #                   If this list is empty, all operation arguments will be published
891         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
892         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
893         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
894         #                            Do not publish sub-shapes in place of arguments, but only
895         #                            in place of sub-shapes of the first argument,
896         #                            because the whole shape corresponds to the first argument.
897         #                            Mainly to be used after transformations, but it also can be
898         #                            usefull after partition with one object shape, and some other
899         #                            operations, where only the first argument has to be considered.
900         #                            If theObject has only one argument shape, this flag is automatically
901         #                            considered as True, not regarding really passed value.
902         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
903         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
904         #  \return list of published sub-shapes
905         #
906         #  @ref tui_restore_prs_params "Example"
907         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
908                                    theInheritFirstArg=False, theAddPrefix=True):
909             """
910             Publish sub-shapes, standing for arguments and sub-shapes of arguments
911             To be used from python scripts out of geompy.addToStudy() (non-default usage)
912
913             Parameters:
914                 theObject published GEOM.GEOM_Object, arguments of which will be published
915                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
916                           If this list is empty, all operation arguments will be published
917                 theFindMethod method to search sub-shapes, corresponding to arguments and
918                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
919                 theInheritFirstArg set properties of the first argument for theObject.
920                                    Do not publish sub-shapes in place of arguments, but only
921                                    in place of sub-shapes of the first argument,
922                                    because the whole shape corresponds to the first argument.
923                                    Mainly to be used after transformations, but it also can be
924                                    usefull after partition with one object shape, and some other
925                                    operations, where only the first argument has to be considered.
926                                    If theObject has only one argument shape, this flag is automatically
927                                    considered as True, not regarding really passed value.
928                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
929                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
930
931             Returns: 
932                 list of published sub-shapes
933             """
934             # Example: see GEOM_TestAll.py
935             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
936                                                theFindMethod, theInheritFirstArg, theAddPrefix)
937
938         # end of l3_restore_ss
939         ## @}
940
941         ## @addtogroup l3_basic_go
942         ## @{
943
944         ## Create point by three coordinates.
945         #  @param theX The X coordinate of the point.
946         #  @param theY The Y coordinate of the point.
947         #  @param theZ The Z coordinate of the point.
948         #  @param theName Object name; when specified, this parameter is used
949         #         for result publication in the study. Otherwise, if automatic
950         #         publication is switched on, default value is used for result name.
951         #
952         #  @return New GEOM.GEOM_Object, containing the created point.
953         #
954         #  @ref tui_creation_point "Example"
955         def MakeVertex(self, theX, theY, theZ, theName=None):
956             """
957             Create point by three coordinates.
958
959             Parameters:
960                 theX The X coordinate of the point.
961                 theY The Y coordinate of the point.
962                 theZ The Z coordinate of the point.
963                 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             Returns: 
968                 New GEOM.GEOM_Object, containing the created point.
969             """
970             # Example: see GEOM_TestAll.py
971             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
972             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
973             RaiseIfFailed("MakePointXYZ", self.BasicOp)
974             anObj.SetParameters(Parameters)
975             self._autoPublish(anObj, theName, "vertex")
976             return anObj
977
978         ## Create a point, distant from the referenced point
979         #  on the given distances along the coordinate axes.
980         #  @param theReference The referenced point.
981         #  @param theX Displacement from the referenced point along OX axis.
982         #  @param theY Displacement from the referenced point along OY axis.
983         #  @param theZ Displacement from the referenced point along OZ axis.
984         #  @param theName Object name; when specified, this parameter is used
985         #         for result publication in the study. Otherwise, if automatic
986         #         publication is switched on, default value is used for result name.
987         #
988         #  @return New GEOM.GEOM_Object, containing the created point.
989         #
990         #  @ref tui_creation_point "Example"
991         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
992             """
993             Create a point, distant from the referenced point
994             on the given distances along the coordinate axes.
995
996             Parameters:
997                 theReference The referenced point.
998                 theX Displacement from the referenced point along OX axis.
999                 theY Displacement from the referenced point along OY axis.
1000                 theZ Displacement from the referenced point along OZ axis.
1001                 theName Object name; when specified, this parameter is used
1002                         for result publication in the study. Otherwise, if automatic
1003                         publication is switched on, default value is used for result name.
1004
1005             Returns:
1006                 New GEOM.GEOM_Object, containing the created point.
1007             """
1008             # Example: see GEOM_TestAll.py
1009             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1010             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1011             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1012             anObj.SetParameters(Parameters)
1013             self._autoPublish(anObj, theName, "vertex")
1014             return anObj
1015
1016         ## Create a point, corresponding to the given parameter on the given curve.
1017         #  @param theRefCurve The referenced curve.
1018         #  @param theParameter Value of parameter on the referenced curve.
1019         #  @param theName Object name; when specified, this parameter is used
1020         #         for result publication in the study. Otherwise, if automatic
1021         #         publication is switched on, default value is used for result name.
1022         #
1023         #  @return New GEOM.GEOM_Object, containing the created point.
1024         #
1025         #  @ref tui_creation_point "Example"
1026         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1027             """
1028             Create a point, corresponding to the given parameter on the given curve.
1029
1030             Parameters:
1031                 theRefCurve The referenced curve.
1032                 theParameter Value of parameter on the referenced curve.
1033                 theName Object name; when specified, this parameter is used
1034                         for result publication in the study. Otherwise, if automatic
1035                         publication is switched on, default value is used for result name.
1036
1037             Returns:
1038                 New GEOM.GEOM_Object, containing the created point.
1039
1040             Example of usage:
1041                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1042             """
1043             # Example: see GEOM_TestAll.py
1044             theParameter, Parameters = ParseParameters(theParameter)
1045             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1046             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1047             anObj.SetParameters(Parameters)
1048             self._autoPublish(anObj, theName, "vertex")
1049             return anObj
1050
1051         ## Create a point by projection give coordinates on the given curve
1052         #  @param theRefCurve The referenced curve.
1053         #  @param theX X-coordinate in 3D space
1054         #  @param theY Y-coordinate in 3D space
1055         #  @param theZ Z-coordinate in 3D space
1056         #  @param theName Object name; when specified, this parameter is used
1057         #         for result publication in the study. Otherwise, if automatic
1058         #         publication is switched on, default value is used for result name.
1059         #
1060         #  @return New GEOM.GEOM_Object, containing the created point.
1061         #
1062         #  @ref tui_creation_point "Example"
1063         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1064             """
1065             Create a point by projection give coordinates on the given curve
1066             
1067             Parameters:
1068                 theRefCurve The referenced curve.
1069                 theX X-coordinate in 3D space
1070                 theY Y-coordinate in 3D space
1071                 theZ Z-coordinate in 3D space
1072                 theName Object name; when specified, this parameter is used
1073                         for result publication in the study. Otherwise, if automatic
1074                         publication is switched on, default value is used for result name.
1075
1076             Returns:
1077                 New GEOM.GEOM_Object, containing the created point.
1078
1079             Example of usage:
1080                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1081             """
1082             # Example: see GEOM_TestAll.py
1083             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1084             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1085             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1086             anObj.SetParameters(Parameters)
1087             self._autoPublish(anObj, theName, "vertex")
1088             return anObj
1089
1090         ## Create a point, corresponding to the given length on the given curve.
1091         #  @param theRefCurve The referenced curve.
1092         #  @param theLength Length on the referenced curve. It can be negative.
1093         #  @param theStartPoint Point allowing to choose the direction for the calculation
1094         #                       of the length. If None, start from the first point of theRefCurve.
1095         #  @param theName Object name; when specified, this parameter is used
1096         #         for result publication in the study. Otherwise, if automatic
1097         #         publication is switched on, default value is used for result name.
1098         #
1099         #  @return New GEOM.GEOM_Object, containing the created point.
1100         #
1101         #  @ref tui_creation_point "Example"
1102         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1103             """
1104             Create a point, corresponding to the given length on the given curve.
1105
1106             Parameters:
1107                 theRefCurve The referenced curve.
1108                 theLength Length on the referenced curve. It can be negative.
1109                 theStartPoint Point allowing to choose the direction for the calculation
1110                               of the length. If None, start from the first point of theRefCurve.
1111                 theName Object name; when specified, this parameter is used
1112                         for result publication in the study. Otherwise, if automatic
1113                         publication is switched on, default value is used for result name.
1114
1115             Returns:
1116                 New GEOM.GEOM_Object, containing the created point.
1117             """
1118             # Example: see GEOM_TestAll.py
1119             theLength, Parameters = ParseParameters(theLength)
1120             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1121             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1122             anObj.SetParameters(Parameters)
1123             self._autoPublish(anObj, theName, "vertex")
1124             return anObj
1125
1126         ## Create a point, corresponding to the given parameters on the
1127         #    given surface.
1128         #  @param theRefSurf The referenced surface.
1129         #  @param theUParameter Value of U-parameter on the referenced surface.
1130         #  @param theVParameter Value of V-parameter on the referenced surface.
1131         #  @param theName Object name; when specified, this parameter is used
1132         #         for result publication in the study. Otherwise, if automatic
1133         #         publication is switched on, default value is used for result name.
1134         #
1135         #  @return New GEOM.GEOM_Object, containing the created point.
1136         #
1137         #  @ref swig_MakeVertexOnSurface "Example"
1138         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1139             """
1140             Create a point, corresponding to the given parameters on the
1141             given surface.
1142
1143             Parameters:
1144                 theRefSurf The referenced surface.
1145                 theUParameter Value of U-parameter on the referenced surface.
1146                 theVParameter Value of V-parameter on the referenced surface.
1147                 theName Object name; when specified, this parameter is used
1148                         for result publication in the study. Otherwise, if automatic
1149                         publication is switched on, default value is used for result name.
1150
1151             Returns:
1152                 New GEOM.GEOM_Object, containing the created point.
1153
1154             Example of usage:
1155                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1156             """
1157             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1158             # Example: see GEOM_TestAll.py
1159             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1160             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1161             anObj.SetParameters(Parameters);
1162             self._autoPublish(anObj, theName, "vertex")
1163             return anObj
1164
1165         ## Create a point by projection give coordinates on the given surface
1166         #  @param theRefSurf The referenced surface.
1167         #  @param theX X-coordinate in 3D space
1168         #  @param theY Y-coordinate in 3D space
1169         #  @param theZ Z-coordinate in 3D space
1170         #  @param theName Object name; when specified, this parameter is used
1171         #         for result publication in the study. Otherwise, if automatic
1172         #         publication is switched on, default value is used for result name.
1173         #
1174         #  @return New GEOM.GEOM_Object, containing the created point.
1175         #
1176         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1177         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1178             """
1179             Create a point by projection give coordinates on the given surface
1180
1181             Parameters:
1182                 theRefSurf The referenced surface.
1183                 theX X-coordinate in 3D space
1184                 theY Y-coordinate in 3D space
1185                 theZ Z-coordinate in 3D space
1186                 theName Object name; when specified, this parameter is used
1187                         for result publication in the study. Otherwise, if automatic
1188                         publication is switched on, default value is used for result name.
1189
1190             Returns:
1191                 New GEOM.GEOM_Object, containing the created point.
1192
1193             Example of usage:
1194                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1195             """
1196             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1197             # Example: see GEOM_TestAll.py
1198             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1199             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1200             anObj.SetParameters(Parameters);
1201             self._autoPublish(anObj, theName, "vertex")
1202             return anObj
1203
1204         ## Create a point, which lays on the given face.
1205         #  The point will lay in arbitrary place of the face.
1206         #  The only condition on it is a non-zero distance to the face boundary.
1207         #  Such point can be used to uniquely identify the face inside any
1208         #  shape in case, when the shape does not contain overlapped faces.
1209         #  @param theFace The referenced face.
1210         #  @param theName Object name; when specified, this parameter is used
1211         #         for result publication in the study. Otherwise, if automatic
1212         #         publication is switched on, default value is used for result name.
1213         #
1214         #  @return New GEOM.GEOM_Object, containing the created point.
1215         #
1216         #  @ref swig_MakeVertexInsideFace "Example"
1217         def MakeVertexInsideFace (self, theFace, theName=None):
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
1225             Parameters:
1226                 theFace The referenced face.
1227                 theName Object name; when specified, this parameter is used
1228                         for result publication in the study. Otherwise, if automatic
1229                         publication is switched on, default value is used for result name.
1230
1231             Returns:
1232                 New GEOM.GEOM_Object, containing the created point.
1233
1234             Example of usage:
1235                 p_on_face = geompy.MakeVertexInsideFace(Face)
1236             """
1237             # Example: see GEOM_TestAll.py
1238             anObj = self.BasicOp.MakePointOnFace(theFace)
1239             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1240             self._autoPublish(anObj, theName, "vertex")
1241             return anObj
1242
1243         ## Create a point on intersection of two lines.
1244         #  @param theRefLine1, theRefLine2 The referenced lines.
1245         #  @param theName Object name; when specified, this parameter is used
1246         #         for result publication in the study. Otherwise, if automatic
1247         #         publication is switched on, default value is used for result name.
1248         #
1249         #  @return New GEOM.GEOM_Object, containing the created point.
1250         #
1251         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1252         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1253             """
1254             Create a point on intersection of two lines.
1255
1256             Parameters:
1257                 theRefLine1, theRefLine2 The referenced lines.
1258                 theName Object name; when specified, this parameter is used
1259                         for result publication in the study. Otherwise, if automatic
1260                         publication is switched on, default value is used for result name.
1261
1262             Returns:
1263                 New GEOM.GEOM_Object, containing the created point.
1264             """
1265             # Example: see GEOM_TestAll.py
1266             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1267             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1268             self._autoPublish(anObj, theName, "vertex")
1269             return anObj
1270
1271         ## Create a tangent, corresponding to the given parameter on the given curve.
1272         #  @param theRefCurve The referenced curve.
1273         #  @param theParameter Value of parameter on the referenced curve.
1274         #  @param theName Object name; when specified, this parameter is used
1275         #         for result publication in the study. Otherwise, if automatic
1276         #         publication is switched on, default value is used for result name.
1277         #
1278         #  @return New GEOM.GEOM_Object, containing the created tangent.
1279         #
1280         #  @ref swig_MakeTangentOnCurve "Example"
1281         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1282             """
1283             Create a tangent, corresponding to the given parameter on the given curve.
1284
1285             Parameters:
1286                 theRefCurve The referenced curve.
1287                 theParameter Value of parameter on the referenced curve.
1288                 theName Object name; when specified, this parameter is used
1289                         for result publication in the study. Otherwise, if automatic
1290                         publication is switched on, default value is used for result name.
1291
1292             Returns:
1293                 New GEOM.GEOM_Object, containing the created tangent.
1294
1295             Example of usage:
1296                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1297             """
1298             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1299             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1300             self._autoPublish(anObj, theName, "tangent")
1301             return anObj
1302
1303         ## Create a tangent plane, corresponding to the given parameter on the given face.
1304         #  @param theFace The face for which tangent plane should be built.
1305         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1306         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1307         #  @param theTrimSize the size of plane.
1308         #  @param theName Object name; when specified, this parameter is used
1309         #         for result publication in the study. Otherwise, if automatic
1310         #         publication is switched on, default value is used for result name.
1311         #
1312         #  @return New GEOM.GEOM_Object, containing the created tangent.
1313         #
1314         #  @ref swig_MakeTangentPlaneOnFace "Example"
1315         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1316             """
1317             Create a tangent plane, corresponding to the given parameter on the given face.
1318
1319             Parameters:
1320                 theFace The face for which tangent plane should be built.
1321                 theParameterV vertical value of the center point (0.0 - 1.0).
1322                 theParameterU horisontal value of the center point (0.0 - 1.0).
1323                 theTrimSize the size of plane.
1324                 theName Object name; when specified, this parameter is used
1325                         for result publication in the study. Otherwise, if automatic
1326                         publication is switched on, default value is used for result name.
1327
1328            Returns: 
1329                 New GEOM.GEOM_Object, containing the created tangent.
1330
1331            Example of usage:
1332                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1333             """
1334             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1335             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1336             self._autoPublish(anObj, theName, "tangent")
1337             return anObj
1338
1339         ## Create a vector with the given components.
1340         #  @param theDX X component of the vector.
1341         #  @param theDY Y component of the vector.
1342         #  @param theDZ Z component of the vector.
1343         #  @param theName Object name; when specified, this parameter is used
1344         #         for result publication in the study. Otherwise, if automatic
1345         #         publication is switched on, default value is used for result name.
1346         #
1347         #  @return New GEOM.GEOM_Object, containing the created vector.
1348         #
1349         #  @ref tui_creation_vector "Example"
1350         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1351             """
1352             Create a vector with the given components.
1353
1354             Parameters:
1355                 theDX X component of the vector.
1356                 theDY Y component of the vector.
1357                 theDZ Z component of the vector.
1358                 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             Returns:     
1363                 New GEOM.GEOM_Object, containing the created vector.
1364             """
1365             # Example: see GEOM_TestAll.py
1366             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1367             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1368             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1369             anObj.SetParameters(Parameters)
1370             self._autoPublish(anObj, theName, "vector")
1371             return anObj
1372
1373         ## Create a vector between two points.
1374         #  @param thePnt1 Start point for the vector.
1375         #  @param thePnt2 End point for the vector.
1376         #  @param theName Object name; when specified, this parameter is used
1377         #         for result publication in the study. Otherwise, if automatic
1378         #         publication is switched on, default value is used for result name.
1379         #
1380         #  @return New GEOM.GEOM_Object, containing the created vector.
1381         #
1382         #  @ref tui_creation_vector "Example"
1383         def MakeVector(self, thePnt1, thePnt2, theName=None):
1384             """
1385             Create a vector between two points.
1386
1387             Parameters:
1388                 thePnt1 Start point for the vector.
1389                 thePnt2 End point for the vector.
1390                 theName Object name; when specified, this parameter is used
1391                         for result publication in the study. Otherwise, if automatic
1392                         publication is switched on, default value is used for result name.
1393
1394             Returns:        
1395                 New GEOM.GEOM_Object, containing the created vector.
1396             """
1397             # Example: see GEOM_TestAll.py
1398             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1399             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1400             self._autoPublish(anObj, theName, "vector")
1401             return anObj
1402
1403         ## Create a line, passing through the given point
1404         #  and parrallel to the given direction
1405         #  @param thePnt Point. The resulting line will pass through it.
1406         #  @param theDir Direction. The resulting line will be parallel to it.
1407         #  @param theName Object name; when specified, this parameter is used
1408         #         for result publication in the study. Otherwise, if automatic
1409         #         publication is switched on, default value is used for result name.
1410         #
1411         #  @return New GEOM.GEOM_Object, containing the created line.
1412         #
1413         #  @ref tui_creation_line "Example"
1414         def MakeLine(self, thePnt, theDir, theName=None):
1415             """
1416             Create a line, passing through the given point
1417             and parrallel to the given direction
1418
1419             Parameters:
1420                 thePnt Point. The resulting line will pass through it.
1421                 theDir Direction. The resulting line will be parallel to it.
1422                 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             Returns:
1427                 New GEOM.GEOM_Object, containing the created line.
1428             """
1429             # Example: see GEOM_TestAll.py
1430             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1431             RaiseIfFailed("MakeLine", self.BasicOp)
1432             self._autoPublish(anObj, theName, "line")
1433             return anObj
1434
1435         ## Create a line, passing through the given points
1436         #  @param thePnt1 First of two points, defining the line.
1437         #  @param thePnt2 Second of two points, defining the line.
1438         #  @param theName Object name; when specified, this parameter is used
1439         #         for result publication in the study. Otherwise, if automatic
1440         #         publication is switched on, default value is used for result name.
1441         #
1442         #  @return New GEOM.GEOM_Object, containing the created line.
1443         #
1444         #  @ref tui_creation_line "Example"
1445         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1446             """
1447             Create a line, passing through the given points
1448
1449             Parameters:
1450                 thePnt1 First of two points, defining the line.
1451                 thePnt2 Second of two points, defining the line.
1452                 theName Object name; when specified, this parameter is used
1453                         for result publication in the study. Otherwise, if automatic
1454                         publication is switched on, default value is used for result name.
1455
1456             Returns:
1457                 New GEOM.GEOM_Object, containing the created line.
1458             """
1459             # Example: see GEOM_TestAll.py
1460             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1461             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1462             self._autoPublish(anObj, theName, "line")
1463             return anObj
1464
1465         ## Create a line on two faces intersection.
1466         #  @param theFace1 First of two faces, defining the line.
1467         #  @param theFace2 Second of two faces, defining the line.
1468         #  @param theName Object name; when specified, this parameter is used
1469         #         for result publication in the study. Otherwise, if automatic
1470         #         publication is switched on, default value is used for result name.
1471         #
1472         #  @return New GEOM.GEOM_Object, containing the created line.
1473         #
1474         #  @ref swig_MakeLineTwoFaces "Example"
1475         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1476             """
1477             Create a line on two faces intersection.
1478
1479             Parameters:
1480                 theFace1 First of two faces, defining the line.
1481                 theFace2 Second of two faces, defining the line.
1482                 theName Object name; when specified, this parameter is used
1483                         for result publication in the study. Otherwise, if automatic
1484                         publication is switched on, default value is used for result name.
1485
1486             Returns:
1487                 New GEOM.GEOM_Object, containing the created line.
1488             """
1489             # Example: see GEOM_TestAll.py
1490             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1491             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1492             self._autoPublish(anObj, theName, "line")
1493             return anObj
1494
1495         ## Create a plane, passing through the given point
1496         #  and normal to the given vector.
1497         #  @param thePnt Point, the plane has to pass through.
1498         #  @param theVec Vector, defining the plane normal direction.
1499         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1500         #  @param theName Object name; when specified, this parameter is used
1501         #         for result publication in the study. Otherwise, if automatic
1502         #         publication is switched on, default value is used for result name.
1503         #
1504         #  @return New GEOM.GEOM_Object, containing the created plane.
1505         #
1506         #  @ref tui_creation_plane "Example"
1507         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1508             """
1509             Create a plane, passing through the given point
1510             and normal to the given vector.
1511
1512             Parameters:
1513                 thePnt Point, the plane has to pass through.
1514                 theVec Vector, defining the plane normal direction.
1515                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1516                 theName Object name; when specified, this parameter is used
1517                         for result publication in the study. Otherwise, if automatic
1518                         publication is switched on, default value is used for result name.
1519
1520             Returns:    
1521                 New GEOM.GEOM_Object, containing the created plane.
1522             """
1523             # Example: see GEOM_TestAll.py
1524             theTrimSize, Parameters = ParseParameters(theTrimSize);
1525             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1526             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1527             anObj.SetParameters(Parameters)
1528             self._autoPublish(anObj, theName, "plane")
1529             return anObj
1530
1531         ## Create a plane, passing through the three given points
1532         #  @param thePnt1 First of three points, defining the plane.
1533         #  @param thePnt2 Second of three points, defining the plane.
1534         #  @param thePnt3 Fird of three points, defining the plane.
1535         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1536         #  @param theName Object name; when specified, this parameter is used
1537         #         for result publication in the study. Otherwise, if automatic
1538         #         publication is switched on, default value is used for result name.
1539         #
1540         #  @return New GEOM.GEOM_Object, containing the created plane.
1541         #
1542         #  @ref tui_creation_plane "Example"
1543         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1544             """
1545             Create a plane, passing through the three given points
1546
1547             Parameters:
1548                 thePnt1 First of three points, defining the plane.
1549                 thePnt2 Second of three points, defining the plane.
1550                 thePnt3 Fird of three points, defining the plane.
1551                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1552                 theName Object name; when specified, this parameter is used
1553                         for result publication in the study. Otherwise, if automatic
1554                         publication is switched on, default value is used for result name.
1555
1556             Returns:
1557                 New GEOM.GEOM_Object, containing the created plane.
1558             """
1559             # Example: see GEOM_TestAll.py
1560             theTrimSize, Parameters = ParseParameters(theTrimSize);
1561             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1562             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1563             anObj.SetParameters(Parameters)
1564             self._autoPublish(anObj, theName, "plane")
1565             return anObj
1566
1567         ## Create a plane, similar to the existing one, but with another size of representing face.
1568         #  @param theFace Referenced plane or LCS(Marker).
1569         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1570         #  @param theName Object name; when specified, this parameter is used
1571         #         for result publication in the study. Otherwise, if automatic
1572         #         publication is switched on, default value is used for result name.
1573         #
1574         #  @return New GEOM.GEOM_Object, containing the created plane.
1575         #
1576         #  @ref tui_creation_plane "Example"
1577         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1578             """
1579             Create a plane, similar to the existing one, but with another size of representing face.
1580
1581             Parameters:
1582                 theFace Referenced plane or LCS(Marker).
1583                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1584                 theName Object name; when specified, this parameter is used
1585                         for result publication in the study. Otherwise, if automatic
1586                         publication is switched on, default value is used for result name.
1587
1588             Returns:
1589                 New GEOM.GEOM_Object, containing the created plane.
1590             """
1591             # Example: see GEOM_TestAll.py
1592             theTrimSize, Parameters = ParseParameters(theTrimSize);
1593             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1594             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1595             anObj.SetParameters(Parameters)
1596             self._autoPublish(anObj, theName, "plane")
1597             return anObj
1598
1599         ## Create a plane, passing through the 2 vectors
1600         #  with center in a start point of the first vector.
1601         #  @param theVec1 Vector, defining center point and plane direction.
1602         #  @param theVec2 Vector, defining the plane normal direction.
1603         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1604         #  @param theName Object name; when specified, this parameter is used
1605         #         for result publication in the study. Otherwise, if automatic
1606         #         publication is switched on, default value is used for result name.
1607         #
1608         #  @return New GEOM.GEOM_Object, containing the created plane.
1609         #
1610         #  @ref tui_creation_plane "Example"
1611         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1612             """
1613             Create a plane, passing through the 2 vectors
1614             with center in a start point of the first vector.
1615
1616             Parameters:
1617                 theVec1 Vector, defining center point and plane direction.
1618                 theVec2 Vector, defining the plane normal direction.
1619                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1620                 theName Object name; when specified, this parameter is used
1621                         for result publication in the study. Otherwise, if automatic
1622                         publication is switched on, default value is used for result name.
1623
1624             Returns: 
1625                 New GEOM.GEOM_Object, containing the created plane.
1626             """
1627             # Example: see GEOM_TestAll.py
1628             theTrimSize, Parameters = ParseParameters(theTrimSize);
1629             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1630             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1631             anObj.SetParameters(Parameters)
1632             self._autoPublish(anObj, theName, "plane")
1633             return anObj
1634
1635         ## Create a plane, based on a Local coordinate system.
1636         #  @param theLCS  coordinate system, defining plane.
1637         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1638         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1639         #  @param theName Object name; when specified, this parameter is used
1640         #         for result publication in the study. Otherwise, if automatic
1641         #         publication is switched on, default value is used for result name.
1642         #
1643         #  @return New GEOM.GEOM_Object, containing the created plane.
1644         #
1645         #  @ref tui_creation_plane "Example"
1646         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1647             """
1648             Create a plane, based on a Local coordinate system.
1649
1650            Parameters: 
1651                 theLCS  coordinate system, defining plane.
1652                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1653                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1654                 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             Returns: 
1659                 New GEOM.GEOM_Object, containing the created plane.
1660             """
1661             # Example: see GEOM_TestAll.py
1662             theTrimSize, Parameters = ParseParameters(theTrimSize);
1663             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1664             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1665             anObj.SetParameters(Parameters)
1666             self._autoPublish(anObj, theName, "plane")
1667             return anObj
1668
1669         ## Create a local coordinate system.
1670         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1671         #  @param XDX,XDY,XDZ Three components of OX direction
1672         #  @param YDX,YDY,YDZ Three components of OY direction
1673         #  @param theName Object name; when specified, this parameter is used
1674         #         for result publication in the study. Otherwise, if automatic
1675         #         publication is switched on, default value is used for result name.
1676         #
1677         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1678         #
1679         #  @ref swig_MakeMarker "Example"
1680         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1681             """
1682             Create a local coordinate system.
1683
1684             Parameters: 
1685                 OX,OY,OZ Three coordinates of coordinate system origin.
1686                 XDX,XDY,XDZ Three components of OX direction
1687                 YDX,YDY,YDZ Three components of OY direction
1688                 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             Returns: 
1693                 New GEOM.GEOM_Object, containing the created coordinate system.
1694             """
1695             # Example: see GEOM_TestAll.py
1696             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1697             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1698             RaiseIfFailed("MakeMarker", self.BasicOp)
1699             anObj.SetParameters(Parameters)
1700             self._autoPublish(anObj, theName, "lcs")
1701             return anObj
1702
1703         ## Create a local coordinate system from shape.
1704         #  @param theShape The initial shape to detect the coordinate system.
1705         #  @param theName Object name; when specified, this parameter is used
1706         #         for result publication in the study. Otherwise, if automatic
1707         #         publication is switched on, default value is used for result name.
1708         #
1709         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1710         #
1711         #  @ref tui_creation_lcs "Example"
1712         def MakeMarkerFromShape(self, theShape, theName=None):
1713             """
1714             Create a local coordinate system from shape.
1715
1716             Parameters:
1717                 theShape The initial shape to detect the coordinate system.
1718                 theName Object name; when specified, this parameter is used
1719                         for result publication in the study. Otherwise, if automatic
1720                         publication is switched on, default value is used for result name.
1721                 
1722             Returns: 
1723                 New GEOM.GEOM_Object, containing the created coordinate system.
1724             """
1725             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1726             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1727             self._autoPublish(anObj, theName, "lcs")
1728             return anObj
1729
1730         ## Create a local coordinate system from point and two vectors.
1731         #  @param theOrigin Point of coordinate system origin.
1732         #  @param theXVec Vector of X direction
1733         #  @param theYVec Vector of Y direction
1734         #  @param theName Object name; when specified, this parameter is used
1735         #         for result publication in the study. Otherwise, if automatic
1736         #         publication is switched on, default value is used for result name.
1737         #
1738         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1739         #
1740         #  @ref tui_creation_lcs "Example"
1741         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1742             """
1743             Create a local coordinate system from point and two vectors.
1744
1745             Parameters:
1746                 theOrigin Point of coordinate system origin.
1747                 theXVec Vector of X direction
1748                 theYVec Vector of Y direction
1749                 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             Returns: 
1754                 New GEOM.GEOM_Object, containing the created coordinate system.
1755
1756             """
1757             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1758             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1759             self._autoPublish(anObj, theName, "lcs")
1760             return anObj
1761
1762         # end of l3_basic_go
1763         ## @}
1764
1765         ## @addtogroup l4_curves
1766         ## @{
1767
1768         ##  Create an arc of circle, passing through three given points.
1769         #  @param thePnt1 Start point of the arc.
1770         #  @param thePnt2 Middle point of the arc.
1771         #  @param thePnt3 End point of the arc.
1772         #  @param theName Object name; when specified, this parameter is used
1773         #         for result publication in the study. Otherwise, if automatic
1774         #         publication is switched on, default value is used for result name.
1775         #
1776         #  @return New GEOM.GEOM_Object, containing the created arc.
1777         #
1778         #  @ref swig_MakeArc "Example"
1779         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1780             """
1781             Create an arc of circle, passing through three given points.
1782
1783             Parameters:
1784                 thePnt1 Start point of the arc.
1785                 thePnt2 Middle point of the arc.
1786                 thePnt3 End point of the arc.
1787                 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             Returns: 
1792                 New GEOM.GEOM_Object, containing the created arc.
1793             """
1794             # Example: see GEOM_TestAll.py
1795             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1796             RaiseIfFailed("MakeArc", self.CurvesOp)
1797             self._autoPublish(anObj, theName, "arc")
1798             return anObj
1799
1800         ##  Create an arc of circle from a center and 2 points.
1801         #  @param thePnt1 Center of the arc
1802         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1803         #  @param thePnt3 End point of the arc (Gives also a direction)
1804         #  @param theSense Orientation of the arc
1805         #  @param theName Object name; when specified, this parameter is used
1806         #         for result publication in the study. Otherwise, if automatic
1807         #         publication is switched on, default value is used for result name.
1808         #
1809         #  @return New GEOM.GEOM_Object, containing the created arc.
1810         #
1811         #  @ref swig_MakeArc "Example"
1812         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1813             """
1814             Create an arc of circle from a center and 2 points.
1815
1816             Parameters:
1817                 thePnt1 Center of the arc
1818                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1819                 thePnt3 End point of the arc (Gives also a direction)
1820                 theSense Orientation of the arc
1821                 theName Object name; when specified, this parameter is used
1822                         for result publication in the study. Otherwise, if automatic
1823                         publication is switched on, default value is used for result name.
1824
1825             Returns:
1826                 New GEOM.GEOM_Object, containing the created arc.
1827             """
1828             # Example: see GEOM_TestAll.py
1829             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1830             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1831             self._autoPublish(anObj, theName, "arc")
1832             return anObj
1833
1834         ##  Create an arc of ellipse, of center and two points.
1835         #  @param theCenter Center of the arc.
1836         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1837         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1838         #  @param theName Object name; when specified, this parameter is used
1839         #         for result publication in the study. Otherwise, if automatic
1840         #         publication is switched on, default value is used for result name.
1841         #
1842         #  @return New GEOM.GEOM_Object, containing the created arc.
1843         #
1844         #  @ref swig_MakeArc "Example"
1845         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1846             """
1847             Create an arc of ellipse, of center and two points.
1848
1849             Parameters:
1850                 theCenter Center of the arc.
1851                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1852                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1853                 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             Returns:
1858                 New GEOM.GEOM_Object, containing the created arc.
1859             """
1860             # Example: see GEOM_TestAll.py
1861             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1862             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1863             self._autoPublish(anObj, theName, "arc")
1864             return anObj
1865
1866         ## Create a circle with given center, normal vector and radius.
1867         #  @param thePnt Circle center.
1868         #  @param theVec Vector, normal to the plane of the circle.
1869         #  @param theR Circle radius.
1870         #  @param theName Object name; when specified, this parameter is used
1871         #         for result publication in the study. Otherwise, if automatic
1872         #         publication is switched on, default value is used for result name.
1873         #
1874         #  @return New GEOM.GEOM_Object, containing the created circle.
1875         #
1876         #  @ref tui_creation_circle "Example"
1877         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1878             """
1879             Create a circle with given center, normal vector and radius.
1880
1881             Parameters:
1882                 thePnt Circle center.
1883                 theVec Vector, normal to the plane of the circle.
1884                 theR Circle radius.
1885                 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             Returns:
1890                 New GEOM.GEOM_Object, containing the created circle.
1891             """
1892             # Example: see GEOM_TestAll.py
1893             theR, Parameters = ParseParameters(theR)
1894             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1895             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1896             anObj.SetParameters(Parameters)
1897             self._autoPublish(anObj, theName, "circle")
1898             return anObj
1899
1900         ## Create a circle with given radius.
1901         #  Center of the circle will be in the origin of global
1902         #  coordinate system and normal vector will be codirected with Z axis
1903         #  @param theR Circle radius.
1904         #  @param theName Object name; when specified, this parameter is used
1905         #         for result publication in the study. Otherwise, if automatic
1906         #         publication is switched on, default value is used for result name.
1907         #
1908         #  @return New GEOM.GEOM_Object, containing the created circle.
1909         def MakeCircleR(self, theR, theName=None):
1910             """
1911             Create a circle with given radius.
1912             Center of the circle will be in the origin of global
1913             coordinate system and normal vector will be codirected with Z axis
1914
1915             Parameters:
1916                 theR Circle radius.
1917                 theName Object name; when specified, this parameter is used
1918                         for result publication in the study. Otherwise, if automatic
1919                         publication is switched on, default value is used for result name.
1920
1921             Returns:
1922                 New GEOM.GEOM_Object, containing the created circle.
1923             """
1924             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1925             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1926             self._autoPublish(anObj, theName, "circle")
1927             return anObj
1928
1929         ## Create a circle, passing through three given points
1930         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1931         #  @param theName Object name; when specified, this parameter is used
1932         #         for result publication in the study. Otherwise, if automatic
1933         #         publication is switched on, default value is used for result name.
1934         #
1935         #  @return New GEOM.GEOM_Object, containing the created circle.
1936         #
1937         #  @ref tui_creation_circle "Example"
1938         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1939             """
1940             Create a circle, passing through three given points
1941
1942             Parameters:
1943                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1944                 theName Object name; when specified, this parameter is used
1945                         for result publication in the study. Otherwise, if automatic
1946                         publication is switched on, default value is used for result name.
1947
1948             Returns:
1949                 New GEOM.GEOM_Object, containing the created circle.
1950             """
1951             # Example: see GEOM_TestAll.py
1952             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1953             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1954             self._autoPublish(anObj, theName, "circle")
1955             return anObj
1956
1957         ## Create a circle, with given point1 as center,
1958         #  passing through the point2 as radius and laying in the plane,
1959         #  defined by all three given points.
1960         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1961         #  @param theName Object name; when specified, this parameter is used
1962         #         for result publication in the study. Otherwise, if automatic
1963         #         publication is switched on, default value is used for result name.
1964         #
1965         #  @return New GEOM.GEOM_Object, containing the created circle.
1966         #
1967         #  @ref swig_MakeCircle "Example"
1968         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1969             """
1970             Create a circle, with given point1 as center,
1971             passing through the point2 as radius and laying in the plane,
1972             defined by all three given points.
1973
1974             Parameters:
1975                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1976                 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             Returns:
1981                 New GEOM.GEOM_Object, containing the created circle.
1982             """
1983             # Example: see GEOM_example6.py
1984             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
1985             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
1986             self._autoPublish(anObj, theName, "circle")
1987             return anObj
1988
1989         ## Create an ellipse with given center, normal vector and radiuses.
1990         #  @param thePnt Ellipse center.
1991         #  @param theVec Vector, normal to the plane of the ellipse.
1992         #  @param theRMajor Major ellipse radius.
1993         #  @param theRMinor Minor ellipse radius.
1994         #  @param theVecMaj Vector, direction of the ellipse's main axis.
1995         #  @param theName Object name; when specified, this parameter is used
1996         #         for result publication in the study. Otherwise, if automatic
1997         #         publication is switched on, default value is used for result name.
1998         #
1999         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2000         #
2001         #  @ref tui_creation_ellipse "Example"
2002         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2003             """
2004             Create an ellipse with given center, normal vector and radiuses.
2005
2006             Parameters:
2007                 thePnt Ellipse center.
2008                 theVec Vector, normal to the plane of the ellipse.
2009                 theRMajor Major ellipse radius.
2010                 theRMinor Minor ellipse radius.
2011                 theVecMaj Vector, direction of the ellipse's main axis.
2012                 theName Object name; when specified, this parameter is used
2013                         for result publication in the study. Otherwise, if automatic
2014                         publication is switched on, default value is used for result name.
2015
2016             Returns:    
2017                 New GEOM.GEOM_Object, containing the created ellipse.
2018             """
2019             # Example: see GEOM_TestAll.py
2020             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2021             if theVecMaj is not None:
2022                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2023             else:
2024                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2025                 pass
2026             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2027             anObj.SetParameters(Parameters)
2028             self._autoPublish(anObj, theName, "ellipse")
2029             return anObj
2030
2031         ## Create an ellipse with given radiuses.
2032         #  Center of the ellipse will be in the origin of global
2033         #  coordinate system and normal vector will be codirected with Z axis
2034         #  @param theRMajor Major ellipse radius.
2035         #  @param theRMinor Minor ellipse radius.
2036         #  @param theName Object name; when specified, this parameter is used
2037         #         for result publication in the study. Otherwise, if automatic
2038         #         publication is switched on, default value is used for result name.
2039         #
2040         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2041         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2042             """
2043             Create an ellipse with given radiuses.
2044             Center of the ellipse will be in the origin of global
2045             coordinate system and normal vector will be codirected with Z axis
2046
2047             Parameters:
2048                 theRMajor Major ellipse radius.
2049                 theRMinor Minor ellipse radius.
2050                 theName Object name; when specified, this parameter is used
2051                         for result publication in the study. Otherwise, if automatic
2052                         publication is switched on, default value is used for result name.
2053
2054             Returns:
2055             New GEOM.GEOM_Object, containing the created ellipse.
2056             """
2057             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2058             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2059             self._autoPublish(anObj, theName, "ellipse")
2060             return anObj
2061
2062         ## Create a polyline on the set of points.
2063         #  @param thePoints Sequence of points for the polyline.
2064         #  @param theIsClosed If True, build a closed wire.
2065         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created polyline.
2070         #
2071         #  @ref tui_creation_curve "Example"
2072         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2073             """
2074             Create a polyline on the set of points.
2075
2076             Parameters:
2077                 thePoints Sequence of points for the polyline.
2078                 theIsClosed If True, build a closed wire.
2079                 theName Object name; when specified, this parameter is used
2080                         for result publication in the study. Otherwise, if automatic
2081                         publication is switched on, default value is used for result name.
2082
2083             Returns:
2084                 New GEOM.GEOM_Object, containing the created polyline.
2085             """
2086             # Example: see GEOM_TestAll.py
2087             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2088             RaiseIfFailed("MakePolyline", self.CurvesOp)
2089             self._autoPublish(anObj, theName, "polyline")
2090             return anObj
2091
2092         ## Create bezier curve on the set of points.
2093         #  @param thePoints Sequence of points for the bezier curve.
2094         #  @param theIsClosed If True, build a closed curve.
2095         #  @param theName Object name; when specified, this parameter is used
2096         #         for result publication in the study. Otherwise, if automatic
2097         #         publication is switched on, default value is used for result name.
2098         #
2099         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2100         #
2101         #  @ref tui_creation_curve "Example"
2102         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2103             """
2104             Create bezier curve on the set of points.
2105
2106             Parameters:
2107                 thePoints Sequence of points for the bezier curve.
2108                 theIsClosed If True, build a closed curve.
2109                 theName Object name; when specified, this parameter is used
2110                         for result publication in the study. Otherwise, if automatic
2111                         publication is switched on, default value is used for result name.
2112
2113             Returns:
2114                 New GEOM.GEOM_Object, containing the created bezier curve.
2115             """
2116             # Example: see GEOM_TestAll.py
2117             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2118             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2119             self._autoPublish(anObj, theName, "bezier")
2120             return anObj
2121
2122         ## Create B-Spline curve on the set of points.
2123         #  @param thePoints Sequence of points for the B-Spline curve.
2124         #  @param theIsClosed If True, build a closed curve.
2125         #  @param theDoReordering If TRUE, the algo does not follow the order of
2126         #                         \a thePoints but searches for the closest vertex.
2127         #  @param theName Object name; when specified, this parameter is used
2128         #         for result publication in the study. Otherwise, if automatic
2129         #         publication is switched on, default value is used for result name.
2130         #
2131         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2132         #
2133         #  @ref tui_creation_curve "Example"
2134         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2135             """
2136             Create B-Spline curve on the set of points.
2137
2138             Parameters:
2139                 thePoints Sequence of points for the B-Spline curve.
2140                 theIsClosed If True, build a closed curve.
2141                 theDoReordering If True, the algo does not follow the order of
2142                                 thePoints but searches for the closest vertex.
2143                 theName Object name; when specified, this parameter is used
2144                         for result publication in the study. Otherwise, if automatic
2145                         publication is switched on, default value is used for result name.
2146
2147             Returns:                     
2148                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2149             """
2150             # Example: see GEOM_TestAll.py
2151             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2152             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2153             self._autoPublish(anObj, theName, "bspline")
2154             return anObj
2155
2156         ## Create B-Spline curve on the set of points.
2157         #  @param thePoints Sequence of points for the B-Spline curve.
2158         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2159         #  @param theLastVec Vector object, defining the curve direction at its last point.
2160         #  @param theName Object name; when specified, this parameter is used
2161         #         for result publication in the study. Otherwise, if automatic
2162         #         publication is switched on, default value is used for result name.
2163         #
2164         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2165         #
2166         #  @ref tui_creation_curve "Example"
2167         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2168             """
2169             Create B-Spline curve on the set of points.
2170
2171             Parameters:
2172                 thePoints Sequence of points for the B-Spline curve.
2173                 theFirstVec Vector object, defining the curve direction at its first point.
2174                 theLastVec Vector object, defining the curve direction at its last point.
2175                 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             Returns:                     
2180                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2181             """
2182             # Example: see GEOM_TestAll.py
2183             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2184             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2185             self._autoPublish(anObj, theName, "bspline")
2186             return anObj
2187
2188         ## Creates a curve using the parametric definition of the basic points.
2189         #  @param thexExpr parametric equation of the coordinates X.
2190         #  @param theyExpr parametric equation of the coordinates Y.
2191         #  @param thezExpr parametric equation of the coordinates Z.
2192         #  @param theParamMin the minimal value of the parameter.
2193         #  @param theParamMax the maximum value of the parameter.
2194         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2195         #  @param theCurveType the type of the curve.
2196         #  @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.
2197         #  @param theName Object name; when specified, this parameter is used
2198         #         for result publication in the study. Otherwise, if automatic
2199         #         publication is switched on, default value is used for result name.
2200         #
2201         #  @return New GEOM.GEOM_Object, containing the created curve.
2202         #
2203         #  @ref tui_creation_curve "Example"
2204         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2205                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2206             """
2207             Creates a curve using the parametric definition of the basic points.
2208
2209             Parameters:
2210                 thexExpr parametric equation of the coordinates X.
2211                 theyExpr parametric equation of the coordinates Y.
2212                 thezExpr parametric equation of the coordinates Z.
2213                 theParamMin the minimal value of the parameter.
2214                 theParamMax the maximum value of the parameter.
2215                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2216                 theCurveType the type of the curve.
2217                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2218                              method is used which can lead to a bug.
2219                 theName Object name; when specified, this parameter is used
2220                         for result publication in the study. Otherwise, if automatic
2221                         publication is switched on, default value is used for result name.
2222
2223             Returns:
2224                 New GEOM.GEOM_Object, containing the created curve.
2225             """
2226             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2227             if theNewMethod:
2228               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2229             else:
2230               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2231             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2232             anObj.SetParameters(Parameters)
2233             self._autoPublish(anObj, theName, "curve")
2234             return anObj
2235
2236         # end of l4_curves
2237         ## @}
2238
2239         ## @addtogroup l3_sketcher
2240         ## @{
2241
2242         ## Create a sketcher (wire or face), following the textual description,
2243         #  passed through <VAR>theCommand</VAR> argument. \n
2244         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2245         #  Format of the description string have to be the following:
2246         #
2247         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2248         #
2249         #  Where:
2250         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2251         #  - CMD is one of
2252         #     - "R angle" : Set the direction by angle
2253         #     - "D dx dy" : Set the direction by DX & DY
2254         #     .
2255         #       \n
2256         #     - "TT x y" : Create segment by point at X & Y
2257         #     - "T dx dy" : Create segment by point with DX & DY
2258         #     - "L length" : Create segment by direction & Length
2259         #     - "IX x" : Create segment by direction & Intersect. X
2260         #     - "IY y" : Create segment by direction & Intersect. Y
2261         #     .
2262         #       \n
2263         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2264         #     - "AA x y": Create arc by point at X & Y
2265         #     - "A dx dy" : Create arc by point with DX & DY
2266         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2267         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2268         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2269         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2270         #     .
2271         #       \n
2272         #     - "WW" : Close Wire (to finish)
2273         #     - "WF" : Close Wire and build face (to finish)
2274         #     .
2275         #        \n
2276         #  - Flag1 (= reverse) is 0 or 2 ...
2277         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2278         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2279         #     .
2280         #        \n
2281         #  - Flag2 (= control tolerance) is 0 or 1 ...
2282         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2283         #     - if 1 the wire is built only if the end point is on the arc
2284         #       with a tolerance of 10^-7 on the distance else the creation fails
2285         #
2286         #  @param theCommand String, defining the sketcher in local
2287         #                    coordinates of the working plane.
2288         #  @param theWorkingPlane Nine double values, defining origin,
2289         #                         OZ and OX directions of the working plane.
2290         #  @param theName Object name; when specified, this parameter is used
2291         #         for result publication in the study. Otherwise, if automatic
2292         #         publication is switched on, default value is used for result name.
2293         #
2294         #  @return New GEOM.GEOM_Object, containing the created wire.
2295         #
2296         #  @ref tui_sketcher_page "Example"
2297         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2298             """
2299             Create a sketcher (wire or face), following the textual description, passed
2300             through theCommand argument.
2301             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2302             Format of the description string have to be the following:
2303                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2304             Where:
2305             - x1, y1 are coordinates of the first sketcher point (zero by default),
2306             - CMD is one of
2307                - "R angle" : Set the direction by angle
2308                - "D dx dy" : Set the direction by DX & DY
2309                
2310                - "TT x y" : Create segment by point at X & Y
2311                - "T dx dy" : Create segment by point with DX & DY
2312                - "L length" : Create segment by direction & Length
2313                - "IX x" : Create segment by direction & Intersect. X
2314                - "IY y" : Create segment by direction & Intersect. Y
2315
2316                - "C radius length" : Create arc by direction, radius and length(in degree)
2317                - "AA x y": Create arc by point at X & Y
2318                - "A dx dy" : Create arc by point with DX & DY
2319                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2320                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2321                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2322                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2323
2324                - "WW" : Close Wire (to finish)
2325                - "WF" : Close Wire and build face (to finish)
2326             
2327             - Flag1 (= reverse) is 0 or 2 ...
2328                - if 0 the drawn arc is the one of lower angle (< Pi)
2329                - if 2 the drawn arc ius the one of greater angle (> Pi)
2330         
2331             - Flag2 (= control tolerance) is 0 or 1 ...
2332                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2333                - if 1 the wire is built only if the end point is on the arc
2334                  with a tolerance of 10^-7 on the distance else the creation fails
2335
2336             Parameters:
2337                 theCommand String, defining the sketcher in local
2338                            coordinates of the working plane.
2339                 theWorkingPlane Nine double values, defining origin,
2340                                 OZ and OX directions of the working plane.
2341                 theName Object name; when specified, this parameter is used
2342                         for result publication in the study. Otherwise, if automatic
2343                         publication is switched on, default value is used for result name.
2344
2345             Returns:
2346                 New GEOM.GEOM_Object, containing the created wire.
2347             """
2348             # Example: see GEOM_TestAll.py
2349             theCommand,Parameters = ParseSketcherCommand(theCommand)
2350             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2351             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2352             anObj.SetParameters(Parameters)
2353             self._autoPublish(anObj, theName, "wire")
2354             return anObj
2355
2356         ## Create a sketcher (wire or face), following the textual description,
2357         #  passed through <VAR>theCommand</VAR> argument. \n
2358         #  For format of the description string see MakeSketcher() method.\n
2359         #  @param theCommand String, defining the sketcher in local
2360         #                    coordinates of the working plane.
2361         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2362         #  @param theName Object name; when specified, this parameter is used
2363         #         for result publication in the study. Otherwise, if automatic
2364         #         publication is switched on, default value is used for result name.
2365         #
2366         #  @return New GEOM.GEOM_Object, containing the created wire.
2367         #
2368         #  @ref tui_sketcher_page "Example"
2369         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2370             """
2371             Create a sketcher (wire or face), following the textual description,
2372             passed through theCommand argument.
2373             For format of the description string see geompy.MakeSketcher() method.
2374
2375             Parameters:
2376                 theCommand String, defining the sketcher in local
2377                            coordinates of the working plane.
2378                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2379                 theName Object name; when specified, this parameter is used
2380                         for result publication in the study. Otherwise, if automatic
2381                         publication is switched on, default value is used for result name.
2382
2383             Returns:
2384                 New GEOM.GEOM_Object, containing the created wire.
2385             """
2386             theCommand,Parameters = ParseSketcherCommand(theCommand)
2387             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2388             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2389             anObj.SetParameters(Parameters)
2390             self._autoPublish(anObj, theName, "wire")
2391             return anObj
2392
2393         ## Create a sketcher wire, following the numerical description,
2394         #  passed through <VAR>theCoordinates</VAR> argument. \n
2395         #  @param theCoordinates double values, defining points to create a wire,
2396         #                                                      passing from it.
2397         #  @param theName Object name; when specified, this parameter is used
2398         #         for result publication in the study. Otherwise, if automatic
2399         #         publication is switched on, default value is used for result name.
2400         #
2401         #  @return New GEOM.GEOM_Object, containing the created wire.
2402         #
2403         #  @ref tui_3dsketcher_page "Example"
2404         def Make3DSketcher(self, theCoordinates, theName=None):
2405             """
2406             Create a sketcher wire, following the numerical description,
2407             passed through theCoordinates argument.
2408
2409             Parameters:
2410                 theCoordinates double values, defining points to create a wire,
2411                                passing from it.
2412                 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             Returns:
2417                 New GEOM_Object, containing the created wire.
2418             """
2419             theCoordinates,Parameters = ParseParameters(theCoordinates)
2420             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2421             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2422             anObj.SetParameters(Parameters)
2423             self._autoPublish(anObj, theName, "wire")
2424             return anObj
2425
2426         ## Obtain a 3D sketcher interface
2427         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2428         #
2429         #  @ref tui_3dsketcher_page "Example"
2430         def Sketcher3D (self):
2431             """
2432             Obtain a 3D sketcher interface.
2433
2434             Example of usage:
2435                 sk = geompy.Sketcher3D()
2436                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2437                 sk.addPointsRelative(0, 0, 130)
2438                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2439                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2440                 sk.close()
2441                 a3D_Sketcher_1 = sk.wire()
2442             """
2443             sk = Sketcher3D (self)
2444             return sk
2445
2446         # end of l3_sketcher
2447         ## @}
2448
2449         ## @addtogroup l3_3d_primitives
2450         ## @{
2451
2452         ## Create a box by coordinates of two opposite vertices.
2453         #
2454         #  @param x1,y1,z1 double values, defining first point it.
2455         #  @param x2,y2,z2 double values, defining first point it.
2456         #  @param theName Object name; when specified, this parameter is used
2457         #         for result publication in the study. Otherwise, if automatic
2458         #         publication is switched on, default value is used for result name.
2459         #
2460         #  @return New GEOM.GEOM_Object, containing the created box.
2461         #
2462         #  @ref tui_creation_box "Example"
2463         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2464             """
2465             Create a box by coordinates of two opposite vertices.
2466             
2467             Parameters:
2468                 x1,y1,z1 double values, defining first point.
2469                 x2,y2,z2 double values, defining second point.
2470                 theName Object name; when specified, this parameter is used
2471                         for result publication in the study. Otherwise, if automatic
2472                         publication is switched on, default value is used for result name.
2473                 
2474             Returns:
2475                 New GEOM.GEOM_Object, containing the created box.
2476             """
2477             # Example: see GEOM_TestAll.py
2478             pnt1 = self.MakeVertex(x1,y1,z1)
2479             pnt2 = self.MakeVertex(x2,y2,z2)
2480             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2481             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2482
2483         ## Create a box with specified dimensions along the coordinate axes
2484         #  and with edges, parallel to the coordinate axes.
2485         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2486         #  @param theDX Length of Box edges, parallel to OX axis.
2487         #  @param theDY Length of Box edges, parallel to OY axis.
2488         #  @param theDZ Length of Box edges, parallel to OZ axis.
2489         #  @param theName Object name; when specified, this parameter is used
2490         #         for result publication in the study. Otherwise, if automatic
2491         #         publication is switched on, default value is used for result name.
2492         #
2493         #  @return New GEOM.GEOM_Object, containing the created box.
2494         #
2495         #  @ref tui_creation_box "Example"
2496         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
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
2502             Parameters:
2503                 theDX Length of Box edges, parallel to OX axis.
2504                 theDY Length of Box edges, parallel to OY axis.
2505                 theDZ Length of Box edges, parallel to OZ axis.
2506                 theName Object name; when specified, this parameter is used
2507                         for result publication in the study. Otherwise, if automatic
2508                         publication is switched on, default value is used for result name.
2509
2510             Returns:   
2511                 New GEOM.GEOM_Object, containing the created box.
2512             """
2513             # Example: see GEOM_TestAll.py
2514             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2515             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2516             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2517             anObj.SetParameters(Parameters)
2518             self._autoPublish(anObj, theName, "box")
2519             return anObj
2520
2521         ## Create a box with two specified opposite vertices,
2522         #  and with edges, parallel to the coordinate axes
2523         #  @param thePnt1 First of two opposite vertices.
2524         #  @param thePnt2 Second of two opposite vertices.
2525         #  @param theName Object name; when specified, this parameter is used
2526         #         for result publication in the study. Otherwise, if automatic
2527         #         publication is switched on, default value is used for result name.
2528         #
2529         #  @return New GEOM.GEOM_Object, containing the created box.
2530         #
2531         #  @ref tui_creation_box "Example"
2532         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2533             """
2534             Create a box with two specified opposite vertices,
2535             and with edges, parallel to the coordinate axes
2536
2537             Parameters:
2538                 thePnt1 First of two opposite vertices.
2539                 thePnt2 Second of two opposite vertices.
2540                 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             Returns:
2545                 New GEOM.GEOM_Object, containing the created box.
2546             """
2547             # Example: see GEOM_TestAll.py
2548             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2549             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2550             self._autoPublish(anObj, theName, "box")
2551             return anObj
2552
2553         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2554         #  @param theH height of Face.
2555         #  @param theW width of Face.
2556         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2557         #  @param theName Object name; when specified, this parameter is used
2558         #         for result publication in the study. Otherwise, if automatic
2559         #         publication is switched on, default value is used for result name.
2560         #
2561         #  @return New GEOM.GEOM_Object, containing the created face.
2562         #
2563         #  @ref tui_creation_face "Example"
2564         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2565             """
2566             Create a face with specified dimensions with edges parallel to coordinate axes.
2567
2568             Parameters:
2569                 theH height of Face.
2570                 theW width of Face.
2571                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2572                 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             Returns:
2577                 New GEOM.GEOM_Object, containing the created face.
2578             """
2579             # Example: see GEOM_TestAll.py
2580             theH,theW,Parameters = ParseParameters(theH, theW)
2581             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2582             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2583             anObj.SetParameters(Parameters)
2584             self._autoPublish(anObj, theName, "rectangle")
2585             return anObj
2586
2587         ## Create a face from another plane and two sizes,
2588         #  vertical size and horisontal size.
2589         #  @param theObj   Normale vector to the creating face or
2590         #  the face object.
2591         #  @param theH     Height (vertical size).
2592         #  @param theW     Width (horisontal size).
2593         #  @param theName Object name; when specified, this parameter is used
2594         #         for result publication in the study. Otherwise, if automatic
2595         #         publication is switched on, default value is used for result name.
2596         #
2597         #  @return New GEOM.GEOM_Object, containing the created face.
2598         #
2599         #  @ref tui_creation_face "Example"
2600         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2601             """
2602             Create a face from another plane and two sizes,
2603             vertical size and horisontal size.
2604
2605             Parameters:
2606                 theObj   Normale vector to the creating face or
2607                          the face object.
2608                 theH     Height (vertical size).
2609                 theW     Width (horisontal size).
2610                 theName Object name; when specified, this parameter is used
2611                         for result publication in the study. Otherwise, if automatic
2612                         publication is switched on, default value is used for result name.
2613
2614             Returns:
2615                 New GEOM_Object, containing the created face.
2616             """
2617             # Example: see GEOM_TestAll.py
2618             theH,theW,Parameters = ParseParameters(theH, theW)
2619             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2620             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2621             anObj.SetParameters(Parameters)
2622             self._autoPublish(anObj, theName, "rectangle")
2623             return anObj
2624
2625         ## Create a disk with given center, normal vector and radius.
2626         #  @param thePnt Disk center.
2627         #  @param theVec Vector, normal to the plane of the disk.
2628         #  @param theR Disk radius.
2629         #  @param theName Object name; when specified, this parameter is used
2630         #         for result publication in the study. Otherwise, if automatic
2631         #         publication is switched on, default value is used for result name.
2632         #
2633         #  @return New GEOM.GEOM_Object, containing the created disk.
2634         #
2635         #  @ref tui_creation_disk "Example"
2636         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2637             """
2638             Create a disk with given center, normal vector and radius.
2639
2640             Parameters:
2641                 thePnt Disk center.
2642                 theVec Vector, normal to the plane of the disk.
2643                 theR Disk radius.
2644                 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             Returns:    
2649                 New GEOM.GEOM_Object, containing the created disk.
2650             """
2651             # Example: see GEOM_TestAll.py
2652             theR,Parameters = ParseParameters(theR)
2653             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2654             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2655             anObj.SetParameters(Parameters)
2656             self._autoPublish(anObj, theName, "disk")
2657             return anObj
2658
2659         ## Create a disk, passing through three given points
2660         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2661         #  @param theName Object name; when specified, this parameter is used
2662         #         for result publication in the study. Otherwise, if automatic
2663         #         publication is switched on, default value is used for result name.
2664         #
2665         #  @return New GEOM.GEOM_Object, containing the created disk.
2666         #
2667         #  @ref tui_creation_disk "Example"
2668         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2669             """
2670             Create a disk, passing through three given points
2671
2672             Parameters:
2673                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2674                 theName Object name; when specified, this parameter is used
2675                         for result publication in the study. Otherwise, if automatic
2676                         publication is switched on, default value is used for result name.
2677
2678             Returns:    
2679                 New GEOM.GEOM_Object, containing the created disk.
2680             """
2681             # Example: see GEOM_TestAll.py
2682             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2683             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2684             self._autoPublish(anObj, theName, "disk")
2685             return anObj
2686
2687         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2688         #  @param theR Radius of Face.
2689         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2690         #  @param theName Object name; when specified, this parameter is used
2691         #         for result publication in the study. Otherwise, if automatic
2692         #         publication is switched on, default value is used for result name.
2693         #
2694         #  @return New GEOM.GEOM_Object, containing the created disk.
2695         #
2696         #  @ref tui_creation_face "Example"
2697         def MakeDiskR(self, theR, theOrientation, theName=None):
2698             """
2699             Create a disk with specified dimensions along OX-OY coordinate axes.
2700
2701             Parameters:
2702                 theR Radius of Face.
2703                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2704                 theName Object name; when specified, this parameter is used
2705                         for result publication in the study. Otherwise, if automatic
2706                         publication is switched on, default value is used for result name.
2707
2708             Returns: 
2709                 New GEOM.GEOM_Object, containing the created disk.
2710
2711             Example of usage:
2712                 Disk3 = geompy.MakeDiskR(100., 1)
2713             """
2714             # Example: see GEOM_TestAll.py
2715             theR,Parameters = ParseParameters(theR)
2716             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2717             RaiseIfFailed("MakeDiskR", self.PrimOp)
2718             anObj.SetParameters(Parameters)
2719             self._autoPublish(anObj, theName, "disk")
2720             return anObj
2721
2722         ## Create a cylinder with given base point, axis, radius and height.
2723         #  @param thePnt Central point of cylinder base.
2724         #  @param theAxis Cylinder axis.
2725         #  @param theR Cylinder radius.
2726         #  @param theH Cylinder height.
2727         #  @param theName Object name; when specified, this parameter is used
2728         #         for result publication in the study. Otherwise, if automatic
2729         #         publication is switched on, default value is used for result name.
2730         #
2731         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2732         #
2733         #  @ref tui_creation_cylinder "Example"
2734         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2735             """
2736             Create a cylinder with given base point, axis, radius and height.
2737
2738             Parameters:
2739                 thePnt Central point of cylinder base.
2740                 theAxis Cylinder axis.
2741                 theR Cylinder radius.
2742                 theH Cylinder height.
2743                 theName Object name; when specified, this parameter is used
2744                         for result publication in the study. Otherwise, if automatic
2745                         publication is switched on, default value is used for result name.
2746
2747             Returns: 
2748                 New GEOM.GEOM_Object, containing the created cylinder.
2749             """
2750             # Example: see GEOM_TestAll.py
2751             theR,theH,Parameters = ParseParameters(theR, theH)
2752             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2753             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2754             anObj.SetParameters(Parameters)
2755             self._autoPublish(anObj, theName, "cylinder")
2756             return anObj
2757
2758         ## Create a cylinder with given radius and height at
2759         #  the origin of coordinate system. Axis of the cylinder
2760         #  will be collinear to the OZ axis of the coordinate system.
2761         #  @param theR Cylinder radius.
2762         #  @param theH Cylinder height.
2763         #  @param theName Object name; when specified, this parameter is used
2764         #         for result publication in the study. Otherwise, if automatic
2765         #         publication is switched on, default value is used for result name.
2766         #
2767         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2768         #
2769         #  @ref tui_creation_cylinder "Example"
2770         def MakeCylinderRH(self, theR, theH, theName=None):
2771             """
2772             Create a cylinder with given radius and height at
2773             the origin of coordinate system. Axis of the cylinder
2774             will be collinear to the OZ axis of the coordinate system.
2775
2776             Parameters:
2777                 theR Cylinder radius.
2778                 theH Cylinder height.
2779                 theName Object name; when specified, this parameter is used
2780                         for result publication in the study. Otherwise, if automatic
2781                         publication is switched on, default value is used for result name.
2782
2783             Returns:    
2784                 New GEOM.GEOM_Object, containing the created cylinder.
2785             """
2786             # Example: see GEOM_TestAll.py
2787             theR,theH,Parameters = ParseParameters(theR, theH)
2788             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2789             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2790             anObj.SetParameters(Parameters)
2791             self._autoPublish(anObj, theName, "cylinder")
2792             return anObj
2793
2794         ## Create a sphere with given center and radius.
2795         #  @param thePnt Sphere center.
2796         #  @param theR Sphere radius.
2797         #  @param theName Object name; when specified, this parameter is used
2798         #         for result publication in the study. Otherwise, if automatic
2799         #         publication is switched on, default value is used for result name.
2800         #
2801         #  @return New GEOM.GEOM_Object, containing the created sphere.
2802         #
2803         #  @ref tui_creation_sphere "Example"
2804         def MakeSpherePntR(self, thePnt, theR, theName=None):
2805             """
2806             Create a sphere with given center and radius.
2807
2808             Parameters:
2809                 thePnt Sphere center.
2810                 theR Sphere radius.
2811                 theName Object name; when specified, this parameter is used
2812                         for result publication in the study. Otherwise, if automatic
2813                         publication is switched on, default value is used for result name.
2814
2815             Returns:    
2816                 New GEOM.GEOM_Object, containing the created sphere.            
2817             """
2818             # Example: see GEOM_TestAll.py
2819             theR,Parameters = ParseParameters(theR)
2820             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2821             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2822             anObj.SetParameters(Parameters)
2823             self._autoPublish(anObj, theName, "sphere")
2824             return anObj
2825
2826         ## Create a sphere with given center and radius.
2827         #  @param x,y,z Coordinates of sphere center.
2828         #  @param theR Sphere radius.
2829         #  @param theName Object name; when specified, this parameter is used
2830         #         for result publication in the study. Otherwise, if automatic
2831         #         publication is switched on, default value is used for result name.
2832         #
2833         #  @return New GEOM.GEOM_Object, containing the created sphere.
2834         #
2835         #  @ref tui_creation_sphere "Example"
2836         def MakeSphere(self, x, y, z, theR, theName=None):
2837             """
2838             Create a sphere with given center and radius.
2839
2840             Parameters: 
2841                 x,y,z Coordinates of sphere center.
2842                 theR Sphere radius.
2843                 theName Object name; when specified, this parameter is used
2844                         for result publication in the study. Otherwise, if automatic
2845                         publication is switched on, default value is used for result name.
2846
2847             Returns:
2848                 New GEOM.GEOM_Object, containing the created sphere.
2849             """
2850             # Example: see GEOM_TestAll.py
2851             point = self.MakeVertex(x, y, z)
2852             # note: auto-publishing is done in self.MakeSpherePntR()
2853             anObj = self.MakeSpherePntR(point, theR, theName)
2854             return anObj
2855
2856         ## Create a sphere with given radius at the origin of coordinate system.
2857         #  @param theR Sphere radius.
2858         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created sphere.
2863         #
2864         #  @ref tui_creation_sphere "Example"
2865         def MakeSphereR(self, theR, theName=None):
2866             """
2867             Create a sphere with given radius at the origin of coordinate system.
2868
2869             Parameters: 
2870                 theR Sphere radius.
2871                 theName Object name; when specified, this parameter is used
2872                         for result publication in the study. Otherwise, if automatic
2873                         publication is switched on, default value is used for result name.
2874
2875             Returns:
2876                 New GEOM.GEOM_Object, containing the created sphere.            
2877             """
2878             # Example: see GEOM_TestAll.py
2879             theR,Parameters = ParseParameters(theR)
2880             anObj = self.PrimOp.MakeSphereR(theR)
2881             RaiseIfFailed("MakeSphereR", self.PrimOp)
2882             anObj.SetParameters(Parameters)
2883             self._autoPublish(anObj, theName, "sphere")
2884             return anObj
2885
2886         ## Create a cone with given base point, axis, height and radiuses.
2887         #  @param thePnt Central point of the first cone base.
2888         #  @param theAxis Cone axis.
2889         #  @param theR1 Radius of the first cone base.
2890         #  @param theR2 Radius of the second cone base.
2891         #    \note If both radiuses are non-zero, the cone will be truncated.
2892         #    \note If the radiuses are equal, a cylinder will be created instead.
2893         #  @param theH Cone height.
2894         #  @param theName Object name; when specified, this parameter is used
2895         #         for result publication in the study. Otherwise, if automatic
2896         #         publication is switched on, default value is used for result name.
2897         #
2898         #  @return New GEOM.GEOM_Object, containing the created cone.
2899         #
2900         #  @ref tui_creation_cone "Example"
2901         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2902             """
2903             Create a cone with given base point, axis, height and radiuses.
2904
2905             Parameters: 
2906                 thePnt Central point of the first cone base.
2907                 theAxis Cone axis.
2908                 theR1 Radius of the first cone base.
2909                 theR2 Radius of the second cone base.
2910                 theH Cone height.
2911                 theName Object name; when specified, this parameter is used
2912                         for result publication in the study. Otherwise, if automatic
2913                         publication is switched on, default value is used for result name.
2914
2915             Note:
2916                 If both radiuses are non-zero, the cone will be truncated.
2917                 If the radiuses are equal, a cylinder will be created instead.
2918
2919             Returns:
2920                 New GEOM.GEOM_Object, containing the created cone.
2921             """
2922             # Example: see GEOM_TestAll.py
2923             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2924             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2925             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2926             anObj.SetParameters(Parameters)
2927             self._autoPublish(anObj, theName, "cone")
2928             return anObj
2929
2930         ## Create a cone with given height and radiuses at
2931         #  the origin of coordinate system. Axis of the cone will
2932         #  be collinear to the OZ axis of the coordinate system.
2933         #  @param theR1 Radius of the first cone base.
2934         #  @param theR2 Radius of the second cone base.
2935         #    \note If both radiuses are non-zero, the cone will be truncated.
2936         #    \note If the radiuses are equal, a cylinder will be created instead.
2937         #  @param theH Cone height.
2938         #  @param theName Object name; when specified, this parameter is used
2939         #         for result publication in the study. Otherwise, if automatic
2940         #         publication is switched on, default value is used for result name.
2941         #
2942         #  @return New GEOM.GEOM_Object, containing the created cone.
2943         #
2944         #  @ref tui_creation_cone "Example"
2945         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
2946             """
2947             Create a cone with given height and radiuses at
2948             the origin of coordinate system. Axis of the cone will
2949             be collinear to the OZ axis of the coordinate system.
2950
2951             Parameters: 
2952                 theR1 Radius of the first cone base.
2953                 theR2 Radius of the second cone base.
2954                 theH Cone height.
2955                 theName Object name; when specified, this parameter is used
2956                         for result publication in the study. Otherwise, if automatic
2957                         publication is switched on, default value is used for result name.
2958
2959             Note:
2960                 If both radiuses are non-zero, the cone will be truncated.
2961                 If the radiuses are equal, a cylinder will be created instead.
2962
2963             Returns:
2964                 New GEOM.GEOM_Object, containing the created cone.
2965             """
2966             # Example: see GEOM_TestAll.py
2967             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2968             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
2969             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
2970             anObj.SetParameters(Parameters)
2971             self._autoPublish(anObj, theName, "cone")
2972             return anObj
2973
2974         ## Create a torus with given center, normal vector and radiuses.
2975         #  @param thePnt Torus central point.
2976         #  @param theVec Torus axis of symmetry.
2977         #  @param theRMajor Torus major radius.
2978         #  @param theRMinor Torus minor radius.
2979         #  @param theName Object name; when specified, this parameter is used
2980         #         for result publication in the study. Otherwise, if automatic
2981         #         publication is switched on, default value is used for result name.
2982         #
2983         #  @return New GEOM.GEOM_Object, containing the created torus.
2984         #
2985         #  @ref tui_creation_torus "Example"
2986         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
2987             """
2988             Create a torus with given center, normal vector and radiuses.
2989
2990             Parameters: 
2991                 thePnt Torus central point.
2992                 theVec Torus axis of symmetry.
2993                 theRMajor Torus major radius.
2994                 theRMinor Torus minor radius.
2995                 theName Object name; when specified, this parameter is used
2996                         for result publication in the study. Otherwise, if automatic
2997                         publication is switched on, default value is used for result name.
2998
2999            Returns:
3000                 New GEOM.GEOM_Object, containing the created torus.
3001             """
3002             # Example: see GEOM_TestAll.py
3003             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3004             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3005             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3006             anObj.SetParameters(Parameters)
3007             self._autoPublish(anObj, theName, "torus")
3008             return anObj
3009
3010         ## Create a torus with given radiuses at the origin of coordinate system.
3011         #  @param theRMajor Torus major radius.
3012         #  @param theRMinor Torus minor radius.
3013         #  @param theName Object name; when specified, this parameter is used
3014         #         for result publication in the study. Otherwise, if automatic
3015         #         publication is switched on, default value is used for result name.
3016         #
3017         #  @return New GEOM.GEOM_Object, containing the created torus.
3018         #
3019         #  @ref tui_creation_torus "Example"
3020         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3021             """
3022            Create a torus with given radiuses at the origin of coordinate system.
3023
3024            Parameters: 
3025                 theRMajor Torus major radius.
3026                 theRMinor Torus minor radius.
3027                 theName Object name; when specified, this parameter is used
3028                         for result publication in the study. Otherwise, if automatic
3029                         publication is switched on, default value is used for result name.
3030
3031            Returns:
3032                 New GEOM.GEOM_Object, containing the created torus.            
3033             """
3034             # Example: see GEOM_TestAll.py
3035             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3036             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3037             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3038             anObj.SetParameters(Parameters)
3039             self._autoPublish(anObj, theName, "torus")
3040             return anObj
3041
3042         # end of l3_3d_primitives
3043         ## @}
3044
3045         ## @addtogroup l3_complex
3046         ## @{
3047
3048         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3049         #  @param theBase Base shape to be extruded.
3050         #  @param thePoint1 First end of extrusion vector.
3051         #  @param thePoint2 Second end of extrusion vector.
3052         #  @param theScaleFactor Use it to make prism with scaled second base.
3053         #                        Nagative value means not scaled second base.
3054         #  @param theName Object name; when specified, this parameter is used
3055         #         for result publication in the study. Otherwise, if automatic
3056         #         publication is switched on, default value is used for result name.
3057         #
3058         #  @return New GEOM.GEOM_Object, containing the created prism.
3059         #
3060         #  @ref tui_creation_prism "Example"
3061         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3062             """
3063             Create a shape by extrusion of the base shape along a vector, defined by two points.
3064
3065             Parameters: 
3066                 theBase Base shape to be extruded.
3067                 thePoint1 First end of extrusion vector.
3068                 thePoint2 Second end of extrusion vector.
3069                 theScaleFactor Use it to make prism with scaled second base.
3070                                Nagative value means not scaled second base.
3071                 theName Object name; when specified, this parameter is used
3072                         for result publication in the study. Otherwise, if automatic
3073                         publication is switched on, default value is used for result name.
3074
3075             Returns:
3076                 New GEOM.GEOM_Object, containing the created prism.
3077             """
3078             # Example: see GEOM_TestAll.py
3079             anObj = None
3080             Parameters = ""
3081             if theScaleFactor > 0:
3082                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3083                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3084             else:
3085                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3086             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3087             anObj.SetParameters(Parameters)
3088             self._autoPublish(anObj, theName, "prism")
3089             return anObj
3090
3091         ## Create a shape by extrusion of the base shape along a
3092         #  vector, defined by two points, in 2 Ways (forward/backward).
3093         #  @param theBase Base shape to be extruded.
3094         #  @param thePoint1 First end of extrusion vector.
3095         #  @param thePoint2 Second end of extrusion vector.
3096         #  @param theName Object name; when specified, this parameter is used
3097         #         for result publication in the study. Otherwise, if automatic
3098         #         publication is switched on, default value is used for result name.
3099         #
3100         #  @return New GEOM.GEOM_Object, containing the created prism.
3101         #
3102         #  @ref tui_creation_prism "Example"
3103         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3104             """
3105             Create a shape by extrusion of the base shape along a
3106             vector, defined by two points, in 2 Ways (forward/backward).
3107
3108             Parameters: 
3109                 theBase Base shape to be extruded.
3110                 thePoint1 First end of extrusion vector.
3111                 thePoint2 Second end of extrusion vector.
3112                 theName Object name; when specified, this parameter is used
3113                         for result publication in the study. Otherwise, if automatic
3114                         publication is switched on, default value is used for result name.
3115
3116             Returns:
3117                 New GEOM.GEOM_Object, containing the created prism.
3118             """
3119             # Example: see GEOM_TestAll.py
3120             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3121             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3122             self._autoPublish(anObj, theName, "prism")
3123             return anObj
3124
3125         ## Create a shape by extrusion of the base shape along the vector,
3126         #  i.e. all the space, transfixed by the base shape during its translation
3127         #  along the vector on the given distance.
3128         #  @param theBase Base shape to be extruded.
3129         #  @param theVec Direction of extrusion.
3130         #  @param theH Prism dimension along theVec.
3131         #  @param theScaleFactor Use it to make prism with scaled second base.
3132         #                        Negative value means not scaled second base.
3133         #  @param theName Object name; when specified, this parameter is used
3134         #         for result publication in the study. Otherwise, if automatic
3135         #         publication is switched on, default value is used for result name.
3136         #
3137         #  @return New GEOM.GEOM_Object, containing the created prism.
3138         #
3139         #  @ref tui_creation_prism "Example"
3140         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3141             """
3142             Create a shape by extrusion of the base shape along the vector,
3143             i.e. all the space, transfixed by the base shape during its translation
3144             along the vector on the given distance.
3145
3146             Parameters: 
3147                 theBase Base shape to be extruded.
3148                 theVec Direction of extrusion.
3149                 theH Prism dimension along theVec.
3150                 theScaleFactor Use it to make prism with scaled second base.
3151                                Negative value means not scaled second base.
3152                 theName Object name; when specified, this parameter is used
3153                         for result publication in the study. Otherwise, if automatic
3154                         publication is switched on, default value is used for result name.
3155
3156             Returns:
3157                 New GEOM.GEOM_Object, containing the created prism.
3158             """
3159             # Example: see GEOM_TestAll.py
3160             anObj = None
3161             Parameters = ""
3162             if theScaleFactor > 0:
3163                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3164                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3165             else:
3166                 theH,Parameters = ParseParameters(theH)
3167                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3168             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3169             anObj.SetParameters(Parameters)
3170             self._autoPublish(anObj, theName, "prism")
3171             return anObj
3172
3173         ## Create a shape by extrusion of the base shape along the vector,
3174         #  i.e. all the space, transfixed by the base shape during its translation
3175         #  along the vector on the given distance in 2 Ways (forward/backward).
3176         #  @param theBase Base shape to be extruded.
3177         #  @param theVec Direction of extrusion.
3178         #  @param theH Prism dimension along theVec in forward direction.
3179         #  @param theName Object name; when specified, this parameter is used
3180         #         for result publication in the study. Otherwise, if automatic
3181         #         publication is switched on, default value is used for result name.
3182         #
3183         #  @return New GEOM.GEOM_Object, containing the created prism.
3184         #
3185         #  @ref tui_creation_prism "Example"
3186         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
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
3192             Parameters:
3193                 theBase Base shape to be extruded.
3194                 theVec Direction of extrusion.
3195                 theH Prism dimension along theVec in forward direction.
3196                 theName Object name; when specified, this parameter is used
3197                         for result publication in the study. Otherwise, if automatic
3198                         publication is switched on, default value is used for result name.
3199
3200             Returns:
3201                 New GEOM.GEOM_Object, containing the created prism.
3202             """
3203             # Example: see GEOM_TestAll.py
3204             theH,Parameters = ParseParameters(theH)
3205             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3206             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3207             anObj.SetParameters(Parameters)
3208             self._autoPublish(anObj, theName, "prism")
3209             return anObj
3210
3211         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3212         #  @param theBase Base shape to be extruded.
3213         #  @param theDX, theDY, theDZ Directions of extrusion.
3214         #  @param theScaleFactor Use it to make prism with scaled second base.
3215         #                        Nagative value means not scaled second base.
3216         #  @param theName Object name; when specified, this parameter is used
3217         #         for result publication in the study. Otherwise, if automatic
3218         #         publication is switched on, default value is used for result name.
3219         #
3220         #  @return New GEOM.GEOM_Object, containing the created prism.
3221         #
3222         #  @ref tui_creation_prism "Example"
3223         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3224             """
3225             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3226
3227             Parameters:
3228                 theBase Base shape to be extruded.
3229                 theDX, theDY, theDZ Directions of extrusion.
3230                 theScaleFactor Use it to make prism with scaled second base.
3231                                Nagative value means not scaled second base.
3232                 theName Object name; when specified, this parameter is used
3233                         for result publication in the study. Otherwise, if automatic
3234                         publication is switched on, default value is used for result name.
3235
3236             Returns: 
3237                 New GEOM.GEOM_Object, containing the created prism.
3238             """
3239             # Example: see GEOM_TestAll.py
3240             anObj = None
3241             Parameters = ""
3242             if theScaleFactor > 0:
3243                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3244                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3245             else:
3246                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3247                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3248             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3249             anObj.SetParameters(Parameters)
3250             self._autoPublish(anObj, theName, "prism")
3251             return anObj
3252
3253         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3254         #  i.e. all the space, transfixed by the base shape during its translation
3255         #  along the vector on the given distance in 2 Ways (forward/backward).
3256         #  @param theBase Base shape to be extruded.
3257         #  @param theDX, theDY, theDZ Directions of extrusion.
3258         #  @param theName Object name; when specified, this parameter is used
3259         #         for result publication in the study. Otherwise, if automatic
3260         #         publication is switched on, default value is used for result name.
3261         #
3262         #  @return New GEOM.GEOM_Object, containing the created prism.
3263         #
3264         #  @ref tui_creation_prism "Example"
3265         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3266             """
3267             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3268             i.e. all the space, transfixed by the base shape during its translation
3269             along the vector on the given distance in 2 Ways (forward/backward).
3270
3271             Parameters:
3272                 theBase Base shape to be extruded.
3273                 theDX, theDY, theDZ Directions of extrusion.
3274                 theName Object name; when specified, this parameter is used
3275                         for result publication in the study. Otherwise, if automatic
3276                         publication is switched on, default value is used for result name.
3277
3278             Returns:
3279                 New GEOM.GEOM_Object, containing the created prism.
3280             """
3281             # Example: see GEOM_TestAll.py
3282             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3283             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3284             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3285             anObj.SetParameters(Parameters)
3286             self._autoPublish(anObj, theName, "prism")
3287             return anObj
3288
3289         ## Create a shape by revolution of the base shape around the axis
3290         #  on the given angle, i.e. all the space, transfixed by the base
3291         #  shape during its rotation around the axis on the given angle.
3292         #  @param theBase Base shape to be rotated.
3293         #  @param theAxis Rotation axis.
3294         #  @param theAngle Rotation angle in radians.
3295         #  @param theName Object name; when specified, this parameter is used
3296         #         for result publication in the study. Otherwise, if automatic
3297         #         publication is switched on, default value is used for result name.
3298         #
3299         #  @return New GEOM.GEOM_Object, containing the created revolution.
3300         #
3301         #  @ref tui_creation_revolution "Example"
3302         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
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
3308             Parameters:
3309                 theBase Base shape to be rotated.
3310                 theAxis Rotation axis.
3311                 theAngle Rotation angle in radians.
3312                 theName Object name; when specified, this parameter is used
3313                         for result publication in the study. Otherwise, if automatic
3314                         publication is switched on, default value is used for result name.
3315
3316             Returns: 
3317                 New GEOM.GEOM_Object, containing the created revolution.
3318             """
3319             # Example: see GEOM_TestAll.py
3320             theAngle,Parameters = ParseParameters(theAngle)
3321             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3322             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3323             anObj.SetParameters(Parameters)
3324             self._autoPublish(anObj, theName, "revolution")
3325             return anObj
3326
3327         ## Create a shape by revolution of the base shape around the axis
3328         #  on the given angle, i.e. all the space, transfixed by the base
3329         #  shape during its rotation around the axis on the given angle in
3330         #  both directions (forward/backward)
3331         #  @param theBase Base shape to be rotated.
3332         #  @param theAxis Rotation axis.
3333         #  @param theAngle Rotation angle in radians.
3334         #  @param theName Object name; when specified, this parameter is used
3335         #         for result publication in the study. Otherwise, if automatic
3336         #         publication is switched on, default value is used for result name.
3337         #
3338         #  @return New GEOM.GEOM_Object, containing the created revolution.
3339         #
3340         #  @ref tui_creation_revolution "Example"
3341         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3342             """
3343             Create a shape by revolution of the base shape around the axis
3344             on the given angle, i.e. all the space, transfixed by the base
3345             shape during its rotation around the axis on the given angle in
3346             both directions (forward/backward).
3347
3348             Parameters:
3349                 theBase Base shape to be rotated.
3350                 theAxis Rotation axis.
3351                 theAngle Rotation angle in radians.
3352                 theName Object name; when specified, this parameter is used
3353                         for result publication in the study. Otherwise, if automatic
3354                         publication is switched on, default value is used for result name.
3355
3356             Returns: 
3357                 New GEOM.GEOM_Object, containing the created revolution.
3358             """
3359             theAngle,Parameters = ParseParameters(theAngle)
3360             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3361             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3362             anObj.SetParameters(Parameters)
3363             self._autoPublish(anObj, theName, "revolution")
3364             return anObj
3365
3366         ## Create a filling from the given compound of contours.
3367         #  @param theShape the compound of contours
3368         #  @param theMinDeg a minimal degree of BSpline surface to create
3369         #  @param theMaxDeg a maximal degree of BSpline surface to create
3370         #  @param theTol2D a 2d tolerance to be reached
3371         #  @param theTol3D a 3d tolerance to be reached
3372         #  @param theNbIter a number of iteration of approximation algorithm
3373         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3374         #  @param isApprox if True, BSpline curves are generated in the process
3375         #                  of surface construction. By default it is False, that means
3376         #                  the surface is created using given curves. The usage of
3377         #                  Approximation makes the algorithm work slower, but allows
3378         #                  building the surface for rather complex cases.
3379         #  @param theName Object name; when specified, this parameter is used
3380         #         for result publication in the study. Otherwise, if automatic
3381         #         publication is switched on, default value is used for result name.
3382         #
3383         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3384         #
3385         #  @ref tui_creation_filling "Example"
3386         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3387                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3388             """
3389             Create a filling from the given compound of contours.
3390
3391             Parameters:
3392                 theShape the compound of contours
3393                 theMinDeg a minimal degree of BSpline surface to create
3394                 theMaxDeg a maximal degree of BSpline surface to create
3395                 theTol2D a 2d tolerance to be reached
3396                 theTol3D a 3d tolerance to be reached
3397                 theNbIter a number of iteration of approximation algorithm
3398                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3399                 isApprox if True, BSpline curves are generated in the process
3400                          of surface construction. By default it is False, that means
3401                          the surface is created using given curves. The usage of
3402                          Approximation makes the algorithm work slower, but allows
3403                          building the surface for rather complex cases
3404                 theName Object name; when specified, this parameter is used
3405                         for result publication in the study. Otherwise, if automatic
3406                         publication is switched on, default value is used for result name.
3407
3408             Returns: 
3409                 New GEOM.GEOM_Object, containing the created filling surface.
3410
3411             Example of usage:
3412                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3413             """
3414             # Example: see GEOM_TestAll.py
3415             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3416             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3417                                             theTol2D, theTol3D, theNbIter,
3418                                             theMethod, isApprox)
3419             RaiseIfFailed("MakeFilling", self.PrimOp)
3420             anObj.SetParameters(Parameters)
3421             self._autoPublish(anObj, theName, "filling")
3422             return anObj
3423
3424
3425         ## Create a filling from the given compound of contours.
3426         #  This method corresponds to MakeFilling with isApprox=True
3427         #  @param theShape the compound of contours
3428         #  @param theMinDeg a minimal degree of BSpline surface to create
3429         #  @param theMaxDeg a maximal degree of BSpline surface to create
3430         #  @param theTol3D a 3d tolerance to be reached
3431         #  @param theName Object name; when specified, this parameter is used
3432         #         for result publication in the study. Otherwise, if automatic
3433         #         publication is switched on, default value is used for result name.
3434         #
3435         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3436         #
3437         #  @ref tui_creation_filling "Example"
3438         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3439             """
3440             Create a filling from the given compound of contours.
3441             This method corresponds to MakeFilling with isApprox=True
3442
3443             Parameters:
3444                 theShape the compound of contours
3445                 theMinDeg a minimal degree of BSpline surface to create
3446                 theMaxDeg a maximal degree of BSpline surface to create
3447                 theTol3D a 3d tolerance to be reached
3448                 theName Object name; when specified, this parameter is used
3449                         for result publication in the study. Otherwise, if automatic
3450                         publication is switched on, default value is used for result name.
3451
3452             Returns: 
3453                 New GEOM.GEOM_Object, containing the created filling surface.
3454
3455             Example of usage:
3456                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3457             """
3458             # Example: see GEOM_TestAll.py
3459             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3460             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3461                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3462             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3463             anObj.SetParameters(Parameters)
3464             self._autoPublish(anObj, theName, "filling")
3465             return anObj
3466
3467         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3468         #  @param theSeqSections - set of specified sections.
3469         #  @param theModeSolid - mode defining building solid or shell
3470         #  @param thePreci - precision 3D used for smoothing
3471         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3472         #  @param theName Object name; when specified, this parameter is used
3473         #         for result publication in the study. Otherwise, if automatic
3474         #         publication is switched on, default value is used for result name.
3475         #
3476         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3477         #
3478         #  @ref swig_todo "Example"
3479         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3480             """
3481             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3482
3483             Parameters:
3484                 theSeqSections - set of specified sections.
3485                 theModeSolid - mode defining building solid or shell
3486                 thePreci - precision 3D used for smoothing
3487                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3488                 theName Object name; when specified, this parameter is used
3489                         for result publication in the study. Otherwise, if automatic
3490                         publication is switched on, default value is used for result name.
3491
3492             Returns:
3493                 New GEOM.GEOM_Object, containing the created shell or solid.
3494             """
3495             # Example: see GEOM_TestAll.py
3496             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3497             RaiseIfFailed("MakeThruSections", self.PrimOp)
3498             self._autoPublish(anObj, theName, "filling")
3499             return anObj
3500
3501         ## Create a shape by extrusion of the base shape along
3502         #  the path shape. The path shape can be a wire or an edge.
3503         #  @param theBase Base shape to be extruded.
3504         #  @param thePath Path shape to extrude the base shape along it.
3505         #  @param theName Object name; when specified, this parameter is used
3506         #         for result publication in the study. Otherwise, if automatic
3507         #         publication is switched on, default value is used for result name.
3508         #
3509         #  @return New GEOM.GEOM_Object, containing the created pipe.
3510         #
3511         #  @ref tui_creation_pipe "Example"
3512         def MakePipe(self, theBase, thePath, theName=None):
3513             """
3514             Create a shape by extrusion of the base shape along
3515             the path shape. The path shape can be a wire or an edge.
3516
3517             Parameters:
3518                 theBase Base shape to be extruded.
3519                 thePath Path shape to extrude the base shape along it.
3520                 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             Returns:
3525                 New GEOM.GEOM_Object, containing the created pipe.
3526             """
3527             # Example: see GEOM_TestAll.py
3528             anObj = self.PrimOp.MakePipe(theBase, thePath)
3529             RaiseIfFailed("MakePipe", self.PrimOp)
3530             self._autoPublish(anObj, theName, "pipe")
3531             return anObj
3532
3533         ## Create a shape by extrusion of the profile shape along
3534         #  the path shape. The path shape can be a wire or an edge.
3535         #  the several profiles can be specified in the several locations of path.
3536         #  @param theSeqBases - list of  Bases shape to be extruded.
3537         #  @param theLocations - list of locations on the path corresponding
3538         #                        specified list of the Bases shapes. Number of locations
3539         #                        should be equal to number of bases or list of locations can be empty.
3540         #  @param thePath - Path shape to extrude the base shape along it.
3541         #  @param theWithContact - the mode defining that the section is translated to be in
3542         #                          contact with the spine.
3543         #  @param theWithCorrection - defining that the section is rotated to be
3544         #                             orthogonal to the spine tangent in the correspondent point
3545         #  @param theName Object name; when specified, this parameter is used
3546         #         for result publication in the study. Otherwise, if automatic
3547         #         publication is switched on, default value is used for result name.
3548         #
3549         #  @return New GEOM.GEOM_Object, containing the created pipe.
3550         #
3551         #  @ref tui_creation_pipe_with_diff_sec "Example"
3552         def MakePipeWithDifferentSections(self, theSeqBases,
3553                                           theLocations, thePath,
3554                                           theWithContact, theWithCorrection, theName=None):
3555             """
3556             Create a shape by extrusion of the profile shape along
3557             the path shape. The path shape can be a wire or an edge.
3558             the several profiles can be specified in the several locations of path.
3559
3560             Parameters:
3561                 theSeqBases - list of  Bases shape to be extruded.
3562                 theLocations - list of locations on the path corresponding
3563                                specified list of the Bases shapes. Number of locations
3564                                should be equal to number of bases or list of locations can be empty.
3565                 thePath - Path shape to extrude the base shape along it.
3566                 theWithContact - the mode defining that the section is translated to be in
3567                                  contact with the spine(0/1)
3568                 theWithCorrection - defining that the section is rotated to be
3569                                     orthogonal to the spine tangent in the correspondent point (0/1)
3570                 theName Object name; when specified, this parameter is used
3571                         for result publication in the study. Otherwise, if automatic
3572                         publication is switched on, default value is used for result name.
3573
3574             Returns:
3575                 New GEOM.GEOM_Object, containing the created pipe.
3576             """
3577             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3578                                                               theLocations, thePath,
3579                                                               theWithContact, theWithCorrection)
3580             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3581             self._autoPublish(anObj, theName, "pipe")
3582             return anObj
3583
3584         ## Create a shape by extrusion of the profile shape along
3585         #  the path shape. The path shape can be a wire or a edge.
3586         #  the several profiles can be specified in the several locations of path.
3587         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3588         #                       shell or face. If number of faces in neighbour sections
3589         #                       aren't coincided result solid between such sections will
3590         #                       be created using external boundaries of this shells.
3591         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3592         #                          This list is used for searching correspondences between
3593         #                          faces in the sections. Size of this list must be equal
3594         #                          to size of list of base shapes.
3595         #  @param theLocations - list of locations on the path corresponding
3596         #                        specified list of the Bases shapes. Number of locations
3597         #                        should be equal to number of bases. First and last
3598         #                        locations must be coincided with first and last vertexes
3599         #                        of path correspondingly.
3600         #  @param thePath - Path shape to extrude the base shape along it.
3601         #  @param theWithContact - the mode defining that the section is translated to be in
3602         #                          contact with the spine.
3603         #  @param theWithCorrection - defining that the section is rotated to be
3604         #                             orthogonal to the spine tangent in the correspondent point
3605         #  @param theName Object name; when specified, this parameter is used
3606         #         for result publication in the study. Otherwise, if automatic
3607         #         publication is switched on, default value is used for result name.
3608         #
3609         #  @return New GEOM.GEOM_Object, containing the created solids.
3610         #
3611         #  @ref tui_creation_pipe_with_shell_sec "Example"
3612         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3613                                       theLocations, thePath,
3614                                       theWithContact, theWithCorrection, theName=None):
3615             """
3616             Create a shape by extrusion of the profile shape along
3617             the path shape. The path shape can be a wire or a edge.
3618             the several profiles can be specified in the several locations of path.
3619
3620             Parameters:
3621                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3622                               shell or face. If number of faces in neighbour sections
3623                               aren't coincided result solid between such sections will
3624                               be created using external boundaries of this shells.
3625                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3626                                  This list is used for searching correspondences between
3627                                  faces in the sections. Size of this list must be equal
3628                                  to size of list of base shapes.
3629                 theLocations - list of locations on the path corresponding
3630                                specified list of the Bases shapes. Number of locations
3631                                should be equal to number of bases. First and last
3632                                locations must be coincided with first and last vertexes
3633                                of path correspondingly.
3634                 thePath - Path shape to extrude the base shape along it.
3635                 theWithContact - the mode defining that the section is translated to be in
3636                                  contact with the spine (0/1)
3637                 theWithCorrection - defining that the section is rotated to be
3638                                     orthogonal to the spine tangent in the correspondent point (0/1)
3639                 theName Object name; when specified, this parameter is used
3640                         for result publication in the study. Otherwise, if automatic
3641                         publication is switched on, default value is used for result name.
3642
3643             Returns:                           
3644                 New GEOM.GEOM_Object, containing the created solids.
3645             """
3646             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3647                                                           theLocations, thePath,
3648                                                           theWithContact, theWithCorrection)
3649             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3650             self._autoPublish(anObj, theName, "pipe")
3651             return anObj
3652
3653         ## Create a shape by extrusion of the profile shape along
3654         #  the path shape. This function is used only for debug pipe
3655         #  functionality - it is a version of function MakePipeWithShellSections()
3656         #  which give a possibility to recieve information about
3657         #  creating pipe between each pair of sections step by step.
3658         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3659                                              theLocations, thePath,
3660                                              theWithContact, theWithCorrection, theName=None):
3661             """
3662             Create a shape by extrusion of the profile shape along
3663             the path shape. This function is used only for debug pipe
3664             functionality - it is a version of previous function
3665             geompy.MakePipeWithShellSections() which give a possibility to
3666             recieve information about creating pipe between each pair of
3667             sections step by step.
3668             """
3669             res = []
3670             nbsect = len(theSeqBases)
3671             nbsubsect = len(theSeqSubBases)
3672             #print "nbsect = ",nbsect
3673             for i in range(1,nbsect):
3674                 #print "  i = ",i
3675                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3676                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3677                 tmpSeqSubBases = []
3678                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3679                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3680                                                               tmpLocations, thePath,
3681                                                               theWithContact, theWithCorrection)
3682                 if self.PrimOp.IsDone() == 0:
3683                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3684                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3685                     break
3686                 else:
3687                     print "Pipe between ",i," and ",i+1," sections is OK"
3688                     res.append(anObj)
3689                     pass
3690                 pass
3691
3692             resc = self.MakeCompound(res)
3693             #resc = self.MakeSewing(res, 0.001)
3694             #print "resc: ",resc
3695             self._autoPublish(resc, theName, "pipe")
3696             return resc
3697
3698         ## Create solids between given sections
3699         #  @param theSeqBases - list of sections (shell or face).
3700         #  @param theLocations - list of corresponding vertexes
3701         #  @param theName Object name; when specified, this parameter is used
3702         #         for result publication in the study. Otherwise, if automatic
3703         #         publication is switched on, default value is used for result name.
3704         #
3705         #  @return New GEOM.GEOM_Object, containing the created solids.
3706         #
3707         #  @ref tui_creation_pipe_without_path "Example"
3708         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3709             """
3710             Create solids between given sections
3711
3712             Parameters:
3713                 theSeqBases - list of sections (shell or face).
3714                 theLocations - list of corresponding vertexes
3715                 theName Object name; when specified, this parameter is used
3716                         for result publication in the study. Otherwise, if automatic
3717                         publication is switched on, default value is used for result name.
3718
3719             Returns:
3720                 New GEOM.GEOM_Object, containing the created solids.
3721             """
3722             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3723             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3724             self._autoPublish(anObj, theName, "pipe")
3725             return anObj
3726
3727         ## Create a shape by extrusion of the base shape along
3728         #  the path shape with constant bi-normal direction along the given vector.
3729         #  The path shape can be a wire or an edge.
3730         #  @param theBase Base shape to be extruded.
3731         #  @param thePath Path shape to extrude the base shape along it.
3732         #  @param theVec Vector defines a constant binormal direction to keep the
3733         #                same angle beetween the direction and the sections
3734         #                along the sweep surface.
3735         #  @param theName Object name; when specified, this parameter is used
3736         #         for result publication in the study. Otherwise, if automatic
3737         #         publication is switched on, default value is used for result name.
3738         #
3739         #  @return New GEOM.GEOM_Object, containing the created pipe.
3740         #
3741         #  @ref tui_creation_pipe "Example"
3742         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3743             """
3744             Create a shape by extrusion of the base shape along
3745             the path shape with constant bi-normal direction along the given vector.
3746             The path shape can be a wire or an edge.
3747
3748             Parameters:
3749                 theBase Base shape to be extruded.
3750                 thePath Path shape to extrude the base shape along it.
3751                 theVec Vector defines a constant binormal direction to keep the
3752                        same angle beetween the direction and the sections
3753                        along the sweep surface.
3754                 theName Object name; when specified, this parameter is used
3755                         for result publication in the study. Otherwise, if automatic
3756                         publication is switched on, default value is used for result name.
3757
3758             Returns:              
3759                 New GEOM.GEOM_Object, containing the created pipe.
3760             """
3761             # Example: see GEOM_TestAll.py
3762             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3763             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3764             self._autoPublish(anObj, theName, "pipe")
3765             return anObj
3766
3767         ## Build a middle path of a pipe-like shape.
3768         #  The path shape can be a wire or an edge.
3769         #  @param theShape It can be closed or unclosed pipe-like shell
3770         #                  or a pipe-like solid.
3771         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3772         #                            should be wires or faces of theShape.
3773         #  @param theName Object name; when specified, this parameter is used
3774         #         for result publication in the study. Otherwise, if automatic
3775         #         publication is switched on, default value is used for result name.
3776         #
3777         #  @note It is not assumed that exact or approximate copy of theShape
3778         #        can be obtained by applying existing Pipe operation on the
3779         #        resulting "Path" wire taking theBase1 as the base - it is not
3780         #        always possible; though in some particular cases it might work
3781         #        it is not guaranteed. Thus, RestorePath function should not be
3782         #        considered as an exact reverse operation of the Pipe.
3783         #
3784         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3785         #                                source pipe's "path".
3786         #
3787         #  @ref tui_creation_pipe_path "Example"
3788         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3789             """
3790             Build a middle path of a pipe-like shape.
3791             The path shape can be a wire or an edge.
3792
3793             Parameters:
3794                 theShape It can be closed or unclosed pipe-like shell
3795                          or a pipe-like solid.
3796                 theBase1, theBase2 Two bases of the supposed pipe. This
3797                                    should be wires or faces of theShape.
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_Object, containing an edge or wire that represent
3804                                  source pipe's path.
3805             """
3806             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3807             RaiseIfFailed("RestorePath", self.PrimOp)
3808             self._autoPublish(anObj, theName, "path")
3809             return anObj
3810
3811         ## Build a middle path of a pipe-like shape.
3812         #  The path shape can be a wire or an edge.
3813         #  @param theShape It can be closed or unclosed pipe-like shell
3814         #                  or a pipe-like solid.
3815         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3816         #                                should be lists of edges of theShape.
3817         #  @param theName Object name; when specified, this parameter is used
3818         #         for result publication in the study. Otherwise, if automatic
3819         #         publication is switched on, default value is used for result name.
3820         #
3821         #  @note It is not assumed that exact or approximate copy of theShape
3822         #        can be obtained by applying existing Pipe operation on the
3823         #        resulting "Path" wire taking theBase1 as the base - it is not
3824         #        always possible; though in some particular cases it might work
3825         #        it is not guaranteed. Thus, RestorePath function should not be
3826         #        considered as an exact reverse operation of the Pipe.
3827         #
3828         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3829         #                                source pipe's "path".
3830         #
3831         #  @ref tui_creation_pipe_path "Example"
3832         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3833             """
3834             Build a middle path of a pipe-like shape.
3835             The path shape can be a wire or an edge.
3836
3837             Parameters:
3838                 theShape It can be closed or unclosed pipe-like shell
3839                          or a pipe-like solid.
3840                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3841                                        should be lists of edges of theShape.
3842                 theName Object name; when specified, this parameter is used
3843                         for result publication in the study. Otherwise, if automatic
3844                         publication is switched on, default value is used for result name.
3845
3846             Returns:
3847                 New GEOM_Object, containing an edge or wire that represent
3848                                  source pipe's path.
3849             """
3850             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3851             RaiseIfFailed("RestorePath", self.PrimOp)
3852             self._autoPublish(anObj, theName, "path")
3853             return anObj
3854
3855         # end of l3_complex
3856         ## @}
3857
3858         ## @addtogroup l3_advanced
3859         ## @{
3860
3861         ## Create a linear edge with specified ends.
3862         #  @param thePnt1 Point for the first end of edge.
3863         #  @param thePnt2 Point for the second end of edge.
3864         #  @param theName Object name; when specified, this parameter is used
3865         #         for result publication in the study. Otherwise, if automatic
3866         #         publication is switched on, default value is used for result name.
3867         #
3868         #  @return New GEOM.GEOM_Object, containing the created edge.
3869         #
3870         #  @ref tui_creation_edge "Example"
3871         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3872             """
3873             Create a linear edge with specified ends.
3874
3875             Parameters:
3876                 thePnt1 Point for the first end of edge.
3877                 thePnt2 Point for the second end of edge.
3878                 theName Object name; when specified, this parameter is used
3879                         for result publication in the study. Otherwise, if automatic
3880                         publication is switched on, default value is used for result name.
3881
3882             Returns:           
3883                 New GEOM.GEOM_Object, containing the created edge.
3884             """
3885             # Example: see GEOM_TestAll.py
3886             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
3887             RaiseIfFailed("MakeEdge", self.ShapesOp)
3888             self._autoPublish(anObj, theName, "edge")
3889             return anObj
3890
3891         ## Create a new edge, corresponding to the given length on the given curve.
3892         #  @param theRefCurve The referenced curve (edge).
3893         #  @param theLength Length on the referenced curve. It can be negative.
3894         #  @param theStartPoint Any point can be selected for it, the new edge will begin
3895         #                       at the end of \a theRefCurve, close to the selected point.
3896         #                       If None, start from the first point of \a theRefCurve.
3897         #  @param theName Object name; when specified, this parameter is used
3898         #         for result publication in the study. Otherwise, if automatic
3899         #         publication is switched on, default value is used for result name.
3900         #
3901         #  @return New GEOM.GEOM_Object, containing the created edge.
3902         #
3903         #  @ref tui_creation_edge "Example"
3904         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
3905             """
3906             Create a new edge, corresponding to the given length on the given curve.
3907
3908             Parameters:
3909                 theRefCurve The referenced curve (edge).
3910                 theLength Length on the referenced curve. It can be negative.
3911                 theStartPoint Any point can be selected for it, the new edge will begin
3912                               at the end of theRefCurve, close to the selected point.
3913                               If None, start from the first point of theRefCurve.
3914                 theName Object name; when specified, this parameter is used
3915                         for result publication in the study. Otherwise, if automatic
3916                         publication is switched on, default value is used for result name.
3917
3918             Returns:              
3919                 New GEOM.GEOM_Object, containing the created edge.
3920             """
3921             # Example: see GEOM_TestAll.py
3922             theLength, Parameters = ParseParameters(theLength)
3923             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
3924             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
3925             anObj.SetParameters(Parameters)
3926             self._autoPublish(anObj, theName, "edge")
3927             return anObj
3928
3929         ## Create an edge from specified wire.
3930         #  @param theWire source Wire
3931         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
3932         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
3933         #  @param theName Object name; when specified, this parameter is used
3934         #         for result publication in the study. Otherwise, if automatic
3935         #         publication is switched on, default value is used for result name.
3936         #
3937         #  @return New GEOM.GEOM_Object, containing the created edge.
3938         #
3939         #  @ref tui_creation_edge "Example"
3940         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
3941             """
3942             Create an edge from specified wire.
3943
3944             Parameters:
3945                 theWire source Wire
3946                 theLinearTolerance linear tolerance value (default = 1e-07)
3947                 theAngularTolerance angular tolerance value (default = 1e-12)
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.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
3957             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
3958             self._autoPublish(anObj, theName, "edge")
3959             return anObj
3960
3961         ## Create a wire from the set of edges and wires.
3962         #  @param theEdgesAndWires List of edges and/or wires.
3963         #  @param theTolerance Maximum distance between vertices, that will be merged.
3964         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
3965         #  @param theName Object name; when specified, this parameter is used
3966         #         for result publication in the study. Otherwise, if automatic
3967         #         publication is switched on, default value is used for result name.
3968         #
3969         #  @return New GEOM.GEOM_Object, containing the created wire.
3970         #
3971         #  @ref tui_creation_wire "Example"
3972         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
3973             """
3974             Create a wire from the set of edges and wires.
3975
3976             Parameters:
3977                 theEdgesAndWires List of edges and/or wires.
3978                 theTolerance Maximum distance between vertices, that will be merged.
3979                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
3980                 theName Object name; when specified, this parameter is used
3981                         for result publication in the study. Otherwise, if automatic
3982                         publication is switched on, default value is used for result name.
3983
3984             Returns:                    
3985                 New GEOM.GEOM_Object, containing the created wire.
3986             """
3987             # Example: see GEOM_TestAll.py
3988             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
3989             RaiseIfFailed("MakeWire", self.ShapesOp)
3990             self._autoPublish(anObj, theName, "wire")
3991             return anObj
3992
3993         ## Create a face on the given wire.
3994         #  @param theWire closed Wire or Edge to build the face on.
3995         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
3996         #                        If the tolerance of the obtained planar face is less
3997         #                        than 1e-06, this face will be returned, otherwise the
3998         #                        algorithm tries to build any suitable face on the given
3999         #                        wire and prints a warning message.
4000         #  @param theName Object name; when specified, this parameter is used
4001         #         for result publication in the study. Otherwise, if automatic
4002         #         publication is switched on, default value is used for result name.
4003         #
4004         #  @return New GEOM.GEOM_Object, containing the created face.
4005         #
4006         #  @ref tui_creation_face "Example"
4007         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4008             """
4009             Create a face on the given wire.
4010
4011             Parameters:
4012                 theWire closed Wire or Edge to build the face on.
4013                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4014                                If the tolerance of the obtained planar face is less
4015                                than 1e-06, this face will be returned, otherwise the
4016                                algorithm tries to build any suitable face on the given
4017                                wire and prints a warning message.
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 face.
4024             """
4025             # Example: see GEOM_TestAll.py
4026             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4027             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4028                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4029             else:
4030                 RaiseIfFailed("MakeFace", self.ShapesOp)
4031             self._autoPublish(anObj, theName, "face")
4032             return anObj
4033
4034         ## Create a face on the given wires set.
4035         #  @param theWires List of closed wires or edges to build the face on.
4036         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4037         #                        If the tolerance of the obtained planar face is less
4038         #                        than 1e-06, this face will be returned, otherwise the
4039         #                        algorithm tries to build any suitable face on the given
4040         #                        wire and prints a warning message.
4041         #  @param theName Object name; when specified, this parameter is used
4042         #         for result publication in the study. Otherwise, if automatic
4043         #         publication is switched on, default value is used for result name.
4044         #
4045         #  @return New GEOM.GEOM_Object, containing the created face.
4046         #
4047         #  @ref tui_creation_face "Example"
4048         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4049             """
4050             Create a face on the given wires set.
4051
4052             Parameters:
4053                 theWires List of closed wires or edges to build the face on.
4054                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4055                                If the tolerance of the obtained planar face is less
4056                                than 1e-06, this face will be returned, otherwise the
4057                                algorithm tries to build any suitable face on the given
4058                                wire and prints a warning message.
4059                 theName Object name; when specified, this parameter is used
4060                         for result publication in the study. Otherwise, if automatic
4061                         publication is switched on, default value is used for result name.
4062
4063             Returns: 
4064                 New GEOM.GEOM_Object, containing the created face.
4065             """
4066             # Example: see GEOM_TestAll.py
4067             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4068             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4069                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4070             else:
4071                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4072             self._autoPublish(anObj, theName, "face")
4073             return anObj
4074
4075         ## See MakeFaceWires() method for details.
4076         #
4077         #  @ref tui_creation_face "Example 1"
4078         #  \n @ref swig_MakeFaces  "Example 2"
4079         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4080             """
4081             See geompy.MakeFaceWires() method for details.
4082             """
4083             # Example: see GEOM_TestOthers.py
4084             # note: auto-publishing is done in self.MakeFaceWires()
4085             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4086             return anObj
4087
4088         ## Create a shell from the set of faces and shells.
4089         #  @param theFacesAndShells List of faces and/or shells.
4090         #  @param theName Object name; when specified, this parameter is used
4091         #         for result publication in the study. Otherwise, if automatic
4092         #         publication is switched on, default value is used for result name.
4093         #
4094         #  @return New GEOM.GEOM_Object, containing the created shell.
4095         #
4096         #  @ref tui_creation_shell "Example"
4097         def MakeShell(self, theFacesAndShells, theName=None):
4098             """
4099             Create a shell from the set of faces and shells.
4100
4101             Parameters:
4102                 theFacesAndShells List of faces and/or shells.
4103                 theName Object name; when specified, this parameter is used
4104                         for result publication in the study. Otherwise, if automatic
4105                         publication is switched on, default value is used for result name.
4106
4107             Returns:
4108                 New GEOM.GEOM_Object, containing the created shell.
4109             """
4110             # Example: see GEOM_TestAll.py
4111             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4112             RaiseIfFailed("MakeShell", self.ShapesOp)
4113             self._autoPublish(anObj, theName, "shell")
4114             return anObj
4115
4116         ## Create a solid, bounded by the given shells.
4117         #  @param theShells Sequence of bounding shells.
4118         #  @param theName Object name; when specified, this parameter is used
4119         #         for result publication in the study. Otherwise, if automatic
4120         #         publication is switched on, default value is used for result name.
4121         #
4122         #  @return New GEOM.GEOM_Object, containing the created solid.
4123         #
4124         #  @ref tui_creation_solid "Example"
4125         def MakeSolid(self, theShells, theName=None):
4126             """
4127             Create a solid, bounded by the given shells.
4128
4129             Parameters:
4130                 theShells Sequence of bounding shells.
4131                 theName Object name; when specified, this parameter is used
4132                         for result publication in the study. Otherwise, if automatic
4133                         publication is switched on, default value is used for result name.
4134
4135             Returns:
4136                 New GEOM.GEOM_Object, containing the created solid.
4137             """
4138             # Example: see GEOM_TestAll.py
4139             if len(theShells) == 1:
4140                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4141                 #if len(descr) > 0:
4142                 #    raise RuntimeError, "MakeSolidShells : " + descr
4143                 if descr == "WRN_SHAPE_UNCLOSED":
4144                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4145             anObj = self.ShapesOp.MakeSolidShells(theShells)
4146             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4147             self._autoPublish(anObj, theName, "solid")
4148             return anObj
4149
4150         ## Create a compound of the given shapes.
4151         #  @param theShapes List of shapes to put in compound.
4152         #  @param theName Object name; when specified, this parameter is used
4153         #         for result publication in the study. Otherwise, if automatic
4154         #         publication is switched on, default value is used for result name.
4155         #
4156         #  @return New GEOM.GEOM_Object, containing the created compound.
4157         #
4158         #  @ref tui_creation_compound "Example"
4159         def MakeCompound(self, theShapes, theName=None):
4160             """
4161             Create a compound of the given shapes.
4162
4163             Parameters:
4164                 theShapes List of shapes to put in compound.
4165                 theName Object name; when specified, this parameter is used
4166                         for result publication in the study. Otherwise, if automatic
4167                         publication is switched on, default value is used for result name.
4168
4169             Returns:
4170                 New GEOM.GEOM_Object, containing the created compound.
4171             """
4172             # Example: see GEOM_TestAll.py
4173             anObj = self.ShapesOp.MakeCompound(theShapes)
4174             RaiseIfFailed("MakeCompound", self.ShapesOp)
4175             self._autoPublish(anObj, theName, "compound")
4176             return anObj
4177
4178         # end of l3_advanced
4179         ## @}
4180
4181         ## @addtogroup l2_measure
4182         ## @{
4183
4184         ## Gives quantity of faces in the given shape.
4185         #  @param theShape Shape to count faces of.
4186         #  @return Quantity of faces.
4187         #
4188         #  @ref swig_NumberOf "Example"
4189         def NumberOfFaces(self, theShape):
4190             """
4191             Gives quantity of faces in the given shape.
4192
4193             Parameters:
4194                 theShape Shape to count faces of.
4195
4196             Returns:    
4197                 Quantity of faces.
4198             """
4199             # Example: see GEOM_TestOthers.py
4200             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4201             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4202             return nb_faces
4203
4204         ## Gives quantity of edges in the given shape.
4205         #  @param theShape Shape to count edges of.
4206         #  @return Quantity of edges.
4207         #
4208         #  @ref swig_NumberOf "Example"
4209         def NumberOfEdges(self, theShape):
4210             """
4211             Gives quantity of edges in the given shape.
4212
4213             Parameters:
4214                 theShape Shape to count edges of.
4215
4216             Returns:    
4217                 Quantity of edges.
4218             """
4219             # Example: see GEOM_TestOthers.py
4220             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4221             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4222             return nb_edges
4223
4224         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4225         #  @param theShape Shape to count sub-shapes of.
4226         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4227         #  @return Quantity of sub-shapes of given type.
4228         #
4229         #  @ref swig_NumberOf "Example"
4230         def NumberOfSubShapes(self, theShape, theShapeType):
4231             """
4232             Gives quantity of sub-shapes of type theShapeType in the given shape.
4233
4234             Parameters:
4235                 theShape Shape to count sub-shapes of.
4236                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4237
4238             Returns:
4239                 Quantity of sub-shapes of given type.
4240             """
4241             # Example: see GEOM_TestOthers.py
4242             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4243             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4244             return nb_ss
4245
4246         ## Gives quantity of solids in the given shape.
4247         #  @param theShape Shape to count solids in.
4248         #  @return Quantity of solids.
4249         #
4250         #  @ref swig_NumberOf "Example"
4251         def NumberOfSolids(self, theShape):
4252             """
4253             Gives quantity of solids in the given shape.
4254
4255             Parameters:
4256                 theShape Shape to count solids in.
4257
4258             Returns:
4259                 Quantity of solids.
4260             """
4261             # Example: see GEOM_TestOthers.py
4262             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"])
4263             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4264             return nb_solids
4265
4266         # end of l2_measure
4267         ## @}
4268
4269         ## @addtogroup l3_healing
4270         ## @{
4271
4272         ## Reverses an orientation the given shape.
4273         #  @param theShape Shape to be reversed.
4274         #  @param theName Object name; when specified, this parameter is used
4275         #         for result publication in the study. Otherwise, if automatic
4276         #         publication is switched on, default value is used for result name.
4277         #
4278         #  @return The reversed copy of theShape.
4279         #
4280         #  @ref swig_ChangeOrientation "Example"
4281         def ChangeOrientation(self, theShape, theName=None):
4282             """
4283             Reverses an orientation the given shape.
4284
4285             Parameters:
4286                 theShape Shape to be reversed.
4287                 theName Object name; when specified, this parameter is used
4288                         for result publication in the study. Otherwise, if automatic
4289                         publication is switched on, default value is used for result name.
4290
4291             Returns:   
4292                 The reversed copy of theShape.
4293             """
4294             # Example: see GEOM_TestAll.py
4295             anObj = self.ShapesOp.ChangeOrientation(theShape)
4296             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4297             self._autoPublish(anObj, theName, "reversed")
4298             return anObj
4299
4300         ## See ChangeOrientation() method for details.
4301         #
4302         #  @ref swig_OrientationChange "Example"
4303         def OrientationChange(self, theShape, theName=None):
4304             """
4305             See geompy.ChangeOrientation method for details.
4306             """
4307             # Example: see GEOM_TestOthers.py
4308             # note: auto-publishing is done in self.ChangeOrientation()
4309             anObj = self.ChangeOrientation(theShape, theName)
4310             return anObj
4311
4312         # end of l3_healing
4313         ## @}
4314
4315         ## @addtogroup l4_obtain
4316         ## @{
4317
4318         ## Retrieve all free faces from the given shape.
4319         #  Free face is a face, which is not shared between two shells of the shape.
4320         #  @param theShape Shape to find free faces in.
4321         #  @return List of IDs of all free faces, contained in theShape.
4322         #
4323         #  @ref tui_measurement_tools_page "Example"
4324         def GetFreeFacesIDs(self,theShape):
4325             """
4326             Retrieve all free faces from the given shape.
4327             Free face is a face, which is not shared between two shells of the shape.
4328
4329             Parameters:
4330                 theShape Shape to find free faces in.
4331
4332             Returns:
4333                 List of IDs of all free faces, contained in theShape.
4334             """
4335             # Example: see GEOM_TestOthers.py
4336             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4337             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4338             return anIDs
4339
4340         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4341         #  @param theShape1 Shape to find sub-shapes in.
4342         #  @param theShape2 Shape to find shared sub-shapes with.
4343         #  @param theShapeType Type of sub-shapes to be retrieved.
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 List of sub-shapes of theShape1, shared with theShape2.
4349         #
4350         #  @ref swig_GetSharedShapes "Example"
4351         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4352             """
4353             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4354
4355             Parameters:
4356                 theShape1 Shape to find sub-shapes in.
4357                 theShape2 Shape to find shared sub-shapes with.
4358                 theShapeType Type of sub-shapes to be retrieved.
4359                 theName Object name; when specified, this parameter is used
4360                         for result publication in the study. Otherwise, if automatic
4361                         publication is switched on, default value is used for result name.
4362
4363             Returns:
4364                 List of sub-shapes of theShape1, shared with theShape2.
4365             """
4366             # Example: see GEOM_TestOthers.py
4367             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4368             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4369             self._autoPublish(aList, theName, "shared")
4370             return aList
4371
4372         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4373         #  @param theShapes Shapes to find common sub-shapes of.
4374         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4375         #  @param theName Object name; when specified, this parameter is used
4376         #         for result publication in the study. Otherwise, if automatic
4377         #         publication is switched on, default value is used for result name.
4378         #
4379         #  @return List of objects, that are sub-shapes of all given shapes.
4380         #
4381         #  @ref swig_GetSharedShapes "Example"
4382         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4383             """
4384             Get all sub-shapes, shared by all shapes in the list theShapes.
4385
4386             Parameters:
4387                 theShapes Shapes to find common sub-shapes of.
4388                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4389                 theName Object name; when specified, this parameter is used
4390                         for result publication in the study. Otherwise, if automatic
4391                         publication is switched on, default value is used for result name.
4392
4393             Returns:    
4394                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4395             """
4396             # Example: see GEOM_TestOthers.py
4397             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4398             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4399             self._autoPublish(aList, theName, "shared")
4400             return aList
4401
4402         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4403         #  situated relatively the specified plane by the certain way,
4404         #  defined through <VAR>theState</VAR> parameter.
4405         #  @param theShape Shape to find sub-shapes of.
4406         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4407         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4408         #                direction and location of the plane to find shapes on.
4409         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4410         #  @param theName Object name; when specified, this parameter is used
4411         #         for result publication in the study. Otherwise, if automatic
4412         #         publication is switched on, default value is used for result name.
4413         #
4414         #  @return List of all found sub-shapes.
4415         #
4416         #  @ref swig_GetShapesOnPlane "Example"
4417         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4418             """
4419             Find in theShape all sub-shapes of type theShapeType,
4420             situated relatively the specified plane by the certain way,
4421             defined through theState parameter.
4422
4423             Parameters:
4424                 theShape Shape to find sub-shapes of.
4425                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4426                 theAx1 Vector (or line, or linear edge), specifying normal
4427                        direction and location of the plane to find shapes on.
4428                 theState The state of the sub-shapes to find (see GEOM::shape_state)
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 all found sub-shapes.
4435             """
4436             # Example: see GEOM_TestOthers.py
4437             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4438             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4439             self._autoPublish(aList, theName, "shapeOnPlane")
4440             return aList
4441
4442         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4443         #  situated relatively the specified plane by the certain way,
4444         #  defined through <VAR>theState</VAR> parameter.
4445         #  @param theShape Shape to find sub-shapes of.
4446         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4447         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4448         #                direction and location of the plane to find shapes on.
4449         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4450         #
4451         #  @return List of all found sub-shapes indices.
4452         #
4453         #  @ref swig_GetShapesOnPlaneIDs "Example"
4454         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4455             """
4456             Find in theShape all sub-shapes of type theShapeType,
4457             situated relatively the specified plane by the certain way,
4458             defined through theState parameter.
4459
4460             Parameters:
4461                 theShape Shape to find sub-shapes of.
4462                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4463                 theAx1 Vector (or line, or linear edge), specifying normal
4464                        direction and location of the plane to find shapes on.
4465                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4466
4467             Returns:
4468                 List of all found sub-shapes indices.
4469             """
4470             # Example: see GEOM_TestOthers.py
4471             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4472             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4473             return aList
4474
4475         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4476         #  situated relatively the specified plane by the certain way,
4477         #  defined through <VAR>theState</VAR> parameter.
4478         #  @param theShape Shape to find sub-shapes of.
4479         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4480         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4481         #                direction of the plane to find shapes on.
4482         #  @param thePnt Point specifying location of the plane to find shapes on.
4483         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4484         #  @param theName Object name; when specified, this parameter is used
4485         #         for result publication in the study. Otherwise, if automatic
4486         #         publication is switched on, default value is used for result name.
4487         #
4488         #  @return List of all found sub-shapes.
4489         #
4490         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4491         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4492             """
4493             Find in theShape all sub-shapes of type theShapeType,
4494             situated relatively the specified plane by the certain way,
4495             defined through theState parameter.
4496
4497             Parameters:
4498                 theShape Shape to find sub-shapes of.
4499                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4500                 theAx1 Vector (or line, or linear edge), specifying normal
4501                        direction and location of the plane to find shapes on.
4502                 thePnt Point specifying location of the plane to find shapes on.
4503                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4504                 theName Object name; when specified, this parameter is used
4505                         for result publication in the study. Otherwise, if automatic
4506                         publication is switched on, default value is used for result name.
4507
4508             Returns:
4509                 List of all found sub-shapes.
4510             """
4511             # Example: see GEOM_TestOthers.py
4512             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4513                                                                theAx1, thePnt, theState)
4514             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4515             self._autoPublish(aList, theName, "shapeOnPlane")
4516             return aList
4517
4518         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4519         #  situated relatively the specified plane by the certain way,
4520         #  defined through <VAR>theState</VAR> parameter.
4521         #  @param theShape Shape to find sub-shapes of.
4522         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4523         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4524         #                direction of the plane to find shapes on.
4525         #  @param thePnt Point specifying location of the plane to find shapes on.
4526         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4527         #
4528         #  @return List of all found sub-shapes indices.
4529         #
4530         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4531         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4532             """
4533             Find in theShape all sub-shapes of type theShapeType,
4534             situated relatively the specified plane by the certain way,
4535             defined through theState parameter.
4536
4537             Parameters:
4538                 theShape Shape to find sub-shapes of.
4539                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4540                 theAx1 Vector (or line, or linear edge), specifying normal
4541                        direction and location of the plane to find shapes on.
4542                 thePnt Point specifying location of the plane to find shapes on.
4543                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4544
4545             Returns:
4546                 List of all found sub-shapes indices.
4547             """
4548             # Example: see GEOM_TestOthers.py
4549             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4550                                                                   theAx1, thePnt, theState)
4551             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4552             return aList
4553
4554         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4555         #  the specified cylinder by the certain way, defined through \a theState parameter.
4556         #  @param theShape Shape to find sub-shapes of.
4557         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4558         #  @param theAxis Vector (or line, or linear edge), specifying
4559         #                 axis of the cylinder to find shapes on.
4560         #  @param theRadius Radius of the cylinder to find shapes on.
4561         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4562         #  @param theName Object name; when specified, this parameter is used
4563         #         for result publication in the study. Otherwise, if automatic
4564         #         publication is switched on, default value is used for result name.
4565         #
4566         #  @return List of all found sub-shapes.
4567         #
4568         #  @ref swig_GetShapesOnCylinder "Example"
4569         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4570             """
4571             Find in theShape all sub-shapes of type theShapeType, situated relatively
4572             the specified cylinder by the certain way, defined through theState parameter.
4573
4574             Parameters:
4575                 theShape Shape to find sub-shapes of.
4576                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4577                 theAxis Vector (or line, or linear edge), specifying
4578                         axis of the cylinder to find shapes on.
4579                 theRadius Radius of the cylinder to find shapes on.
4580                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4581                 theName Object name; when specified, this parameter is used
4582                         for result publication in the study. Otherwise, if automatic
4583                         publication is switched on, default value is used for result name.
4584
4585             Returns:
4586                 List of all found sub-shapes.
4587             """
4588             # Example: see GEOM_TestOthers.py
4589             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4590             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4591             self._autoPublish(aList, theName, "shapeOnCylinder")
4592             return aList
4593
4594         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4595         #  the specified cylinder by the certain way, defined through \a theState parameter.
4596         #  @param theShape Shape to find sub-shapes of.
4597         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4598         #  @param theAxis Vector (or line, or linear edge), specifying
4599         #                 axis of the cylinder to find shapes on.
4600         #  @param theRadius Radius of the cylinder to find shapes on.
4601         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4602         #
4603         #  @return List of all found sub-shapes indices.
4604         #
4605         #  @ref swig_GetShapesOnCylinderIDs "Example"
4606         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4607             """
4608             Find in theShape all sub-shapes of type theShapeType, situated relatively
4609             the specified cylinder by the certain way, defined through theState parameter.
4610
4611             Parameters:
4612                 theShape Shape to find sub-shapes of.
4613                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4614                 theAxis Vector (or line, or linear edge), specifying
4615                         axis of the cylinder to find shapes on.
4616                 theRadius Radius of the cylinder to find shapes on.
4617                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4618
4619             Returns:
4620                 List of all found sub-shapes indices.
4621             """
4622             # Example: see GEOM_TestOthers.py
4623             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4624             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4625             return aList
4626
4627         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4628         #  the specified cylinder by the certain way, defined through \a theState parameter.
4629         #  @param theShape Shape to find sub-shapes of.
4630         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4631         #  @param theAxis Vector (or line, or linear edge), specifying
4632         #                 axis of the cylinder to find shapes on.
4633         #  @param thePnt Point specifying location of the bottom of the cylinder.
4634         #  @param theRadius Radius of the cylinder to find shapes on.
4635         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4636         #  @param theName Object name; when specified, this parameter is used
4637         #         for result publication in the study. Otherwise, if automatic
4638         #         publication is switched on, default value is used for result name.
4639         #
4640         #  @return List of all found sub-shapes.
4641         #
4642         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4643         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4644             """
4645             Find in theShape all sub-shapes of type theShapeType, situated relatively
4646             the specified cylinder by the certain way, defined through theState parameter.
4647
4648             Parameters:
4649                 theShape Shape to find sub-shapes of.
4650                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4651                 theAxis Vector (or line, or linear edge), specifying
4652                         axis of the cylinder to find shapes on.
4653                 theRadius Radius of the cylinder to find shapes on.
4654                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4655                 theName Object name; when specified, this parameter is used
4656                         for result publication in the study. Otherwise, if automatic
4657                         publication is switched on, default value is used for result name.
4658
4659             Returns:
4660                 List of all found sub-shapes.
4661             """
4662             # Example: see GEOM_TestOthers.py
4663             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4664             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4665             self._autoPublish(aList, theName, "shapeOnCylinder")
4666             return aList
4667
4668         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4669         #  the specified cylinder by the certain way, defined through \a theState parameter.
4670         #  @param theShape Shape to find sub-shapes of.
4671         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4672         #  @param theAxis Vector (or line, or linear edge), specifying
4673         #                 axis of the cylinder to find shapes on.
4674         #  @param thePnt Point specifying location of the bottom of the cylinder.
4675         #  @param theRadius Radius of the cylinder to find shapes on.
4676         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4677         #
4678         #  @return List of all found sub-shapes indices
4679         #
4680         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4681         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4682             """
4683             Find in theShape all sub-shapes of type theShapeType, situated relatively
4684             the specified cylinder by the certain way, defined through theState parameter.
4685
4686             Parameters:
4687                 theShape Shape to find sub-shapes of.
4688                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4689                 theAxis Vector (or line, or linear edge), specifying
4690                         axis of the cylinder to find shapes on.
4691                 theRadius Radius of the cylinder to find shapes on.
4692                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4693
4694             Returns:
4695                 List of all found sub-shapes indices.            
4696             """
4697             # Example: see GEOM_TestOthers.py
4698             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4699             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4700             return aList
4701
4702         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4703         #  the specified sphere by the certain way, defined through \a theState parameter.
4704         #  @param theShape Shape to find sub-shapes of.
4705         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4706         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4707         #  @param theRadius Radius of the sphere to find shapes on.
4708         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4709         #  @param theName Object name; when specified, this parameter is used
4710         #         for result publication in the study. Otherwise, if automatic
4711         #         publication is switched on, default value is used for result name.
4712         #
4713         #  @return List of all found sub-shapes.
4714         #
4715         #  @ref swig_GetShapesOnSphere "Example"
4716         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4717             """
4718             Find in theShape all sub-shapes of type theShapeType, situated relatively
4719             the specified sphere by the certain way, defined through theState parameter.
4720
4721             Parameters:
4722                 theShape Shape to find sub-shapes of.
4723                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4724                 theCenter Point, specifying center of the sphere to find shapes on.
4725                 theRadius Radius of the sphere to find shapes on.
4726                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4727                 theName Object name; when specified, this parameter is used
4728                         for result publication in the study. Otherwise, if automatic
4729                         publication is switched on, default value is used for result name.
4730
4731             Returns:
4732                 List of all found sub-shapes.
4733             """
4734             # Example: see GEOM_TestOthers.py
4735             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4736             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4737             self._autoPublish(aList, theName, "shapeOnSphere")
4738             return aList
4739
4740         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4741         #  the specified sphere by the certain way, defined through \a theState parameter.
4742         #  @param theShape Shape to find sub-shapes of.
4743         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4744         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4745         #  @param theRadius Radius of the sphere 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_GetShapesOnSphereIDs "Example"
4751         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4752             """
4753             Find in theShape all sub-shapes of type theShapeType, situated relatively
4754             the specified sphere 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                 theCenter Point, specifying center of the sphere to find shapes on.
4760                 theRadius Radius of the sphere to find shapes on.
4761                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4762
4763             Returns:
4764                 List of all found sub-shapes indices.
4765             """
4766             # Example: see GEOM_TestOthers.py
4767             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4768             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4769             return aList
4770
4771         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4772         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4773         #  @param theShape Shape to find sub-shapes of.
4774         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4775         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4776         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4777         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4778         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4779         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4780         #  @param theName Object name; when specified, this parameter is used
4781         #         for result publication in the study. Otherwise, if automatic
4782         #         publication is switched on, default value is used for result name.
4783         #
4784         #  @return List of all found sub-shapes.
4785         #
4786         #  @ref swig_GetShapesOnQuadrangle "Example"
4787         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4788                                   theTopLeftPoint, theTopRigthPoint,
4789                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4790             """
4791             Find in theShape all sub-shapes of type theShapeType, situated relatively
4792             the specified quadrangle by the certain way, defined through theState parameter.
4793
4794             Parameters:
4795                 theShape Shape to find sub-shapes of.
4796                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4797                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4798                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4799                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4800                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4801                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4802                 theName Object name; when specified, this parameter is used
4803                         for result publication in the study. Otherwise, if automatic
4804                         publication is switched on, default value is used for result name.
4805
4806             Returns:
4807                 List of all found sub-shapes.
4808             """
4809             # Example: see GEOM_TestOthers.py
4810             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4811                                                         theTopLeftPoint, theTopRigthPoint,
4812                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4813             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4814             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4815             return aList
4816
4817         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4818         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4819         #  @param theShape Shape to find sub-shapes of.
4820         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4821         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4822         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4823         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4824         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4825         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4826         #
4827         #  @return List of all found sub-shapes indices.
4828         #
4829         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4830         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4831                                      theTopLeftPoint, theTopRigthPoint,
4832                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4833             """
4834             Find in theShape all sub-shapes of type theShapeType, situated relatively
4835             the specified quadrangle by the certain way, defined through theState parameter.
4836
4837             Parameters:
4838                 theShape Shape to find sub-shapes of.
4839                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4840                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4841                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4842                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4843                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4844                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4845
4846             Returns:
4847                 List of all found sub-shapes indices.
4848             """
4849
4850             # Example: see GEOM_TestOthers.py
4851             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4852                                                            theTopLeftPoint, theTopRigthPoint,
4853                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4854             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4855             return aList
4856
4857         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4858         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4859         #  @param theBox Shape for relative comparing.
4860         #  @param theShape Shape to find sub-shapes of.
4861         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4862         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4863         #  @param theName Object name; when specified, this parameter is used
4864         #         for result publication in the study. Otherwise, if automatic
4865         #         publication is switched on, default value is used for result name.
4866         #
4867         #  @return List of all found sub-shapes.
4868         #
4869         #  @ref swig_GetShapesOnBox "Example"
4870         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4871             """
4872             Find in theShape all sub-shapes of type theShapeType, situated relatively
4873             the specified theBox by the certain way, defined through theState parameter.
4874
4875             Parameters:
4876                 theBox Shape for relative comparing.
4877                 theShape Shape to find sub-shapes of.
4878                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4879                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4880                 theName Object name; when specified, this parameter is used
4881                         for result publication in the study. Otherwise, if automatic
4882                         publication is switched on, default value is used for result name.
4883
4884             Returns:
4885                 List of all found sub-shapes.
4886             """
4887             # Example: see GEOM_TestOthers.py
4888             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
4889             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
4890             self._autoPublish(aList, theName, "shapeOnBox")
4891             return aList
4892
4893         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4894         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4895         #  @param theBox Shape for relative comparing.
4896         #  @param theShape Shape to find sub-shapes of.
4897         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4898         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4899         #
4900         #  @return List of all found sub-shapes indices.
4901         #
4902         #  @ref swig_GetShapesOnBoxIDs "Example"
4903         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
4904             """
4905             Find in theShape all sub-shapes of type theShapeType, situated relatively
4906             the specified theBox by the certain way, defined through theState parameter.
4907
4908             Parameters:
4909                 theBox Shape for relative comparing.
4910                 theShape Shape to find sub-shapes of.
4911                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4912                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4913
4914             Returns:
4915                 List of all found sub-shapes indices.
4916             """
4917             # Example: see GEOM_TestOthers.py
4918             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
4919             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
4920             return aList
4921
4922         ## Find in \a theShape all sub-shapes of type \a theShapeType,
4923         #  situated relatively the specified \a theCheckShape by the
4924         #  certain way, defined through \a theState parameter.
4925         #  @param theCheckShape Shape for relative comparing. It must be a solid.
4926         #  @param theShape Shape to find sub-shapes of.
4927         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
4928         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4929         #  @param theName Object name; when specified, this parameter is used
4930         #         for result publication in the study. Otherwise, if automatic
4931         #         publication is switched on, default value is used for result name.
4932         #
4933         #  @return List of all found sub-shapes.
4934         #
4935         #  @ref swig_GetShapesOnShape "Example"
4936         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
4937             """
4938             Find in theShape all sub-shapes of type theShapeType,
4939             situated relatively the specified theCheckShape by the
4940             certain way, defined through theState parameter.
4941
4942             Parameters:
4943                 theCheckShape Shape for relative comparing. It must be a solid.
4944                 theShape Shape to find sub-shapes of.
4945                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4946                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4947                 theName Object name; when specified, this parameter is used
4948                         for result publication in the study. Otherwise, if automatic
4949                         publication is switched on, default value is used for result name.
4950
4951             Returns:
4952                 List of all found sub-shapes.
4953             """
4954             # Example: see GEOM_TestOthers.py
4955             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
4956                                                    theShapeType, theState)
4957             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
4958             self._autoPublish(aList, theName, "shapeOnShape")
4959             return aList
4960
4961         ## Find in \a theShape all sub-shapes of type \a theShapeType,
4962         #  situated relatively the specified \a theCheckShape by the
4963         #  certain way, defined through \a theState parameter.
4964         #  @param theCheckShape Shape for relative comparing. It must be a solid.
4965         #  @param theShape Shape to find sub-shapes of.
4966         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4967         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4968         #  @param theName Object name; when specified, this parameter is used
4969         #         for result publication in the study. Otherwise, if automatic
4970         #         publication is switched on, default value is used for result name.
4971         #
4972         #  @return All found sub-shapes as compound.
4973         #
4974         #  @ref swig_GetShapesOnShapeAsCompound "Example"
4975         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
4976             """
4977             Find in theShape all sub-shapes of type theShapeType,
4978             situated relatively the specified theCheckShape by the
4979             certain way, defined through theState parameter.
4980
4981             Parameters:
4982                 theCheckShape Shape for relative comparing. It must be a solid.
4983                 theShape Shape to find sub-shapes of.
4984                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4985                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4986                 theName Object name; when specified, this parameter is used
4987                         for result publication in the study. Otherwise, if automatic
4988                         publication is switched on, default value is used for result name.
4989
4990             Returns:
4991                 All found sub-shapes as compound.
4992             """
4993             # Example: see GEOM_TestOthers.py
4994             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
4995                                                              theShapeType, theState)
4996             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
4997             self._autoPublish(anObj, theName, "shapeOnShape")
4998             return anObj
4999
5000         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5001         #  situated relatively the specified \a theCheckShape by the
5002         #  certain way, defined through \a theState parameter.
5003         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5004         #  @param theShape Shape to find sub-shapes of.
5005         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5006         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5007         #
5008         #  @return List of all found sub-shapes indices.
5009         #
5010         #  @ref swig_GetShapesOnShapeIDs "Example"
5011         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5012             """
5013             Find in theShape all sub-shapes of type theShapeType,
5014             situated relatively the specified theCheckShape by the
5015             certain way, defined through theState parameter.
5016
5017             Parameters:
5018                 theCheckShape Shape for relative comparing. It must be a solid.
5019                 theShape Shape to find sub-shapes of.
5020                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5021                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5022
5023             Returns:
5024                 List of all found sub-shapes indices.
5025             """
5026             # Example: see GEOM_TestOthers.py
5027             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5028                                                       theShapeType, theState)
5029             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5030             return aList
5031
5032         ## Get sub-shape(s) of theShapeWhere, which are
5033         #  coincident with \a theShapeWhat or could be a part of it.
5034         #  @param theShapeWhere Shape to find sub-shapes of.
5035         #  @param theShapeWhat Shape, specifying what to find.
5036         #  @param isNewImplementation implementation of GetInPlace functionality
5037         #             (default = False, old alghorithm based on shape properties)
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 Group of all found sub-shapes or a single found sub-shape.
5043         #
5044         #  @note This function has a restriction on argument shapes.
5045         #        If \a theShapeWhere has curved parts with significantly
5046         #        outstanding centres (i.e. the mass centre of a part is closer to
5047         #        \a theShapeWhat than to the part), such parts will not be found.
5048         #        @image html get_in_place_lost_part.png
5049         #
5050         #  @ref swig_GetInPlace "Example"
5051         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5052             """
5053             Get sub-shape(s) of theShapeWhere, which are
5054             coincident with  theShapeWhat or could be a part of it.
5055
5056             Parameters:
5057                 theShapeWhere Shape to find sub-shapes of.
5058                 theShapeWhat Shape, specifying what to find.
5059                 isNewImplementation Implementation of GetInPlace functionality
5060                                     (default = False, old alghorithm based on shape properties)
5061                 theName Object name; when specified, this parameter is used
5062                         for result publication in the study. Otherwise, if automatic
5063                         publication is switched on, default value is used for result name.
5064
5065             Returns:
5066                 Group of all found sub-shapes or a single found sub-shape.
5067
5068                 
5069             Note:
5070                 This function has a restriction on argument shapes.
5071                 If theShapeWhere has curved parts with significantly
5072                 outstanding centres (i.e. the mass centre of a part is closer to
5073                 theShapeWhat than to the part), such parts will not be found.
5074             """
5075             # Example: see GEOM_TestOthers.py
5076             anObj = None
5077             if isNewImplementation:
5078                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5079             else:
5080                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5081                 pass
5082             RaiseIfFailed("GetInPlace", self.ShapesOp)
5083             self._autoPublish(anObj, theName, "inplace")
5084             return anObj
5085
5086         ## Get sub-shape(s) of \a theShapeWhere, which are
5087         #  coincident with \a theShapeWhat or could be a part of it.
5088         #
5089         #  Implementation of this method is based on a saved history of an operation,
5090         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5091         #  arguments (an argument shape or a sub-shape of an argument shape).
5092         #  The operation could be the Partition or one of boolean operations,
5093         #  performed on simple shapes (not on compounds).
5094         #
5095         #  @param theShapeWhere Shape to find sub-shapes of.
5096         #  @param theShapeWhat Shape, specifying what to find (must be in the
5097         #                      building history of the ShapeWhere).
5098         #  @param theName Object name; when specified, this parameter is used
5099         #         for result publication in the study. Otherwise, if automatic
5100         #         publication is switched on, default value is used for result name.
5101         #
5102         #  @return Group of all found sub-shapes or a single found sub-shape.
5103         #
5104         #  @ref swig_GetInPlace "Example"
5105         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5106             """
5107             Implementation of this method is based on a saved history of an operation,
5108             produced theShapeWhere. The theShapeWhat must be among this operation's
5109             arguments (an argument shape or a sub-shape of an argument shape).
5110             The operation could be the Partition or one of boolean operations,
5111             performed on simple shapes (not on compounds).
5112
5113             Parameters:
5114                 theShapeWhere Shape to find sub-shapes of.
5115                 theShapeWhat Shape, specifying what to find (must be in the
5116                                 building history of the ShapeWhere).
5117                 theName Object name; when specified, this parameter is used
5118                         for result publication in the study. Otherwise, if automatic
5119                         publication is switched on, default value is used for result name.
5120
5121             Returns:
5122                 Group of all found sub-shapes or a single found sub-shape.
5123             """
5124             # Example: see GEOM_TestOthers.py
5125             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5126             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5127             self._autoPublish(anObj, theName, "inplace")
5128             return anObj
5129
5130         ## Get sub-shape of theShapeWhere, which is
5131         #  equal to \a theShapeWhat.
5132         #  @param theShapeWhere Shape to find sub-shape of.
5133         #  @param theShapeWhat Shape, specifying what to find.
5134         #  @param theName Object name; when specified, this parameter is used
5135         #         for result publication in the study. Otherwise, if automatic
5136         #         publication is switched on, default value is used for result name.
5137         #
5138         #  @return New GEOM.GEOM_Object for found sub-shape.
5139         #
5140         #  @ref swig_GetSame "Example"
5141         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5142             """
5143             Get sub-shape of theShapeWhere, which is
5144             equal to theShapeWhat.
5145
5146             Parameters:
5147                 theShapeWhere Shape to find sub-shape of.
5148                 theShapeWhat Shape, specifying what to find.
5149                 theName Object name; when specified, this parameter is used
5150                         for result publication in the study. Otherwise, if automatic
5151                         publication is switched on, default value is used for result name.
5152
5153             Returns:
5154                 New GEOM.GEOM_Object for found sub-shape.
5155             """
5156             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5157             RaiseIfFailed("GetSame", self.ShapesOp)
5158             self._autoPublish(anObj, theName, "sameShape")
5159             return anObj
5160
5161
5162         ## Get sub-shape indices of theShapeWhere, which is
5163         #  equal to \a theShapeWhat.
5164         #  @param theShapeWhere Shape to find sub-shape of.
5165         #  @param theShapeWhat Shape, specifying what to find.
5166         #  @return List of all found sub-shapes indices. 
5167         #
5168         #  @ref swig_GetSame "Example"
5169         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5170             """
5171             Get sub-shape indices of theShapeWhere, which is
5172             equal to theShapeWhat.
5173
5174             Parameters:
5175                 theShapeWhere Shape to find sub-shape of.
5176                 theShapeWhat Shape, specifying what to find.
5177
5178             Returns:
5179                 List of all found sub-shapes indices.
5180             """
5181             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5182             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5183             return anObj
5184
5185
5186         # end of l4_obtain
5187         ## @}
5188
5189         ## @addtogroup l4_access
5190         ## @{
5191
5192         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5193         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5194         #  @param aShape Shape to get sub-shape of.
5195         #  @param ListOfID List of sub-shapes indices.
5196         #  @param theName Object name; when specified, this parameter is used
5197         #         for result publication in the study. Otherwise, if automatic
5198         #         publication is switched on, default value is used for result name.
5199         #
5200         #  @return Found sub-shape.
5201         #
5202         #  @ref swig_all_decompose "Example"
5203         def GetSubShape(self, aShape, ListOfID, theName=None):
5204             """
5205             Obtain a composite sub-shape of aShape, composed from sub-shapes
5206             of aShape, selected by their unique IDs inside aShape
5207
5208             Parameters:
5209                 aShape Shape to get sub-shape of.
5210                 ListOfID List of sub-shapes indices.
5211                 theName Object name; when specified, this parameter is used
5212                         for result publication in the study. Otherwise, if automatic
5213                         publication is switched on, default value is used for result name.
5214
5215             Returns:
5216                 Found sub-shape.
5217             """
5218             # Example: see GEOM_TestAll.py
5219             anObj = self.AddSubShape(aShape,ListOfID)
5220             self._autoPublish(anObj, theName, "subshape")
5221             return anObj
5222
5223         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5224         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5225         #  @param aShape Shape to get sub-shape of.
5226         #  @param aSubShape Sub-shapes of aShape.
5227         #  @return ID of found sub-shape.
5228         #
5229         #  @ref swig_all_decompose "Example"
5230         def GetSubShapeID(self, aShape, aSubShape):
5231             """
5232             Obtain unique ID of sub-shape aSubShape inside aShape
5233             of aShape, selected by their unique IDs inside aShape
5234
5235             Parameters:
5236                aShape Shape to get sub-shape of.
5237                aSubShape Sub-shapes of aShape.
5238
5239             Returns:
5240                ID of found sub-shape.
5241             """
5242             # Example: see GEOM_TestAll.py
5243             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5244             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5245             return anID
5246             
5247         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5248         #  This function is provided for performance purpose. The complexity is O(n) with n
5249         #  the number of subobjects of aShape
5250         #  @param aShape Shape to get sub-shape of.
5251         #  @param aSubShapes Sub-shapes of aShape.
5252         #  @return list of IDs of found sub-shapes.
5253         #
5254         #  @ref swig_all_decompose "Example"
5255         def GetSubShapesIDs(self, aShape, aSubShapes):
5256             """
5257             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5258             This function is provided for performance purpose. The complexity is O(n) with n
5259             the number of subobjects of aShape
5260
5261             Parameters:
5262                aShape Shape to get sub-shape of.
5263                aSubShapes Sub-shapes of aShape.
5264
5265             Returns:
5266                List of IDs of found sub-shape.
5267             """
5268             # Example: see GEOM_TestAll.py
5269             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5270             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5271             return anIDs
5272
5273         # end of l4_access
5274         ## @}
5275
5276         ## @addtogroup l4_decompose
5277         ## @{
5278
5279         ## Get all sub-shapes and groups of \a theShape,
5280         #  that were created already by any other methods.
5281         #  @param theShape Any shape.
5282         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5283         #                       returned, else all found sub-shapes and groups.
5284         #  @return List of existing sub-objects of \a theShape.
5285         #
5286         #  @ref swig_all_decompose "Example"
5287         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5288             """
5289             Get all sub-shapes and groups of theShape,
5290             that were created already by any other methods.
5291
5292             Parameters:
5293                 theShape Any shape.
5294                 theGroupsOnly If this parameter is TRUE, only groups will be
5295                                  returned, else all found sub-shapes and groups.
5296
5297             Returns:
5298                 List of existing sub-objects of theShape.
5299             """
5300             # Example: see GEOM_TestAll.py
5301             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5302             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5303             return ListObj
5304
5305         ## Get all groups of \a theShape,
5306         #  that were created already by any other methods.
5307         #  @param theShape Any shape.
5308         #  @return List of existing groups of \a theShape.
5309         #
5310         #  @ref swig_all_decompose "Example"
5311         def GetGroups(self, theShape):
5312             """
5313             Get all groups of theShape,
5314             that were created already by any other methods.
5315
5316             Parameters:
5317                 theShape Any shape.
5318
5319             Returns:
5320                 List of existing groups of theShape.
5321             """
5322             # Example: see GEOM_TestAll.py
5323             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5324             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5325             return ListObj
5326
5327         ## Explode a shape on sub-shapes of a given type.
5328         #  If the shape itself matches the type, it is also returned.
5329         #  @param aShape Shape to be exploded.
5330         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5331         #  @param theName Object name; when specified, this parameter is used
5332         #         for result publication in the study. Otherwise, if automatic
5333         #         publication is switched on, default value is used for result name.
5334         #
5335         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5336         #
5337         #  @ref swig_all_decompose "Example"
5338         def SubShapeAll(self, aShape, aType, theName=None):
5339             """
5340             Explode a shape on sub-shapes of a given type.
5341             If the shape itself matches the type, it is also returned.
5342
5343             Parameters:
5344                 aShape Shape to be exploded.
5345                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5346                 theName Object name; when specified, this parameter is used
5347                         for result publication in the study. Otherwise, if automatic
5348                         publication is switched on, default value is used for result name.
5349
5350             Returns:
5351                 List of sub-shapes of type theShapeType, contained in theShape.
5352             """
5353             # Example: see GEOM_TestAll.py
5354             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5355             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5356             self._autoPublish(ListObj, theName, "subshape")
5357             return ListObj
5358
5359         ## Explode a shape on sub-shapes of a given type.
5360         #  @param aShape Shape to be exploded.
5361         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5362         #  @return List of IDs of sub-shapes.
5363         #
5364         #  @ref swig_all_decompose "Example"
5365         def SubShapeAllIDs(self, aShape, aType):
5366             """
5367             Explode a shape on sub-shapes of a given type.
5368
5369             Parameters:
5370                 aShape Shape to be exploded (see geompy.ShapeType)
5371                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5372
5373             Returns:
5374                 List of IDs of sub-shapes.
5375             """
5376             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5377             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5378             return ListObj
5379
5380         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5381         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
5382         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5383         #  @param aShape Shape to get sub-shape of.
5384         #  @param ListOfInd List of sub-shapes indices.
5385         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5386         #  @param theName Object name; when specified, this parameter is used
5387         #         for result publication in the study. Otherwise, if automatic
5388         #         publication is switched on, default value is used for result name.
5389         #
5390         #  @return A compound of sub-shapes of aShape.
5391         #
5392         #  @ref swig_all_decompose "Example"
5393         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5394             """
5395             Obtain a compound of sub-shapes of aShape,
5396             selected by they indices in list of all sub-shapes of type aType.
5397             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5398             
5399             Parameters:
5400                 aShape Shape to get sub-shape of.
5401                 ListOfID List of sub-shapes indices.
5402                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5403                 theName Object name; when specified, this parameter is used
5404                         for result publication in the study. Otherwise, if automatic
5405                         publication is switched on, default value is used for result name.
5406
5407             Returns:
5408                 A compound of sub-shapes of aShape.
5409             """
5410             # Example: see GEOM_TestAll.py
5411             ListOfIDs = []
5412             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5413             for ind in ListOfInd:
5414                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5415             # note: auto-publishing is done in self.GetSubShape()
5416             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5417             return anObj
5418
5419         ## Explode a shape on sub-shapes of a given type.
5420         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5421         #  If the shape itself matches the type, it is also returned.
5422         #  @param aShape Shape to be exploded.
5423         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5424         #  @param theName Object name; when specified, this parameter is used
5425         #         for result publication in the study. Otherwise, if automatic
5426         #         publication is switched on, default value is used for result name.
5427         #
5428         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5429         #
5430         #  @ref swig_SubShapeAllSorted "Example"
5431         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5432             """
5433             Explode a shape on sub-shapes of a given type.
5434             Sub-shapes will be sorted by coordinates of their gravity centers.
5435             If the shape itself matches the type, it is also returned.
5436
5437             Parameters: 
5438                 aShape Shape to be exploded.
5439                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5440                 theName Object name; when specified, this parameter is used
5441                         for result publication in the study. Otherwise, if automatic
5442                         publication is switched on, default value is used for result name.
5443
5444             Returns: 
5445                 List of sub-shapes of type theShapeType, contained in theShape.
5446             """
5447             # Example: see GEOM_TestAll.py
5448             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5449             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5450             self._autoPublish(ListObj, theName, "subshape")
5451             return ListObj
5452
5453         ## Explode a shape on sub-shapes of a given type.
5454         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5455         #  @param aShape Shape to be exploded.
5456         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5457         #  @return List of IDs of sub-shapes.
5458         #
5459         #  @ref swig_all_decompose "Example"
5460         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5461             """
5462             Explode a shape on sub-shapes of a given type.
5463             Sub-shapes will be sorted by coordinates of their gravity centers.
5464
5465             Parameters: 
5466                 aShape Shape to be exploded.
5467                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5468
5469             Returns: 
5470                 List of IDs of sub-shapes.
5471             """
5472             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5473             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5474             return ListIDs
5475
5476         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5477         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5478         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5479         #  @param aShape Shape to get sub-shape of.
5480         #  @param ListOfInd List of sub-shapes indices.
5481         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5482         #  @param theName Object name; when specified, this parameter is used
5483         #         for result publication in the study. Otherwise, if automatic
5484         #         publication is switched on, default value is used for result name.
5485         #
5486         #  @return A compound of sub-shapes of aShape.
5487         #
5488         #  @ref swig_all_decompose "Example"
5489         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5490             """
5491             Obtain a compound of sub-shapes of aShape,
5492             selected by they indices in sorted list of all sub-shapes of type aType.
5493             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5494
5495             Parameters:
5496                 aShape Shape to get sub-shape of.
5497                 ListOfID List of sub-shapes indices.
5498                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5499                 theName Object name; when specified, this parameter is used
5500                         for result publication in the study. Otherwise, if automatic
5501                         publication is switched on, default value is used for result name.
5502
5503             Returns:
5504                 A compound of sub-shapes of aShape.
5505             """
5506             # Example: see GEOM_TestAll.py
5507             ListOfIDs = []
5508             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5509             for ind in ListOfInd:
5510                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5511             # note: auto-publishing is done in self.GetSubShape()
5512             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5513             return anObj
5514
5515         ## Extract shapes (excluding the main shape) of given type.
5516         #  @param aShape The shape.
5517         #  @param aType  The shape type (see ShapeType())
5518         #  @param isSorted Boolean flag to switch sorting on/off.
5519         #  @param theName Object name; when specified, this parameter is used
5520         #         for result publication in the study. Otherwise, if automatic
5521         #         publication is switched on, default value is used for result name.
5522         #
5523         #  @return List of sub-shapes of type aType, contained in aShape.
5524         #
5525         #  @ref swig_FilletChamfer "Example"
5526         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5527             """
5528             Extract shapes (excluding the main shape) of given type.
5529
5530             Parameters:
5531                 aShape The shape.
5532                 aType  The shape type (see geompy.ShapeType)
5533                 isSorted Boolean flag to switch sorting on/off.
5534                 theName Object name; when specified, this parameter is used
5535                         for result publication in the study. Otherwise, if automatic
5536                         publication is switched on, default value is used for result name.
5537
5538             Returns:     
5539                 List of sub-shapes of type aType, contained in aShape.
5540             """
5541             # Example: see GEOM_TestAll.py
5542             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5543             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5544             self._autoPublish(ListObj, theName, "subshape")
5545             return ListObj
5546
5547         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5548         #  @param aShape Main shape.
5549         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5550         #  @param theName Object name; when specified, this parameter is used
5551         #         for result publication in the study. Otherwise, if automatic
5552         #         publication is switched on, default value is used for result name.
5553         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5554         #
5555         #  @ref swig_all_decompose "Example"
5556         def SubShapes(self, aShape, anIDs, theName=None):
5557             """
5558             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5559
5560             Parameters:
5561                 aShape Main shape.
5562                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5563                 theName Object name; when specified, this parameter is used
5564                         for result publication in the study. Otherwise, if automatic
5565                         publication is switched on, default value is used for result name.
5566
5567             Returns:      
5568                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5569             """
5570             # Example: see GEOM_TestAll.py
5571             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5572             RaiseIfFailed("SubShapes", self.ShapesOp)
5573             self._autoPublish(ListObj, theName, "subshape")
5574             return ListObj
5575
5576         # end of l4_decompose
5577         ## @}
5578
5579         ## @addtogroup l4_decompose_d
5580         ## @{
5581
5582         ## Deprecated method
5583         #  It works like SubShapeAllSortedCentres(), but wrongly
5584         #  defines centres of faces, shells and solids.
5585         def SubShapeAllSorted(self, aShape, aType, theName=None):
5586             """
5587             Deprecated method
5588             It works like geompy.SubShapeAllSortedCentres, but wrongly
5589             defines centres of faces, shells and solids.
5590             """
5591             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5592             RaiseIfFailed("MakeExplode", self.ShapesOp)
5593             self._autoPublish(ListObj, theName, "subshape")
5594             return ListObj
5595
5596         ## Deprecated method
5597         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5598         #  defines centres of faces, shells and solids.
5599         def SubShapeAllSortedIDs(self, aShape, aType):
5600             """
5601             Deprecated method
5602             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5603             defines centres of faces, shells and solids.
5604             """
5605             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5606             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5607             return ListIDs
5608
5609         ## Deprecated method
5610         #  It works like SubShapeSortedCentres(), but has a bug
5611         #  (wrongly defines centres of faces, shells and solids).
5612         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5613             """
5614             Deprecated method
5615             It works like geompy.SubShapeSortedCentres, but has a bug
5616             (wrongly defines centres of faces, shells and solids).
5617             """
5618             ListOfIDs = []
5619             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5620             for ind in ListOfInd:
5621                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5622             # note: auto-publishing is done in self.GetSubShape()
5623             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5624             return anObj
5625
5626         # end of l4_decompose_d
5627         ## @}
5628
5629         ## @addtogroup l3_healing
5630         ## @{
5631
5632         ## Apply a sequence of Shape Healing operators to the given object.
5633         #  @param theShape Shape to be processed.
5634         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5635         #  @param theParameters List of names of parameters
5636         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5637         #  @param theValues List of values of parameters, in the same order
5638         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5639         #  @param theName Object name; when specified, this parameter is used
5640         #         for result publication in the study. Otherwise, if automatic
5641         #         publication is switched on, default value is used for result name.
5642         #
5643         #  <b> Operators and Parameters: </b> \n
5644         #
5645         #  * \b FixShape - corrects invalid shapes. \n
5646         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5647         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5648         #
5649         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5650         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5651         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5652         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5653         #
5654         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5655         #    surfaces in segments using a certain angle. \n
5656         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5657         #    if Angle=180, four if Angle=90, etc). \n
5658         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5659         #
5660         #  * \b SplitClosedFaces - splits closed faces in segments.
5661         #    The number of segments depends on the number of splitting points.\n
5662         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5663         #
5664         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5665         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5666         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5667         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5668         #   This and the previous parameters can take the following values:\n
5669         #   \b Parametric \b Continuity \n
5670         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5671         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5672         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5673         #    ruling out sharp edges).\n
5674         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5675         #       are of the same magnitude).\n
5676         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5677         #    or surfaces (d/du C(u)) are the same at junction. \n
5678         #   \b Geometric \b Continuity \n
5679         #   \b G1: first derivatives are proportional at junction.\n
5680         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5681         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5682         #   \b G2: first and second derivatives are proportional at junction.
5683         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5684         #    continuity requires that the underlying parameterization was continuous as well.
5685         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5686         #
5687         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5688         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5689         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5690         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5691         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5692         #       with the specified parameters.\n
5693         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5694         #       with the specified parameters.\n
5695         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5696         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5697         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5698         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5699         #
5700         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5701         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5702         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5703         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5704         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5705         #
5706         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5707         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5708         #
5709         #
5710         #  @return New GEOM.GEOM_Object, containing processed shape.
5711         #
5712         #  \n @ref tui_shape_processing "Example"
5713         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5714             """
5715             Apply a sequence of Shape Healing operators to the given object.
5716
5717             Parameters:
5718                 theShape Shape to be processed.
5719                 theValues List of values of parameters, in the same order
5720                           as parameters are listed in theParameters list.
5721                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5722                 theParameters List of names of parameters
5723                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5724                 theName Object name; when specified, this parameter is used
5725                         for result publication in the study. Otherwise, if automatic
5726                         publication is switched on, default value is used for result name.
5727
5728                 Operators and Parameters:
5729
5730                  * FixShape - corrects invalid shapes.
5731                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5732                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5733                  * FixFaceSize - removes small faces, such as spots and strips.
5734                      * FixFaceSize.Tolerance - defines minimum possible face size.
5735                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5736                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5737                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5738                                 in segments using a certain angle.
5739                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5740                                           if Angle=180, four if Angle=90, etc).
5741                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5742                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5743                                       splitting points.
5744                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5745                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5746                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5747                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5748                      * SplitContinuity.CurveContinuity - required continuity for curves.
5749                        This and the previous parameters can take the following values:
5750                        
5751                        Parametric Continuity:
5752                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5753                                                    coincidental. The curves or surfaces may still meet at an angle,
5754                                                    giving rise to a sharp corner or edge).
5755                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5756                                                    are parallel, ruling out sharp edges).
5757                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5758                                                   or surfaces are of the same magnitude).
5759                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5760                           curves or surfaces (d/du C(u)) are the same at junction.
5761                           
5762                        Geometric Continuity:
5763                        G1: first derivatives are proportional at junction.
5764                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5765                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5766                        G2: first and second derivatives are proportional at junction. As the names imply,
5767                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5768                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5769                            geometric continuity of order n, but not vice-versa.
5770                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5771                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5772                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5773                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5774                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5775                                                         the specified parameters.
5776                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5777                                                         the specified parameters.
5778                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5779                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5780                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5781                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5782                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5783                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5784                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5785                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5786                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5787                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5788                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5789
5790             Returns:
5791                 New GEOM.GEOM_Object, containing processed shape.
5792
5793             Note: For more information look through SALOME Geometry User's Guide->
5794                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5795             """
5796             # Example: see GEOM_TestHealing.py
5797             theValues,Parameters = ParseList(theValues)
5798             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5799             # To avoid script failure in case of good argument shape
5800             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5801                 return theShape
5802             RaiseIfFailed("ProcessShape", self.HealOp)
5803             for string in (theOperators + theParameters):
5804                 Parameters = ":" + Parameters
5805                 pass
5806             anObj.SetParameters(Parameters)
5807             self._autoPublish(anObj, theName, "healed")
5808             return anObj
5809
5810         ## Remove faces from the given object (shape).
5811         #  @param theObject Shape to be processed.
5812         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5813         #                  removes ALL faces of the given object.
5814         #  @param theName Object name; when specified, this parameter is used
5815         #         for result publication in the study. Otherwise, if automatic
5816         #         publication is switched on, default value is used for result name.
5817         #
5818         #  @return New GEOM.GEOM_Object, containing processed shape.
5819         #
5820         #  @ref tui_suppress_faces "Example"
5821         def SuppressFaces(self, theObject, theFaces, theName=None):
5822             """
5823             Remove faces from the given object (shape).
5824
5825             Parameters:
5826                 theObject Shape to be processed.
5827                 theFaces Indices of faces to be removed, if EMPTY then the method
5828                          removes ALL faces of the given object.
5829                 theName Object name; when specified, this parameter is used
5830                         for result publication in the study. Otherwise, if automatic
5831                         publication is switched on, default value is used for result name.
5832
5833             Returns:
5834                 New GEOM.GEOM_Object, containing processed shape.
5835             """
5836             # Example: see GEOM_TestHealing.py
5837             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5838             RaiseIfFailed("SuppressFaces", self.HealOp)
5839             self._autoPublish(anObj, theName, "suppressFaces")
5840             return anObj
5841
5842         ## Sewing of some shapes into single shape.
5843         #  @param ListShape Shapes to be processed.
5844         #  @param theTolerance Required tolerance value.
5845         #  @param theName Object name; when specified, this parameter is used
5846         #         for result publication in the study. Otherwise, if automatic
5847         #         publication is switched on, default value is used for result name.
5848         #
5849         #  @return New GEOM.GEOM_Object, containing processed shape.
5850         #
5851         #  @ref tui_sewing "Example"
5852         def MakeSewing(self, ListShape, theTolerance, theName=None):
5853             """
5854             Sewing of some shapes into single shape.
5855
5856             Parameters:
5857                 ListShape Shapes to be processed.
5858                 theTolerance Required tolerance value.
5859                 theName Object name; when specified, this parameter is used
5860                         for result publication in the study. Otherwise, if automatic
5861                         publication is switched on, default value is used for result name.
5862
5863             Returns:
5864                 New GEOM.GEOM_Object, containing processed shape.
5865             """
5866             # Example: see GEOM_TestHealing.py
5867             comp = self.MakeCompound(ListShape)
5868             # note: auto-publishing is done in self.Sew()
5869             anObj = self.Sew(comp, theTolerance, theName)
5870             return anObj
5871
5872         ## Sewing of the given object.
5873         #  @param theObject Shape to be processed.
5874         #  @param theTolerance Required tolerance value.
5875         #  @param theName Object name; when specified, this parameter is used
5876         #         for result publication in the study. Otherwise, if automatic
5877         #         publication is switched on, default value is used for result name.
5878         #
5879         #  @return New GEOM.GEOM_Object, containing processed shape.
5880         def Sew(self, theObject, theTolerance, theName=None):
5881             """
5882             Sewing of the given object.
5883
5884             Parameters:
5885                 theObject Shape to be processed.
5886                 theTolerance Required tolerance value.
5887                 theName Object name; when specified, this parameter is used
5888                         for result publication in the study. Otherwise, if automatic
5889                         publication is switched on, default value is used for result name.
5890
5891             Returns:
5892                 New GEOM.GEOM_Object, containing processed shape.
5893             """
5894             # Example: see MakeSewing() above
5895             theTolerance,Parameters = ParseParameters(theTolerance)
5896             anObj = self.HealOp.Sew(theObject, theTolerance)
5897             RaiseIfFailed("Sew", self.HealOp)
5898             anObj.SetParameters(Parameters)
5899             self._autoPublish(anObj, theName, "sewed")
5900             return anObj
5901
5902         ## Remove internal wires and edges from the given object (face).
5903         #  @param theObject Shape to be processed.
5904         #  @param theWires Indices of wires to be removed, if EMPTY then the method
5905         #                  removes ALL internal wires of the given object.
5906         #  @param theName Object name; when specified, this parameter is used
5907         #         for result publication in the study. Otherwise, if automatic
5908         #         publication is switched on, default value is used for result name.
5909         #
5910         #  @return New GEOM.GEOM_Object, containing processed shape.
5911         #
5912         #  @ref tui_suppress_internal_wires "Example"
5913         def SuppressInternalWires(self, theObject, theWires, theName=None):
5914             """
5915             Remove internal wires and edges from the given object (face).
5916
5917             Parameters:
5918                 theObject Shape to be processed.
5919                 theWires Indices of wires to be removed, if EMPTY then the method
5920                          removes ALL internal wires of the given object.
5921                 theName Object name; when specified, this parameter is used
5922                         for result publication in the study. Otherwise, if automatic
5923                         publication is switched on, default value is used for result name.
5924
5925             Returns:                
5926                 New GEOM.GEOM_Object, containing processed shape.
5927             """
5928             # Example: see GEOM_TestHealing.py
5929             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
5930             RaiseIfFailed("RemoveIntWires", self.HealOp)
5931             self._autoPublish(anObj, theName, "suppressWires")
5932             return anObj
5933
5934         ## Remove internal closed contours (holes) from the given object.
5935         #  @param theObject Shape to be processed.
5936         #  @param theWires Indices of wires to be removed, if EMPTY then the method
5937         #                  removes ALL internal holes of the given object
5938         #  @param theName Object name; when specified, this parameter is used
5939         #         for result publication in the study. Otherwise, if automatic
5940         #         publication is switched on, default value is used for result name.
5941         #
5942         #  @return New GEOM.GEOM_Object, containing processed shape.
5943         #
5944         #  @ref tui_suppress_holes "Example"
5945         def SuppressHoles(self, theObject, theWires, theName=None):
5946             """
5947             Remove internal closed contours (holes) from the given object.
5948
5949             Parameters:
5950                 theObject Shape to be processed.
5951                 theWires Indices of wires to be removed, if EMPTY then the method
5952                          removes ALL internal holes of the given object
5953                 theName Object name; when specified, this parameter is used
5954                         for result publication in the study. Otherwise, if automatic
5955                         publication is switched on, default value is used for result name.
5956
5957             Returns:    
5958                 New GEOM.GEOM_Object, containing processed shape.
5959             """
5960             # Example: see GEOM_TestHealing.py
5961             anObj = self.HealOp.FillHoles(theObject, theWires)
5962             RaiseIfFailed("FillHoles", self.HealOp)
5963             self._autoPublish(anObj, theName, "suppressHoles")
5964             return anObj
5965
5966         ## Close an open wire.
5967         #  @param theObject Shape to be processed.
5968         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
5969         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
5970         #  @param isCommonVertex If True  : closure by creation of a common vertex,
5971         #                        If False : closure by creation of an edge between ends.
5972         #  @param theName Object name; when specified, this parameter is used
5973         #         for result publication in the study. Otherwise, if automatic
5974         #         publication is switched on, default value is used for result name.
5975         #
5976         #  @return New GEOM.GEOM_Object, containing processed shape.
5977         #
5978         #  @ref tui_close_contour "Example"
5979         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
5980             """
5981             Close an open wire.
5982
5983             Parameters: 
5984                 theObject Shape to be processed.
5985                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
5986                          if [ ], then theObject itself is a wire.
5987                 isCommonVertex If True  : closure by creation of a common vertex,
5988                                If False : closure by creation of an edge between ends.
5989                 theName Object name; when specified, this parameter is used
5990                         for result publication in the study. Otherwise, if automatic
5991                         publication is switched on, default value is used for result name.
5992
5993             Returns:                      
5994                 New GEOM.GEOM_Object, containing processed shape. 
5995             """
5996             # Example: see GEOM_TestHealing.py
5997             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
5998             RaiseIfFailed("CloseContour", self.HealOp)
5999             self._autoPublish(anObj, theName, "closeContour")
6000             return anObj
6001
6002         ## Addition of a point to a given edge object.
6003         #  @param theObject Shape to be processed.
6004         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6005         #                      if -1, then theObject itself is the edge.
6006         #  @param theValue Value of parameter on edge or length parameter,
6007         #                  depending on \a isByParameter.
6008         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6009         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6010         #  @param theName Object name; when specified, this parameter is used
6011         #         for result publication in the study. Otherwise, if automatic
6012         #         publication is switched on, default value is used for result name.
6013         #
6014         #  @return New GEOM.GEOM_Object, containing processed shape.
6015         #
6016         #  @ref tui_add_point_on_edge "Example"
6017         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6018             """
6019             Addition of a point to a given edge object.
6020
6021             Parameters: 
6022                 theObject Shape to be processed.
6023                 theEdgeIndex Index of edge to be divided within theObject's shape,
6024                              if -1, then theObject itself is the edge.
6025                 theValue Value of parameter on edge or length parameter,
6026                          depending on isByParameter.
6027                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6028                               if FALSE : theValue is treated as a length parameter [0..1]
6029                 theName Object name; when specified, this parameter is used
6030                         for result publication in the study. Otherwise, if automatic
6031                         publication is switched on, default value is used for result name.
6032
6033             Returns:  
6034                 New GEOM.GEOM_Object, containing processed shape.
6035             """
6036             # Example: see GEOM_TestHealing.py
6037             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6038             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6039             RaiseIfFailed("DivideEdge", self.HealOp)
6040             anObj.SetParameters(Parameters)
6041             self._autoPublish(anObj, theName, "divideEdge")
6042             return anObj
6043
6044         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6045         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6046         #  @param theVertices A list of vertices to suppress. If the list
6047         #                     is empty, all vertices in a wire will be assumed.
6048         #  @param theName Object name; when specified, this parameter is used
6049         #         for result publication in the study. Otherwise, if automatic
6050         #         publication is switched on, default value is used for result name.
6051         #
6052         #  @return New GEOM.GEOM_Object with modified wire.
6053         #
6054         #  @ref tui_fuse_collinear_edges "Example"
6055         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6056             """
6057             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6058
6059             Parameters: 
6060                 theWire Wire to minimize the number of C1 continuous edges in.
6061                 theVertices A list of vertices to suppress. If the list
6062                             is empty, all vertices in a wire will be assumed.
6063                 theName Object name; when specified, this parameter is used
6064                         for result publication in the study. Otherwise, if automatic
6065                         publication is switched on, default value is used for result name.
6066
6067             Returns:  
6068                 New GEOM.GEOM_Object with modified wire.
6069             """
6070             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6071             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6072             self._autoPublish(anObj, theName, "fuseEdges")
6073             return anObj
6074
6075         ## Change orientation of the given object. Updates given shape.
6076         #  @param theObject Shape to be processed.
6077         #  @return Updated <var>theObject</var>
6078         #
6079         #  @ref swig_todo "Example"
6080         def ChangeOrientationShell(self,theObject):
6081             """
6082             Change orientation of the given object. Updates given shape.
6083
6084             Parameters: 
6085                 theObject Shape to be processed.
6086
6087             Returns:  
6088                 Updated theObject
6089             """
6090             theObject = self.HealOp.ChangeOrientation(theObject)
6091             RaiseIfFailed("ChangeOrientation", self.HealOp)
6092             pass
6093
6094         ## Change orientation of the given object.
6095         #  @param theObject Shape to be processed.
6096         #  @param theName Object name; when specified, this parameter is used
6097         #         for result publication in the study. Otherwise, if automatic
6098         #         publication is switched on, default value is used for result name.
6099         #
6100         #  @return New GEOM.GEOM_Object, containing processed shape.
6101         #
6102         #  @ref swig_todo "Example"
6103         def ChangeOrientationShellCopy(self, theObject, theName=None):
6104             """
6105             Change orientation of the given object.
6106
6107             Parameters:
6108                 theObject Shape to be processed.
6109                 theName Object name; when specified, this parameter is used
6110                         for result publication in the study. Otherwise, if automatic
6111                         publication is switched on, default value is used for result name.
6112
6113             Returns:   
6114                 New GEOM.GEOM_Object, containing processed shape.
6115             """
6116             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6117             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6118             self._autoPublish(anObj, theName, "reversed")
6119             return anObj
6120
6121         ## Try to limit tolerance of the given object by value \a theTolerance.
6122         #  @param theObject Shape to be processed.
6123         #  @param theTolerance Required tolerance value.
6124         #  @param theName Object name; when specified, this parameter is used
6125         #         for result publication in the study. Otherwise, if automatic
6126         #         publication is switched on, default value is used for result name.
6127         #
6128         #  @return New GEOM.GEOM_Object, containing processed shape.
6129         #
6130         #  @ref tui_limit_tolerance "Example"
6131         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6132             """
6133             Try to limit tolerance of the given object by value theTolerance.
6134
6135             Parameters:
6136                 theObject Shape to be processed.
6137                 theTolerance Required tolerance value.
6138                 theName Object name; when specified, this parameter is used
6139                         for result publication in the study. Otherwise, if automatic
6140                         publication is switched on, default value is used for result name.
6141
6142             Returns:   
6143                 New GEOM.GEOM_Object, containing processed shape.
6144             """
6145             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6146             RaiseIfFailed("LimitTolerance", self.HealOp)
6147             self._autoPublish(anObj, theName, "limitTolerance")
6148             return anObj
6149
6150         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6151         #  that constitute a free boundary of the given shape.
6152         #  @param theObject Shape to get free boundary of.
6153         #  @param theName Object name; when specified, this parameter is used
6154         #         for result publication in the study. Otherwise, if automatic
6155         #         publication is switched on, default value is used for result name.
6156         #
6157         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6158         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6159         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6160         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6161         #
6162         #  @ref tui_measurement_tools_page "Example"
6163         def GetFreeBoundary(self, theObject, theName=None):
6164             """
6165             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6166             that constitute a free boundary of the given shape.
6167
6168             Parameters:
6169                 theObject Shape to get free boundary of.
6170                 theName Object name; when specified, this parameter is used
6171                         for result publication in the study. Otherwise, if automatic
6172                         publication is switched on, default value is used for result name.
6173
6174             Returns: 
6175                 [status, theClosedWires, theOpenWires]
6176                  status: FALSE, if an error(s) occured during the method execution.
6177                  theClosedWires: Closed wires on the free boundary of the given shape.
6178                  theOpenWires: Open wires on the free boundary of the given shape.
6179             """
6180             # Example: see GEOM_TestHealing.py
6181             anObj = self.HealOp.GetFreeBoundary(theObject)
6182             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6183             self._autoPublish(anObj[1], theName, "closedWire")
6184             self._autoPublish(anObj[2], theName, "openWire")
6185             return anObj
6186
6187         ## Replace coincident faces in theShape by one face.
6188         #  @param theShape Initial shape.
6189         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6190         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6191         #                         otherwise all initial shapes.
6192         #  @param theName Object name; when specified, this parameter is used
6193         #         for result publication in the study. Otherwise, if automatic
6194         #         publication is switched on, default value is used for result name.
6195         #
6196         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6197         #
6198         #  @ref tui_glue_faces "Example"
6199         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6200             """
6201             Replace coincident faces in theShape by one face.
6202
6203             Parameters:
6204                 theShape Initial shape.
6205                 theTolerance Maximum distance between faces, which can be considered as coincident.
6206                 doKeepNonSolids If FALSE, only solids will present in the result,
6207                                 otherwise all initial shapes.
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 a copy of theShape without coincident faces.
6214             """
6215             # Example: see GEOM_Spanner.py
6216             theTolerance,Parameters = ParseParameters(theTolerance)
6217             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6218             if anObj is None:
6219                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6220             anObj.SetParameters(Parameters)
6221             self._autoPublish(anObj, theName, "glueFaces")
6222             return anObj
6223
6224         ## Find coincident faces in theShape for possible gluing.
6225         #  @param theShape Initial shape.
6226         #  @param theTolerance Maximum distance between faces,
6227         #                      which can be considered as coincident.
6228         #  @param theName Object name; when specified, this parameter is used
6229         #         for result publication in the study. Otherwise, if automatic
6230         #         publication is switched on, default value is used for result name.
6231         #
6232         #  @return GEOM.ListOfGO
6233         #
6234         #  @ref tui_glue_faces "Example"
6235         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6236             """
6237             Find coincident faces in theShape for possible gluing.
6238
6239             Parameters:
6240                 theShape Initial shape.
6241                 theTolerance Maximum distance between faces,
6242                              which can be considered as coincident.
6243                 theName Object name; when specified, this parameter is used
6244                         for result publication in the study. Otherwise, if automatic
6245                         publication is switched on, default value is used for result name.
6246
6247             Returns:                    
6248                 GEOM.ListOfGO
6249             """
6250             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6251             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6252             self._autoPublish(anObj, theName, "facesToGlue")
6253             return anObj
6254
6255         ## Replace coincident faces in theShape by one face
6256         #  in compliance with given list of faces
6257         #  @param theShape Initial shape.
6258         #  @param theTolerance Maximum distance between faces,
6259         #                      which can be considered as coincident.
6260         #  @param theFaces List of faces for gluing.
6261         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6262         #                         otherwise all initial shapes.
6263         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6264         #                        will be glued, otherwise only the edges,
6265         #                        belonging to <VAR>theFaces</VAR>.
6266         #  @param theName Object name; when specified, this parameter is used
6267         #         for result publication in the study. Otherwise, if automatic
6268         #         publication is switched on, default value is used for result name.
6269         #
6270         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6271         #          without some faces.
6272         #
6273         #  @ref tui_glue_faces "Example"
6274         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6275                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6276             """
6277             Replace coincident faces in theShape by one face
6278             in compliance with given list of faces
6279
6280             Parameters:
6281                 theShape Initial shape.
6282                 theTolerance Maximum distance between faces,
6283                              which can be considered as coincident.
6284                 theFaces List of faces for gluing.
6285                 doKeepNonSolids If FALSE, only solids will present in the result,
6286                                 otherwise all initial shapes.
6287                 doGlueAllEdges If TRUE, all coincident edges of theShape
6288                                will be glued, otherwise only the edges,
6289                                belonging to theFaces.
6290                 theName Object name; when specified, this parameter is used
6291                         for result publication in the study. Otherwise, if automatic
6292                         publication is switched on, default value is used for result name.
6293
6294             Returns:
6295                 New GEOM.GEOM_Object, containing a copy of theShape
6296                     without some faces.
6297             """
6298             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6299                                                       doKeepNonSolids, doGlueAllEdges)
6300             if anObj is None:
6301                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6302             self._autoPublish(anObj, theName, "glueFaces")
6303             return anObj
6304
6305         ## Replace coincident edges in theShape by one edge.
6306         #  @param theShape Initial shape.
6307         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6308         #  @param theName Object name; when specified, this parameter is used
6309         #         for result publication in the study. Otherwise, if automatic
6310         #         publication is switched on, default value is used for result name.
6311         #
6312         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6313         #
6314         #  @ref tui_glue_edges "Example"
6315         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6316             """
6317             Replace coincident edges in theShape by one edge.
6318
6319             Parameters:
6320                 theShape Initial shape.
6321                 theTolerance Maximum distance between edges, which can be considered as coincident.
6322                 theName Object name; when specified, this parameter is used
6323                         for result publication in the study. Otherwise, if automatic
6324                         publication is switched on, default value is used for result name.
6325
6326             Returns:    
6327                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6328             """
6329             theTolerance,Parameters = ParseParameters(theTolerance)
6330             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6331             if anObj is None:
6332                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6333             anObj.SetParameters(Parameters)
6334             self._autoPublish(anObj, theName, "glueEdges")
6335             return anObj
6336
6337         ## Find coincident edges in theShape for possible gluing.
6338         #  @param theShape Initial shape.
6339         #  @param theTolerance Maximum distance between edges,
6340         #                      which can be considered as coincident.
6341         #  @param theName Object name; when specified, this parameter is used
6342         #         for result publication in the study. Otherwise, if automatic
6343         #         publication is switched on, default value is used for result name.
6344         #
6345         #  @return GEOM.ListOfGO
6346         #
6347         #  @ref tui_glue_edges "Example"
6348         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6349             """
6350             Find coincident edges in theShape for possible gluing.
6351
6352             Parameters:
6353                 theShape Initial shape.
6354                 theTolerance Maximum distance between edges,
6355                              which can be considered as coincident.
6356                 theName Object name; when specified, this parameter is used
6357                         for result publication in the study. Otherwise, if automatic
6358                         publication is switched on, default value is used for result name.
6359
6360             Returns:                         
6361                 GEOM.ListOfGO
6362             """
6363             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6364             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6365             self._autoPublish(anObj, theName, "edgesToGlue")
6366             return anObj
6367
6368         ## Replace coincident edges in theShape by one edge
6369         #  in compliance with given list of edges.
6370         #  @param theShape Initial shape.
6371         #  @param theTolerance Maximum distance between edges,
6372         #                      which can be considered as coincident.
6373         #  @param theEdges List of edges for gluing.
6374         #  @param theName Object name; when specified, this parameter is used
6375         #         for result publication in the study. Otherwise, if automatic
6376         #         publication is switched on, default value is used for result name.
6377         #
6378         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6379         #          without some edges.
6380         #
6381         #  @ref tui_glue_edges "Example"
6382         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6383             """
6384             Replace coincident edges in theShape by one edge
6385             in compliance with given list of edges.
6386
6387             Parameters:
6388                 theShape Initial shape.
6389                 theTolerance Maximum distance between edges,
6390                              which can be considered as coincident.
6391                 theEdges List of edges for gluing.
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
6398                 without some edges.
6399             """
6400             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6401             if anObj is None:
6402                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6403             self._autoPublish(anObj, theName, "glueEdges")
6404             return anObj
6405
6406         # end of l3_healing
6407         ## @}
6408
6409         ## @addtogroup l3_boolean Boolean Operations
6410         ## @{
6411
6412         # -----------------------------------------------------------------------------
6413         # Boolean (Common, Cut, Fuse, Section)
6414         # -----------------------------------------------------------------------------
6415
6416         ## Perform one of boolean operations on two given shapes.
6417         #  @param theShape1 First argument for boolean operation.
6418         #  @param theShape2 Second argument for boolean operation.
6419         #  @param theOperation Indicates the operation to be done:\n
6420         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6421         #  @param theName Object name; when specified, this parameter is used
6422         #         for result publication in the study. Otherwise, if automatic
6423         #         publication is switched on, default value is used for result name.
6424         #
6425         #  @return New GEOM.GEOM_Object, containing the result shape.
6426         #
6427         #  @ref tui_fuse "Example"
6428         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6429             """
6430             Perform one of boolean operations on two given shapes.
6431
6432             Parameters: 
6433                 theShape1 First argument for boolean operation.
6434                 theShape2 Second argument for boolean operation.
6435                 theOperation Indicates the operation to be done:
6436                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6437                 theName Object name; when specified, this parameter is used
6438                         for result publication in the study. Otherwise, if automatic
6439                         publication is switched on, default value is used for result name.
6440
6441             Returns:   
6442                 New GEOM.GEOM_Object, containing the result shape.
6443             """
6444             # Example: see GEOM_TestAll.py
6445             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6446             RaiseIfFailed("MakeBoolean", self.BoolOp)
6447             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6448             self._autoPublish(anObj, theName, def_names[theOperation])
6449             return anObj
6450
6451         ## Perform Common boolean operation on two given shapes.
6452         #  @param theShape1 First argument for boolean operation.
6453         #  @param theShape2 Second argument for boolean operation.
6454         #  @param theName Object name; when specified, this parameter is used
6455         #         for result publication in the study. Otherwise, if automatic
6456         #         publication is switched on, default value is used for result name.
6457         #
6458         #  @return New GEOM.GEOM_Object, containing the result shape.
6459         #
6460         #  @ref tui_common "Example 1"
6461         #  \n @ref swig_MakeCommon "Example 2"
6462         def MakeCommon(self, theShape1, theShape2, theName=None):
6463             """
6464             Perform Common boolean operation on two given shapes.
6465
6466             Parameters: 
6467                 theShape1 First argument for boolean operation.
6468                 theShape2 Second argument for boolean operation.
6469                 theName Object name; when specified, this parameter is used
6470                         for result publication in the study. Otherwise, if automatic
6471                         publication is switched on, default value is used for result name.
6472
6473             Returns:   
6474                 New GEOM.GEOM_Object, containing the result shape.
6475             """
6476             # Example: see GEOM_TestOthers.py
6477             # note: auto-publishing is done in self.MakeBoolean()
6478             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6479
6480         ## Perform Cut boolean operation on two given shapes.
6481         #  @param theShape1 First argument for boolean operation.
6482         #  @param theShape2 Second argument for boolean operation.
6483         #  @param theName Object name; when specified, this parameter is used
6484         #         for result publication in the study. Otherwise, if automatic
6485         #         publication is switched on, default value is used for result name.
6486         #
6487         #  @return New GEOM.GEOM_Object, containing the result shape.
6488         #
6489         #  @ref tui_cut "Example 1"
6490         #  \n @ref swig_MakeCommon "Example 2"
6491         def MakeCut(self, theShape1, theShape2, theName=None):
6492             """
6493             Perform Cut boolean operation on two given shapes.
6494
6495             Parameters: 
6496                 theShape1 First argument for boolean operation.
6497                 theShape2 Second argument for boolean operation.
6498                 theName Object name; when specified, this parameter is used
6499                         for result publication in the study. Otherwise, if automatic
6500                         publication is switched on, default value is used for result name.
6501
6502             Returns:   
6503                 New GEOM.GEOM_Object, containing the result shape.
6504             
6505             """
6506             # Example: see GEOM_TestOthers.py
6507             # note: auto-publishing is done in self.MakeBoolean()
6508             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6509
6510         ## Perform Fuse boolean operation on two given shapes.
6511         #  @param theShape1 First argument for boolean operation.
6512         #  @param theShape2 Second argument for boolean operation.
6513         #  @param theName Object name; when specified, this parameter is used
6514         #         for result publication in the study. Otherwise, if automatic
6515         #         publication is switched on, default value is used for result name.
6516         #
6517         #  @return New GEOM.GEOM_Object, containing the result shape.
6518         #
6519         #  @ref tui_fuse "Example 1"
6520         #  \n @ref swig_MakeCommon "Example 2"
6521         def MakeFuse(self, theShape1, theShape2, theName=None):
6522             """
6523             Perform Fuse boolean operation on two given shapes.
6524
6525             Parameters: 
6526                 theShape1 First argument for boolean operation.
6527                 theShape2 Second argument for boolean operation.
6528                 theName Object name; when specified, this parameter is used
6529                         for result publication in the study. Otherwise, if automatic
6530                         publication is switched on, default value is used for result name.
6531
6532             Returns:   
6533                 New GEOM.GEOM_Object, containing the result shape.
6534             
6535             """
6536             # Example: see GEOM_TestOthers.py
6537             # note: auto-publishing is done in self.MakeBoolean()
6538             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6539
6540         ## Perform Section boolean operation on two given shapes.
6541         #  @param theShape1 First argument for boolean operation.
6542         #  @param theShape2 Second argument for boolean operation.
6543         #  @param theName Object name; when specified, this parameter is used
6544         #         for result publication in the study. Otherwise, if automatic
6545         #         publication is switched on, default value is used for result name.
6546         #
6547         #  @return New GEOM.GEOM_Object, containing the result shape.
6548         #
6549         #  @ref tui_section "Example 1"
6550         #  \n @ref swig_MakeCommon "Example 2"
6551         def MakeSection(self, theShape1, theShape2, theName=None):
6552             """
6553             Perform Section boolean operation on two given shapes.
6554
6555             Parameters: 
6556                 theShape1 First argument for boolean operation.
6557                 theShape2 Second argument for boolean operation.
6558                 theName Object name; when specified, this parameter is used
6559                         for result publication in the study. Otherwise, if automatic
6560                         publication is switched on, default value is used for result name.
6561
6562             Returns:   
6563                 New GEOM.GEOM_Object, containing the result shape.
6564             
6565             """
6566             # Example: see GEOM_TestOthers.py
6567             # note: auto-publishing is done in self.MakeBoolean()
6568             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6569
6570         # end of l3_boolean
6571         ## @}
6572
6573         ## @addtogroup l3_basic_op
6574         ## @{
6575
6576         ## Perform partition operation.
6577         #  @param ListShapes Shapes to be intersected.
6578         #  @param ListTools Shapes to intersect theShapes.
6579         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6580         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6581         #         type will be detected automatically.
6582         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6583         #                             target type (equal to Limit) are kept in the result,
6584         #                             else standalone shapes of lower dimension
6585         #                             are kept also (if they exist).
6586         #  @param theName Object name; when specified, this parameter is used
6587         #         for result publication in the study. Otherwise, if automatic
6588         #         publication is switched on, default value is used for result name.
6589         #
6590         #  @note Each compound from ListShapes and ListTools will be exploded
6591         #        in order to avoid possible intersection between shapes from this compound.
6592         #
6593         #  After implementation new version of PartitionAlgo (October 2006)
6594         #  other parameters are ignored by current functionality. They are kept
6595         #  in this function only for support old versions.
6596         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6597         #         Each shape from theKeepInside must belong to theShapes also.
6598         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6599         #         Each shape from theRemoveInside must belong to theShapes also.
6600         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6601         #      @param ListMaterials Material indices for each shape. Make sence,
6602         #         only if theRemoveWebs is TRUE.
6603         #
6604         #  @return New GEOM.GEOM_Object, containing the result shapes.
6605         #
6606         #  @ref tui_partition "Example"
6607         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6608                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6609                           KeepNonlimitShapes=0, theName=None):
6610             """
6611             Perform partition operation.
6612
6613             Parameters: 
6614                 ListShapes Shapes to be intersected.
6615                 ListTools Shapes to intersect theShapes.
6616                 Limit Type of resulting shapes (see geompy.ShapeType)
6617                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6618                       type will be detected automatically.
6619                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6620                                     target type (equal to Limit) are kept in the result,
6621                                     else standalone shapes of lower dimension
6622                                     are kept also (if they exist).
6623                 theName Object name; when specified, this parameter is used
6624                         for result publication in the study. Otherwise, if automatic
6625                         publication is switched on, default value is used for result name.
6626             Note:
6627                     Each compound from ListShapes and ListTools will be exploded
6628                     in order to avoid possible intersection between shapes from
6629                     this compound.
6630                     
6631             After implementation new version of PartitionAlgo (October 2006) other
6632             parameters are ignored by current functionality. They are kept in this
6633             function only for support old versions.
6634             
6635             Ignored parameters:
6636                 ListKeepInside Shapes, outside which the results will be deleted.
6637                                Each shape from theKeepInside must belong to theShapes also.
6638                 ListRemoveInside Shapes, inside which the results will be deleted.
6639                                  Each shape from theRemoveInside must belong to theShapes also.
6640                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6641                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6642
6643             Returns:   
6644                 New GEOM.GEOM_Object, containing the result shapes.
6645             """
6646             # Example: see GEOM_TestAll.py
6647             if Limit == ShapeType["AUTO"]:
6648                 # automatic detection of the most appropriate shape limit type
6649                 lim = GEOM.SHAPE
6650                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6651                 Limit = EnumToLong(lim)
6652                 pass
6653             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6654                                               ListKeepInside, ListRemoveInside,
6655                                               Limit, RemoveWebs, ListMaterials,
6656                                               KeepNonlimitShapes);
6657             RaiseIfFailed("MakePartition", self.BoolOp)
6658             self._autoPublish(anObj, theName, "partition")
6659             return anObj
6660
6661         ## Perform partition operation.
6662         #  This method may be useful if it is needed to make a partition for
6663         #  compound contains nonintersected shapes. Performance will be better
6664         #  since intersection between shapes from compound is not performed.
6665         #
6666         #  Description of all parameters as in previous method MakePartition()
6667         #
6668         #  @note Passed compounds (via ListShapes or via ListTools)
6669         #           have to consist of nonintersecting shapes.
6670         #
6671         #  @return New GEOM.GEOM_Object, containing the result shapes.
6672         #
6673         #  @ref swig_todo "Example"
6674         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6675                                                  ListKeepInside=[], ListRemoveInside=[],
6676                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6677                                                  ListMaterials=[], KeepNonlimitShapes=0,
6678                                                  theName=None):
6679             """
6680             Perform partition operation.
6681             This method may be useful if it is needed to make a partition for
6682             compound contains nonintersected shapes. Performance will be better
6683             since intersection between shapes from compound is not performed.
6684
6685             Parameters: 
6686                 Description of all parameters as in method geompy.MakePartition
6687         
6688             NOTE:
6689                 Passed compounds (via ListShapes or via ListTools)
6690                 have to consist of nonintersecting shapes.
6691
6692             Returns:   
6693                 New GEOM.GEOM_Object, containing the result shapes.
6694             """
6695             if Limit == ShapeType["AUTO"]:
6696                 # automatic detection of the most appropriate shape limit type
6697                 lim = GEOM.SHAPE
6698                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6699                 Limit = EnumToLong(lim)
6700                 pass
6701             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6702                                                                      ListKeepInside, ListRemoveInside,
6703                                                                      Limit, RemoveWebs, ListMaterials,
6704                                                                      KeepNonlimitShapes);
6705             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6706             self._autoPublish(anObj, theName, "partition")
6707             return anObj
6708
6709         ## See method MakePartition() for more information.
6710         #
6711         #  @ref tui_partition "Example 1"
6712         #  \n @ref swig_Partition "Example 2"
6713         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6714                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6715                       KeepNonlimitShapes=0, theName=None):
6716             """
6717             See method geompy.MakePartition for more information.
6718             """
6719             # Example: see GEOM_TestOthers.py
6720             # note: auto-publishing is done in self.MakePartition()
6721             anObj = self.MakePartition(ListShapes, ListTools,
6722                                        ListKeepInside, ListRemoveInside,
6723                                        Limit, RemoveWebs, ListMaterials,
6724                                        KeepNonlimitShapes, theName);
6725             return anObj
6726
6727         ## Perform partition of the Shape with the Plane
6728         #  @param theShape Shape to be intersected.
6729         #  @param thePlane Tool shape, to intersect theShape.
6730         #  @param theName Object name; when specified, this parameter is used
6731         #         for result publication in the study. Otherwise, if automatic
6732         #         publication is switched on, default value is used for result name.
6733         #
6734         #  @return New GEOM.GEOM_Object, containing the result shape.
6735         #
6736         #  @ref tui_partition "Example"
6737         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6738             """
6739             Perform partition of the Shape with the Plane
6740
6741             Parameters: 
6742                 theShape Shape to be intersected.
6743                 thePlane Tool shape, to intersect theShape.
6744                 theName Object name; when specified, this parameter is used
6745                         for result publication in the study. Otherwise, if automatic
6746                         publication is switched on, default value is used for result name.
6747
6748             Returns:  
6749                 New GEOM.GEOM_Object, containing the result shape.
6750             """
6751             # Example: see GEOM_TestAll.py
6752             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
6753             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
6754             self._autoPublish(anObj, theName, "partition")
6755             return anObj
6756
6757         # end of l3_basic_op
6758         ## @}
6759
6760         ## @addtogroup l3_transform
6761         ## @{
6762
6763         ## Translate the given object along the vector, specified
6764         #  by its end points.
6765         #  @param theObject The object to be translated.
6766         #  @param thePoint1 Start point of translation vector.
6767         #  @param thePoint2 End point of translation vector.
6768         #  @param theCopy Flag used to translate object itself or create a copy.
6769         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6770         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6771         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
6772             """
6773             Translate the given object along the vector, specified by its end points.
6774
6775             Parameters: 
6776                 theObject The object to be translated.
6777                 thePoint1 Start point of translation vector.
6778                 thePoint2 End point of translation vector.
6779                 theCopy Flag used to translate object itself or create a copy.
6780
6781             Returns: 
6782                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6783                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6784             """
6785             if theCopy:
6786                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6787             else:
6788                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
6789             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
6790             return anObj
6791
6792         ## Translate the given object along the vector, specified
6793         #  by its end points, creating its copy before the translation.
6794         #  @param theObject The object to be translated.
6795         #  @param thePoint1 Start point of translation vector.
6796         #  @param thePoint2 End point of translation vector.
6797         #  @param theName Object name; when specified, this parameter is used
6798         #         for result publication in the study. Otherwise, if automatic
6799         #         publication is switched on, default value is used for result name.
6800         #
6801         #  @return New GEOM.GEOM_Object, containing the translated object.
6802         #
6803         #  @ref tui_translation "Example 1"
6804         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
6805         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
6806             """
6807             Translate the given object along the vector, specified
6808             by its end points, creating its copy before the translation.
6809
6810             Parameters: 
6811                 theObject The object to be translated.
6812                 thePoint1 Start point of translation vector.
6813                 thePoint2 End point of translation vector.
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 translated object.
6820             """
6821             # Example: see GEOM_TestAll.py
6822             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6823             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
6824             self._autoPublish(anObj, theName, "translated")
6825             return anObj
6826
6827         ## Translate the given object along the vector, specified by its components.
6828         #  @param theObject The object to be translated.
6829         #  @param theDX,theDY,theDZ Components of translation vector.
6830         #  @param theCopy Flag used to translate object itself or create a copy.
6831         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6832         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6833         #
6834         #  @ref tui_translation "Example"
6835         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
6836             """
6837             Translate the given object along the vector, specified by its components.
6838
6839             Parameters: 
6840                 theObject The object to be translated.
6841                 theDX,theDY,theDZ Components of translation vector.
6842                 theCopy Flag used to translate object itself or create a copy.
6843
6844             Returns: 
6845                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6846                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6847             """
6848             # Example: see GEOM_TestAll.py
6849             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
6850             if theCopy:
6851                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
6852             else:
6853                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
6854             anObj.SetParameters(Parameters)
6855             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
6856             return anObj
6857
6858         ## Translate the given object along the vector, specified
6859         #  by its components, creating its copy before the translation.
6860         #  @param theObject The object to be translated.
6861         #  @param theDX,theDY,theDZ Components of translation vector.
6862         #  @param theName Object name; when specified, this parameter is used
6863         #         for result publication in the study. Otherwise, if automatic
6864         #         publication is switched on, default value is used for result name.
6865         #
6866         #  @return New GEOM.GEOM_Object, containing the translated object.
6867         #
6868         #  @ref tui_translation "Example"
6869         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
6870             """
6871             Translate the given object along the vector, specified
6872             by its components, creating its copy before the translation.
6873
6874             Parameters: 
6875                 theObject The object to be translated.
6876                 theDX,theDY,theDZ Components of translation vector.
6877                 theName Object name; when specified, this parameter is used
6878                         for result publication in the study. Otherwise, if automatic
6879                         publication is switched on, default value is used for result name.
6880
6881             Returns: 
6882                 New GEOM.GEOM_Object, containing the translated object.
6883             """
6884             # Example: see GEOM_TestAll.py
6885             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
6886             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
6887             anObj.SetParameters(Parameters)
6888             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
6889             self._autoPublish(anObj, theName, "translated")
6890             return anObj
6891
6892         ## Translate the given object along the given vector.
6893         #  @param theObject The object to be translated.
6894         #  @param theVector The translation vector.
6895         #  @param theCopy Flag used to translate object itself or create a copy.
6896         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6897         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6898         def TranslateVector(self, theObject, theVector, theCopy=False):
6899             """
6900             Translate the given object along the given vector.
6901
6902             Parameters: 
6903                 theObject The object to be translated.
6904                 theVector The translation vector.
6905                 theCopy Flag used to translate object itself or create a copy.
6906
6907             Returns: 
6908                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6909                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6910             """
6911             if theCopy:
6912                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
6913             else:
6914                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
6915             RaiseIfFailed("TranslateVector", self.TrsfOp)
6916             return anObj
6917
6918         ## Translate the given object along the given vector,
6919         #  creating its copy before the translation.
6920         #  @param theObject The object to be translated.
6921         #  @param theVector The translation vector.
6922         #  @param theName Object name; when specified, this parameter is used
6923         #         for result publication in the study. Otherwise, if automatic
6924         #         publication is switched on, default value is used for result name.
6925         #
6926         #  @return New GEOM.GEOM_Object, containing the translated object.
6927         #
6928         #  @ref tui_translation "Example"
6929         def MakeTranslationVector(self, theObject, theVector, theName=None):
6930             """
6931             Translate the given object along the given vector,
6932             creating its copy before the translation.
6933
6934             Parameters: 
6935                 theObject The object to be translated.
6936                 theVector The translation vector.
6937                 theName Object name; when specified, this parameter is used
6938                         for result publication in the study. Otherwise, if automatic
6939                         publication is switched on, default value is used for result name.
6940
6941             Returns: 
6942                 New GEOM.GEOM_Object, containing the translated object.
6943             """
6944             # Example: see GEOM_TestAll.py
6945             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
6946             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
6947             self._autoPublish(anObj, theName, "translated")
6948             return anObj
6949
6950         ## Translate the given object along the given vector on given distance.
6951         #  @param theObject The object to be translated.
6952         #  @param theVector The translation vector.
6953         #  @param theDistance The translation distance.
6954         #  @param theCopy Flag used to translate object itself or create a copy.
6955         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6956         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6957         #
6958         #  @ref tui_translation "Example"
6959         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
6960             """
6961             Translate the given object along the given vector on given distance.
6962
6963             Parameters: 
6964                 theObject The object to be translated.
6965                 theVector The translation vector.
6966                 theDistance The translation distance.
6967                 theCopy Flag used to translate object itself or create a copy.
6968
6969             Returns: 
6970                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6971                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6972             """
6973             # Example: see GEOM_TestAll.py
6974             theDistance,Parameters = ParseParameters(theDistance)
6975             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
6976             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
6977             anObj.SetParameters(Parameters)
6978             return anObj
6979
6980         ## Translate the given object along the given vector on given distance,
6981         #  creating its copy before the translation.
6982         #  @param theObject The object to be translated.
6983         #  @param theVector The translation vector.
6984         #  @param theDistance The translation distance.
6985         #  @param theName Object name; when specified, this parameter is used
6986         #         for result publication in the study. Otherwise, if automatic
6987         #         publication is switched on, default value is used for result name.
6988         #
6989         #  @return New GEOM.GEOM_Object, containing the translated object.
6990         #
6991         #  @ref tui_translation "Example"
6992         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
6993             """
6994             Translate the given object along the given vector on given distance,
6995             creating its copy before the translation.
6996
6997             Parameters:
6998                 theObject The object to be translated.
6999                 theVector The translation vector.
7000                 theDistance The translation distance.
7001                 theName Object name; when specified, this parameter is used
7002                         for result publication in the study. Otherwise, if automatic
7003                         publication is switched on, default value is used for result name.
7004
7005             Returns: 
7006                 New GEOM.GEOM_Object, containing the translated object.
7007             """
7008             # Example: see GEOM_TestAll.py
7009             theDistance,Parameters = ParseParameters(theDistance)
7010             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7011             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7012             anObj.SetParameters(Parameters)
7013             self._autoPublish(anObj, theName, "translated")
7014             return anObj
7015
7016         ## Rotate the given object around the given axis on the given angle.
7017         #  @param theObject The object to be rotated.
7018         #  @param theAxis Rotation axis.
7019         #  @param theAngle Rotation angle in radians.
7020         #  @param theCopy Flag used to rotate object itself or create a copy.
7021         #
7022         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7023         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7024         #
7025         #  @ref tui_rotation "Example"
7026         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7027             """
7028             Rotate the given object around the given axis on the given angle.
7029
7030             Parameters:
7031                 theObject The object to be rotated.
7032                 theAxis Rotation axis.
7033                 theAngle Rotation angle in radians.
7034                 theCopy Flag used to rotate object itself or create a copy.
7035
7036             Returns:
7037                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7038                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7039             """
7040             # Example: see GEOM_TestAll.py
7041             flag = False
7042             if isinstance(theAngle,str):
7043                 flag = True
7044             theAngle, Parameters = ParseParameters(theAngle)
7045             if flag:
7046                 theAngle = theAngle*math.pi/180.0
7047             if theCopy:
7048                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7049             else:
7050                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7051             RaiseIfFailed("Rotate", self.TrsfOp)
7052             anObj.SetParameters(Parameters)
7053             return anObj
7054
7055         ## Rotate the given object around the given axis
7056         #  on the given angle, creating its copy before the rotatation.
7057         #  @param theObject The object to be rotated.
7058         #  @param theAxis Rotation axis.
7059         #  @param theAngle Rotation angle in radians.
7060         #  @param theName Object name; when specified, this parameter is used
7061         #         for result publication in the study. Otherwise, if automatic
7062         #         publication is switched on, default value is used for result name.
7063         #
7064         #  @return New GEOM.GEOM_Object, containing the rotated object.
7065         #
7066         #  @ref tui_rotation "Example"
7067         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7068             """
7069             Rotate the given object around the given axis
7070             on the given angle, creating its copy before the rotatation.
7071
7072             Parameters:
7073                 theObject The object to be rotated.
7074                 theAxis Rotation axis.
7075                 theAngle Rotation angle in radians.
7076                 theName Object name; when specified, this parameter is used
7077                         for result publication in the study. Otherwise, if automatic
7078                         publication is switched on, default value is used for result name.
7079
7080             Returns:
7081                 New GEOM.GEOM_Object, containing the rotated object.
7082             """
7083             # Example: see GEOM_TestAll.py
7084             flag = False
7085             if isinstance(theAngle,str):
7086                 flag = True
7087             theAngle, Parameters = ParseParameters(theAngle)
7088             if flag:
7089                 theAngle = theAngle*math.pi/180.0
7090             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7091             RaiseIfFailed("RotateCopy", self.TrsfOp)
7092             anObj.SetParameters(Parameters)
7093             self._autoPublish(anObj, theName, "rotated")
7094             return anObj
7095
7096         ## Rotate given object around vector perpendicular to plane
7097         #  containing three points.
7098         #  @param theObject The object to be rotated.
7099         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7100         #  containing the three points.
7101         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7102         #  @param theCopy Flag used to rotate object itself or create a copy.
7103         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7104         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7105         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7106             """
7107             Rotate given object around vector perpendicular to plane
7108             containing three points.
7109
7110             Parameters:
7111                 theObject The object to be rotated.
7112                 theCentPoint central point  the axis is the vector perpendicular to the plane
7113                              containing the three points.
7114                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7115                 theCopy Flag used to rotate object itself or create a copy.
7116
7117             Returns:
7118                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7119                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7120             """
7121             if theCopy:
7122                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7123             else:
7124                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7125             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7126             return anObj
7127
7128         ## Rotate given object around vector perpendicular to plane
7129         #  containing three points, creating its copy before the rotatation.
7130         #  @param theObject The object to be rotated.
7131         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7132         #  containing the three points.
7133         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7134         #  @param theName Object name; when specified, this parameter is used
7135         #         for result publication in the study. Otherwise, if automatic
7136         #         publication is switched on, default value is used for result name.
7137         #
7138         #  @return New GEOM.GEOM_Object, containing the rotated object.
7139         #
7140         #  @ref tui_rotation "Example"
7141         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7142             """
7143             Rotate given object around vector perpendicular to plane
7144             containing three points, creating its copy before the rotatation.
7145
7146             Parameters:
7147                 theObject The object to be rotated.
7148                 theCentPoint central point  the axis is the vector perpendicular to the plane
7149                              containing the three points.
7150                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7151                 theName Object name; when specified, this parameter is used
7152                         for result publication in the study. Otherwise, if automatic
7153                         publication is switched on, default value is used for result name.
7154
7155             Returns:
7156                 New GEOM.GEOM_Object, containing the rotated object.
7157             """
7158             # Example: see GEOM_TestAll.py
7159             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7160             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7161             self._autoPublish(anObj, theName, "rotated")
7162             return anObj
7163
7164         ## Scale the given object by the specified factor.
7165         #  @param theObject The object to be scaled.
7166         #  @param thePoint Center point for scaling.
7167         #                  Passing None for it means scaling relatively the origin of global CS.
7168         #  @param theFactor Scaling factor value.
7169         #  @param theCopy Flag used to scale object itself or create a copy.
7170         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7171         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7172         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7173             """
7174             Scale the given object by the specified factor.
7175
7176             Parameters:
7177                 theObject The object to be scaled.
7178                 thePoint Center point for scaling.
7179                          Passing None for it means scaling relatively the origin of global CS.
7180                 theFactor Scaling factor value.
7181                 theCopy Flag used to scale object itself or create a copy.
7182
7183             Returns:    
7184                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7185                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7186             """
7187             # Example: see GEOM_TestAll.py
7188             theFactor, Parameters = ParseParameters(theFactor)
7189             if theCopy:
7190                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7191             else:
7192                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7193             RaiseIfFailed("Scale", self.TrsfOp)
7194             anObj.SetParameters(Parameters)
7195             return anObj
7196
7197         ## Scale the given object by the factor, creating its copy before the scaling.
7198         #  @param theObject The object to be scaled.
7199         #  @param thePoint Center point for scaling.
7200         #                  Passing None for it means scaling relatively the origin of global CS.
7201         #  @param theFactor Scaling factor value.
7202         #  @param theName Object name; when specified, this parameter is used
7203         #         for result publication in the study. Otherwise, if automatic
7204         #         publication is switched on, default value is used for result name.
7205         #
7206         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7207         #
7208         #  @ref tui_scale "Example"
7209         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7210             """
7211             Scale the given object by the factor, creating its copy before the scaling.
7212
7213             Parameters:
7214                 theObject The object to be scaled.
7215                 thePoint Center point for scaling.
7216                          Passing None for it means scaling relatively the origin of global CS.
7217                 theFactor Scaling factor value.
7218                 theName Object name; when specified, this parameter is used
7219                         for result publication in the study. Otherwise, if automatic
7220                         publication is switched on, default value is used for result name.
7221
7222             Returns:    
7223                 New GEOM.GEOM_Object, containing the scaled shape.
7224             """
7225             # Example: see GEOM_TestAll.py
7226             theFactor, Parameters = ParseParameters(theFactor)
7227             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7228             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7229             anObj.SetParameters(Parameters)
7230             self._autoPublish(anObj, theName, "scaled")
7231             return anObj
7232
7233         ## Scale the given object by different factors along coordinate axes.
7234         #  @param theObject The object to be scaled.
7235         #  @param thePoint Center point for scaling.
7236         #                  Passing None for it means scaling relatively the origin of global CS.
7237         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7238         #  @param theCopy Flag used to scale object itself or create a copy.
7239         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7240         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7241         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7242             """
7243             Scale the given object by different factors along coordinate axes.
7244
7245             Parameters:
7246                 theObject The object to be scaled.
7247                 thePoint Center point for scaling.
7248                             Passing None for it means scaling relatively the origin of global CS.
7249                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7250                 theCopy Flag used to scale object itself or create a copy.
7251
7252             Returns:    
7253                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7254                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7255             """
7256             # Example: see GEOM_TestAll.py
7257             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7258             if theCopy:
7259                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7260                                                             theFactorX, theFactorY, theFactorZ)
7261             else:
7262                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7263                                                         theFactorX, theFactorY, theFactorZ)
7264             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7265             anObj.SetParameters(Parameters)
7266             return anObj
7267
7268         ## Scale the given object by different factors along coordinate axes,
7269         #  creating its copy before the scaling.
7270         #  @param theObject The object to be scaled.
7271         #  @param thePoint Center point for scaling.
7272         #                  Passing None for it means scaling relatively the origin of global CS.
7273         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7274         #  @param theName Object name; when specified, this parameter is used
7275         #         for result publication in the study. Otherwise, if automatic
7276         #         publication is switched on, default value is used for result name.
7277         #
7278         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7279         #
7280         #  @ref swig_scale "Example"
7281         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7282             """
7283             Scale the given object by different factors along coordinate axes,
7284             creating its copy before the scaling.
7285
7286             Parameters:
7287                 theObject The object to be scaled.
7288                 thePoint Center point for scaling.
7289                             Passing None for it means scaling relatively the origin of global CS.
7290                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7291                 theName Object name; when specified, this parameter is used
7292                         for result publication in the study. Otherwise, if automatic
7293                         publication is switched on, default value is used for result name.
7294
7295             Returns:
7296                 New GEOM.GEOM_Object, containing the scaled shape.
7297             """
7298             # Example: see GEOM_TestAll.py
7299             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7300             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7301                                                         theFactorX, theFactorY, theFactorZ)
7302             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7303             anObj.SetParameters(Parameters)
7304             self._autoPublish(anObj, theName, "scaled")
7305             return anObj
7306
7307         ## Mirror an object relatively the given plane.
7308         #  @param theObject The object to be mirrored.
7309         #  @param thePlane Plane of symmetry.
7310         #  @param theCopy Flag used to mirror object itself or create a copy.
7311         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7312         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7313         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7314             """
7315             Mirror an object relatively the given plane.
7316
7317             Parameters:
7318                 theObject The object to be mirrored.
7319                 thePlane Plane of symmetry.
7320                 theCopy Flag used to mirror object itself or create a copy.
7321
7322             Returns:
7323                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7324                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7325             """
7326             if theCopy:
7327                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7328             else:
7329                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7330             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7331             return anObj
7332
7333         ## Create an object, symmetrical
7334         #  to the given one relatively the given plane.
7335         #  @param theObject The object to be mirrored.
7336         #  @param thePlane Plane of symmetry.
7337         #  @param theName Object name; when specified, this parameter is used
7338         #         for result publication in the study. Otherwise, if automatic
7339         #         publication is switched on, default value is used for result name.
7340         #
7341         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7342         #
7343         #  @ref tui_mirror "Example"
7344         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7345             """
7346             Create an object, symmetrical to the given one relatively the given plane.
7347
7348             Parameters:
7349                 theObject The object to be mirrored.
7350                 thePlane Plane of symmetry.
7351                 theName Object name; when specified, this parameter is used
7352                         for result publication in the study. Otherwise, if automatic
7353                         publication is switched on, default value is used for result name.
7354
7355             Returns:
7356                 New GEOM.GEOM_Object, containing the mirrored shape.
7357             """
7358             # Example: see GEOM_TestAll.py
7359             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7360             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7361             self._autoPublish(anObj, theName, "mirrored")
7362             return anObj
7363
7364         ## Mirror an object relatively the given axis.
7365         #  @param theObject The object to be mirrored.
7366         #  @param theAxis Axis of symmetry.
7367         #  @param theCopy Flag used to mirror object itself or create a copy.
7368         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7369         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7370         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7371             """
7372             Mirror an object relatively the given axis.
7373
7374             Parameters:
7375                 theObject The object to be mirrored.
7376                 theAxis Axis of symmetry.
7377                 theCopy Flag used to mirror object itself or create a copy.
7378
7379             Returns:
7380                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7381                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7382             """
7383             if theCopy:
7384                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7385             else:
7386                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7387             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7388             return anObj
7389
7390         ## Create an object, symmetrical
7391         #  to the given one relatively the given axis.
7392         #  @param theObject The object to be mirrored.
7393         #  @param theAxis Axis of symmetry.
7394         #  @param theName Object name; when specified, this parameter is used
7395         #         for result publication in the study. Otherwise, if automatic
7396         #         publication is switched on, default value is used for result name.
7397         #
7398         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7399         #
7400         #  @ref tui_mirror "Example"
7401         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7402             """
7403             Create an object, symmetrical to the given one relatively the given axis.
7404
7405             Parameters:
7406                 theObject The object to be mirrored.
7407                 theAxis Axis of symmetry.
7408                 theName Object name; when specified, this parameter is used
7409                         for result publication in the study. Otherwise, if automatic
7410                         publication is switched on, default value is used for result name.
7411
7412             Returns: 
7413                 New GEOM.GEOM_Object, containing the mirrored shape.
7414             """
7415             # Example: see GEOM_TestAll.py
7416             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7417             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7418             self._autoPublish(anObj, theName, "mirrored")
7419             return anObj
7420
7421         ## Mirror an object relatively the given point.
7422         #  @param theObject The object to be mirrored.
7423         #  @param thePoint Point of symmetry.
7424         #  @param theCopy Flag used to mirror object itself or create a copy.
7425         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7426         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7427         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7428             """
7429             Mirror an object relatively the given point.
7430
7431             Parameters:
7432                 theObject The object to be mirrored.
7433                 thePoint Point of symmetry.
7434                 theCopy Flag used to mirror object itself or create a copy.
7435
7436             Returns:
7437                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7438                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7439             """
7440             # Example: see GEOM_TestAll.py
7441             if theCopy:
7442                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7443             else:
7444                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7445             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7446             return anObj
7447
7448         ## Create an object, symmetrical
7449         #  to the given one relatively the given point.
7450         #  @param theObject The object to be mirrored.
7451         #  @param thePoint Point of symmetry.
7452         #  @param theName Object name; when specified, this parameter is used
7453         #         for result publication in the study. Otherwise, if automatic
7454         #         publication is switched on, default value is used for result name.
7455         #
7456         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7457         #
7458         #  @ref tui_mirror "Example"
7459         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7460             """
7461             Create an object, symmetrical
7462             to the given one relatively the given point.
7463
7464             Parameters:
7465                 theObject The object to be mirrored.
7466                 thePoint Point of symmetry.
7467                 theName Object name; when specified, this parameter is used
7468                         for result publication in the study. Otherwise, if automatic
7469                         publication is switched on, default value is used for result name.
7470
7471             Returns:  
7472                 New GEOM.GEOM_Object, containing the mirrored shape.
7473             """
7474             # Example: see GEOM_TestAll.py
7475             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7476             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7477             self._autoPublish(anObj, theName, "mirrored")
7478             return anObj
7479
7480         ## Modify the location of the given object.
7481         #  @param theObject The object to be displaced.
7482         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7483         #                     If \a theStartLCS is NULL, displacement
7484         #                     will be performed from global CS.\n
7485         #                     If \a theObject itself is used as \a theStartLCS,
7486         #                     its location will be changed to \a theEndLCS.
7487         #  @param theEndLCS Coordinate system to perform displacement to it.
7488         #  @param theCopy Flag used to displace object itself or create a copy.
7489         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7490         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7491         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7492             """
7493             Modify the Location of the given object by LCS, creating its copy before the setting.
7494
7495             Parameters:
7496                 theObject The object to be displaced.
7497                 theStartLCS Coordinate system to perform displacement from it.
7498                             If theStartLCS is NULL, displacement
7499                             will be performed from global CS.
7500                             If theObject itself is used as theStartLCS,
7501                             its location will be changed to theEndLCS.
7502                 theEndLCS Coordinate system to perform displacement to it.
7503                 theCopy Flag used to displace object itself or create a copy.
7504
7505             Returns:
7506                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7507                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7508             """
7509             # Example: see GEOM_TestAll.py
7510             if theCopy:
7511                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7512             else:
7513                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7514             RaiseIfFailed("Displace", self.TrsfOp)
7515             return anObj
7516
7517         ## Modify the Location of the given object by LCS,
7518         #  creating its copy before the setting.
7519         #  @param theObject The object to be displaced.
7520         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7521         #                     If \a theStartLCS is NULL, displacement
7522         #                     will be performed from global CS.\n
7523         #                     If \a theObject itself is used as \a theStartLCS,
7524         #                     its location will be changed to \a theEndLCS.
7525         #  @param theEndLCS Coordinate system to perform displacement to it.
7526         #  @param theName Object name; when specified, this parameter is used
7527         #         for result publication in the study. Otherwise, if automatic
7528         #         publication is switched on, default value is used for result name.
7529         #
7530         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7531         #
7532         #  @ref tui_modify_location "Example"
7533         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7534             """
7535             Modify the Location of the given object by LCS, creating its copy before the setting.
7536
7537             Parameters:
7538                 theObject The object to be displaced.
7539                 theStartLCS Coordinate system to perform displacement from it.
7540                             If theStartLCS is NULL, displacement
7541                             will be performed from global CS.
7542                             If theObject itself is used as theStartLCS,
7543                             its location will be changed to theEndLCS.
7544                 theEndLCS Coordinate system to perform displacement to it.
7545                 theName Object name; when specified, this parameter is used
7546                         for result publication in the study. Otherwise, if automatic
7547                         publication is switched on, default value is used for result name.
7548
7549             Returns:  
7550                 New GEOM.GEOM_Object, containing the displaced shape.
7551
7552             Example of usage:
7553                 # create local coordinate systems
7554                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7555                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7556                 # modify the location of the given object
7557                 position = geompy.MakePosition(cylinder, cs1, cs2)
7558             """
7559             # Example: see GEOM_TestAll.py
7560             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7561             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7562             self._autoPublish(anObj, theName, "displaced")
7563             return anObj
7564
7565         ## Modify the Location of the given object by Path.
7566         #  @param  theObject The object to be displaced.
7567         #  @param  thePath Wire or Edge along that the object will be translated.
7568         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7569         #  @param  theCopy is to create a copy objects if true.
7570         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7571         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7572         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7573         #
7574         #  @ref tui_modify_location "Example"
7575         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7576             """
7577             Modify the Location of the given object by Path.
7578
7579             Parameters:
7580                  theObject The object to be displaced.
7581                  thePath Wire or Edge along that the object will be translated.
7582                  theDistance progress of Path (0 = start location, 1 = end of path location).
7583                  theCopy is to create a copy objects if true.
7584                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7585
7586             Returns:  
7587                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7588                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7589
7590             Example of usage:
7591                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7592             """
7593             # Example: see GEOM_TestAll.py
7594             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7595             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7596             return anObj
7597
7598         ## Modify the Location of the given object by Path, creating its copy before the operation.
7599         #  @param theObject The object to be displaced.
7600         #  @param thePath Wire or Edge along that the object will be translated.
7601         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7602         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7603         #  @param theName Object name; when specified, this parameter is used
7604         #         for result publication in the study. Otherwise, if automatic
7605         #         publication is switched on, default value is used for result name.
7606         #
7607         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7608         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7609             """
7610             Modify the Location of the given object by Path, creating its copy before the operation.
7611
7612             Parameters:
7613                  theObject The object to be displaced.
7614                  thePath Wire or Edge along that the object will be translated.
7615                  theDistance progress of Path (0 = start location, 1 = end of path location).
7616                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7617                  theName Object name; when specified, this parameter is used
7618                          for result publication in the study. Otherwise, if automatic
7619                          publication is switched on, default value is used for result name.
7620
7621             Returns:  
7622                 New GEOM.GEOM_Object, containing the displaced shape.
7623             """
7624             # Example: see GEOM_TestAll.py
7625             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7626             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7627             self._autoPublish(anObj, theName, "displaced")
7628             return anObj
7629
7630         ## Offset given shape.
7631         #  @param theObject The base object for the offset.
7632         #  @param theOffset Offset value.
7633         #  @param theCopy Flag used to offset object itself or create a copy.
7634         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7635         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7636         def Offset(self, theObject, theOffset, theCopy=False):
7637             """
7638             Offset given shape.
7639
7640             Parameters:
7641                 theObject The base object for the offset.
7642                 theOffset Offset value.
7643                 theCopy Flag used to offset object itself or create a copy.
7644
7645             Returns: 
7646                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7647                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7648             """
7649             theOffset, Parameters = ParseParameters(theOffset)
7650             if theCopy:
7651                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7652             else:
7653                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7654             RaiseIfFailed("Offset", self.TrsfOp)
7655             anObj.SetParameters(Parameters)
7656             return anObj
7657
7658         ## Create new object as offset of the given one.
7659         #  @param theObject The base object for the offset.
7660         #  @param theOffset Offset value.
7661         #  @param theName Object name; when specified, this parameter is used
7662         #         for result publication in the study. Otherwise, if automatic
7663         #         publication is switched on, default value is used for result name.
7664         #
7665         #  @return New GEOM.GEOM_Object, containing the offset object.
7666         #
7667         #  @ref tui_offset "Example"
7668         def MakeOffset(self, theObject, theOffset, theName=None):
7669             """
7670             Create new object as offset of the given one.
7671
7672             Parameters:
7673                 theObject The base object for the offset.
7674                 theOffset Offset value.
7675                 theName Object name; when specified, this parameter is used
7676                         for result publication in the study. Otherwise, if automatic
7677                         publication is switched on, default value is used for result name.
7678
7679             Returns:  
7680                 New GEOM.GEOM_Object, containing the offset object.
7681
7682             Example of usage:
7683                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7684                  # create a new object as offset of the given object
7685                  offset = geompy.MakeOffset(box, 70.)
7686             """
7687             # Example: see GEOM_TestAll.py
7688             theOffset, Parameters = ParseParameters(theOffset)
7689             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7690             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7691             anObj.SetParameters(Parameters)
7692             self._autoPublish(anObj, theName, "offset")
7693             return anObj
7694
7695         ## Create new object as projection of the given one on a 2D surface.
7696         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7697         #  @param theTarget The target object. It can be planar or cylindrical face.
7698         #  @param theName Object name; when specified, this parameter is used
7699         #         for result publication in the study. Otherwise, if automatic
7700         #         publication is switched on, default value is used for result name.
7701         #
7702         #  @return New GEOM.GEOM_Object, containing the projection.
7703         #
7704         #  @ref tui_projection "Example"
7705         def MakeProjection(self, theSource, theTarget, theName=None):
7706             """
7707             Create new object as projection of the given one on a 2D surface.
7708
7709             Parameters:
7710                 theSource The source object for the projection. It can be a point, edge or wire.
7711                 theTarget The target object. It can be planar or cylindrical face.
7712                 theName Object name; when specified, this parameter is used
7713                         for result publication in the study. Otherwise, if automatic
7714                         publication is switched on, default value is used for result name.
7715
7716             Returns:  
7717                 New GEOM.GEOM_Object, containing the projection.
7718             """
7719             # Example: see GEOM_TestAll.py
7720             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7721             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7722             self._autoPublish(anObj, theName, "projection")
7723             return anObj
7724
7725         # -----------------------------------------------------------------------------
7726         # Patterns
7727         # -----------------------------------------------------------------------------
7728
7729         ## Translate the given object along the given vector a given number times
7730         #  @param theObject The object to be translated.
7731         #  @param theVector Direction of the translation. DX if None.
7732         #  @param theStep Distance to translate on.
7733         #  @param theNbTimes Quantity of translations to be done.
7734         #  @param theName Object name; when specified, this parameter is used
7735         #         for result publication in the study. Otherwise, if automatic
7736         #         publication is switched on, default value is used for result name.
7737         #
7738         #  @return New GEOM.GEOM_Object, containing compound of all
7739         #          the shapes, obtained after each translation.
7740         #
7741         #  @ref tui_multi_translation "Example"
7742         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7743             """
7744             Translate the given object along the given vector a given number times
7745
7746             Parameters:
7747                 theObject The object to be translated.
7748                 theVector Direction of the translation. DX if None.
7749                 theStep Distance to translate on.
7750                 theNbTimes Quantity of translations to be done.
7751                 theName Object name; when specified, this parameter is used
7752                         for result publication in the study. Otherwise, if automatic
7753                         publication is switched on, default value is used for result name.
7754
7755             Returns:     
7756                 New GEOM.GEOM_Object, containing compound of all
7757                 the shapes, obtained after each translation.
7758
7759             Example of usage:
7760                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
7761             """
7762             # Example: see GEOM_TestAll.py
7763             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
7764             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
7765             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
7766             anObj.SetParameters(Parameters)
7767             self._autoPublish(anObj, theName, "multitranslation")
7768             return anObj
7769
7770         ## Conseqently apply two specified translations to theObject specified number of times.
7771         #  @param theObject The object to be translated.
7772         #  @param theVector1 Direction of the first translation. DX if None.
7773         #  @param theStep1 Step of the first translation.
7774         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
7775         #  @param theVector2 Direction of the second translation. DY if None.
7776         #  @param theStep2 Step of the second translation.
7777         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
7778         #  @param theName Object name; when specified, this parameter is used
7779         #         for result publication in the study. Otherwise, if automatic
7780         #         publication is switched on, default value is used for result name.
7781         #
7782         #  @return New GEOM.GEOM_Object, containing compound of all
7783         #          the shapes, obtained after each translation.
7784         #
7785         #  @ref tui_multi_translation "Example"
7786         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
7787                                    theVector2, theStep2, theNbTimes2, theName=None):
7788             """
7789             Conseqently apply two specified translations to theObject specified number of times.
7790
7791             Parameters:
7792                 theObject The object to be translated.
7793                 theVector1 Direction of the first translation. DX if None.
7794                 theStep1 Step of the first translation.
7795                 theNbTimes1 Quantity of translations to be done along theVector1.
7796                 theVector2 Direction of the second translation. DY if None.
7797                 theStep2 Step of the second translation.
7798                 theNbTimes2 Quantity of translations to be done along theVector2.
7799                 theName Object name; when specified, this parameter is used
7800                         for result publication in the study. Otherwise, if automatic
7801                         publication is switched on, default value is used for result name.
7802
7803             Returns:
7804                 New GEOM.GEOM_Object, containing compound of all
7805                 the shapes, obtained after each translation.
7806
7807             Example of usage:
7808                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
7809             """
7810             # Example: see GEOM_TestAll.py
7811             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
7812             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
7813                                                  theVector2, theStep2, theNbTimes2)
7814             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
7815             anObj.SetParameters(Parameters)
7816             self._autoPublish(anObj, theName, "multitranslation")
7817             return anObj
7818
7819         ## Rotate the given object around the given axis a given number times.
7820         #  Rotation angle will be 2*PI/theNbTimes.
7821         #  @param theObject The object to be rotated.
7822         #  @param theAxis The rotation axis. DZ if None.
7823         #  @param theNbTimes Quantity of rotations to be done.
7824         #  @param theName Object name; when specified, this parameter is used
7825         #         for result publication in the study. Otherwise, if automatic
7826         #         publication is switched on, default value is used for result name.
7827         #
7828         #  @return New GEOM.GEOM_Object, containing compound of all the
7829         #          shapes, obtained after each rotation.
7830         #
7831         #  @ref tui_multi_rotation "Example"
7832         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
7833             """
7834             Rotate the given object around the given axis a given number times.
7835             Rotation angle will be 2*PI/theNbTimes.
7836
7837             Parameters:
7838                 theObject The object to be rotated.
7839                 theAxis The rotation axis. DZ if None.
7840                 theNbTimes Quantity of rotations to be done.
7841                 theName Object name; when specified, this parameter is used
7842                         for result publication in the study. Otherwise, if automatic
7843                         publication is switched on, default value is used for result name.
7844
7845             Returns:     
7846                 New GEOM.GEOM_Object, containing compound of all the
7847                 shapes, obtained after each rotation.
7848
7849             Example of usage:
7850                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
7851             """
7852             # Example: see GEOM_TestAll.py
7853             theNbTimes, Parameters = ParseParameters(theNbTimes)
7854             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
7855             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
7856             anObj.SetParameters(Parameters)
7857             self._autoPublish(anObj, theName, "multirotation")
7858             return anObj
7859
7860         ## Rotate the given object around the given axis
7861         #  a given number times on the given angle.
7862         #  @param theObject The object to be rotated.
7863         #  @param theAxis The rotation axis. DZ if None.
7864         #  @param theAngleStep Rotation angle in radians.
7865         #  @param theNbTimes Quantity of rotations to be done.
7866         #  @param theName Object name; when specified, this parameter is used
7867         #         for result publication in the study. Otherwise, if automatic
7868         #         publication is switched on, default value is used for result name.
7869         #
7870         #  @return New GEOM.GEOM_Object, containing compound of all the
7871         #          shapes, obtained after each rotation.
7872         #
7873         #  @ref tui_multi_rotation "Example"
7874         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
7875             """
7876             Rotate the given object around the given axis
7877             a given number times on the given angle.
7878
7879             Parameters:
7880                 theObject The object to be rotated.
7881                 theAxis The rotation axis. DZ if None.
7882                 theAngleStep Rotation angle in radians.
7883                 theNbTimes Quantity of rotations to be done.
7884                 theName Object name; when specified, this parameter is used
7885                         for result publication in the study. Otherwise, if automatic
7886                         publication is switched on, default value is used for result name.
7887
7888             Returns:     
7889                 New GEOM.GEOM_Object, containing compound of all the
7890                 shapes, obtained after each rotation.
7891
7892             Example of usage:
7893                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
7894             """
7895             # Example: see GEOM_TestAll.py
7896             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
7897             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
7898             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
7899             anObj.SetParameters(Parameters)
7900             self._autoPublish(anObj, theName, "multirotation")
7901             return anObj
7902
7903         ## Rotate the given object around the given axis a given
7904         #  number times and multi-translate each rotation result.
7905         #  Rotation angle will be 2*PI/theNbTimes1.
7906         #  Translation direction passes through center of gravity
7907         #  of rotated shape and its projection on the rotation axis.
7908         #  @param theObject The object to be rotated.
7909         #  @param theAxis Rotation axis. DZ if None.
7910         #  @param theNbTimes1 Quantity of rotations to be done.
7911         #  @param theRadialStep Translation distance.
7912         #  @param theNbTimes2 Quantity of translations to be done.
7913         #  @param theName Object name; when specified, this parameter is used
7914         #         for result publication in the study. Otherwise, if automatic
7915         #         publication is switched on, default value is used for result name.
7916         #
7917         #  @return New GEOM.GEOM_Object, containing compound of all the
7918         #          shapes, obtained after each transformation.
7919         #
7920         #  @ref tui_multi_rotation "Example"
7921         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
7922             """
7923             Rotate the given object around the
7924             given axis on the given angle a given number
7925             times and multi-translate each rotation result.
7926             Translation direction passes through center of gravity
7927             of rotated shape and its projection on the rotation axis.
7928
7929             Parameters:
7930                 theObject The object to be rotated.
7931                 theAxis Rotation axis. DZ if None.
7932                 theNbTimes1 Quantity of rotations to be done.
7933                 theRadialStep Translation distance.
7934                 theNbTimes2 Quantity of translations to be done.
7935                 theName Object name; when specified, this parameter is used
7936                         for result publication in the study. Otherwise, if automatic
7937                         publication is switched on, default value is used for result name.
7938
7939             Returns:    
7940                 New GEOM.GEOM_Object, containing compound of all the
7941                 shapes, obtained after each transformation.
7942
7943             Example of usage:
7944                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
7945             """
7946             # Example: see GEOM_TestAll.py
7947             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
7948             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
7949             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
7950             anObj.SetParameters(Parameters)
7951             self._autoPublish(anObj, theName, "multirotation")
7952             return anObj
7953
7954         ## Rotate the given object around the
7955         #  given axis on the given angle a given number
7956         #  times and multi-translate each rotation result.
7957         #  Translation direction passes through center of gravity
7958         #  of rotated shape and its projection on the rotation axis.
7959         #  @param theObject The object to be rotated.
7960         #  @param theAxis Rotation axis. DZ if None.
7961         #  @param theAngleStep Rotation angle in radians.
7962         #  @param theNbTimes1 Quantity of rotations to be done.
7963         #  @param theRadialStep Translation distance.
7964         #  @param theNbTimes2 Quantity of translations to be done.
7965         #  @param theName Object name; when specified, this parameter is used
7966         #         for result publication in the study. Otherwise, if automatic
7967         #         publication is switched on, default value is used for result name.
7968         #
7969         #  @return New GEOM.GEOM_Object, containing compound of all the
7970         #          shapes, obtained after each transformation.
7971         #
7972         #  @ref tui_multi_rotation "Example"
7973         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
7974             """
7975             Rotate the given object around the
7976             given axis on the given angle a given number
7977             times and multi-translate each rotation result.
7978             Translation direction passes through center of gravity
7979             of rotated shape and its projection on the rotation axis.
7980
7981             Parameters:
7982                 theObject The object to be rotated.
7983                 theAxis Rotation axis. DZ if None.
7984                 theAngleStep Rotation angle in radians.
7985                 theNbTimes1 Quantity of rotations to be done.
7986                 theRadialStep Translation distance.
7987                 theNbTimes2 Quantity of translations to be done.
7988                 theName Object name; when specified, this parameter is used
7989                         for result publication in the study. Otherwise, if automatic
7990                         publication is switched on, default value is used for result name.
7991
7992             Returns:    
7993                 New GEOM.GEOM_Object, containing compound of all the
7994                 shapes, obtained after each transformation.
7995
7996             Example of usage:
7997                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
7998             """
7999             # Example: see GEOM_TestAll.py
8000             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8001             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8002             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8003             anObj.SetParameters(Parameters)
8004             self._autoPublish(anObj, theName, "multirotation")
8005             return anObj
8006
8007         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8008         #
8009         #  @ref swig_MakeMultiRotation "Example"
8010         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8011             """
8012             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8013
8014             Example of usage:
8015                 pz = geompy.MakeVertex(0, 0, 100)
8016                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8017                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8018             """
8019             # Example: see GEOM_TestOthers.py
8020             aVec = self.MakeLine(aPoint,aDir)
8021             # note: auto-publishing is done in self.MultiRotate1D()
8022             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8023             return anObj
8024
8025         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8026         #
8027         #  @ref swig_MakeMultiRotation "Example"
8028         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8029             """
8030             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8031
8032             Example of usage:
8033                 pz = geompy.MakeVertex(0, 0, 100)
8034                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8035                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8036             """
8037             # Example: see GEOM_TestOthers.py
8038             aVec = self.MakeLine(aPoint,aDir)
8039             # note: auto-publishing is done in self.MultiRotate1D()
8040             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8041             return anObj
8042
8043         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8044         #
8045         #  @ref swig_MakeMultiRotation "Example"
8046         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8047             """
8048             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8049             
8050             Example of usage:
8051                 pz = geompy.MakeVertex(0, 0, 100)
8052                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8053                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8054             """
8055             # Example: see GEOM_TestOthers.py
8056             aVec = self.MakeLine(aPoint,aDir)
8057             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8058             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8059             return anObj
8060
8061         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8062         #
8063         #  @ref swig_MakeMultiRotation "Example"
8064         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8065             """
8066             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8067             
8068             Example of usage:
8069                 pz = geompy.MakeVertex(0, 0, 100)
8070                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8071                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8072             """
8073             # Example: see GEOM_TestOthers.py
8074             aVec = self.MakeLine(aPoint,aDir)
8075             # note: auto-publishing is done in self.MultiRotate2D()
8076             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8077             return anObj
8078
8079         # end of l3_transform
8080         ## @}
8081
8082         ## @addtogroup l3_transform_d
8083         ## @{
8084
8085         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8086         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8087             """
8088             Deprecated method. Use MultiRotate1DNbTimes instead.
8089             """
8090             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8091             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8092
8093         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8094         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8095         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8096             """
8097             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8098             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8099
8100             Example of usage:
8101                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8102             """
8103             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8104             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8105             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8106             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8107             anObj.SetParameters(Parameters)
8108             self._autoPublish(anObj, theName, "multirotation")
8109             return anObj
8110
8111         ## The same, as MultiRotate1D(), but axis is given by direction and point
8112         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8113         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8114             """
8115             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8116             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8117
8118             Example of usage:
8119                 pz = geompy.MakeVertex(0, 0, 100)
8120                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8121                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8122             """
8123             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8124             aVec = self.MakeLine(aPoint,aDir)
8125             # note: auto-publishing is done in self.MultiRotate1D()
8126             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8127             return anObj
8128
8129         ## The same, as MultiRotate2D(), but axis is given by direction and point
8130         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8131         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8132             """
8133             The same, as MultiRotate2D(), but axis is given by direction and point
8134             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8135             
8136             Example of usage:
8137                 pz = geompy.MakeVertex(0, 0, 100)
8138                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8139                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8140             """
8141             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8142             aVec = self.MakeLine(aPoint,aDir)
8143             # note: auto-publishing is done in self.MultiRotate2D()
8144             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8145             return anObj
8146
8147         # end of l3_transform_d
8148         ## @}
8149
8150         ## @addtogroup l3_local
8151         ## @{
8152
8153         ## Perform a fillet on all edges of the given shape.
8154         #  @param theShape Shape, to perform fillet on.
8155         #  @param theR Fillet radius.
8156         #  @param theName Object name; when specified, this parameter is used
8157         #         for result publication in the study. Otherwise, if automatic
8158         #         publication is switched on, default value is used for result name.
8159         #
8160         #  @return New GEOM.GEOM_Object, containing the result shape.
8161         #
8162         #  @ref tui_fillet "Example 1"
8163         #  \n @ref swig_MakeFilletAll "Example 2"
8164         def MakeFilletAll(self, theShape, theR, theName=None):
8165             """
8166             Perform a fillet on all edges of the given shape.
8167
8168             Parameters:
8169                 theShape Shape, to perform fillet on.
8170                 theR Fillet radius.
8171                 theName Object name; when specified, this parameter is used
8172                         for result publication in the study. Otherwise, if automatic
8173                         publication is switched on, default value is used for result name.
8174
8175             Returns: 
8176                 New GEOM.GEOM_Object, containing the result shape.
8177
8178             Example of usage: 
8179                filletall = geompy.MakeFilletAll(prism, 10.)
8180             """
8181             # Example: see GEOM_TestOthers.py
8182             theR,Parameters = ParseParameters(theR)
8183             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8184             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8185             anObj.SetParameters(Parameters)
8186             self._autoPublish(anObj, theName, "fillet")
8187             return anObj
8188
8189         ## Perform a fillet on the specified edges/faces of the given shape
8190         #  @param theShape Shape, to perform fillet on.
8191         #  @param theR Fillet radius.
8192         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8193         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8194         #  @param theName Object name; when specified, this parameter is used
8195         #         for result publication in the study. Otherwise, if automatic
8196         #         publication is switched on, default value is used for result name.
8197         #
8198         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8199         #
8200         #  @return New GEOM.GEOM_Object, containing the result shape.
8201         #
8202         #  @ref tui_fillet "Example"
8203         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8204             """
8205             Perform a fillet on the specified edges/faces of the given shape
8206
8207             Parameters:
8208                 theShape Shape, to perform fillet on.
8209                 theR Fillet radius.
8210                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8211                 theListShapes Global indices of edges/faces to perform fillet on.
8212                 theName Object name; when specified, this parameter is used
8213                         for result publication in the study. Otherwise, if automatic
8214                         publication is switched on, default value is used for result name.
8215
8216             Note:
8217                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8218
8219             Returns: 
8220                 New GEOM.GEOM_Object, containing the result shape.
8221
8222             Example of usage:
8223                 # get the list of IDs (IDList) for the fillet
8224                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8225                 IDlist_e = []
8226                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8227                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8228                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8229                 # make a fillet on the specified edges of the given shape
8230                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8231             """
8232             # Example: see GEOM_TestAll.py
8233             theR,Parameters = ParseParameters(theR)
8234             anObj = None
8235             if theShapeType == ShapeType["EDGE"]:
8236                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8237                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8238             else:
8239                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8240                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8241             anObj.SetParameters(Parameters)
8242             self._autoPublish(anObj, theName, "fillet")
8243             return anObj
8244
8245         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8246         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8247             """
8248             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8249
8250             Example of usage:
8251                 # get the list of IDs (IDList) for the fillet
8252                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8253                 IDlist_e = []
8254                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8255                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8256                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8257                 # make a fillet on the specified edges of the given shape
8258                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8259             """
8260             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8261             anObj = None
8262             if theShapeType == ShapeType["EDGE"]:
8263                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8264                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8265             else:
8266                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8267                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8268             anObj.SetParameters(Parameters)
8269             self._autoPublish(anObj, theName, "fillet")
8270             return anObj
8271
8272         ## Perform a fillet on the specified edges of the given shape
8273         #  @param theShape  Wire Shape to perform fillet on.
8274         #  @param theR  Fillet radius.
8275         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8276         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8277         #    \note The list of vertices could be empty,
8278         #          in this case fillet will done done at all vertices in wire
8279         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8280         #         by the length of the edges, nearest to the fillet vertex.
8281         #         But sometimes the next edge is C1 continuous with the one, nearest to
8282         #         the fillet point, and such two (or more) edges can be united to allow
8283         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8284         #         thus ignoring the secant vertex (vertices).
8285         #  @param theName Object name; when specified, this parameter is used
8286         #         for result publication in the study. Otherwise, if automatic
8287         #         publication is switched on, default value is used for result name.
8288         #
8289         #  @return New GEOM.GEOM_Object, containing the result shape.
8290         #
8291         #  @ref tui_fillet2d "Example"
8292         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8293             """
8294             Perform a fillet on the specified edges of the given shape
8295
8296             Parameters:
8297                 theShape  Wire Shape to perform fillet on.
8298                 theR  Fillet radius.
8299                 theListOfVertexes Global indices of vertexes to perform fillet on.
8300                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8301                     by the length of the edges, nearest to the fillet vertex.
8302                     But sometimes the next edge is C1 continuous with the one, nearest to
8303                     the fillet point, and such two (or more) edges can be united to allow
8304                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8305                     thus ignoring the secant vertex (vertices).
8306                 theName Object name; when specified, this parameter is used
8307                         for result publication in the study. Otherwise, if automatic
8308                         publication is switched on, default value is used for result name.
8309             Note:
8310                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8311
8312                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8313
8314             Returns: 
8315                 New GEOM.GEOM_Object, containing the result shape.
8316
8317             Example of usage:  
8318                 # create wire
8319                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8320                 # make fillet at given wire vertices with giver radius
8321                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8322             """
8323             # Example: see GEOM_TestAll.py
8324             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8325             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8326             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8327             anObj.SetParameters(Parameters)
8328             self._autoPublish(anObj, theName, "fillet")
8329             return anObj
8330
8331         ## Perform a fillet at the specified vertices of the given face/shell.
8332         #  @param theShape Face or Shell shape to perform fillet on.
8333         #  @param theR Fillet radius.
8334         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8335         #  @param theName Object name; when specified, this parameter is used
8336         #         for result publication in the study. Otherwise, if automatic
8337         #         publication is switched on, default value is used for result name.
8338         #
8339         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8340         #
8341         #  @return New GEOM.GEOM_Object, containing the result shape.
8342         #
8343         #  @ref tui_fillet2d "Example"
8344         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8345             """
8346             Perform a fillet at the specified vertices of the given face/shell.
8347
8348             Parameters:
8349                 theShape  Face or Shell shape to perform fillet on.
8350                 theR  Fillet radius.
8351                 theListOfVertexes Global indices of vertexes to perform fillet on.
8352                 theName Object name; when specified, this parameter is used
8353                         for result publication in the study. Otherwise, if automatic
8354                         publication is switched on, default value is used for result name.
8355             Note:
8356                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8357
8358             Returns: 
8359                 New GEOM.GEOM_Object, containing the result shape.
8360
8361             Example of usage:
8362                 face = geompy.MakeFaceHW(100, 100, 1)
8363                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8364             """
8365             # Example: see GEOM_TestAll.py
8366             theR,Parameters = ParseParameters(theR)
8367             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8368             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8369             anObj.SetParameters(Parameters)
8370             self._autoPublish(anObj, theName, "fillet")
8371             return anObj
8372
8373         ## Perform a symmetric chamfer on all edges of the given shape.
8374         #  @param theShape Shape, to perform chamfer on.
8375         #  @param theD Chamfer size along each face.
8376         #  @param 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         #
8380         #  @return New GEOM.GEOM_Object, containing the result shape.
8381         #
8382         #  @ref tui_chamfer "Example 1"
8383         #  \n @ref swig_MakeChamferAll "Example 2"
8384         def MakeChamferAll(self, theShape, theD, theName=None):
8385             """
8386             Perform a symmetric chamfer on all edges of the given shape.
8387
8388             Parameters:
8389                 theShape Shape, to perform chamfer on.
8390                 theD Chamfer size along each face.
8391                 theName Object name; when specified, this parameter is used
8392                         for result publication in the study. Otherwise, if automatic
8393                         publication is switched on, default value is used for result name.
8394
8395             Returns:     
8396                 New GEOM.GEOM_Object, containing the result shape.
8397
8398             Example of usage:
8399                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8400             """
8401             # Example: see GEOM_TestOthers.py
8402             theD,Parameters = ParseParameters(theD)
8403             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8404             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8405             anObj.SetParameters(Parameters)
8406             self._autoPublish(anObj, theName, "chamfer")
8407             return anObj
8408
8409         ## Perform a chamfer on edges, common to the specified faces,
8410         #  with distance D1 on the Face1
8411         #  @param theShape Shape, to perform chamfer on.
8412         #  @param theD1 Chamfer size along \a theFace1.
8413         #  @param theD2 Chamfer size along \a theFace2.
8414         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8415         #  @param theName Object name; when specified, this parameter is used
8416         #         for result publication in the study. Otherwise, if automatic
8417         #         publication is switched on, default value is used for result name.
8418         #
8419         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8420         #
8421         #  @return New GEOM.GEOM_Object, containing the result shape.
8422         #
8423         #  @ref tui_chamfer "Example"
8424         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8425             """
8426             Perform a chamfer on edges, common to the specified faces,
8427             with distance D1 on the Face1
8428
8429             Parameters:
8430                 theShape Shape, to perform chamfer on.
8431                 theD1 Chamfer size along theFace1.
8432                 theD2 Chamfer size along theFace2.
8433                 theFace1,theFace2 Global indices of two faces of theShape.
8434                 theName Object name; when specified, this parameter is used
8435                         for result publication in the study. Otherwise, if automatic
8436                         publication is switched on, default value is used for result name.
8437
8438             Note:
8439                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8440
8441             Returns:      
8442                 New GEOM.GEOM_Object, containing the result shape.
8443
8444             Example of usage:
8445                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8446                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8447                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8448                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8449             """
8450             # Example: see GEOM_TestAll.py
8451             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8452             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8453             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8454             anObj.SetParameters(Parameters)
8455             self._autoPublish(anObj, theName, "chamfer")
8456             return anObj
8457
8458         ## Perform a chamfer on edges
8459         #  @param theShape Shape, to perform chamfer on.
8460         #  @param theD Chamfer length
8461         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8462         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8463         #  @param theName Object name; when specified, this parameter is used
8464         #         for result publication in the study. Otherwise, if automatic
8465         #         publication is switched on, default value is used for result name.
8466         #
8467         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8468         #
8469         #  @return New GEOM.GEOM_Object, containing the result shape.
8470         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8471             """
8472             Perform a chamfer on edges
8473
8474             Parameters:
8475                 theShape Shape, to perform chamfer on.
8476                 theD1 Chamfer size along theFace1.
8477                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8478                 theFace1,theFace2 Global indices of two faces of theShape.
8479                 theName Object name; when specified, this parameter is used
8480                         for result publication in the study. Otherwise, if automatic
8481                         publication is switched on, default value is used for result name.
8482
8483             Note:
8484                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8485
8486             Returns:      
8487                 New GEOM.GEOM_Object, containing the result shape.
8488
8489             Example of usage:
8490                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8491                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8492                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8493                 ang = 30
8494                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8495             """
8496             flag = False
8497             if isinstance(theAngle,str):
8498                 flag = True
8499             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8500             if flag:
8501                 theAngle = theAngle*math.pi/180.0
8502             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8503             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8504             anObj.SetParameters(Parameters)
8505             self._autoPublish(anObj, theName, "chamfer")
8506             return anObj
8507
8508         ## Perform a chamfer on all edges of the specified faces,
8509         #  with distance D1 on the first specified face (if several for one edge)
8510         #  @param theShape Shape, to perform chamfer on.
8511         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8512         #               connected to the edge, are in \a theFaces, \a theD1
8513         #               will be get along face, which is nearer to \a theFaces beginning.
8514         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8515         #  @param theFaces Sequence of global indices of faces of \a theShape.
8516         #  @param theName Object name; when specified, this parameter is used
8517         #         for result publication in the study. Otherwise, if automatic
8518         #         publication is switched on, default value is used for result name.
8519         #
8520         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8521         #
8522         #  @return New GEOM.GEOM_Object, containing the result shape.
8523         #
8524         #  @ref tui_chamfer "Example"
8525         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8526             """
8527             Perform a chamfer on all edges of the specified faces,
8528             with distance D1 on the first specified face (if several for one edge)
8529
8530             Parameters:
8531                 theShape Shape, to perform chamfer on.
8532                 theD1 Chamfer size along face from  theFaces. If both faces,
8533                       connected to the edge, are in theFaces, theD1
8534                       will be get along face, which is nearer to theFaces beginning.
8535                 theD2 Chamfer size along another of two faces, connected to the edge.
8536                 theFaces Sequence of global indices of faces of theShape.
8537                 theName Object name; when specified, this parameter is used
8538                         for result publication in the study. Otherwise, if automatic
8539                         publication is switched on, default value is used for result name.
8540                 
8541             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8542
8543             Returns:  
8544                 New GEOM.GEOM_Object, containing the result shape.
8545             """
8546             # Example: see GEOM_TestAll.py
8547             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8548             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8549             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8550             anObj.SetParameters(Parameters)
8551             self._autoPublish(anObj, theName, "chamfer")
8552             return anObj
8553
8554         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8555         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8556         #
8557         #  @ref swig_FilletChamfer "Example"
8558         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8559             """
8560             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8561             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8562             """
8563             flag = False
8564             if isinstance(theAngle,str):
8565                 flag = True
8566             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8567             if flag:
8568                 theAngle = theAngle*math.pi/180.0
8569             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8570             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8571             anObj.SetParameters(Parameters)
8572             self._autoPublish(anObj, theName, "chamfer")
8573             return anObj
8574
8575         ## Perform a chamfer on edges,
8576         #  with distance D1 on the first specified face (if several for one edge)
8577         #  @param theShape Shape, to perform chamfer on.
8578         #  @param theD1,theD2 Chamfer size
8579         #  @param theEdges Sequence of edges of \a theShape.
8580         #  @param theName Object name; when specified, this parameter is used
8581         #         for result publication in the study. Otherwise, if automatic
8582         #         publication is switched on, default value is used for result name.
8583         #
8584         #  @return New GEOM.GEOM_Object, containing the result shape.
8585         #
8586         #  @ref swig_FilletChamfer "Example"
8587         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8588             """
8589             Perform a chamfer on edges,
8590             with distance D1 on the first specified face (if several for one edge)
8591             
8592             Parameters:
8593                 theShape Shape, to perform chamfer on.
8594                 theD1,theD2 Chamfer size
8595                 theEdges Sequence of edges of theShape.
8596                 theName Object name; when specified, this parameter is used
8597                         for result publication in the study. Otherwise, if automatic
8598                         publication is switched on, default value is used for result name.
8599
8600             Returns:
8601                 New GEOM.GEOM_Object, containing the result shape.
8602             """
8603             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8604             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8605             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8606             anObj.SetParameters(Parameters)
8607             self._autoPublish(anObj, theName, "chamfer")
8608             return anObj
8609
8610         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8611         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8612         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8613             """
8614             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8615             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8616             """
8617             flag = False
8618             if isinstance(theAngle,str):
8619                 flag = True
8620             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8621             if flag:
8622                 theAngle = theAngle*math.pi/180.0
8623             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8624             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8625             anObj.SetParameters(Parameters)
8626             self._autoPublish(anObj, theName, "chamfer")
8627             return anObj
8628
8629         ## @sa MakeChamferEdge(), MakeChamferFaces()
8630         #
8631         #  @ref swig_MakeChamfer "Example"
8632         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8633             """
8634             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8635             """
8636             # Example: see GEOM_TestOthers.py
8637             anObj = None
8638             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8639             if aShapeType == ShapeType["EDGE"]:
8640                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8641             else:
8642                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8643             return anObj
8644             
8645         ## Remove material from a solid by extrusion of the base shape on the given distance.
8646         #  @param theInit Shape to remove material from. It must be a solid or 
8647         #  a compound made of a single solid.
8648         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8649         #  @param theH Prism dimension along the normal to theBase
8650         #  @param theAngle Draft angle in degrees.
8651         #  @param theName Object name; when specified, this parameter is used
8652         #         for result publication in the study. Otherwise, if automatic
8653         #         publication is switched on, default value is used for result name.
8654         #
8655         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8656         #
8657         #  @ref tui_creation_prism "Example"
8658         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8659             """
8660             Add material to a solid by extrusion of the base shape on the given distance.
8661
8662             Parameters:
8663                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8664                 theBase Closed edge or wire defining the base shape to be extruded.
8665                 theH Prism dimension along the normal  to theBase
8666                 theAngle Draft angle in degrees.
8667                 theName Object name; when specified, this parameter is used
8668                         for result publication in the study. Otherwise, if automatic
8669                         publication is switched on, default value is used for result name.
8670
8671             Returns:
8672                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8673             """
8674             # Example: see GEOM_TestAll.py
8675             #theH,Parameters = ParseParameters(theH)
8676             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8677             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8678             #anObj.SetParameters(Parameters)
8679             self._autoPublish(anObj, theName, "extrudedCut")
8680             return anObj   
8681             
8682         ## Add material to a solid by extrusion of the base shape on the given distance.
8683         #  @param theInit Shape to add material to. It must be a solid or 
8684         #  a compound made of a single solid.
8685         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8686         #  @param theH Prism dimension along the normal to theBase
8687         #  @param theAngle Draft angle in degrees.
8688         #  @param theName Object name; when specified, this parameter is used
8689         #         for result publication in the study. Otherwise, if automatic
8690         #         publication is switched on, default value is used for result name.
8691         #
8692         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8693         #
8694         #  @ref tui_creation_prism "Example"
8695         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8696             """
8697             Add material to a solid by extrusion of the base shape on the given distance.
8698
8699             Parameters:
8700                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8701                 theBase Closed edge or wire defining the base shape to be extruded.
8702                 theH Prism dimension along the normal  to theBase
8703                 theAngle Draft angle in degrees.
8704                 theName Object name; when specified, this parameter is used
8705                         for result publication in the study. Otherwise, if automatic
8706                         publication is switched on, default value is used for result name.
8707
8708             Returns:
8709                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8710             """
8711             # Example: see GEOM_TestAll.py
8712             #theH,Parameters = ParseParameters(theH)
8713             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8714             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8715             #anObj.SetParameters(Parameters)
8716             self._autoPublish(anObj, theName, "extrudedBoss")
8717             return anObj   
8718
8719         # end of l3_local
8720         ## @}
8721
8722         ## @addtogroup l3_basic_op
8723         ## @{
8724
8725         ## Perform an Archimde operation on the given shape with given parameters.
8726         #  The object presenting the resulting face is returned.
8727         #  @param theShape Shape to be put in water.
8728         #  @param theWeight Weight og the shape.
8729         #  @param theWaterDensity Density of the water.
8730         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8731         #  @param theName Object name; when specified, this parameter is used
8732         #         for result publication in the study. Otherwise, if automatic
8733         #         publication is switched on, default value is used for result name.
8734         #
8735         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8736         #          by a plane, corresponding to water level.
8737         #
8738         #  @ref tui_archimede "Example"
8739         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8740             """
8741             Perform an Archimde operation on the given shape with given parameters.
8742             The object presenting the resulting face is returned.
8743
8744             Parameters: 
8745                 theShape Shape to be put in water.
8746                 theWeight Weight og the shape.
8747                 theWaterDensity Density of the water.
8748                 theMeshDeflection Deflection of the mesh, using to compute the section.
8749                 theName Object name; when specified, this parameter is used
8750                         for result publication in the study. Otherwise, if automatic
8751                         publication is switched on, default value is used for result name.
8752
8753             Returns: 
8754                 New GEOM.GEOM_Object, containing a section of theShape
8755                 by a plane, corresponding to water level.
8756             """
8757             # Example: see GEOM_TestAll.py
8758             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
8759               theWeight,theWaterDensity,theMeshDeflection)
8760             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
8761             RaiseIfFailed("MakeArchimede", self.LocalOp)
8762             anObj.SetParameters(Parameters)
8763             self._autoPublish(anObj, theName, "archimede")
8764             return anObj
8765
8766         # end of l3_basic_op
8767         ## @}
8768
8769         ## @addtogroup l2_measure
8770         ## @{
8771
8772         ## Get point coordinates
8773         #  @return [x, y, z]
8774         #
8775         #  @ref tui_measurement_tools_page "Example"
8776         def PointCoordinates(self,Point):
8777             """
8778             Get point coordinates
8779
8780             Returns:
8781                 [x, y, z]
8782             """
8783             # Example: see GEOM_TestMeasures.py
8784             aTuple = self.MeasuOp.PointCoordinates(Point)
8785             RaiseIfFailed("PointCoordinates", self.MeasuOp)
8786             return aTuple 
8787         
8788         ## Get vector coordinates
8789         #  @return [x, y, z]
8790         #
8791         #  @ref tui_measurement_tools_page "Example"
8792         def VectorCoordinates(self,Vector):
8793             """
8794             Get vector coordinates
8795
8796             Returns:
8797                 [x, y, z]
8798             """
8799
8800             p1=self.GetFirstVertex(Vector)
8801             p2=self.GetLastVertex(Vector)
8802             
8803             X1=self.PointCoordinates(p1)
8804             X2=self.PointCoordinates(p2)
8805
8806             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
8807
8808
8809         ## Compute cross product
8810         #  @return vector w=u^v
8811         #
8812         #  @ref tui_measurement_tools_page "Example"
8813         def CrossProduct(self, Vector1, Vector2):
8814             """ 
8815             Compute cross product
8816             
8817             Returns: vector w=u^v
8818             """
8819             u=self.VectorCoordinates(Vector1)
8820             v=self.VectorCoordinates(Vector2)
8821             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])
8822             
8823             return w
8824         
8825         ## Compute cross product
8826         #  @return dot product  p=u.v
8827         #
8828         #  @ref tui_measurement_tools_page "Example"
8829         def DotProduct(self, Vector1, Vector2):
8830             """ 
8831             Compute cross product
8832             
8833             Returns: dot product  p=u.v
8834             """
8835             u=self.VectorCoordinates(Vector1)
8836             v=self.VectorCoordinates(Vector2)
8837             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
8838             
8839             return p
8840
8841
8842         ## Get summarized length of all wires,
8843         #  area of surface and volume of the given shape.
8844         #  @param theShape Shape to define properties of.
8845         #  @return [theLength, theSurfArea, theVolume]\n
8846         #  theLength:   Summarized length of all wires of the given shape.\n
8847         #  theSurfArea: Area of surface of the given shape.\n
8848         #  theVolume:   Volume of the given shape.
8849         #
8850         #  @ref tui_measurement_tools_page "Example"
8851         def BasicProperties(self,theShape):
8852             """
8853             Get summarized length of all wires,
8854             area of surface and volume of the given shape.
8855
8856             Parameters: 
8857                 theShape Shape to define properties of.
8858
8859             Returns:
8860                 [theLength, theSurfArea, theVolume]
8861                  theLength:   Summarized length of all wires of the given shape.
8862                  theSurfArea: Area of surface of the given shape.
8863                  theVolume:   Volume of the given shape.
8864             """
8865             # Example: see GEOM_TestMeasures.py
8866             aTuple = self.MeasuOp.GetBasicProperties(theShape)
8867             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
8868             return aTuple
8869
8870         ## Get parameters of bounding box of the given shape
8871         #  @param theShape Shape to obtain bounding box of.
8872         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
8873         #  Xmin,Xmax: Limits of shape along OX axis.
8874         #  Ymin,Ymax: Limits of shape along OY axis.
8875         #  Zmin,Zmax: Limits of shape along OZ axis.
8876         #
8877         #  @ref tui_measurement_tools_page "Example"
8878         def BoundingBox (self, theShape):
8879             """
8880             Get parameters of bounding box of the given shape
8881
8882             Parameters: 
8883                 theShape Shape to obtain bounding box of.
8884
8885             Returns:
8886                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
8887                  Xmin,Xmax: Limits of shape along OX axis.
8888                  Ymin,Ymax: Limits of shape along OY axis.
8889                  Zmin,Zmax: Limits of shape along OZ axis.
8890             """
8891             # Example: see GEOM_TestMeasures.py
8892             aTuple = self.MeasuOp.GetBoundingBox(theShape)
8893             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
8894             return aTuple
8895
8896         ## Get bounding box of the given shape
8897         #  @param theShape Shape to obtain bounding box of.
8898         #  @param theName Object name; when specified, this parameter is used
8899         #         for result publication in the study. Otherwise, if automatic
8900         #         publication is switched on, default value is used for result name.
8901         #
8902         #  @return New GEOM.GEOM_Object, containing the created box.
8903         #
8904         #  @ref tui_measurement_tools_page "Example"
8905         def MakeBoundingBox (self, theShape, theName=None):
8906             """
8907             Get bounding box of the given shape
8908
8909             Parameters: 
8910                 theShape Shape to obtain bounding box of.
8911                 theName Object name; when specified, this parameter is used
8912                         for result publication in the study. Otherwise, if automatic
8913                         publication is switched on, default value is used for result name.
8914
8915             Returns:
8916                 New GEOM.GEOM_Object, containing the created box.
8917             """
8918             # Example: see GEOM_TestMeasures.py
8919             anObj = self.MeasuOp.MakeBoundingBox(theShape)
8920             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
8921             self._autoPublish(anObj, theName, "bndbox")
8922             return anObj
8923
8924         ## Get inertia matrix and moments of inertia of theShape.
8925         #  @param theShape Shape to calculate inertia of.
8926         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
8927         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
8928         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
8929         #
8930         #  @ref tui_measurement_tools_page "Example"
8931         def Inertia(self,theShape):
8932             """
8933             Get inertia matrix and moments of inertia of theShape.
8934
8935             Parameters: 
8936                 theShape Shape to calculate inertia of.
8937
8938             Returns:
8939                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
8940                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
8941                  Ix,Iy,Iz:    Moments of inertia of the given shape.
8942             """
8943             # Example: see GEOM_TestMeasures.py
8944             aTuple = self.MeasuOp.GetInertia(theShape)
8945             RaiseIfFailed("GetInertia", self.MeasuOp)
8946             return aTuple
8947
8948         ## Get if coords are included in the shape (ST_IN or ST_ON)
8949         #  @param theShape Shape
8950         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
8951         #  @param tolerance to be used (default is 1.0e-7)
8952         #  @return list_of_boolean = [res1, res2, ...]
8953         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
8954             """
8955             Get if coords are included in the shape (ST_IN or ST_ON)
8956             
8957             Parameters: 
8958                 theShape Shape
8959                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
8960                 tolerance to be used (default is 1.0e-7)
8961
8962             Returns:
8963                 list_of_boolean = [res1, res2, ...]
8964             """
8965             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
8966
8967         ## Get minimal distance between the given shapes.
8968         #  @param theShape1,theShape2 Shapes to find minimal distance between.
8969         #  @return Value of the minimal distance between the given shapes.
8970         #
8971         #  @ref tui_measurement_tools_page "Example"
8972         def MinDistance(self, theShape1, theShape2):
8973             """
8974             Get minimal distance between the given shapes.
8975             
8976             Parameters: 
8977                 theShape1,theShape2 Shapes to find minimal distance between.
8978
8979             Returns:    
8980                 Value of the minimal distance between the given shapes.
8981             """
8982             # Example: see GEOM_TestMeasures.py
8983             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
8984             RaiseIfFailed("GetMinDistance", self.MeasuOp)
8985             return aTuple[0]
8986
8987         ## Get minimal distance between the given shapes.
8988         #  @param theShape1,theShape2 Shapes to find minimal distance between.
8989         #  @return Value of the minimal distance between the given shapes, in form of list
8990         #          [Distance, DX, DY, DZ].
8991         #
8992         #  @ref swig_all_measure "Example"
8993         def MinDistanceComponents(self, theShape1, theShape2):
8994             """
8995             Get minimal distance between the given shapes.
8996
8997             Parameters: 
8998                 theShape1,theShape2 Shapes to find minimal distance between.
8999
9000             Returns:  
9001                 Value of the minimal distance between the given shapes, in form of list
9002                 [Distance, DX, DY, DZ]
9003             """
9004             # Example: see GEOM_TestMeasures.py
9005             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9006             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9007             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9008             return aRes
9009
9010         ## Get closest points of the given shapes.
9011         #  @param theShape1,theShape2 Shapes to find closest points of.
9012         #  @return The number of found solutions (-1 in case of infinite number of
9013         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9014         #
9015         #  @ref tui_measurement_tools_page "Example"
9016         def ClosestPoints (self, theShape1, theShape2):
9017             """
9018             Get closest points of the given shapes.
9019
9020             Parameters: 
9021                 theShape1,theShape2 Shapes to find closest points of.
9022
9023             Returns:    
9024                 The number of found solutions (-1 in case of infinite number of
9025                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9026             """
9027             # Example: see GEOM_TestMeasures.py
9028             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9029             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9030             return aTuple
9031
9032         ## Get angle between the given shapes in degrees.
9033         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9034         #  @note If both arguments are vectors, the angle is computed in accordance
9035         #        with their orientations, otherwise the minimum angle is computed.
9036         #  @return Value of the angle between the given shapes in degrees.
9037         #
9038         #  @ref tui_measurement_tools_page "Example"
9039         def GetAngle(self, theShape1, theShape2):
9040             """
9041             Get angle between the given shapes in degrees.
9042
9043             Parameters: 
9044                 theShape1,theShape2 Lines or linear edges to find angle between.
9045
9046             Note:
9047                 If both arguments are vectors, the angle is computed in accordance
9048                 with their orientations, otherwise the minimum angle is computed.
9049
9050             Returns:  
9051                 Value of the angle between the given shapes in degrees.
9052             """
9053             # Example: see GEOM_TestMeasures.py
9054             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9055             RaiseIfFailed("GetAngle", self.MeasuOp)
9056             return anAngle
9057
9058         ## Get angle between the given shapes in radians.
9059         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9060         #  @note If both arguments are vectors, the angle is computed in accordance
9061         #        with their orientations, otherwise the minimum angle is computed.
9062         #  @return Value of the angle between the given shapes in radians.
9063         #
9064         #  @ref tui_measurement_tools_page "Example"
9065         def GetAngleRadians(self, theShape1, theShape2):
9066             """
9067             Get angle between the given shapes in radians.
9068
9069             Parameters: 
9070                 theShape1,theShape2 Lines or linear edges to find angle between.
9071
9072                 
9073             Note:
9074                 If both arguments are vectors, the angle is computed in accordance
9075                 with their orientations, otherwise the minimum angle is computed.
9076
9077             Returns:  
9078                 Value of the angle between the given shapes in radians.
9079             """
9080             # Example: see GEOM_TestMeasures.py
9081             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9082             RaiseIfFailed("GetAngle", self.MeasuOp)
9083             return anAngle
9084
9085         ## Get angle between the given vectors in degrees.
9086         #  @param theShape1,theShape2 Vectors to find angle between.
9087         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9088         #                 if False, the opposite vector to the normal vector is used.
9089         #  @return Value of the angle between the given vectors in degrees.
9090         #
9091         #  @ref tui_measurement_tools_page "Example"
9092         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9093             """
9094             Get angle between the given vectors in degrees.
9095
9096             Parameters: 
9097                 theShape1,theShape2 Vectors to find angle between.
9098                 theFlag If True, the normal vector is defined by the two vectors cross,
9099                         if False, the opposite vector to the normal vector is used.
9100
9101             Returns:  
9102                 Value of the angle between the given vectors in degrees.
9103             """
9104             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9105             if not theFlag:
9106                 anAngle = 360. - anAngle
9107             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9108             return anAngle
9109
9110         ## The same as GetAngleVectors, but the result is in radians.
9111         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9112             """
9113             Get angle between the given vectors in radians.
9114
9115             Parameters: 
9116                 theShape1,theShape2 Vectors to find angle between.
9117                 theFlag If True, the normal vector is defined by the two vectors cross,
9118                         if False, the opposite vector to the normal vector is used.
9119
9120             Returns:  
9121                 Value of the angle between the given vectors in radians.
9122             """
9123             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9124             return anAngle
9125
9126         ## @name Curve Curvature Measurement
9127         #  Methods for receiving radius of curvature of curves
9128         #  in the given point
9129         ## @{
9130
9131         ## Measure curvature of a curve at a point, set by parameter.
9132         #  @param theCurve a curve.
9133         #  @param theParam parameter.
9134         #  @return radius of curvature of \a theCurve.
9135         #
9136         #  @ref swig_todo "Example"
9137         def CurveCurvatureByParam(self, theCurve, theParam):
9138             """
9139             Measure curvature of a curve at a point, set by parameter.
9140
9141             Parameters: 
9142                 theCurve a curve.
9143                 theParam parameter.
9144
9145             Returns: 
9146                 radius of curvature of theCurve.
9147             """
9148             # Example: see GEOM_TestMeasures.py
9149             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9150             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9151             return aCurv
9152
9153         ## Measure curvature of a curve at a point.
9154         #  @param theCurve a curve.
9155         #  @param thePoint given point.
9156         #  @return radius of curvature of \a theCurve.
9157         #
9158         #  @ref swig_todo "Example"
9159         def CurveCurvatureByPoint(self, theCurve, thePoint):
9160             """
9161             Measure curvature of a curve at a point.
9162
9163             Parameters: 
9164                 theCurve a curve.
9165                 thePoint given point.
9166
9167             Returns: 
9168                 radius of curvature of theCurve.           
9169             """
9170             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9171             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9172             return aCurv
9173         ## @}
9174
9175         ## @name Surface Curvature Measurement
9176         #  Methods for receiving max and min radius of curvature of surfaces
9177         #  in the given point
9178         ## @{
9179
9180         ## Measure max radius of curvature of surface.
9181         #  @param theSurf the given surface.
9182         #  @param theUParam Value of U-parameter on the referenced surface.
9183         #  @param theVParam Value of V-parameter on the referenced surface.
9184         #  @return max radius of curvature of theSurf.
9185         #
9186         ## @ref swig_todo "Example"
9187         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9188             """
9189             Measure max radius of curvature of surface.
9190
9191             Parameters: 
9192                 theSurf the given surface.
9193                 theUParam Value of U-parameter on the referenced surface.
9194                 theVParam Value of V-parameter on the referenced surface.
9195                 
9196             Returns:     
9197                 max radius of curvature of theSurf.
9198             """
9199             # Example: see GEOM_TestMeasures.py
9200             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9201             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9202             return aSurf
9203
9204         ## Measure max radius of curvature of surface in the given point
9205         #  @param theSurf the given surface.
9206         #  @param thePoint given point.
9207         #  @return max radius of curvature of theSurf.
9208         #
9209         ## @ref swig_todo "Example"
9210         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9211             """
9212             Measure max radius of curvature of surface in the given point.
9213
9214             Parameters: 
9215                 theSurf the given surface.
9216                 thePoint given point.
9217                 
9218             Returns:     
9219                 max radius of curvature of theSurf.          
9220             """
9221             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9222             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9223             return aSurf
9224
9225         ## Measure min radius of curvature of surface.
9226         #  @param theSurf the given surface.
9227         #  @param theUParam Value of U-parameter on the referenced surface.
9228         #  @param theVParam Value of V-parameter on the referenced surface.
9229         #  @return min radius of curvature of theSurf.
9230         #   
9231         ## @ref swig_todo "Example"
9232         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9233             """
9234             Measure min radius of curvature of surface.
9235
9236             Parameters: 
9237                 theSurf the given surface.
9238                 theUParam Value of U-parameter on the referenced surface.
9239                 theVParam Value of V-parameter on the referenced surface.
9240                 
9241             Returns:     
9242                 Min radius of curvature of theSurf.
9243             """
9244             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9245             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9246             return aSurf
9247
9248         ## Measure min radius of curvature of surface in the given point
9249         #  @param theSurf the given surface.
9250         #  @param thePoint given point.
9251         #  @return min radius of curvature of theSurf.
9252         #
9253         ## @ref swig_todo "Example"
9254         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9255             """
9256             Measure min radius of curvature of surface in the given point.
9257
9258             Parameters: 
9259                 theSurf the given surface.
9260                 thePoint given point.
9261                 
9262             Returns:     
9263                 Min radius of curvature of theSurf.          
9264             """
9265             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9266             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9267             return aSurf
9268         ## @}
9269
9270         ## Get min and max tolerances of sub-shapes of theShape
9271         #  @param theShape Shape, to get tolerances of.
9272         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9273         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9274         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9275         #  VertMin,VertMax: Min and max tolerances of the vertices.
9276         #
9277         #  @ref tui_measurement_tools_page "Example"
9278         def Tolerance(self,theShape):
9279             """
9280             Get min and max tolerances of sub-shapes of theShape
9281
9282             Parameters: 
9283                 theShape Shape, to get tolerances of.
9284
9285             Returns:    
9286                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9287                  FaceMin,FaceMax: Min and max tolerances of the faces.
9288                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9289                  VertMin,VertMax: Min and max tolerances of the vertices.
9290             """
9291             # Example: see GEOM_TestMeasures.py
9292             aTuple = self.MeasuOp.GetTolerance(theShape)
9293             RaiseIfFailed("GetTolerance", self.MeasuOp)
9294             return aTuple
9295
9296         ## Obtain description of the given shape (number of sub-shapes of each type)
9297         #  @param theShape Shape to be described.
9298         #  @return Description of the given shape.
9299         #
9300         #  @ref tui_measurement_tools_page "Example"
9301         def WhatIs(self,theShape):
9302             """
9303             Obtain description of the given shape (number of sub-shapes of each type)
9304
9305             Parameters:
9306                 theShape Shape to be described.
9307
9308             Returns:
9309                 Description of the given shape.
9310             """
9311             # Example: see GEOM_TestMeasures.py
9312             aDescr = self.MeasuOp.WhatIs(theShape)
9313             RaiseIfFailed("WhatIs", self.MeasuOp)
9314             return aDescr
9315
9316         ## Obtain quantity of shapes of the given type in \a theShape.
9317         #  If \a theShape is of type \a theType, it is also counted.
9318         #  @param theShape Shape to be described.
9319         #  @param theType the given ShapeType().
9320         #  @return Quantity of shapes of type \a theType in \a theShape.
9321         #
9322         #  @ref tui_measurement_tools_page "Example"
9323         def NbShapes (self, theShape, theType):
9324             """
9325             Obtain quantity of shapes of the given type in theShape.
9326             If theShape is of type theType, it is also counted.
9327
9328             Parameters:
9329                 theShape Shape to be described.
9330                 theType the given geompy.ShapeType
9331
9332             Returns:
9333                 Quantity of shapes of type theType in theShape.
9334             """
9335             # Example: see GEOM_TestMeasures.py
9336             listSh = self.SubShapeAllIDs(theShape, theType)
9337             Nb = len(listSh)
9338             t       = EnumToLong(theShape.GetShapeType())
9339             theType = EnumToLong(theType)
9340             if t == theType:
9341                 Nb = Nb + 1
9342                 pass
9343             return Nb
9344
9345         ## Obtain quantity of shapes of each type in \a theShape.
9346         #  The \a theShape is also counted.
9347         #  @param theShape Shape to be described.
9348         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9349         #
9350         #  @ref tui_measurement_tools_page "Example"
9351         def ShapeInfo (self, theShape):
9352             """
9353             Obtain quantity of shapes of each type in theShape.
9354             The theShape is also counted.
9355
9356             Parameters:
9357                 theShape Shape to be described.
9358
9359             Returns:
9360                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9361             """
9362             # Example: see GEOM_TestMeasures.py
9363             aDict = {}
9364             for typeSh in ShapeType:
9365                 if typeSh in ( "AUTO", "SHAPE" ): continue
9366                 listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
9367                 Nb = len(listSh)
9368                 if EnumToLong(theShape.GetShapeType()) == ShapeType[typeSh]:
9369                     Nb = Nb + 1
9370                     pass
9371                 aDict[typeSh] = Nb
9372                 pass
9373             return aDict
9374
9375         ## Get a point, situated at the centre of mass of theShape.
9376         #  @param theShape Shape to define centre of mass of.
9377         #  @param theName Object name; when specified, this parameter is used
9378         #         for result publication in the study. Otherwise, if automatic
9379         #         publication is switched on, default value is used for result name.
9380         #
9381         #  @return New GEOM.GEOM_Object, containing the created point.
9382         #
9383         #  @ref tui_measurement_tools_page "Example"
9384         def MakeCDG(self, theShape, theName=None):
9385             """
9386             Get a point, situated at the centre of mass of theShape.
9387
9388             Parameters:
9389                 theShape Shape to define centre of mass of.
9390                 theName Object name; when specified, this parameter is used
9391                         for result publication in the study. Otherwise, if automatic
9392                         publication is switched on, default value is used for result name.
9393
9394             Returns:
9395                 New GEOM.GEOM_Object, containing the created point.
9396             """
9397             # Example: see GEOM_TestMeasures.py
9398             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9399             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9400             self._autoPublish(anObj, theName, "centerOfMass")
9401             return anObj
9402
9403         ## Get a vertex sub-shape by index depended with orientation.
9404         #  @param theShape Shape to find sub-shape.
9405         #  @param theIndex Index to find vertex by this index (starting from zero)
9406         #  @param theName Object name; when specified, this parameter is used
9407         #         for result publication in the study. Otherwise, if automatic
9408         #         publication is switched on, default value is used for result name.
9409         #
9410         #  @return New GEOM.GEOM_Object, containing the created vertex.
9411         #
9412         #  @ref tui_measurement_tools_page "Example"
9413         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9414             """
9415             Get a vertex sub-shape by index depended with orientation.
9416
9417             Parameters:
9418                 theShape Shape to find sub-shape.
9419                 theIndex Index to find vertex by this index (starting from zero)
9420                 theName Object name; when specified, this parameter is used
9421                         for result publication in the study. Otherwise, if automatic
9422                         publication is switched on, default value is used for result name.
9423
9424             Returns:
9425                 New GEOM.GEOM_Object, containing the created vertex.
9426             """
9427             # Example: see GEOM_TestMeasures.py
9428             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9429             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9430             self._autoPublish(anObj, theName, "vertex")
9431             return anObj
9432
9433         ## Get the first vertex of wire/edge depended orientation.
9434         #  @param theShape Shape to find first vertex.
9435         #  @param theName Object name; when specified, this parameter is used
9436         #         for result publication in the study. Otherwise, if automatic
9437         #         publication is switched on, default value is used for result name.
9438         #
9439         #  @return New GEOM.GEOM_Object, containing the created vertex.
9440         #
9441         #  @ref tui_measurement_tools_page "Example"
9442         def GetFirstVertex(self, theShape, theName=None):
9443             """
9444             Get the first vertex of wire/edge depended orientation.
9445
9446             Parameters:
9447                 theShape Shape to find first vertex.
9448                 theName Object name; when specified, this parameter is used
9449                         for result publication in the study. Otherwise, if automatic
9450                         publication is switched on, default value is used for result name.
9451
9452             Returns:    
9453                 New GEOM.GEOM_Object, containing the created vertex.
9454             """
9455             # Example: see GEOM_TestMeasures.py
9456             # note: auto-publishing is done in self.GetVertexByIndex()
9457             anObj = self.GetVertexByIndex(theShape, 0, theName)
9458             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9459             return anObj
9460
9461         ## Get the last vertex of wire/edge depended orientation.
9462         #  @param theShape Shape to find last vertex.
9463         #  @param theName Object name; when specified, this parameter is used
9464         #         for result publication in the study. Otherwise, if automatic
9465         #         publication is switched on, default value is used for result name.
9466         #
9467         #  @return New GEOM.GEOM_Object, containing the created vertex.
9468         #
9469         #  @ref tui_measurement_tools_page "Example"
9470         def GetLastVertex(self, theShape, theName=None):
9471             """
9472             Get the last vertex of wire/edge depended orientation.
9473
9474             Parameters: 
9475                 theShape Shape to find last vertex.
9476                 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             Returns:   
9481                 New GEOM.GEOM_Object, containing the created vertex.
9482             """
9483             # Example: see GEOM_TestMeasures.py
9484             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"])
9485             # note: auto-publishing is done in self.GetVertexByIndex()
9486             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9487             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9488             return anObj
9489
9490         ## Get a normale to the given face. If the point is not given,
9491         #  the normale is calculated at the center of mass.
9492         #  @param theFace Face to define normale of.
9493         #  @param theOptionalPoint Point to compute the normale at.
9494         #  @param theName Object name; when specified, this parameter is used
9495         #         for result publication in the study. Otherwise, if automatic
9496         #         publication is switched on, default value is used for result name.
9497         #
9498         #  @return New GEOM.GEOM_Object, containing the created vector.
9499         #
9500         #  @ref swig_todo "Example"
9501         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9502             """
9503             Get a normale to the given face. If the point is not given,
9504             the normale is calculated at the center of mass.
9505             
9506             Parameters: 
9507                 theFace Face to define normale of.
9508                 theOptionalPoint Point to compute the normale at.
9509                 theName Object name; when specified, this parameter is used
9510                         for result publication in the study. Otherwise, if automatic
9511                         publication is switched on, default value is used for result name.
9512
9513             Returns:   
9514                 New GEOM.GEOM_Object, containing the created vector.
9515             """
9516             # Example: see GEOM_TestMeasures.py
9517             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9518             RaiseIfFailed("GetNormal", self.MeasuOp)
9519             self._autoPublish(anObj, theName, "normal")
9520             return anObj
9521
9522         ## Check a topology of the given shape.
9523         #  @param theShape Shape to check validity of.
9524         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9525         #                        if TRUE, the shape's geometry will be checked also.
9526         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9527         #                        of problem is printed.
9528         #                        if TRUE and if theShape is invalid, the description 
9529         #                        of problem is also returned.
9530         #  @return TRUE, if the shape "seems to be valid".
9531         #
9532         #  @ref tui_measurement_tools_page "Example"
9533         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9534             """
9535             Check a topology of the given shape.
9536
9537             Parameters: 
9538                 theShape Shape to check validity of.
9539                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9540                                if TRUE, the shape's geometry will be checked also.
9541                 theReturnStatus If FALSE and if theShape is invalid, a description
9542                                 of problem is printed.
9543                                 if TRUE and if theShape is invalid, the description 
9544                                 of problem is returned.
9545
9546             Returns:   
9547                 TRUE, if the shape "seems to be valid".
9548                 If theShape is invalid, prints a description of problem.
9549                 This description can also be returned.
9550             """
9551             # Example: see GEOM_TestMeasures.py
9552             if theIsCheckGeom:
9553                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9554                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9555             else:
9556                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9557                 RaiseIfFailed("CheckShape", self.MeasuOp)
9558             if IsValid == 0:
9559                 if theReturnStatus == 0:
9560                     print Status
9561             if theReturnStatus == 1:
9562               return (IsValid, Status)
9563             return IsValid
9564
9565         ## Detect self-intersections in the given shape.
9566         #  @param theShape Shape to check.
9567         #  @return TRUE, if the shape contains no self-intersections.
9568         #
9569         #  @ref tui_measurement_tools_page "Example"
9570         def CheckSelfIntersections(self, theShape):
9571             """
9572             Detect self-intersections in the given shape.
9573
9574             Parameters: 
9575                 theShape Shape to check.
9576
9577             Returns:   
9578                 TRUE, if the shape contains no self-intersections.
9579             """
9580             # Example: see GEOM_TestMeasures.py
9581             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9582             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9583             return IsValid
9584
9585         ## Get position (LCS) of theShape.
9586         #
9587         #  Origin of the LCS is situated at the shape's center of mass.
9588         #  Axes of the LCS are obtained from shape's location or,
9589         #  if the shape is a planar face, from position of its plane.
9590         #
9591         #  @param theShape Shape to calculate position of.
9592         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9593         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9594         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9595         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9596         #
9597         #  @ref swig_todo "Example"
9598         def GetPosition(self,theShape):
9599             """
9600             Get position (LCS) of theShape.
9601             Origin of the LCS is situated at the shape's center of mass.
9602             Axes of the LCS are obtained from shape's location or,
9603             if the shape is a planar face, from position of its plane.
9604
9605             Parameters: 
9606                 theShape Shape to calculate position of.
9607
9608             Returns:  
9609                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9610                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9611                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9612                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9613             """
9614             # Example: see GEOM_TestMeasures.py
9615             aTuple = self.MeasuOp.GetPosition(theShape)
9616             RaiseIfFailed("GetPosition", self.MeasuOp)
9617             return aTuple
9618
9619         ## Get kind of theShape.
9620         #
9621         #  @param theShape Shape to get a kind of.
9622         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9623         #          and a list of parameters, describing the shape.
9624         #  @note  Concrete meaning of each value, returned via \a theIntegers
9625         #         or \a theDoubles list depends on the kind() of the shape.
9626         #
9627         #  @ref swig_todo "Example"
9628         def KindOfShape(self,theShape):
9629             """
9630             Get kind of theShape.
9631          
9632             Parameters: 
9633                 theShape Shape to get a kind of.
9634
9635             Returns:
9636                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9637                     and a list of parameters, describing the shape.
9638             Note:
9639                 Concrete meaning of each value, returned via theIntegers
9640                 or theDoubles list depends on the geompy.kind of the shape
9641             """
9642             # Example: see GEOM_TestMeasures.py
9643             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9644             RaiseIfFailed("KindOfShape", self.MeasuOp)
9645
9646             aKind  = aRoughTuple[0]
9647             anInts = aRoughTuple[1]
9648             aDbls  = aRoughTuple[2]
9649
9650             # Now there is no exception from this rule:
9651             aKindTuple = [aKind] + aDbls + anInts
9652
9653             # If they are we will regroup parameters for such kind of shape.
9654             # For example:
9655             #if aKind == kind.SOME_KIND:
9656             #    #  SOME_KIND     int int double int double double
9657             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9658
9659             return aKindTuple
9660
9661         # end of l2_measure
9662         ## @}
9663
9664         ## @addtogroup l2_import_export
9665         ## @{
9666
9667         ## Import a shape from the BREP or IGES or STEP file
9668         #  (depends on given format) with given name.
9669         #  @param theFileName The file, containing the shape.
9670         #  @param theFormatName Specify format for the file reading.
9671         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9672         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9673         #            format 'STEP_SCALE' is used instead of 'STEP',
9674         #            length unit will be set to 'meter' and result model will be scaled.
9675         #  @param theName Object name; when specified, this parameter is used
9676         #         for result publication in the study. Otherwise, if automatic
9677         #         publication is switched on, default value is used for result name.
9678         #
9679         #  @return New GEOM.GEOM_Object, containing the imported shape.
9680         #
9681         #  @ref swig_Import_Export "Example"
9682         def ImportFile(self, theFileName, theFormatName, theName=None):
9683             """
9684             Import a shape from the BREP or IGES or STEP file
9685             (depends on given format) with given name.
9686
9687             Parameters: 
9688                 theFileName The file, containing the shape.
9689                 theFormatName Specify format for the file reading.
9690                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9691                     If format 'IGES_SCALE' is used instead of 'IGES' or
9692                        format 'STEP_SCALE' is used instead of 'STEP',
9693                        length unit will be set to 'meter' and result model will be scaled.
9694                 theName Object name; when specified, this parameter is used
9695                         for result publication in the study. Otherwise, if automatic
9696                         publication is switched on, default value is used for result name.
9697
9698             Returns:
9699                 New GEOM.GEOM_Object, containing the imported shape.
9700             """
9701             # Example: see GEOM_TestOthers.py
9702             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9703             RaiseIfFailed("ImportFile", self.InsertOp)
9704             self._autoPublish(anObj, theName, "imported")
9705             return anObj
9706
9707         ## Deprecated analog of ImportFile()
9708         def Import(self, theFileName, theFormatName, theName=None):
9709             """
9710             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9711             """
9712             print "WARNING: Function Import is deprecated, use ImportFile instead"
9713             # note: auto-publishing is done in self.ImportFile()
9714             return self.ImportFile(theFileName, theFormatName, theName)
9715
9716         ## Shortcut to ImportFile() for BREP format.
9717         #  Import a shape from the BREP file with given name.
9718         #  @param theFileName The file, containing the shape.
9719         #  @param theName Object name; when specified, this parameter is used
9720         #         for result publication in the study. Otherwise, if automatic
9721         #         publication is switched on, default value is used for result name.
9722         #
9723         #  @return New GEOM.GEOM_Object, containing the imported shape.
9724         #
9725         #  @ref swig_Import_Export "Example"
9726         def ImportBREP(self, theFileName, theName=None):
9727             """
9728             geompy.ImportFile(...) function for BREP format
9729             Import a shape from the BREP file with given name.
9730
9731             Parameters: 
9732                 theFileName The file, containing the shape.
9733                 theName Object name; when specified, this parameter is used
9734                         for result publication in the study. Otherwise, if automatic
9735                         publication is switched on, default value is used for result name.
9736
9737             Returns:
9738                 New GEOM.GEOM_Object, containing the imported shape.
9739             """
9740             # Example: see GEOM_TestOthers.py
9741             # note: auto-publishing is done in self.ImportFile()
9742             return self.ImportFile(theFileName, "BREP", theName)
9743
9744         ## Shortcut to ImportFile() for IGES format
9745         #  Import a shape from the IGES file with given name.
9746         #  @param theFileName The file, containing the shape.
9747         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9748         #                     and result model will be scaled, if its units are not meters.
9749         #                     If False (default), file length units will be taken into account.
9750         #  @param theName Object name; when specified, this parameter is used
9751         #         for result publication in the study. Otherwise, if automatic
9752         #         publication is switched on, default value is used for result name.
9753         #
9754         #  @return New GEOM.GEOM_Object, containing the imported shape.
9755         #
9756         #  @ref swig_Import_Export "Example"
9757         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
9758             """
9759             geompy.ImportFile(...) function for IGES format
9760
9761             Parameters:
9762                 theFileName The file, containing the shape.
9763                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9764                             and result model will be scaled, if its units are not meters.
9765                             If False (default), file length units will be taken into account.
9766                 theName Object name; when specified, this parameter is used
9767                         for result publication in the study. Otherwise, if automatic
9768                         publication is switched on, default value is used for result name.
9769
9770             Returns:
9771                 New GEOM.GEOM_Object, containing the imported shape.
9772             """
9773             # Example: see GEOM_TestOthers.py
9774             # note: auto-publishing is done in self.ImportFile()
9775             if ignoreUnits:
9776                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
9777             return self.ImportFile(theFileName, "IGES", theName)
9778
9779         ## Return length unit from given IGES file
9780         #  @param theFileName The file, containing the shape.
9781         #  @return String, containing the units name.
9782         #
9783         #  @ref swig_Import_Export "Example"
9784         def GetIGESUnit(self, theFileName):
9785             """
9786             Return length units from given IGES file
9787
9788             Parameters:
9789                 theFileName The file, containing the shape.
9790
9791             Returns:
9792                 String, containing the units name.
9793             """
9794             # Example: see GEOM_TestOthers.py
9795             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
9796             return aUnitName
9797
9798         ## Shortcut to ImportFile() for STEP format
9799         #  Import a shape from the STEP file with given name.
9800         #  @param theFileName The file, containing the shape.
9801         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9802         #                     and result model will be scaled, if its units are not meters.
9803         #                     If False (default), file length units will be taken into account.
9804         #  @param theName Object name; when specified, this parameter is used
9805         #         for result publication in the study. Otherwise, if automatic
9806         #         publication is switched on, default value is used for result name.
9807         #
9808         #  @return New GEOM.GEOM_Object, containing the imported shape.
9809         #
9810         #  @ref swig_Import_Export "Example"
9811         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
9812             """
9813             geompy.ImportFile(...) function for STEP format
9814
9815             Parameters:
9816                 theFileName The file, containing the shape.
9817                 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                 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             Returns:
9825                 New GEOM.GEOM_Object, containing the imported shape.
9826             """
9827             # Example: see GEOM_TestOthers.py
9828             # note: auto-publishing is done in self.ImportFile()
9829             if ignoreUnits:
9830                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
9831             return self.ImportFile(theFileName, "STEP", theName)
9832
9833         ## Return length unit from given IGES or STEP file
9834         #  @param theFileName The file, containing the shape.
9835         #  @return String, containing the units name.
9836         #
9837         #  @ref swig_Import_Export "Example"
9838         def GetSTEPUnit(self, theFileName):
9839             """
9840             Return length units from given STEP file
9841
9842             Parameters:
9843                 theFileName The file, containing the shape.
9844
9845             Returns:
9846                 String, containing the units name.
9847             """
9848             # Example: see GEOM_TestOthers.py
9849             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
9850             return aUnitName
9851
9852         ## Read a shape from the binary stream, containing its bounding representation (BRep).
9853         #  @note This method will not be dumped to the python script by DumpStudy functionality.
9854         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
9855         #  @param theStream The BRep binary stream.
9856         #  @param theName Object name; when specified, this parameter is used
9857         #         for result publication in the study. Otherwise, if automatic
9858         #         publication is switched on, default value is used for result name.
9859         #
9860         #  @return New GEOM_Object, containing the shape, read from theStream.
9861         #
9862         #  @ref swig_Import_Export "Example"
9863         def RestoreShape (self, theStream, theName=None):
9864             """
9865             Read a shape from the binary stream, containing its bounding representation (BRep).
9866
9867             Note:
9868                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
9869
9870             Parameters: 
9871                 theStream The BRep binary stream.
9872                 theName Object name; when specified, this parameter is used
9873                         for result publication in the study. Otherwise, if automatic
9874                         publication is switched on, default value is used for result name.
9875
9876             Returns:
9877                 New GEOM_Object, containing the shape, read from theStream.
9878             """
9879             # Example: see GEOM_TestOthers.py
9880             anObj = self.InsertOp.RestoreShape(theStream)
9881             RaiseIfFailed("RestoreShape", self.InsertOp)
9882             self._autoPublish(anObj, theName, "restored")
9883             return anObj
9884
9885         ## Export the given shape into a file with given name.
9886         #  @param theObject Shape to be stored in the file.
9887         #  @param theFileName Name of the file to store the given shape in.
9888         #  @param theFormatName Specify format for the shape storage.
9889         #         Available formats can be obtained with
9890         #         geompy.InsertOp.ExportTranslators()[0] method.
9891         #
9892         #  @ref swig_Import_Export "Example"
9893         def Export(self, theObject, theFileName, theFormatName):
9894             """
9895             Export the given shape into a file with given name.
9896
9897             Parameters: 
9898                 theObject Shape to be stored in the file.
9899                 theFileName Name of the file to store the given shape in.
9900                 theFormatName Specify format for the shape storage.
9901                               Available formats can be obtained with
9902                               geompy.InsertOp.ExportTranslators()[0] method.
9903             """
9904             # Example: see GEOM_TestOthers.py
9905             self.InsertOp.Export(theObject, theFileName, theFormatName)
9906             if self.InsertOp.IsDone() == 0:
9907                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
9908                 pass
9909             pass
9910
9911         ## Shortcut to Export() for BREP format
9912         #
9913         #  @ref swig_Import_Export "Example"
9914         def ExportBREP(self,theObject, theFileName):
9915             """
9916             geompy.Export(...) function for BREP format
9917             """
9918             # Example: see GEOM_TestOthers.py
9919             return self.Export(theObject, theFileName, "BREP")
9920
9921         ## Shortcut to Export() for IGES format
9922         #
9923         #  @ref swig_Import_Export "Example"
9924         def ExportIGES(self,theObject, theFileName):
9925             """
9926             geompy.Export(...) function for IGES format
9927             """
9928             # Example: see GEOM_TestOthers.py
9929             return self.Export(theObject, theFileName, "IGES")
9930
9931         ## Shortcut to Export() for STEP format
9932         #
9933         #  @ref swig_Import_Export "Example"
9934         def ExportSTEP(self,theObject, theFileName):
9935             """
9936             geompy.Export(...) function for STEP format
9937             """
9938             # Example: see GEOM_TestOthers.py
9939             return self.Export(theObject, theFileName, "STEP")
9940
9941         # end of l2_import_export
9942         ## @}
9943
9944         ## @addtogroup l3_blocks
9945         ## @{
9946
9947         ## Create a quadrangle face from four edges. Order of Edges is not
9948         #  important. It is  not necessary that edges share the same vertex.
9949         #  @param E1,E2,E3,E4 Edges for the face bound.
9950         #  @param theName Object name; when specified, this parameter is used
9951         #         for result publication in the study. Otherwise, if automatic
9952         #         publication is switched on, default value is used for result name.
9953         #
9954         #  @return New GEOM.GEOM_Object, containing the created face.
9955         #
9956         #  @ref tui_building_by_blocks_page "Example"
9957         def MakeQuad(self, E1, E2, E3, E4, theName=None):
9958             """
9959             Create a quadrangle face from four edges. Order of Edges is not
9960             important. It is  not necessary that edges share the same vertex.
9961
9962             Parameters: 
9963                 E1,E2,E3,E4 Edges for the face bound.
9964                 theName Object name; when specified, this parameter is used
9965                         for result publication in the study. Otherwise, if automatic
9966                         publication is switched on, default value is used for result name.
9967
9968             Returns: 
9969                 New GEOM.GEOM_Object, containing the created face.
9970
9971             Example of usage:               
9972                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
9973             """
9974             # Example: see GEOM_Spanner.py
9975             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
9976             RaiseIfFailed("MakeQuad", self.BlocksOp)
9977             self._autoPublish(anObj, theName, "quad")
9978             return anObj
9979
9980         ## Create a quadrangle face on two edges.
9981         #  The missing edges will be built by creating the shortest ones.
9982         #  @param E1,E2 Two opposite edges for the face.
9983         #  @param theName Object name; when specified, this parameter is used
9984         #         for result publication in the study. Otherwise, if automatic
9985         #         publication is switched on, default value is used for result name.
9986         #
9987         #  @return New GEOM.GEOM_Object, containing the created face.
9988         #
9989         #  @ref tui_building_by_blocks_page "Example"
9990         def MakeQuad2Edges(self, E1, E2, theName=None):
9991             """
9992             Create a quadrangle face on two edges.
9993             The missing edges will be built by creating the shortest ones.
9994
9995             Parameters: 
9996                 E1,E2 Two opposite edges for the face.
9997                 theName Object name; when specified, this parameter is used
9998                         for result publication in the study. Otherwise, if automatic
9999                         publication is switched on, default value is used for result name.
10000
10001             Returns: 
10002                 New GEOM.GEOM_Object, containing the created face.
10003             
10004             Example of usage:
10005                 # create vertices
10006                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10007                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10008                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10009                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10010                 # create edges
10011                 edge1 = geompy.MakeEdge(p1, p2)
10012                 edge2 = geompy.MakeEdge(p3, p4)
10013                 # create a quadrangle face from two edges
10014                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10015             """
10016             # Example: see GEOM_Spanner.py
10017             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10018             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10019             self._autoPublish(anObj, theName, "quad")
10020             return anObj
10021
10022         ## Create a quadrangle face with specified corners.
10023         #  The missing edges will be built by creating the shortest ones.
10024         #  @param V1,V2,V3,V4 Corner vertices for the face.
10025         #  @param theName Object name; when specified, this parameter is used
10026         #         for result publication in the study. Otherwise, if automatic
10027         #         publication is switched on, default value is used for result name.
10028         #
10029         #  @return New GEOM.GEOM_Object, containing the created face.
10030         #
10031         #  @ref tui_building_by_blocks_page "Example 1"
10032         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10033         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10034             """
10035             Create a quadrangle face with specified corners.
10036             The missing edges will be built by creating the shortest ones.
10037
10038             Parameters: 
10039                 V1,V2,V3,V4 Corner vertices for the face.
10040                 theName Object name; when specified, this parameter is used
10041                         for result publication in the study. Otherwise, if automatic
10042                         publication is switched on, default value is used for result name.
10043
10044             Returns: 
10045                 New GEOM.GEOM_Object, containing the created face.
10046
10047             Example of usage:
10048                 # create vertices
10049                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10050                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10051                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10052                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10053                 # create a quadrangle from four points in its corners
10054                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10055             """
10056             # Example: see GEOM_Spanner.py
10057             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10058             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10059             self._autoPublish(anObj, theName, "quad")
10060             return anObj
10061
10062         ## Create a hexahedral solid, bounded by the six given faces. Order of
10063         #  faces is not important. It is  not necessary that Faces share the same edge.
10064         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10065         #  @param theName Object name; when specified, this parameter is used
10066         #         for result publication in the study. Otherwise, if automatic
10067         #         publication is switched on, default value is used for result name.
10068         #
10069         #  @return New GEOM.GEOM_Object, containing the created solid.
10070         #
10071         #  @ref tui_building_by_blocks_page "Example 1"
10072         #  \n @ref swig_MakeHexa "Example 2"
10073         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10074             """
10075             Create a hexahedral solid, bounded by the six given faces. Order of
10076             faces is not important. It is  not necessary that Faces share the same edge.
10077
10078             Parameters: 
10079                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10080                 theName Object name; when specified, this parameter is used
10081                         for result publication in the study. Otherwise, if automatic
10082                         publication is switched on, default value is used for result name.
10083
10084             Returns:    
10085                 New GEOM.GEOM_Object, containing the created solid.
10086
10087             Example of usage:
10088                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10089             """
10090             # Example: see GEOM_Spanner.py
10091             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10092             RaiseIfFailed("MakeHexa", self.BlocksOp)
10093             self._autoPublish(anObj, theName, "hexa")
10094             return anObj
10095
10096         ## Create a hexahedral solid between two given faces.
10097         #  The missing faces will be built by creating the smallest ones.
10098         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10099         #  @param theName Object name; when specified, this parameter is used
10100         #         for result publication in the study. Otherwise, if automatic
10101         #         publication is switched on, default value is used for result name.
10102         #
10103         #  @return New GEOM.GEOM_Object, containing the created solid.
10104         #
10105         #  @ref tui_building_by_blocks_page "Example 1"
10106         #  \n @ref swig_MakeHexa2Faces "Example 2"
10107         def MakeHexa2Faces(self, F1, F2, theName=None):
10108             """
10109             Create a hexahedral solid between two given faces.
10110             The missing faces will be built by creating the smallest ones.
10111
10112             Parameters: 
10113                 F1,F2 Two opposite faces for the hexahedral solid.
10114                 theName Object name; when specified, this parameter is used
10115                         for result publication in the study. Otherwise, if automatic
10116                         publication is switched on, default value is used for result name.
10117
10118             Returns:
10119                 New GEOM.GEOM_Object, containing the created solid.
10120
10121             Example of usage:
10122                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10123             """
10124             # Example: see GEOM_Spanner.py
10125             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10126             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10127             self._autoPublish(anObj, theName, "hexa")
10128             return anObj
10129
10130         # end of l3_blocks
10131         ## @}
10132
10133         ## @addtogroup l3_blocks_op
10134         ## @{
10135
10136         ## Get a vertex, found in the given shape by its coordinates.
10137         #  @param theShape Block or a compound of blocks.
10138         #  @param theX,theY,theZ Coordinates of the sought vertex.
10139         #  @param theEpsilon Maximum allowed distance between the resulting
10140         #                    vertex and point with the given coordinates.
10141         #  @param theName Object name; when specified, this parameter is used
10142         #         for result publication in the study. Otherwise, if automatic
10143         #         publication is switched on, default value is used for result name.
10144         #
10145         #  @return New GEOM.GEOM_Object, containing the found vertex.
10146         #
10147         #  @ref swig_GetPoint "Example"
10148         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10149             """
10150             Get a vertex, found in the given shape by its coordinates.
10151
10152             Parameters: 
10153                 theShape Block or a compound of blocks.
10154                 theX,theY,theZ Coordinates of the sought vertex.
10155                 theEpsilon Maximum allowed distance between the resulting
10156                            vertex and point with the given coordinates.
10157                 theName Object name; when specified, this parameter is used
10158                         for result publication in the study. Otherwise, if automatic
10159                         publication is switched on, default value is used for result name.
10160
10161             Returns:                  
10162                 New GEOM.GEOM_Object, containing the found vertex.
10163
10164             Example of usage:
10165                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10166             """
10167             # Example: see GEOM_TestOthers.py
10168             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10169             RaiseIfFailed("GetPoint", self.BlocksOp)
10170             self._autoPublish(anObj, theName, "vertex")
10171             return anObj
10172
10173         ## Find a vertex of the given shape, which has minimal distance to the given point.
10174         #  @param theShape Any shape.
10175         #  @param thePoint Point, close to the desired vertex.
10176         #  @param theName Object name; when specified, this parameter is used
10177         #         for result publication in the study. Otherwise, if automatic
10178         #         publication is switched on, default value is used for result name.
10179         #
10180         #  @return New GEOM.GEOM_Object, containing the found vertex.
10181         #
10182         #  @ref swig_GetVertexNearPoint "Example"
10183         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10184             """
10185             Find a vertex of the given shape, which has minimal distance to the given point.
10186
10187             Parameters: 
10188                 theShape Any shape.
10189                 thePoint Point, close to the desired vertex.
10190                 theName Object name; when specified, this parameter is used
10191                         for result publication in the study. Otherwise, if automatic
10192                         publication is switched on, default value is used for result name.
10193
10194             Returns:
10195                 New GEOM.GEOM_Object, containing the found vertex.
10196
10197             Example of usage:
10198                 pmidle = geompy.MakeVertex(50, 0, 50)
10199                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10200             """
10201             # Example: see GEOM_TestOthers.py
10202             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10203             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10204             self._autoPublish(anObj, theName, "vertex")
10205             return anObj
10206
10207         ## Get an edge, found in the given shape by two given vertices.
10208         #  @param theShape Block or a compound of blocks.
10209         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10210         #  @param theName Object name; when specified, this parameter is used
10211         #         for result publication in the study. Otherwise, if automatic
10212         #         publication is switched on, default value is used for result name.
10213         #
10214         #  @return New GEOM.GEOM_Object, containing the found edge.
10215         #
10216         #  @ref swig_GetEdge "Example"
10217         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10218             """
10219             Get an edge, found in the given shape by two given vertices.
10220
10221             Parameters: 
10222                 theShape Block or a compound of blocks.
10223                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10224                 theName Object name; when specified, this parameter is used
10225                         for result publication in the study. Otherwise, if automatic
10226                         publication is switched on, default value is used for result name.
10227
10228             Returns:
10229                 New GEOM.GEOM_Object, containing the found edge.
10230             """
10231             # Example: see GEOM_Spanner.py
10232             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10233             RaiseIfFailed("GetEdge", self.BlocksOp)
10234             self._autoPublish(anObj, theName, "edge")
10235             return anObj
10236
10237         ## Find an edge of the given shape, which has minimal distance to the given point.
10238         #  @param theShape Block or a compound of blocks.
10239         #  @param thePoint Point, close to the desired edge.
10240         #  @param theName Object name; when specified, this parameter is used
10241         #         for result publication in the study. Otherwise, if automatic
10242         #         publication is switched on, default value is used for result name.
10243         #
10244         #  @return New GEOM.GEOM_Object, containing the found edge.
10245         #
10246         #  @ref swig_GetEdgeNearPoint "Example"
10247         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10248             """
10249             Find an edge of the given shape, which has minimal distance to the given point.
10250
10251             Parameters: 
10252                 theShape Block or a compound of blocks.
10253                 thePoint Point, close to the desired edge.
10254                 theName Object name; when specified, this parameter is used
10255                         for result publication in the study. Otherwise, if automatic
10256                         publication is switched on, default value is used for result name.
10257
10258             Returns:
10259                 New GEOM.GEOM_Object, containing the found edge.
10260             """
10261             # Example: see GEOM_TestOthers.py
10262             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10263             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10264             self._autoPublish(anObj, theName, "edge")
10265             return anObj
10266
10267         ## Returns a face, found in the given shape by four given corner vertices.
10268         #  @param theShape Block or a compound of blocks.
10269         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10270         #  @param theName Object name; when specified, this parameter is used
10271         #         for result publication in the study. Otherwise, if automatic
10272         #         publication is switched on, default value is used for result name.
10273         #
10274         #  @return New GEOM.GEOM_Object, containing the found face.
10275         #
10276         #  @ref swig_todo "Example"
10277         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10278             """
10279             Returns a face, found in the given shape by four given corner vertices.
10280
10281             Parameters:
10282                 theShape Block or a compound of blocks.
10283                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10284                 theName Object name; when specified, this parameter is used
10285                         for result publication in the study. Otherwise, if automatic
10286                         publication is switched on, default value is used for result name.
10287
10288             Returns:
10289                 New GEOM.GEOM_Object, containing the found face.
10290             """
10291             # Example: see GEOM_Spanner.py
10292             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10293             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10294             self._autoPublish(anObj, theName, "face")
10295             return anObj
10296
10297         ## Get a face of block, found in the given shape by two given edges.
10298         #  @param theShape Block or a compound of blocks.
10299         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10300         #  @param theName Object name; when specified, this parameter is used
10301         #         for result publication in the study. Otherwise, if automatic
10302         #         publication is switched on, default value is used for result name.
10303         #
10304         #  @return New GEOM.GEOM_Object, containing the found face.
10305         #
10306         #  @ref swig_todo "Example"
10307         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10308             """
10309             Get a face of block, found in the given shape by two given edges.
10310
10311             Parameters:
10312                 theShape Block or a compound of blocks.
10313                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10314                 theName Object name; when specified, this parameter is used
10315                         for result publication in the study. Otherwise, if automatic
10316                         publication is switched on, default value is used for result name.
10317
10318             Returns:
10319                 New GEOM.GEOM_Object, containing the found face.
10320             """
10321             # Example: see GEOM_Spanner.py
10322             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10323             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10324             self._autoPublish(anObj, theName, "face")
10325             return anObj
10326
10327         ## Find a face, opposite to the given one in the given block.
10328         #  @param theBlock Must be a hexahedral solid.
10329         #  @param theFace Face of \a theBlock, opposite to the desired face.
10330         #  @param theName Object name; when specified, this parameter is used
10331         #         for result publication in the study. Otherwise, if automatic
10332         #         publication is switched on, default value is used for result name.
10333         #
10334         #  @return New GEOM.GEOM_Object, containing the found face.
10335         #
10336         #  @ref swig_GetOppositeFace "Example"
10337         def GetOppositeFace(self, theBlock, theFace, theName=None):
10338             """
10339             Find a face, opposite to the given one in the given block.
10340
10341             Parameters:
10342                 theBlock Must be a hexahedral solid.
10343                 theFace Face of theBlock, opposite to the desired face.
10344                 theName Object name; when specified, this parameter is used
10345                         for result publication in the study. Otherwise, if automatic
10346                         publication is switched on, default value is used for result name.
10347
10348             Returns: 
10349                 New GEOM.GEOM_Object, containing the found face.
10350             """
10351             # Example: see GEOM_Spanner.py
10352             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10353             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10354             self._autoPublish(anObj, theName, "face")
10355             return anObj
10356
10357         ## Find a face of the given shape, which has minimal distance to the given point.
10358         #  @param theShape Block or a compound of blocks.
10359         #  @param thePoint Point, close to the desired face.
10360         #  @param theName Object name; when specified, this parameter is used
10361         #         for result publication in the study. Otherwise, if automatic
10362         #         publication is switched on, default value is used for result name.
10363         #
10364         #  @return New GEOM.GEOM_Object, containing the found face.
10365         #
10366         #  @ref swig_GetFaceNearPoint "Example"
10367         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10368             """
10369             Find a face of the given shape, which has minimal distance to the given point.
10370
10371             Parameters:
10372                 theShape Block or a compound of blocks.
10373                 thePoint Point, close to the desired face.
10374                 theName Object name; when specified, this parameter is used
10375                         for result publication in the study. Otherwise, if automatic
10376                         publication is switched on, default value is used for result name.
10377
10378             Returns:
10379                 New GEOM.GEOM_Object, containing the found face.
10380             """
10381             # Example: see GEOM_Spanner.py
10382             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10383             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10384             self._autoPublish(anObj, theName, "face")
10385             return anObj
10386
10387         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10388         #  @param theBlock Block or a compound of blocks.
10389         #  @param theVector Vector, close to the normale of the desired face.
10390         #  @param theName Object name; when specified, this parameter is used
10391         #         for result publication in the study. Otherwise, if automatic
10392         #         publication is switched on, default value is used for result name.
10393         #
10394         #  @return New GEOM.GEOM_Object, containing the found face.
10395         #
10396         #  @ref swig_todo "Example"
10397         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10398             """
10399             Find a face of block, whose outside normale has minimal angle with the given vector.
10400
10401             Parameters:
10402                 theBlock Block or a compound of blocks.
10403                 theVector Vector, close to the normale of the desired face.
10404                 theName Object name; when specified, this parameter is used
10405                         for result publication in the study. Otherwise, if automatic
10406                         publication is switched on, default value is used for result name.
10407
10408             Returns:
10409                 New GEOM.GEOM_Object, containing the found face.
10410             """
10411             # Example: see GEOM_Spanner.py
10412             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10413             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10414             self._autoPublish(anObj, theName, "face")
10415             return anObj
10416
10417         ## Find all sub-shapes of type \a theShapeType of the given shape,
10418         #  which have minimal distance to the given point.
10419         #  @param theShape Any shape.
10420         #  @param thePoint Point, close to the desired shape.
10421         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10422         #  @param theTolerance The tolerance for distances comparison. All shapes
10423         #                      with distances to the given point in interval
10424         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10425         #  @param theName Object name; when specified, this parameter is used
10426         #         for result publication in the study. Otherwise, if automatic
10427         #         publication is switched on, default value is used for result name.
10428         #
10429         #  @return New GEOM_Object, containing a group of all found shapes.
10430         #
10431         #  @ref swig_GetShapesNearPoint "Example"
10432         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10433             """
10434             Find all sub-shapes of type theShapeType of the given shape,
10435             which have minimal distance to the given point.
10436
10437             Parameters:
10438                 theShape Any shape.
10439                 thePoint Point, close to the desired shape.
10440                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10441                 theTolerance The tolerance for distances comparison. All shapes
10442                                 with distances to the given point in interval
10443                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
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_Object, containing a group of all found shapes.
10450             """
10451             # Example: see GEOM_TestOthers.py
10452             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10453             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10454             self._autoPublish(anObj, theName, "group")
10455             return anObj
10456
10457         # end of l3_blocks_op
10458         ## @}
10459
10460         ## @addtogroup l4_blocks_measure
10461         ## @{
10462
10463         ## Check, if the compound of blocks is given.
10464         #  To be considered as a compound of blocks, the
10465         #  given shape must satisfy the following conditions:
10466         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10467         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10468         #  - The compound should be connexe.
10469         #  - The glue between two quadrangle faces should be applied.
10470         #  @param theCompound The compound to check.
10471         #  @return TRUE, if the given shape is a compound of blocks.
10472         #  If theCompound is not valid, prints all discovered errors.
10473         #
10474         #  @ref tui_measurement_tools_page "Example 1"
10475         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10476         def CheckCompoundOfBlocks(self,theCompound):
10477             """
10478             Check, if the compound of blocks is given.
10479             To be considered as a compound of blocks, the
10480             given shape must satisfy the following conditions:
10481             - Each element of the compound should be a Block (6 faces and 12 edges).
10482             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10483             - The compound should be connexe.
10484             - The glue between two quadrangle faces should be applied.
10485
10486             Parameters:
10487                 theCompound The compound to check.
10488
10489             Returns:
10490                 TRUE, if the given shape is a compound of blocks.
10491                 If theCompound is not valid, prints all discovered errors.            
10492             """
10493             # Example: see GEOM_Spanner.py
10494             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10495             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10496             if IsValid == 0:
10497                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10498                 print Descr
10499             return IsValid
10500
10501         ## Retrieve all non blocks solids and faces from \a theShape.
10502         #  @param theShape The shape to explore.
10503         #  @param theName Object name; when specified, this parameter is used
10504         #         for result publication in the study. Otherwise, if automatic
10505         #         publication is switched on, default value is used for result name.
10506         #
10507         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10508         #          non block solids (= not 6 faces, or with 6 faces, but with the
10509         #          presence of non-quadrangular faces). The second object is a
10510         #          group of all non quadrangular faces.
10511         #
10512         #  @ref tui_measurement_tools_page "Example 1"
10513         #  \n @ref swig_GetNonBlocks "Example 2"
10514         def GetNonBlocks (self, theShape, theName=None):
10515             """
10516             Retrieve all non blocks solids and faces from theShape.
10517
10518             Parameters:
10519                 theShape The shape to explore.
10520                 theName Object name; when specified, this parameter is used
10521                         for result publication in the study. Otherwise, if automatic
10522                         publication is switched on, default value is used for result name.
10523
10524             Returns:
10525                 A tuple of two GEOM_Objects. The first object is a group of all
10526                 non block solids (= not 6 faces, or with 6 faces, but with the
10527                 presence of non-quadrangular faces). The second object is a
10528                 group of all non quadrangular faces.
10529
10530             Usage:
10531                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10532             """
10533             # Example: see GEOM_Spanner.py
10534             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10535             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10536             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10537             return aTuple
10538
10539         ## Remove all seam and degenerated edges from \a theShape.
10540         #  Unite faces and edges, sharing one surface. It means that
10541         #  this faces must have references to one C++ surface object (handle).
10542         #  @param theShape The compound or single solid to remove irregular edges from.
10543         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10544         #         do not unite faces.
10545         #  @param theName Object name; when specified, this parameter is used
10546         #         for result publication in the study. Otherwise, if automatic
10547         #         publication is switched on, default value is used for result name.
10548         #
10549         #  @return Improved shape.
10550         #
10551         #  @ref swig_RemoveExtraEdges "Example"
10552         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10553             """
10554             Remove all seam and degenerated edges from theShape.
10555             Unite faces and edges, sharing one surface. It means that
10556             this faces must have references to one C++ surface object (handle).
10557
10558             Parameters:
10559                 theShape The compound or single solid to remove irregular edges from.
10560                 doUnionFaces If True, then unite faces. If False (the default value),
10561                              do not unite faces.
10562                 theName Object name; when specified, this parameter is used
10563                         for result publication in the study. Otherwise, if automatic
10564                         publication is switched on, default value is used for result name.
10565
10566             Returns: 
10567                 Improved shape.
10568             """
10569             # Example: see GEOM_TestOthers.py
10570             nbFacesOptimum = -1 # -1 means do not unite faces
10571             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10572             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10573             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10574             self._autoPublish(anObj, theName, "removeExtraEdges")
10575             return anObj
10576
10577         ## Check, if the given shape is a blocks compound.
10578         #  Fix all detected errors.
10579         #    \note Single block can be also fixed by this method.
10580         #  @param theShape The compound to check and improve.
10581         #  @param theName Object name; when specified, this parameter is used
10582         #         for result publication in the study. Otherwise, if automatic
10583         #         publication is switched on, default value is used for result name.
10584         #
10585         #  @return Improved compound.
10586         #
10587         #  @ref swig_CheckAndImprove "Example"
10588         def CheckAndImprove(self, theShape, theName=None):
10589             """
10590             Check, if the given shape is a blocks compound.
10591             Fix all detected errors.
10592
10593             Note:
10594                 Single block can be also fixed by this method.
10595
10596             Parameters:
10597                 theShape The compound to check and improve.
10598                 theName Object name; when specified, this parameter is used
10599                         for result publication in the study. Otherwise, if automatic
10600                         publication is switched on, default value is used for result name.
10601
10602             Returns: 
10603                 Improved compound.
10604             """
10605             # Example: see GEOM_TestOthers.py
10606             anObj = self.BlocksOp.CheckAndImprove(theShape)
10607             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10608             self._autoPublish(anObj, theName, "improved")
10609             return anObj
10610
10611         # end of l4_blocks_measure
10612         ## @}
10613
10614         ## @addtogroup l3_blocks_op
10615         ## @{
10616
10617         ## Get all the blocks, contained in the given compound.
10618         #  @param theCompound The compound to explode.
10619         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10620         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10621         #  @param theName Object name; when specified, this parameter is used
10622         #         for result publication in the study. Otherwise, if automatic
10623         #         publication is switched on, default value is used for result name.
10624         #
10625         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10626         #
10627         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10628         #
10629         #  @ref tui_explode_on_blocks "Example 1"
10630         #  \n @ref swig_MakeBlockExplode "Example 2"
10631         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10632             """
10633             Get all the blocks, contained in the given compound.
10634
10635             Parameters:
10636                 theCompound The compound to explode.
10637                 theMinNbFaces If solid has lower number of faces, it is not a block.
10638                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10639                 theName Object name; when specified, this parameter is used
10640                         for result publication in the study. Otherwise, if automatic
10641                         publication is switched on, default value is used for result name.
10642
10643             Note:
10644                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10645
10646             Returns:  
10647                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10648             """
10649             # Example: see GEOM_TestOthers.py
10650             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10651             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10652             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10653             for anObj in aList:
10654                 anObj.SetParameters(Parameters)
10655                 pass
10656             self._autoPublish(aList, theName, "block")
10657             return aList
10658
10659         ## Find block, containing the given point inside its volume or on boundary.
10660         #  @param theCompound Compound, to find block in.
10661         #  @param thePoint Point, close to the desired block. If the point lays on
10662         #         boundary between some blocks, we return block with nearest center.
10663         #  @param theName Object name; when specified, this parameter is used
10664         #         for result publication in the study. Otherwise, if automatic
10665         #         publication is switched on, default value is used for result name.
10666         #
10667         #  @return New GEOM.GEOM_Object, containing the found block.
10668         #
10669         #  @ref swig_todo "Example"
10670         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10671             """
10672             Find block, containing the given point inside its volume or on boundary.
10673
10674             Parameters:
10675                 theCompound Compound, to find block in.
10676                 thePoint Point, close to the desired block. If the point lays on
10677                          boundary between some blocks, we return block with nearest center.
10678                 theName Object name; when specified, this parameter is used
10679                         for result publication in the study. Otherwise, if automatic
10680                         publication is switched on, default value is used for result name.
10681
10682             Returns:
10683                 New GEOM.GEOM_Object, containing the found block.
10684             """
10685             # Example: see GEOM_Spanner.py
10686             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10687             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10688             self._autoPublish(anObj, theName, "block")
10689             return anObj
10690
10691         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10692         #  @param theCompound Compound, to find block in.
10693         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10694         #  @param theName Object name; when specified, this parameter is used
10695         #         for result publication in the study. Otherwise, if automatic
10696         #         publication is switched on, default value is used for result name.
10697         #
10698         #  @return New GEOM.GEOM_Object, containing the found block.
10699         #
10700         #  @ref swig_GetBlockByParts "Example"
10701         def GetBlockByParts(self, theCompound, theParts, theName=None):
10702             """
10703              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10704
10705              Parameters:
10706                 theCompound Compound, to find block in.
10707                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
10708                 theName Object name; when specified, this parameter is used
10709                         for result publication in the study. Otherwise, if automatic
10710                         publication is switched on, default value is used for result name.
10711
10712             Returns: 
10713                 New GEOM_Object, containing the found block.
10714             """
10715             # Example: see GEOM_TestOthers.py
10716             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
10717             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
10718             self._autoPublish(anObj, theName, "block")
10719             return anObj
10720
10721         ## Return all blocks, containing all the elements, passed as the parts.
10722         #  @param theCompound Compound, to find blocks in.
10723         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10724         #  @param theName Object name; when specified, this parameter is used
10725         #         for result publication in the study. Otherwise, if automatic
10726         #         publication is switched on, default value is used for result name.
10727         #
10728         #  @return List of GEOM.GEOM_Object, containing the found blocks.
10729         #
10730         #  @ref swig_todo "Example"
10731         def GetBlocksByParts(self, theCompound, theParts, theName=None):
10732             """
10733             Return all blocks, containing all the elements, passed as the parts.
10734
10735             Parameters:
10736                 theCompound Compound, to find blocks in.
10737                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10738                 theName Object name; when specified, this parameter is used
10739                         for result publication in the study. Otherwise, if automatic
10740                         publication is switched on, default value is used for result name.
10741
10742             Returns:
10743                 List of GEOM.GEOM_Object, containing the found blocks.
10744             """
10745             # Example: see GEOM_Spanner.py
10746             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
10747             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
10748             self._autoPublish(aList, theName, "block")
10749             return aList
10750
10751         ## Multi-transformate block and glue the result.
10752         #  Transformation is defined so, as to superpose direction faces.
10753         #  @param Block Hexahedral solid to be multi-transformed.
10754         #  @param DirFace1 ID of First direction face.
10755         #  @param DirFace2 ID of Second direction face.
10756         #  @param NbTimes Quantity of transformations to be done.
10757         #  @param theName Object name; when specified, this parameter is used
10758         #         for result publication in the study. Otherwise, if automatic
10759         #         publication is switched on, default value is used for result name.
10760         #
10761         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10762         #
10763         #  @return New GEOM.GEOM_Object, containing the result shape.
10764         #
10765         #  @ref tui_multi_transformation "Example"
10766         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
10767             """
10768             Multi-transformate block and glue the result.
10769             Transformation is defined so, as to superpose direction faces.
10770
10771             Parameters:
10772                 Block Hexahedral solid to be multi-transformed.
10773                 DirFace1 ID of First direction face.
10774                 DirFace2 ID of Second direction face.
10775                 NbTimes Quantity of transformations to be done.
10776                 theName Object name; when specified, this parameter is used
10777                         for result publication in the study. Otherwise, if automatic
10778                         publication is switched on, default value is used for result name.
10779
10780             Note:
10781                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10782
10783             Returns:
10784                 New GEOM.GEOM_Object, containing the result shape.
10785             """
10786             # Example: see GEOM_Spanner.py
10787             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
10788             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
10789             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
10790             anObj.SetParameters(Parameters)
10791             self._autoPublish(anObj, theName, "transformed")
10792             return anObj
10793
10794         ## Multi-transformate block and glue the result.
10795         #  @param Block Hexahedral solid to be multi-transformed.
10796         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
10797         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
10798         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
10799         #  @param theName Object name; when specified, this parameter is used
10800         #         for result publication in the study. Otherwise, if automatic
10801         #         publication is switched on, default value is used for result name.
10802         #
10803         #  @return New GEOM.GEOM_Object, containing the result shape.
10804         #
10805         #  @ref tui_multi_transformation "Example"
10806         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
10807                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
10808             """
10809             Multi-transformate block and glue the result.
10810
10811             Parameters:
10812                 Block Hexahedral solid to be multi-transformed.
10813                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
10814                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
10815                 NbTimesU,NbTimesV Quantity of transformations to be done.
10816                 theName Object name; when specified, this parameter is used
10817                         for result publication in the study. Otherwise, if automatic
10818                         publication is switched on, default value is used for result name.
10819
10820             Returns:
10821                 New GEOM.GEOM_Object, containing the result shape.
10822             """
10823             # Example: see GEOM_Spanner.py
10824             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
10825               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
10826             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
10827                                                             DirFace1V, DirFace2V, NbTimesV)
10828             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
10829             anObj.SetParameters(Parameters)
10830             self._autoPublish(anObj, theName, "transformed")
10831             return anObj
10832
10833         ## Build all possible propagation groups.
10834         #  Propagation group is a set of all edges, opposite to one (main)
10835         #  edge of this group directly or through other opposite edges.
10836         #  Notion of Opposite Edge make sence only on quadrangle face.
10837         #  @param theShape Shape to build propagation groups on.
10838         #  @param theName Object name; when specified, this parameter is used
10839         #         for result publication in the study. Otherwise, if automatic
10840         #         publication is switched on, default value is used for result name.
10841         #
10842         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
10843         #
10844         #  @ref swig_Propagate "Example"
10845         def Propagate(self, theShape, theName=None):
10846             """
10847             Build all possible propagation groups.
10848             Propagation group is a set of all edges, opposite to one (main)
10849             edge of this group directly or through other opposite edges.
10850             Notion of Opposite Edge make sence only on quadrangle face.
10851
10852             Parameters:
10853                 theShape Shape to build propagation groups on.
10854                 theName Object name; when specified, this parameter is used
10855                         for result publication in the study. Otherwise, if automatic
10856                         publication is switched on, default value is used for result name.
10857
10858             Returns:
10859                 List of GEOM.GEOM_Object, each of them is a propagation group.
10860             """
10861             # Example: see GEOM_TestOthers.py
10862             listChains = self.BlocksOp.Propagate(theShape)
10863             RaiseIfFailed("Propagate", self.BlocksOp)
10864             self._autoPublish(listChains, theName, "propagate")
10865             return listChains
10866
10867         # end of l3_blocks_op
10868         ## @}
10869
10870         ## @addtogroup l3_groups
10871         ## @{
10872
10873         ## Creates a new group which will store sub-shapes of theMainShape
10874         #  @param theMainShape is a GEOM object on which the group is selected
10875         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
10876         #  @param theName Object name; when specified, this parameter is used
10877         #         for result publication in the study. Otherwise, if automatic
10878         #         publication is switched on, default value is used for result name.
10879         #
10880         #  @return a newly created GEOM group (GEOM.GEOM_Object)
10881         #
10882         #  @ref tui_working_with_groups_page "Example 1"
10883         #  \n @ref swig_CreateGroup "Example 2"
10884         def CreateGroup(self, theMainShape, theShapeType, theName=None):
10885             """
10886             Creates a new group which will store sub-shapes of theMainShape
10887
10888             Parameters:
10889                theMainShape is a GEOM object on which the group is selected
10890                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
10891                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
10892                 theName Object name; when specified, this parameter is used
10893                         for result publication in the study. Otherwise, if automatic
10894                         publication is switched on, default value is used for result name.
10895
10896             Returns:
10897                a newly created GEOM group
10898
10899             Example of usage:
10900                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
10901                 
10902             """
10903             # Example: see GEOM_TestOthers.py
10904             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
10905             RaiseIfFailed("CreateGroup", self.GroupOp)
10906             self._autoPublish(anObj, theName, "group")
10907             return anObj
10908
10909         ## Adds a sub-object with ID theSubShapeId to the group
10910         #  @param theGroup is a GEOM group to which the new sub-shape is added
10911         #  @param theSubShapeID is a sub-shape ID in the main object.
10912         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
10913         #
10914         #  @ref tui_working_with_groups_page "Example"
10915         def AddObject(self,theGroup, theSubShapeID):
10916             """
10917             Adds a sub-object with ID theSubShapeId to the group
10918
10919             Parameters:
10920                 theGroup       is a GEOM group to which the new sub-shape is added
10921                 theSubShapeID  is a sub-shape ID in the main object.
10922
10923             Note:
10924                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
10925             """
10926             # Example: see GEOM_TestOthers.py
10927             self.GroupOp.AddObject(theGroup, theSubShapeID)
10928             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
10929                 RaiseIfFailed("AddObject", self.GroupOp)
10930                 pass
10931             pass
10932
10933         ## Removes a sub-object with ID \a theSubShapeId from the group
10934         #  @param theGroup is a GEOM group from which the new sub-shape is removed
10935         #  @param theSubShapeID is a sub-shape ID in the main object.
10936         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
10937         #
10938         #  @ref tui_working_with_groups_page "Example"
10939         def RemoveObject(self,theGroup, theSubShapeID):
10940             """
10941             Removes a sub-object with ID theSubShapeId from the group
10942
10943             Parameters:
10944                 theGroup is a GEOM group from which the new sub-shape is removed
10945                 theSubShapeID is a sub-shape ID in the main object.
10946
10947             Note:
10948                 Use method GetSubShapeID() to get an unique ID of the sub-shape
10949             """
10950             # Example: see GEOM_TestOthers.py
10951             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
10952             RaiseIfFailed("RemoveObject", self.GroupOp)
10953             pass
10954
10955         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
10956         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
10957         #  @param theSubShapes is a list of sub-shapes to be added.
10958         #
10959         #  @ref tui_working_with_groups_page "Example"
10960         def UnionList (self,theGroup, theSubShapes):
10961             """
10962             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
10963
10964             Parameters:
10965                 theGroup is a GEOM group to which the new sub-shapes are added.
10966                 theSubShapes is a list of sub-shapes to be added.
10967             """
10968             # Example: see GEOM_TestOthers.py
10969             self.GroupOp.UnionList(theGroup, theSubShapes)
10970             RaiseIfFailed("UnionList", self.GroupOp)
10971             pass
10972
10973         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
10974         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
10975         #  @param theSubShapes is a list of indices of sub-shapes to be added.
10976         #
10977         #  @ref swig_UnionIDs "Example"
10978         def UnionIDs(self,theGroup, theSubShapes):
10979             """
10980             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
10981
10982             Parameters:
10983                 theGroup is a GEOM group to which the new sub-shapes are added.
10984                 theSubShapes is a list of indices of sub-shapes to be added.
10985             """
10986             # Example: see GEOM_TestOthers.py
10987             self.GroupOp.UnionIDs(theGroup, theSubShapes)
10988             RaiseIfFailed("UnionIDs", self.GroupOp)
10989             pass
10990
10991         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
10992         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
10993         #  @param theSubShapes is a list of sub-shapes to be removed.
10994         #
10995         #  @ref tui_working_with_groups_page "Example"
10996         def DifferenceList (self,theGroup, theSubShapes):
10997             """
10998             Removes from the group all the given shapes. No errors, if some shapes are not included.
10999
11000             Parameters:
11001                 theGroup is a GEOM group from which the sub-shapes are removed.
11002                 theSubShapes is a list of sub-shapes to be removed.
11003             """
11004             # Example: see GEOM_TestOthers.py
11005             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11006             RaiseIfFailed("DifferenceList", self.GroupOp)
11007             pass
11008
11009         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11010         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11011         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11012         #
11013         #  @ref swig_DifferenceIDs "Example"
11014         def DifferenceIDs(self,theGroup, theSubShapes):
11015             """
11016             Removes from the group all the given shapes. No errors, if some shapes are not included.
11017
11018             Parameters:
11019                 theGroup is a GEOM group from which the sub-shapes are removed.
11020                 theSubShapes is a list of indices of sub-shapes to be removed.
11021             """            
11022             # Example: see GEOM_TestOthers.py
11023             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11024             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11025             pass
11026
11027         ## Union of two groups.
11028         #  New group is created. It will contain all entities
11029         #  which are present in groups theGroup1 and theGroup2.
11030         #  @param theGroup1, theGroup2 are the initial GEOM groups
11031         #                              to create the united group from.
11032         #  @param theName Object name; when specified, this parameter is used
11033         #         for result publication in the study. Otherwise, if automatic
11034         #         publication is switched on, default value is used for result name.
11035         #
11036         #  @return a newly created GEOM group.
11037         #
11038         #  @ref tui_union_groups_anchor "Example"
11039         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11040             """
11041             Union of two groups.
11042             New group is created. It will contain all entities
11043             which are present in groups theGroup1 and theGroup2.
11044
11045             Parameters:
11046                 theGroup1, theGroup2 are the initial GEOM groups
11047                                      to create the united group from.
11048                 theName Object name; when specified, this parameter is used
11049                         for result publication in the study. Otherwise, if automatic
11050                         publication is switched on, default value is used for result name.
11051
11052             Returns:
11053                 a newly created GEOM group.
11054             """
11055             # Example: see GEOM_TestOthers.py
11056             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11057             RaiseIfFailed("UnionGroups", self.GroupOp)
11058             self._autoPublish(aGroup, theName, "group")
11059             return aGroup
11060
11061         ## Intersection of two groups.
11062         #  New group is created. It will contain only those entities
11063         #  which are present in both groups theGroup1 and theGroup2.
11064         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11065         #  @param theName Object name; when specified, this parameter is used
11066         #         for result publication in the study. Otherwise, if automatic
11067         #         publication is switched on, default value is used for result name.
11068         #
11069         #  @return a newly created GEOM group.
11070         #
11071         #  @ref tui_intersect_groups_anchor "Example"
11072         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11073             """
11074             Intersection of two groups.
11075             New group is created. It will contain only those entities
11076             which are present in both groups theGroup1 and theGroup2.
11077
11078             Parameters:
11079                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11080                 theName Object name; when specified, this parameter is used
11081                         for result publication in the study. Otherwise, if automatic
11082                         publication is switched on, default value is used for result name.
11083
11084             Returns:
11085                 a newly created GEOM group.
11086             """
11087             # Example: see GEOM_TestOthers.py
11088             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11089             RaiseIfFailed("IntersectGroups", self.GroupOp)
11090             self._autoPublish(aGroup, theName, "group")
11091             return aGroup
11092
11093         ## Cut of two groups.
11094         #  New group is created. It will contain entities which are
11095         #  present in group theGroup1 but are not present in group theGroup2.
11096         #  @param theGroup1 is a GEOM group to include elements of.
11097         #  @param theGroup2 is a GEOM group to exclude elements of.
11098         #  @param theName Object name; when specified, this parameter is used
11099         #         for result publication in the study. Otherwise, if automatic
11100         #         publication is switched on, default value is used for result name.
11101         #
11102         #  @return a newly created GEOM group.
11103         #
11104         #  @ref tui_cut_groups_anchor "Example"
11105         def CutGroups (self, theGroup1, theGroup2, theName=None):
11106             """
11107             Cut of two groups.
11108             New group is created. It will contain entities which are
11109             present in group theGroup1 but are not present in group theGroup2.
11110
11111             Parameters:
11112                 theGroup1 is a GEOM group to include elements of.
11113                 theGroup2 is a GEOM group to exclude elements of.
11114                 theName Object name; when specified, this parameter is used
11115                         for result publication in the study. Otherwise, if automatic
11116                         publication is switched on, default value is used for result name.
11117
11118             Returns:
11119                 a newly created GEOM group.
11120             """
11121             # Example: see GEOM_TestOthers.py
11122             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11123             RaiseIfFailed("CutGroups", self.GroupOp)
11124             self._autoPublish(aGroup, theName, "group")
11125             return aGroup
11126
11127         ## Union of list of groups.
11128         #  New group is created. It will contain all entities that are
11129         #  present in groups listed in theGList.
11130         #  @param theGList is a list of GEOM groups to create the united group from.
11131         #  @param theName Object name; when specified, this parameter is used
11132         #         for result publication in the study. Otherwise, if automatic
11133         #         publication is switched on, default value is used for result name.
11134         #
11135         #  @return a newly created GEOM group.
11136         #
11137         #  @ref tui_union_groups_anchor "Example"
11138         def UnionListOfGroups (self, theGList, theName=None):
11139             """
11140             Union of list of groups.
11141             New group is created. It will contain all entities that are
11142             present in groups listed in theGList.
11143
11144             Parameters:
11145                 theGList is a list of GEOM groups to create the united group from.
11146                 theName Object name; when specified, this parameter is used
11147                         for result publication in the study. Otherwise, if automatic
11148                         publication is switched on, default value is used for result name.
11149
11150             Returns:
11151                 a newly created GEOM group.
11152             """
11153             # Example: see GEOM_TestOthers.py
11154             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11155             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11156             self._autoPublish(aGroup, theName, "group")
11157             return aGroup
11158
11159         ## Cut of lists of groups.
11160         #  New group is created. It will contain only entities
11161         #  which are present in groups listed in theGList1 but 
11162         #  are not present in groups from theGList2.
11163         #  @param theGList1 is a list of GEOM groups to include elements of.
11164         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11165         #  @param theName Object name; when specified, this parameter is used
11166         #         for result publication in the study. Otherwise, if automatic
11167         #         publication is switched on, default value is used for result name.
11168         #
11169         #  @return a newly created GEOM group.
11170         #
11171         #  @ref tui_intersect_groups_anchor "Example"
11172         def IntersectListOfGroups (self, theGList, theName=None):
11173             """
11174             Cut of lists of groups.
11175             New group is created. It will contain only entities
11176             which are present in groups listed in theGList1 but 
11177             are not present in groups from theGList2.
11178
11179             Parameters:
11180                 theGList1 is a list of GEOM groups to include elements of.
11181                 theGList2 is a list of GEOM groups to exclude elements of.
11182                 theName Object name; when specified, this parameter is used
11183                         for result publication in the study. Otherwise, if automatic
11184                         publication is switched on, default value is used for result name.
11185
11186             Returns:
11187                 a newly created GEOM group.
11188             """
11189             # Example: see GEOM_TestOthers.py
11190             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11191             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11192             self._autoPublish(aGroup, theName, "group")
11193             return aGroup
11194
11195         ## Cut of lists of groups.
11196         #  New group is created. It will contain only entities
11197         #  which are present in groups listed in theGList1 but 
11198         #  are not present in groups from theGList2.
11199         #  @param theGList1 is a list of GEOM groups to include elements of.
11200         #  @param theGList2 is a list of GEOM groups to exclude elements of.
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_cut_groups_anchor "Example"
11208         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11209             """
11210             Cut of lists of groups.
11211             New group is created. It will contain only entities
11212             which are present in groups listed in theGList1 but 
11213             are not present in groups from theGList2.
11214
11215             Parameters:
11216                 theGList1 is a list of GEOM groups to include elements of.
11217                 theGList2 is a list of GEOM groups to exclude elements of.
11218                 theName Object name; when specified, this parameter is used
11219                         for result publication in the study. Otherwise, if automatic
11220                         publication is switched on, default value is used for result name.
11221
11222             Returns:
11223                 a newly created GEOM group.
11224             """
11225             # Example: see GEOM_TestOthers.py
11226             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11227             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11228             self._autoPublish(aGroup, theName, "group")
11229             return aGroup
11230
11231         ## Returns a list of sub-objects ID stored in the group
11232         #  @param theGroup is a GEOM group for which a list of IDs is requested
11233         #
11234         #  @ref swig_GetObjectIDs "Example"
11235         def GetObjectIDs(self,theGroup):
11236             """
11237             Returns a list of sub-objects ID stored in the group
11238
11239             Parameters:
11240                 theGroup is a GEOM group for which a list of IDs is requested
11241             """
11242             # Example: see GEOM_TestOthers.py
11243             ListIDs = self.GroupOp.GetObjects(theGroup)
11244             RaiseIfFailed("GetObjects", self.GroupOp)
11245             return ListIDs
11246
11247         ## Returns a type of sub-objects stored in the group
11248         #  @param theGroup is a GEOM group which type is returned.
11249         #
11250         #  @ref swig_GetType "Example"
11251         def GetType(self,theGroup):
11252             """
11253             Returns a type of sub-objects stored in the group
11254
11255             Parameters:
11256                 theGroup is a GEOM group which type is returned.
11257             """
11258             # Example: see GEOM_TestOthers.py
11259             aType = self.GroupOp.GetType(theGroup)
11260             RaiseIfFailed("GetType", self.GroupOp)
11261             return aType
11262
11263         ## Convert a type of geom object from id to string value
11264         #  @param theId is a GEOM obect type id.
11265         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11266         #  @ref swig_GetType "Example"
11267         def ShapeIdToType(self, theId):
11268             """
11269             Convert a type of geom object from id to string value
11270
11271             Parameters:
11272                 theId is a GEOM obect type id.
11273                 
11274             Returns:
11275                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11276             """
11277             if theId == 0:
11278                 return "COPY"
11279             if theId == 1:
11280                 return "IMPORT"
11281             if theId == 2:
11282                 return "POINT"
11283             if theId == 3:
11284                 return "VECTOR"
11285             if theId == 4:
11286                 return "PLANE"
11287             if theId == 5:
11288                 return "LINE"
11289             if theId == 6:
11290                 return "TORUS"
11291             if theId == 7:
11292                 return "BOX"
11293             if theId == 8:
11294                 return "CYLINDER"
11295             if theId == 9:
11296                 return "CONE"
11297             if theId == 10:
11298                 return "SPHERE"
11299             if theId == 11:
11300                 return "PRISM"
11301             if theId == 12:
11302                 return "REVOLUTION"
11303             if theId == 13:
11304                 return "BOOLEAN"
11305             if theId == 14:
11306                 return "PARTITION"
11307             if theId == 15:
11308                 return "POLYLINE"
11309             if theId == 16:
11310                 return "CIRCLE"
11311             if theId == 17:
11312                 return "SPLINE"
11313             if theId == 18:
11314                 return "ELLIPSE"
11315             if theId == 19:
11316                 return "CIRC_ARC"
11317             if theId == 20:
11318                 return "FILLET"
11319             if theId == 21:
11320                 return "CHAMFER"
11321             if theId == 22:
11322                 return "EDGE"
11323             if theId == 23:
11324                 return "WIRE"
11325             if theId == 24:
11326                 return "FACE"
11327             if theId == 25:
11328                 return "SHELL"
11329             if theId == 26:
11330                 return "SOLID"
11331             if theId == 27:
11332                 return "COMPOUND"
11333             if theId == 28:
11334                 return "SUBSHAPE"
11335             if theId == 29:
11336                 return "PIPE"
11337             if theId == 30:
11338                 return "ARCHIMEDE"
11339             if theId == 31:
11340                 return "FILLING"
11341             if theId == 32:
11342                 return "EXPLODE"
11343             if theId == 33:
11344                 return "GLUED"
11345             if theId == 34:
11346                 return "SKETCHER"
11347             if theId == 35:
11348                 return "CDG"
11349             if theId == 36:
11350                 return "FREE_BOUNDS"
11351             if theId == 37:
11352                 return "GROUP"
11353             if theId == 38:
11354                 return "BLOCK"
11355             if theId == 39:
11356                 return "MARKER"
11357             if theId == 40:
11358                 return "THRUSECTIONS"
11359             if theId == 41:
11360                 return "COMPOUNDFILTER"
11361             if theId == 42:
11362                 return "SHAPES_ON_SHAPE"
11363             if theId == 43:
11364                 return "ELLIPSE_ARC"
11365             if theId == 44:
11366                 return "3DSKETCHER"
11367             if theId == 45:
11368                 return "FILLET_2D"
11369             if theId == 46:
11370                 return "FILLET_1D"
11371             if theId == 201:
11372                 return "PIPETSHAPE"
11373             return "Shape Id not exist."
11374
11375         ## Returns a main shape associated with the group
11376         #  @param theGroup is a GEOM group for which a main shape object is requested
11377         #  @return a GEOM object which is a main shape for theGroup
11378         #
11379         #  @ref swig_GetMainShape "Example"
11380         def GetMainShape(self,theGroup):
11381             """
11382             Returns a main shape associated with the group
11383
11384             Parameters:
11385                 theGroup is a GEOM group for which a main shape object is requested
11386
11387             Returns:
11388                 a GEOM object which is a main shape for theGroup
11389
11390             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11391             """
11392             # Example: see GEOM_TestOthers.py
11393             anObj = self.GroupOp.GetMainShape(theGroup)
11394             RaiseIfFailed("GetMainShape", self.GroupOp)
11395             return anObj
11396
11397         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11398         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11399         #  @param theShape given shape (see GEOM.GEOM_Object)
11400         #  @param min_length minimum length of edges of theShape
11401         #  @param max_length maximum length of edges of theShape
11402         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11403         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11404         #  @param theName Object name; when specified, this parameter is used
11405         #         for result publication in the study. Otherwise, if automatic
11406         #         publication is switched on, default value is used for result name.
11407         #
11408         #  @return a newly created GEOM group of edges
11409         #
11410         #  @@ref swig_todo "Example"
11411         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11412             """
11413             Create group of edges of theShape, whose length is in range [min_length, max_length].
11414             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11415
11416             Parameters:
11417                 theShape given shape
11418                 min_length minimum length of edges of theShape
11419                 max_length maximum length of edges of theShape
11420                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11421                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11422                 theName Object name; when specified, this parameter is used
11423                         for result publication in the study. Otherwise, if automatic
11424                         publication is switched on, default value is used for result name.
11425
11426              Returns:
11427                 a newly created GEOM group of edges.
11428             """
11429             edges = self.SubShapeAll(theShape, ShapeType["EDGE"])
11430             edges_in_range = []
11431             for edge in edges:
11432                 Props = self.BasicProperties(edge)
11433                 if min_length <= Props[0] and Props[0] <= max_length:
11434                     if (not include_min) and (min_length == Props[0]):
11435                         skip = 1
11436                     else:
11437                         if (not include_max) and (Props[0] == max_length):
11438                             skip = 1
11439                         else:
11440                             edges_in_range.append(edge)
11441
11442             if len(edges_in_range) <= 0:
11443                 print "No edges found by given criteria"
11444                 return None
11445
11446             # note: auto-publishing is done in self.CreateGroup()
11447             group_edges = self.CreateGroup(theShape, ShapeType["EDGE"], theName)
11448             self.UnionList(group_edges, edges_in_range)
11449
11450             return group_edges
11451
11452         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11453         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11454         #  @param min_length minimum length of edges of selected shape
11455         #  @param max_length maximum length of edges of selected shape
11456         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11457         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11458         #  @return a newly created GEOM group of edges
11459         #  @ref swig_todo "Example"
11460         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11461             """
11462             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11463             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11464
11465             Parameters:
11466                 min_length minimum length of edges of selected shape
11467                 max_length maximum length of edges of selected shape
11468                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11469                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11470
11471              Returns:
11472                 a newly created GEOM group of edges.
11473             """
11474             nb_selected = sg.SelectedCount()
11475             if nb_selected < 1:
11476                 print "Select a shape before calling this function, please."
11477                 return 0
11478             if nb_selected > 1:
11479                 print "Only one shape must be selected"
11480                 return 0
11481
11482             id_shape = sg.getSelected(0)
11483             shape = IDToObject( id_shape )
11484
11485             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11486
11487             left_str  = " < "
11488             right_str = " < "
11489             if include_min: left_str  = " <= "
11490             if include_max: right_str  = " <= "
11491
11492             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11493                                     + left_str + "length" + right_str + `max_length`)
11494
11495             sg.updateObjBrowser(1)
11496
11497             return group_edges
11498
11499         # end of l3_groups
11500         ## @}
11501
11502         ## @addtogroup l4_advanced
11503         ## @{
11504
11505         ## Create a T-shape object with specified caracteristics for the main
11506         #  and the incident pipes (radius, width, half-length).
11507         #  The extremities of the main pipe are located on junctions points P1 and P2.
11508         #  The extremity of the incident pipe is located on junction point P3.
11509         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11510         #  the main plane of the T-shape is XOY.
11511         #  @param theR1 Internal radius of main pipe
11512         #  @param theW1 Width of main pipe
11513         #  @param theL1 Half-length of main pipe
11514         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11515         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11516         #  @param theL2 Half-length of incident pipe
11517         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11518         #  @param theP1 1st junction point of main pipe
11519         #  @param theP2 2nd junction point of main pipe
11520         #  @param theP3 Junction point of incident pipe
11521         #  @param theName Object name; when specified, this parameter is used
11522         #         for result publication in the study. Otherwise, if automatic
11523         #         publication is switched on, default value is used for result name.
11524         #
11525         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11526         #
11527         #  @ref tui_creation_pipetshape "Example"
11528         def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None):
11529             """
11530             Create a T-shape object with specified caracteristics for the main
11531             and the incident pipes (radius, width, half-length).
11532             The extremities of the main pipe are located on junctions points P1 and P2.
11533             The extremity of the incident pipe is located on junction point P3.
11534             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11535             the main plane of the T-shape is XOY.
11536
11537             Paremeters:
11538                 theR1 Internal radius of main pipe
11539                 theW1 Width of main pipe
11540                 theL1 Half-length of main pipe
11541                 theR2 Internal radius of incident pipe (R2 < R1)
11542                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11543                 theL2 Half-length of incident pipe
11544                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11545                 theP1 1st junction point of main pipe
11546                 theP2 2nd junction point of main pipe
11547                 theP3 Junction point of incident pipe
11548                 theName Object name; when specified, this parameter is used
11549                         for result publication in the study. Otherwise, if automatic
11550                         publication is switched on, default value is used for result name.
11551
11552             Returns:
11553                 List of GEOM_Object, containing the created shape and propagation groups.
11554
11555             Example of usage:
11556                 # create PipeTShape object
11557                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11558                 # create PipeTShape object with position
11559                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11560             """
11561             theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)        
11562             if (theP1 and theP2 and theP3):
11563                 anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3)
11564             else:
11565                 anObj = self.AdvOp.MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh)
11566             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11567             if Parameters: anObj[0].SetParameters(Parameters)
11568             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11569             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11570             return anObj
11571
11572         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11573         #  and the incident pipes (radius, width, half-length). The chamfer is
11574         #  created on the junction of the pipes.
11575         #  The extremities of the main pipe are located on junctions points P1 and P2.
11576         #  The extremity of the incident pipe is located on junction point P3.
11577         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11578         #  the main plane of the T-shape is XOY.
11579         #  @param theR1 Internal radius of main pipe
11580         #  @param theW1 Width of main pipe
11581         #  @param theL1 Half-length of main pipe
11582         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11583         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11584         #  @param theL2 Half-length of incident pipe
11585         #  @param theH Height of the chamfer.
11586         #  @param theW Width of the chamfer.
11587         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11588         #  @param theP1 1st junction point of main pipe
11589         #  @param theP2 2nd junction point of main pipe
11590         #  @param theP3 Junction point of incident pipe
11591         #  @param theName Object name; when specified, this parameter is used
11592         #         for result publication in the study. Otherwise, if automatic
11593         #         publication is switched on, default value is used for result name.
11594         #
11595         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11596         #
11597         #  @ref tui_creation_pipetshape "Example"
11598         def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None):
11599             """
11600             Create a T-shape object with chamfer and with specified caracteristics for the main
11601             and the incident pipes (radius, width, half-length). The chamfer is
11602             created on the junction of the pipes.
11603             The extremities of the main pipe are located on junctions points P1 and P2.
11604             The extremity of the incident pipe is located on junction point P3.
11605             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11606             the main plane of the T-shape is XOY.
11607
11608             Paremeters:
11609                 theR1 Internal radius of main pipe
11610                 theW1 Width of main pipe
11611                 theL1 Half-length of main pipe
11612                 theR2 Internal radius of incident pipe (R2 < R1)
11613                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11614                 theL2 Half-length of incident pipe
11615                 theH Height of the chamfer.
11616                 theW Width of the chamfer.
11617                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11618                 theP1 1st junction point of main pipe
11619                 theP2 2nd junction point of main pipe
11620                 theP3 Junction point of incident pipe
11621                 theName Object name; when specified, this parameter is used
11622                         for result publication in the study. Otherwise, if automatic
11623                         publication is switched on, default value is used for result name.
11624
11625             Returns:
11626                 List of GEOM_Object, containing the created shape and propagation groups.
11627
11628             Example of usage:
11629                 # create PipeTShape with chamfer object
11630                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
11631                 # create PipeTShape with chamfer object with position
11632                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
11633             """
11634             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW)
11635             if (theP1 and theP2 and theP3):
11636               anObj = self.AdvOp.MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3)
11637             else:
11638               anObj = self.AdvOp.MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh)
11639             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
11640             if Parameters: anObj[0].SetParameters(Parameters)
11641             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11642             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11643             return anObj
11644
11645         ## Create a T-shape object with fillet and with specified caracteristics for the main
11646         #  and the incident pipes (radius, width, half-length). The fillet is
11647         #  created on the junction of the pipes.
11648         #  The extremities of the main pipe are located on junctions points P1 and P2.
11649         #  The extremity of the incident pipe is located on junction point P3.
11650         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11651         #  the main plane of the T-shape is XOY.
11652         #  @param theR1 Internal radius of main pipe
11653         #  @param theW1 Width of main pipe
11654         #  @param theL1 Half-length of main pipe
11655         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11656         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11657         #  @param theL2 Half-length of incident pipe
11658         #  @param theRF Radius of curvature of fillet.
11659         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11660         #  @param theP1 1st junction point of main pipe
11661         #  @param theP2 2nd junction point of main pipe
11662         #  @param theP3 Junction point of incident pipe
11663         #  @param theName Object name; when specified, this parameter is used
11664         #         for result publication in the study. Otherwise, if automatic
11665         #         publication is switched on, default value is used for result name.
11666         #
11667         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11668         #
11669         #  @ref tui_creation_pipetshape "Example"
11670         def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None):
11671             """
11672             Create a T-shape object with fillet and with specified caracteristics for the main
11673             and the incident pipes (radius, width, half-length). The fillet is
11674             created on the junction of the pipes.
11675             The extremities of the main pipe are located on junctions points P1 and P2.
11676             The extremity of the incident pipe is located on junction point P3.
11677
11678             Paremeters:
11679                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11680                 the main plane of the T-shape is XOY.
11681                 theR1 Internal radius of main pipe
11682                 theW1 Width of main pipe
11683                 heL1 Half-length of main pipe
11684                 theR2 Internal radius of incident pipe (R2 < R1)
11685                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11686                 theL2 Half-length of incident pipe
11687                 theRF Radius of curvature of fillet.
11688                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11689                 theP1 1st junction point of main pipe
11690                 theP2 2nd junction point of main pipe
11691                 theP3 Junction point of incident pipe
11692                 theName Object name; when specified, this parameter is used
11693                         for result publication in the study. Otherwise, if automatic
11694                         publication is switched on, default value is used for result name.
11695                 
11696             Returns:
11697                 List of GEOM_Object, containing the created shape and propagation groups.
11698                 
11699             Example of usage:
11700                 # create PipeTShape with fillet object
11701                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
11702                 # create PipeTShape with fillet object with position
11703                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
11704         
11705             """
11706             theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
11707             if (theP1 and theP2 and theP3):
11708               anObj = self.AdvOp.MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3)
11709             else:
11710               anObj = self.AdvOp.MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh)
11711             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
11712             if Parameters: anObj[0].SetParameters(Parameters)
11713             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11714             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11715             return anObj
11716
11717         ## This function allows creating a disk already divided into blocks. It
11718         #  can be used to create divided pipes for later meshing in hexaedra.
11719         #  @param theR Radius of the disk
11720         #  @param theOrientation Orientation of the plane on which the disk will be built
11721         #         1 = XOY, 2 = OYZ, 3 = OZX
11722         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11723         #  @param theName Object name; when specified, this parameter is used
11724         #         for result publication in the study. Otherwise, if automatic
11725         #         publication is switched on, default value is used for result name.
11726         #
11727         #  @return New GEOM_Object, containing the created shape.
11728         #
11729         #  @ref tui_creation_divideddisk "Example"
11730         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
11731             """
11732             Creates a disk, divided into blocks. It can be used to create divided pipes
11733             for later meshing in hexaedra.
11734
11735             Parameters:
11736                 theR Radius of the disk
11737                 theOrientation Orientation of the plane on which the disk will be built:
11738                                1 = XOY, 2 = OYZ, 3 = OZX
11739                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11740                 theName Object name; when specified, this parameter is used
11741                         for result publication in the study. Otherwise, if automatic
11742                         publication is switched on, default value is used for result name.
11743
11744             Returns:
11745                 New GEOM_Object, containing the created shape.
11746             """
11747             theR, Parameters = ParseParameters(theR)
11748             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
11749             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
11750             if Parameters: anObj.SetParameters(Parameters)
11751             self._autoPublish(anObj, theName, "dividedDisk")
11752             return anObj
11753             
11754         ## This function allows creating a disk already divided into blocks. It
11755         #  can be used to create divided pipes for later meshing in hexaedra.
11756         #  @param theCenter Center of the disk
11757         #  @param theVector Normal vector to the plane of the created disk
11758         #  @param theRadius Radius of the disk
11759         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11760         #  @param theName Object name; when specified, this parameter is used
11761         #         for result publication in the study. Otherwise, if automatic
11762         #         publication is switched on, default value is used for result name.
11763         #
11764         #  @return New GEOM_Object, containing the created shape.
11765         #
11766         #  @ref tui_creation_divideddisk "Example"
11767         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
11768             """
11769             Creates a disk already divided into blocks. It can be used to create divided pipes
11770             for later meshing in hexaedra.
11771
11772             Parameters:
11773                 theCenter Center of the disk
11774                 theVector Normal vector to the plane of the created disk
11775                 theRadius Radius of the disk
11776                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
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                 New GEOM_Object, containing the created shape.
11783             """
11784             theRadius, Parameters = ParseParameters(theRadius)
11785             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
11786             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
11787             if Parameters: anObj.SetParameters(Parameters)
11788             self._autoPublish(anObj, theName, "dividedDisk")
11789             return anObj
11790
11791         ## Builds a cylinder prepared for hexa meshes
11792         #  @param theR Radius of the cylinder
11793         #  @param theH Height of the cylinder
11794         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11795         #  @param theName Object name; when specified, this parameter is used
11796         #         for result publication in the study. Otherwise, if automatic
11797         #         publication is switched on, default value is used for result name.
11798         #
11799         #  @return New GEOM_Object, containing the created shape.
11800         #
11801         #  @ref tui_creation_dividedcylinder "Example"
11802         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
11803             """
11804             Builds a cylinder prepared for hexa meshes
11805
11806             Parameters:
11807                 theR Radius of the cylinder
11808                 theH Height of the cylinder
11809                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11810                 theName Object name; when specified, this parameter is used
11811                         for result publication in the study. Otherwise, if automatic
11812                         publication is switched on, default value is used for result name.
11813
11814             Returns:
11815                 New GEOM_Object, containing the created shape.
11816             """
11817             theR, theH, Parameters = ParseParameters(theR, theH)
11818             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
11819             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
11820             if Parameters: anObj.SetParameters(Parameters)
11821             self._autoPublish(anObj, theName, "dividedCylinder")
11822             return anObj
11823
11824         #@@ insert new functions before this line @@ do not remove this line @@#
11825
11826         # end of l4_advanced
11827         ## @}
11828
11829         ## Create a copy of the given object
11830         #
11831         #  @param theOriginal geometry object for copy
11832         #  @return unique object identifier
11833         #  @ingroup l1_geompyDC_auxiliary
11834         #  @param theName Object name; when specified, this parameter is used
11835         #         for result publication in the study. Otherwise, if automatic
11836         #         publication is switched on, default value is used for result name.
11837         #
11838         #  @return New GEOM_Object, containing the copied shape.
11839         #
11840         #  @ingroup l1_geompy_auxiliary
11841         #  @ref swig_MakeCopy "Example"
11842         def MakeCopy(self, theOriginal, theName=None):
11843             """
11844             Create a copy of the given object
11845
11846             Paremeters:
11847                 theOriginal geometry object for copy
11848                 theName Object name; when specified, this parameter is used
11849                         for result publication in the study. Otherwise, if automatic
11850                         publication is switched on, default value is used for result name.
11851
11852             Returns:
11853                 New GEOM_Object, containing the copied shape.
11854
11855             Example of usage: Copy = geompy.MakeCopy(Box)
11856             """
11857             # Example: see GEOM_TestAll.py
11858             anObj = self.InsertOp.MakeCopy(theOriginal)
11859             RaiseIfFailed("MakeCopy", self.InsertOp)
11860             self._autoPublish(anObj, theName, "copy")
11861             return anObj
11862
11863         ## Add Path to load python scripts from
11864         #  @param Path a path to load python scripts from
11865         #  @ingroup l1_geompyDC_auxiliary
11866         def addPath(self,Path):
11867             """
11868             Add Path to load python scripts from
11869
11870             Parameters:
11871                 Path a path to load python scripts from
11872             """
11873             if (sys.path.count(Path) < 1):
11874                 sys.path.append(Path)
11875                 pass
11876             pass
11877
11878         ## Load marker texture from the file
11879         #  @param Path a path to the texture file
11880         #  @return unique texture identifier
11881         #  @ingroup l1_geompyDC_auxiliary
11882         def LoadTexture(self, Path):
11883             """
11884             Load marker texture from the file
11885             
11886             Parameters:
11887                 Path a path to the texture file
11888                 
11889             Returns:
11890                 unique texture identifier
11891             """
11892             # Example: see GEOM_TestAll.py
11893             ID = self.InsertOp.LoadTexture(Path)
11894             RaiseIfFailed("LoadTexture", self.InsertOp)
11895             return ID
11896
11897         ## Get internal name of the object based on its study entry
11898         #  @note This method does not provide an unique identifier of the geometry object.
11899         #  @note This is internal function of GEOM component, though it can be used outside it for 
11900         #  appropriate reason (e.g. for identification of geometry object).
11901         #  @param obj geometry object
11902         #  @return unique object identifier
11903         #  @ingroup l1_geompyDC_auxiliary
11904         def getObjectID(self, obj):
11905             """
11906             Get internal name of the object based on its study entry.
11907             Note: this method does not provide an unique identifier of the geometry object.
11908             It is an internal function of GEOM component, though it can be used outside GEOM for 
11909             appropriate reason (e.g. for identification of geometry object).
11910
11911             Parameters:
11912                 obj geometry object
11913
11914             Returns:
11915                 unique object identifier
11916             """
11917             ID = ""
11918             entry = salome.ObjectToID(obj)
11919             if entry is not None:
11920                 lst = entry.split(":")
11921                 if len(lst) > 0:
11922                     ID = lst[-1] # -1 means last item in the list            
11923                     return "GEOM_" + ID
11924             return ID
11925                 
11926             
11927
11928         ## Add marker texture. @a Width and @a Height parameters
11929         #  specify width and height of the texture in pixels.
11930         #  If @a RowData is @c True, @a Texture parameter should represent texture data
11931         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
11932         #  parameter should be unpacked string, in which '1' symbols represent opaque
11933         #  pixels and '0' represent transparent pixels of the texture bitmap.
11934         #
11935         #  @param Width texture width in pixels
11936         #  @param Height texture height in pixels
11937         #  @param Texture texture data
11938         #  @param RowData if @c True, @a Texture data are packed in the byte stream
11939         #  @return unique texture identifier
11940         #  @ingroup l1_geompyDC_auxiliary
11941         def AddTexture(self, Width, Height, Texture, RowData=False):
11942             """
11943             Add marker texture. Width and Height parameters
11944             specify width and height of the texture in pixels.
11945             If RowData is True, Texture parameter should represent texture data
11946             packed into the byte array. If RowData is False (default), Texture
11947             parameter should be unpacked string, in which '1' symbols represent opaque
11948             pixels and '0' represent transparent pixels of the texture bitmap.
11949
11950             Parameters:
11951                 Width texture width in pixels
11952                 Height texture height in pixels
11953                 Texture texture data
11954                 RowData if True, Texture data are packed in the byte stream
11955
11956             Returns:
11957                 return unique texture identifier
11958             """
11959             if not RowData: Texture = PackData(Texture)
11960             ID = self.InsertOp.AddTexture(Width, Height, Texture)
11961             RaiseIfFailed("AddTexture", self.InsertOp)
11962             return ID
11963
11964 import omniORB
11965 # Register the new proxy for GEOM_Gen
11966 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geompyDC)
11967
11968 def geomInstance( study, instance=None):
11969     print "geomInstance ", study, instance
11970     global engine
11971     global geom
11972     global doLcc
11973     engine = instance
11974     if engine is None:
11975       doLcc = True
11976     geom = geompyDC()
11977     assert isinstance(geom,geompyDC), "Geom engine class is %s but should be geompyDC.geompyDC. Import geompyDC before creating the instance."%geom.__class__
11978     geom.init_geom(study)
11979     return geom