]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
Merge from BR_plugins_pbyacs 03/04/2013
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup l1_publish_data Publishing results in SALOME study
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of 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_geomBuilder_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 salome.geom.gsketcher import Sketcher3D
201
202 # service function
203 def _toListOfNames(_names, _size=-1):
204     l = []
205     import types
206     if type(_names) in [types.ListType, types.TupleType]:
207         for i in _names: l.append(i)
208     elif _names:
209         l.append(_names)
210     if l and len(l) < _size:
211         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
212     return l
213
214 ## Raise an Error, containing the Method_name, if Operation is Failed
215 ## @ingroup l1_geomBuilder_auxiliary
216 def RaiseIfFailed (Method_name, Operation):
217     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
218         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
219
220 ## Return list of variables value from salome notebook
221 ## @ingroup l1_geomBuilder_auxiliary
222 def ParseParameters(*parameters):
223     Result = []
224     StringResult = []
225     for parameter in parameters:
226         if isinstance(parameter, list):
227             lResults = ParseParameters(*parameter)
228             if len(lResults) > 0:
229                 Result.append(lResults[:-1])
230                 StringResult += lResults[-1].split(":")
231                 pass
232             pass
233         else:
234             if isinstance(parameter,str):
235                 if notebook.isVariable(parameter):
236                     Result.append(notebook.get(parameter))
237                 else:
238                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
239                 pass
240             else:
241                 Result.append(parameter)
242                 pass
243             StringResult.append(str(parameter))
244             pass
245         pass
246     if Result:
247         Result.append(":".join(StringResult))
248     else:
249         Result = ":".join(StringResult)
250     return Result
251
252 ## Return list of variables value from salome notebook
253 ## @ingroup l1_geomBuilder_auxiliary
254 def ParseList(list):
255     Result = []
256     StringResult = ""
257     for parameter in list:
258         if isinstance(parameter,str) and notebook.isVariable(parameter):
259             Result.append(str(notebook.get(parameter)))
260             pass
261         else:
262             Result.append(str(parameter))
263             pass
264
265         StringResult = StringResult + str(parameter)
266         StringResult = StringResult + ":"
267         pass
268     StringResult = StringResult[:len(StringResult)-1]
269     return Result, StringResult
270
271 ## Return list of variables value from salome notebook
272 ## @ingroup l1_geomBuilder_auxiliary
273 def ParseSketcherCommand(command):
274     Result = ""
275     StringResult = ""
276     sections = command.split(":")
277     for section in sections:
278         parameters = section.split(" ")
279         paramIndex = 1
280         for parameter in parameters:
281             if paramIndex > 1 and parameter.find("'") != -1:
282                 parameter = parameter.replace("'","")
283                 if notebook.isVariable(parameter):
284                     Result = Result + str(notebook.get(parameter)) + " "
285                     pass
286                 else:
287                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
288                     pass
289                 pass
290             else:
291                 Result = Result + str(parameter) + " "
292                 pass
293             if paramIndex > 1:
294                 StringResult = StringResult + parameter
295                 StringResult = StringResult + ":"
296                 pass
297             paramIndex = paramIndex + 1
298             pass
299         Result = Result[:len(Result)-1] + ":"
300         pass
301     Result = Result[:len(Result)-1]
302     return Result, StringResult
303
304 ## Helper function which can be used to pack the passed string to the byte data.
305 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
306 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
307 ## For example,
308 ## \code
309 ## val = PackData("10001110") # val = 0xAE
310 ## val = PackData("1")        # val = 0x80
311 ## \endcode
312 ## @param data unpacked data - a string containing '1' and '0' symbols
313 ## @return data packed to the byte stream
314 ## @ingroup l1_geomBuilder_auxiliary
315 def PackData(data):
316     """
317     Helper function which can be used to pack the passed string to the byte data.
318     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
319     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
320
321     Parameters:
322         data unpacked data - a string containing '1' and '0' symbols
323
324     Returns:
325         data packed to the byte stream
326         
327     Example of usage:
328         val = PackData("10001110") # val = 0xAE
329         val = PackData("1")        # val = 0x80
330     """
331     bytes = len(data)/8
332     if len(data)%8: bytes += 1
333     res = ""
334     for b in range(bytes):
335         d = data[b*8:(b+1)*8]
336         val = 0
337         for i in range(8):
338             val *= 2
339             if i < len(d):
340                 if d[i] == "1": val += 1
341                 elif d[i] != "0":
342                     raise "Invalid symbol %s" % d[i]
343                 pass
344             pass
345         res += chr(val)
346         pass
347     return res
348
349 ## Read bitmap texture from the text file.
350 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
351 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
352 ## The function returns width and height of the pixmap in pixels and byte stream representing
353 ## texture bitmap itself.
354 ##
355 ## This function can be used to read the texture to the byte stream in order to pass it to
356 ## the AddTexture() function of geomBuilder class.
357 ## For example,
358 ## \code
359 ## from salome.geom import geomBuilder
360 ## geompy = geomBuilder.New(salome.myStudy)
361 ## texture = geompy.readtexture('mytexture.dat')
362 ## texture = geompy.AddTexture(*texture)
363 ## obj.SetMarkerTexture(texture)
364 ## \endcode
365 ## @param fname texture file name
366 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
367 ## @ingroup l1_geomBuilder_auxiliary
368 def ReadTexture(fname):
369     """
370     Read bitmap texture from the text file.
371     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
372     A zero symbol ('0') represents transparent pixel of the texture bitmap.
373     The function returns width and height of the pixmap in pixels and byte stream representing
374     texture bitmap itself.
375     This function can be used to read the texture to the byte stream in order to pass it to
376     the AddTexture() function of geomBuilder class.
377     
378     Parameters:
379         fname texture file name
380
381     Returns:
382         sequence of tree values: texture's width, height in pixels and its byte stream
383     
384     Example of usage:
385         from salome.geom import geomBuilder
386         geompy = geomBuilder.New(salome.myStudy)
387         texture = geompy.readtexture('mytexture.dat')
388         texture = geompy.AddTexture(*texture)
389         obj.SetMarkerTexture(texture)
390     """
391     try:
392         f = open(fname)
393         lines = [ l.strip() for l in f.readlines()]
394         f.close()
395         maxlen = 0
396         if lines: maxlen = max([len(x) for x in lines])
397         lenbytes = maxlen/8
398         if maxlen%8: lenbytes += 1
399         bytedata=""
400         for line in lines:
401             if len(line)%8:
402                 lenline = (len(line)/8+1)*8
403                 pass
404             else:
405                 lenline = (len(line)/8)*8
406                 pass
407             for i in range(lenline/8):
408                 byte=""
409                 for j in range(8):
410                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
411                     else: byte += "0"
412                     pass
413                 bytedata += PackData(byte)
414                 pass
415             for i in range(lenline/8, lenbytes):
416                 bytedata += PackData("0")
417             pass
418         return lenbytes*8, len(lines), bytedata
419     except:
420         pass
421     return 0, 0, ""
422
423 ## Returns a long value from enumeration type
424 #  Can be used for CORBA enumerator types like GEOM.shape_type
425 #  @param theItem enumeration type
426 #  @ingroup l1_geomBuilder_auxiliary
427 def EnumToLong(theItem):
428     """
429     Returns a long value from enumeration type
430     Can be used for CORBA enumerator types like geomBuilder.ShapeType
431
432     Parameters:
433         theItem enumeration type
434     """
435     ret = theItem
436     if hasattr(theItem, "_v"): ret = theItem._v
437     return ret
438
439 ## Information about closed/unclosed state of shell or wire
440 #  @ingroup l1_geomBuilder_auxiliary
441 class info:
442     """
443     Information about closed/unclosed state of shell or wire
444     """
445     UNKNOWN  = 0
446     CLOSED   = 1
447     UNCLOSED = 2
448
449 # Warning: geom is a singleton
450 geom = None
451 engine = None
452 doLcc = False
453 created = False
454
455 class geomBuilder(object, GEOM._objref_GEOM_Gen):
456
457         ## Enumeration ShapeType as a dictionary. \n
458         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
459         #  @ingroup l1_geomBuilder_auxiliary
460         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
461
462         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
463         #  and a list of parameters, describing the shape.
464         #  List of parameters, describing the shape:
465         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
466         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
467         #
468         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
469         #
470         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
471         #
472         #  - SPHERE:       [xc yc zc            R]
473         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
474         #  - BOX:          [xc yc zc                      ax ay az]
475         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
476         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
477         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
478         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
479         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
480         #
481         #  - SPHERE2D:     [xc yc zc            R]
482         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
483         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
484         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
485         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
486         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
487         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
488         #  - PLANE:        [xo yo zo  dx dy dz]
489         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
490         #  - FACE:                                       [nb_edges  nb_vertices]
491         #
492         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
493         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
494         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
495         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
496         #  - LINE:         [xo yo zo  dx dy dz]
497         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
498         #  - EDGE:                                                 [nb_vertices]
499         #
500         #  - VERTEX:       [x  y  z]
501         #  @ingroup l1_geomBuilder_auxiliary
502         kind = GEOM.GEOM_IKindOfShape
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                         # geomBuilder instance is created from lcc.FindOrLoadComponent
530                         created = True
531                         #print "super ", engine, geom, doLcc, created
532                         geom = super(geomBuilder,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 "-------- geomBuilder __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         ## Process object publication in the study, as follows:
567         #  - if @a theName is specified (not None), the object is published in the study
568         #    with this name, not taking into account "auto-publishing" option;
569         #  - if @a theName is NOT specified, the object is published in the study
570         #    (using default name, which can be customized using @a theDefaultName parameter)
571         #    only if auto-publishing is switched on.
572         #
573         #  @param theObj  object, a subject for publishing
574         #  @param theName object name for study
575         #  @param theDefaultName default name for the auto-publishing
576         #
577         #  @sa addToStudyAuto()
578         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
579             # ---
580             def _item_name(_names, _defname, _idx=-1):
581                 if not _names: _names = _defname
582                 if type(_names) in [types.ListType, types.TupleType]:
583                     if _idx >= 0:
584                         if _idx >= len(_names) or not _names[_idx]:
585                             if type(_defname) not in [types.ListType, types.TupleType]:
586                                 _name = "%s_%d"%(_defname, _idx+1)
587                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
588                                 _name = _defname[_idx]
589                             else:
590                                 _name = "%noname_%d"%(dn, _idx+1)
591                             pass
592                         else:
593                             _name = _names[_idx]
594                         pass
595                     else:
596                         # must be wrong  usage
597                         _name = _names[0]
598                     pass
599                 else:
600                     if _idx >= 0:
601                         _name = "%s_%d"%(_names, _idx+1)
602                     else:
603                         _name = _names
604                     pass
605                 return _name
606             # ---
607             if not theObj:
608                 return # null object
609             if not theName and not self.myMaxNbSubShapesAllowed:
610                 return # nothing to do: auto-publishing is disabled
611             if not theName and not theDefaultName:
612                 return # neither theName nor theDefaultName is given
613             import types
614             if type(theObj) in [types.ListType, types.TupleType]:
615                 # list of objects is being published
616                 idx = 0
617                 for obj in theObj:
618                     if not obj: continue # bad object
619                     ###if obj.GetStudyEntry(): continue # already published
620                     name = _item_name(theName, theDefaultName, idx)
621                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
622                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
623                     else:
624                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
625                         pass
626                     idx = idx+1
627                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
628                     pass
629                 pass
630             else:
631                 # single object is published
632                 ###if theObj.GetStudyEntry(): return # already published
633                 name = _item_name(theName, theDefaultName)
634                 if theObj.IsMainShape():
635                     self.addToStudy(theObj, name)
636                 else:
637                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
638                     pass
639                 pass
640             pass
641
642         ## @addtogroup l1_geompy_auxiliary
643         ## @{
644         def init_geom(self,theStudy):
645             self.myStudy = theStudy
646             self.myStudyId = self.myStudy._get_StudyId()
647             self.myBuilder = self.myStudy.NewBuilder()
648             self.father = self.myStudy.FindComponent("GEOM")
649             if self.father is None:
650                 self.father = self.myBuilder.NewComponent("GEOM")
651                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
652                 FName = A1._narrow(SALOMEDS.AttributeName)
653                 FName.SetValue("Geometry")
654                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
655                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
656                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
657                 self.myBuilder.DefineComponentInstance(self.father,self)
658                 pass
659             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
660             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
661             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
662             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
663             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
664             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
665             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
666             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
667             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
668             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
669             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
670             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
671             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
672             pass
673
674         ## Enable / disable results auto-publishing
675         # 
676         #  The automatic publishing is managed in the following way:
677         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
678         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
679         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
680         #  value passed as parameter has the same effect.
681         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
682         #  maximum number of sub-shapes allowed for publishing is set to specified value.
683         #
684         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
685         #  @ingroup l1_publish_data
686         def addToStudyAuto(self, maxNbSubShapes=-1):
687             """
688             Enable / disable results auto-publishing
689
690             The automatic publishing is managed in the following way:
691             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
692             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
693             maximum number of sub-shapes allowed for publishing is unlimited; any negative
694             value passed as parameter has the same effect.
695             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
696             maximum number of sub-shapes allowed for publishing is set to this value.
697
698             Parameters:
699                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
700
701             Example of usage:
702                 geompy.addToStudyAuto()   # enable auto-publishing
703                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
704                 geompy.addToStudyAuto(0)  # disable auto-publishing
705             """
706             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
707             pass
708
709         ## Dump component to the Python script
710         #  This method overrides IDL function to allow default values for the parameters.
711         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
712             """
713             Dump component to the Python script
714             This method overrides IDL function to allow default values for the parameters.
715             """
716             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
717
718         ## Get name for sub-shape aSubObj of shape aMainObj
719         #
720         # @ref swig_SubShapeName "Example"
721         def SubShapeName(self,aSubObj, aMainObj):
722             """
723             Get name for sub-shape aSubObj of shape aMainObj
724             """
725             # Example: see GEOM_TestAll.py
726
727             #aSubId  = orb.object_to_string(aSubObj)
728             #aMainId = orb.object_to_string(aMainObj)
729             #index = gg.getIndexTopology(aSubId, aMainId)
730             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
731             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
732             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
733             return name
734
735         ## Publish in study aShape with name aName
736         #
737         #  \param aShape the shape to be published
738         #  \param aName  the name for the shape
739         #  \param doRestoreSubShapes if True, finds and publishes also
740         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
741         #         and published sub-shapes of arguments
742         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
743         #                                                  these arguments description
744         #  \return study entry of the published shape in form of string
745         #
746         #  @ingroup l1_publish_data
747         #  @ref swig_all_addtostudy "Example"
748         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
749                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
750             """
751             Publish in study aShape with name aName
752
753             Parameters:
754                 aShape the shape to be published
755                 aName  the name for the shape
756                 doRestoreSubShapes if True, finds and publishes also
757                                    sub-shapes of aShape, corresponding to its arguments
758                                    and published sub-shapes of arguments
759                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
760                                                          these arguments description
761
762             Returns:
763                 study entry of the published shape in form of string
764
765             Example of usage:
766                 id_block1 = geompy.addToStudy(Block1, "Block 1")
767             """
768             # Example: see GEOM_TestAll.py
769             try:
770                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
771                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
772                 if doRestoreSubShapes:
773                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
774                                             theFindMethod, theInheritFirstArg, True )
775             except:
776                 print "addToStudy() failed"
777                 return ""
778             return aShape.GetStudyEntry()
779
780         ## Publish in study aShape with name aName as sub-object of previously published aFather
781         #  \param aFather previously published object
782         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
783         #  \param aName  the name for the shape
784         #
785         #  \return study entry of the published shape in form of string
786         #
787         #  @ingroup l1_publish_data
788         #  @ref swig_all_addtostudyInFather "Example"
789         def addToStudyInFather(self, aFather, aShape, aName):
790             """
791             Publish in study aShape with name aName as sub-object of previously published aFather
792
793             Parameters:
794                 aFather previously published object
795                 aShape the shape to be published as sub-object of aFather
796                 aName  the name for the shape
797
798             Returns:
799                 study entry of the published shape in form of string
800             """
801             # Example: see GEOM_TestAll.py
802             try:
803                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
804                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
805             except:
806                 print "addToStudyInFather() failed"
807                 return ""
808             return aShape.GetStudyEntry()
809
810         ## Unpublish object in study
811         #
812         #  \param obj the object to be unpublished
813         def hideInStudy(self, obj):
814             """
815             Unpublish object in study
816
817             Parameters:
818                 obj the object to be unpublished
819             """
820             ior = salome.orb.object_to_string(obj)
821             aSObject = self.myStudy.FindObjectIOR(ior)
822             if aSObject is not None:
823                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
824                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
825                 drwAttribute.SetDrawable(False)
826                 pass
827
828         # end of l1_geompy_auxiliary
829         ## @}
830
831         ## @addtogroup l3_restore_ss
832         ## @{
833
834         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
835         #  To be used from python scripts out of addToStudy() (non-default usage)
836         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
837         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
838         #                   If this list is empty, all operation arguments will be published
839         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
840         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
841         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
842         #                            Do not publish sub-shapes in place of arguments, but only
843         #                            in place of sub-shapes of the first argument,
844         #                            because the whole shape corresponds to the first argument.
845         #                            Mainly to be used after transformations, but it also can be
846         #                            usefull after partition with one object shape, and some other
847         #                            operations, where only the first argument has to be considered.
848         #                            If theObject has only one argument shape, this flag is automatically
849         #                            considered as True, not regarding really passed value.
850         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
851         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
852         #  \return list of published sub-shapes
853         #
854         #  @ref tui_restore_prs_params "Example"
855         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
856                               theInheritFirstArg=False, theAddPrefix=True):
857             """
858             Publish sub-shapes, standing for arguments and sub-shapes of arguments
859             To be used from python scripts out of geompy.addToStudy (non-default usage)
860
861             Parameters:
862                 theObject published GEOM.GEOM_Object, arguments of which will be published
863                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
864                           If this list is empty, all operation arguments will be published
865                 theFindMethod method to search sub-shapes, corresponding to arguments and
866                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
867                 theInheritFirstArg set properties of the first argument for theObject.
868                                    Do not publish sub-shapes in place of arguments, but only
869                                    in place of sub-shapes of the first argument,
870                                    because the whole shape corresponds to the first argument.
871                                    Mainly to be used after transformations, but it also can be
872                                    usefull after partition with one object shape, and some other
873                                    operations, where only the first argument has to be considered.
874                                    If theObject has only one argument shape, this flag is automatically
875                                    considered as True, not regarding really passed value.
876                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
877                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
878             Returns:
879                 list of published sub-shapes
880             """
881             # Example: see GEOM_TestAll.py
882             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
883                                           theFindMethod, theInheritFirstArg, theAddPrefix)
884
885         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
886         #  To be used from python scripts out of addToStudy() (non-default usage)
887         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
888         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
889         #                   If this list is empty, all operation arguments will be published
890         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
891         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
892         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
893         #                            Do not publish sub-shapes in place of arguments, but only
894         #                            in place of sub-shapes of the first argument,
895         #                            because the whole shape corresponds to the first argument.
896         #                            Mainly to be used after transformations, but it also can be
897         #                            usefull after partition with one object shape, and some other
898         #                            operations, where only the first argument has to be considered.
899         #                            If theObject has only one argument shape, this flag is automatically
900         #                            considered as True, not regarding really passed value.
901         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
902         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
903         #  \return list of published sub-shapes
904         #
905         #  @ref tui_restore_prs_params "Example"
906         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
907                                    theInheritFirstArg=False, theAddPrefix=True):
908             """
909             Publish sub-shapes, standing for arguments and sub-shapes of arguments
910             To be used from python scripts out of geompy.addToStudy() (non-default usage)
911
912             Parameters:
913                 theObject published GEOM.GEOM_Object, arguments of which will be published
914                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
915                           If this list is empty, all operation arguments will be published
916                 theFindMethod method to search sub-shapes, corresponding to arguments and
917                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
918                 theInheritFirstArg set properties of the first argument for theObject.
919                                    Do not publish sub-shapes in place of arguments, but only
920                                    in place of sub-shapes of the first argument,
921                                    because the whole shape corresponds to the first argument.
922                                    Mainly to be used after transformations, but it also can be
923                                    usefull after partition with one object shape, and some other
924                                    operations, where only the first argument has to be considered.
925                                    If theObject has only one argument shape, this flag is automatically
926                                    considered as True, not regarding really passed value.
927                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
928                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
929
930             Returns: 
931                 list of published sub-shapes
932             """
933             # Example: see GEOM_TestAll.py
934             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
935                                                theFindMethod, theInheritFirstArg, theAddPrefix)
936
937         # end of l3_restore_ss
938         ## @}
939
940         ## @addtogroup l3_basic_go
941         ## @{
942
943         ## Create point by three coordinates.
944         #  @param theX The X coordinate of the point.
945         #  @param theY The Y coordinate of the point.
946         #  @param theZ The Z coordinate of the point.
947         #  @param theName Object name; when specified, this parameter is used
948         #         for result publication in the study. Otherwise, if automatic
949         #         publication is switched on, default value is used for result name.
950         #
951         #  @return New GEOM.GEOM_Object, containing the created point.
952         #
953         #  @ref tui_creation_point "Example"
954         def MakeVertex(self, theX, theY, theZ, theName=None):
955             """
956             Create point by three coordinates.
957
958             Parameters:
959                 theX The X coordinate of the point.
960                 theY The Y coordinate of the point.
961                 theZ The Z coordinate of the point.
962                 theName Object name; when specified, this parameter is used
963                         for result publication in the study. Otherwise, if automatic
964                         publication is switched on, default value is used for result name.
965                 
966             Returns: 
967                 New GEOM.GEOM_Object, containing the created point.
968             """
969             # Example: see GEOM_TestAll.py
970             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
971             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
972             RaiseIfFailed("MakePointXYZ", self.BasicOp)
973             anObj.SetParameters(Parameters)
974             self._autoPublish(anObj, theName, "vertex")
975             return anObj
976
977         ## Create a point, distant from the referenced point
978         #  on the given distances along the coordinate axes.
979         #  @param theReference The referenced point.
980         #  @param theX Displacement from the referenced point along OX axis.
981         #  @param theY Displacement from the referenced point along OY axis.
982         #  @param theZ Displacement from the referenced point along OZ axis.
983         #  @param theName Object name; when specified, this parameter is used
984         #         for result publication in the study. Otherwise, if automatic
985         #         publication is switched on, default value is used for result name.
986         #
987         #  @return New GEOM.GEOM_Object, containing the created point.
988         #
989         #  @ref tui_creation_point "Example"
990         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
991             """
992             Create a point, distant from the referenced point
993             on the given distances along the coordinate axes.
994
995             Parameters:
996                 theReference The referenced point.
997                 theX Displacement from the referenced point along OX axis.
998                 theY Displacement from the referenced point along OY axis.
999                 theZ Displacement from the referenced point along OZ axis.
1000                 theName Object name; when specified, this parameter is used
1001                         for result publication in the study. Otherwise, if automatic
1002                         publication is switched on, default value is used for result name.
1003
1004             Returns:
1005                 New GEOM.GEOM_Object, containing the created point.
1006             """
1007             # Example: see GEOM_TestAll.py
1008             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1009             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1010             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1011             anObj.SetParameters(Parameters)
1012             self._autoPublish(anObj, theName, "vertex")
1013             return anObj
1014
1015         ## Create a point, corresponding to the given parameter on the given curve.
1016         #  @param theRefCurve The referenced curve.
1017         #  @param theParameter Value of parameter on the referenced curve.
1018         #  @param theName Object name; when specified, this parameter is used
1019         #         for result publication in the study. Otherwise, if automatic
1020         #         publication is switched on, default value is used for result name.
1021         #
1022         #  @return New GEOM.GEOM_Object, containing the created point.
1023         #
1024         #  @ref tui_creation_point "Example"
1025         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1026             """
1027             Create a point, corresponding to the given parameter on the given curve.
1028
1029             Parameters:
1030                 theRefCurve The referenced curve.
1031                 theParameter Value of parameter on the referenced curve.
1032                 theName Object name; when specified, this parameter is used
1033                         for result publication in the study. Otherwise, if automatic
1034                         publication is switched on, default value is used for result name.
1035
1036             Returns:
1037                 New GEOM.GEOM_Object, containing the created point.
1038
1039             Example of usage:
1040                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1041             """
1042             # Example: see GEOM_TestAll.py
1043             theParameter, Parameters = ParseParameters(theParameter)
1044             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1045             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1046             anObj.SetParameters(Parameters)
1047             self._autoPublish(anObj, theName, "vertex")
1048             return anObj
1049
1050         ## Create a point by projection give coordinates on the given curve
1051         #  @param theRefCurve The referenced curve.
1052         #  @param theX X-coordinate in 3D space
1053         #  @param theY Y-coordinate in 3D space
1054         #  @param theZ Z-coordinate in 3D space
1055         #  @param theName Object name; when specified, this parameter is used
1056         #         for result publication in the study. Otherwise, if automatic
1057         #         publication is switched on, default value is used for result name.
1058         #
1059         #  @return New GEOM.GEOM_Object, containing the created point.
1060         #
1061         #  @ref tui_creation_point "Example"
1062         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1063             """
1064             Create a point by projection give coordinates on the given curve
1065             
1066             Parameters:
1067                 theRefCurve The referenced curve.
1068                 theX X-coordinate in 3D space
1069                 theY Y-coordinate in 3D space
1070                 theZ Z-coordinate in 3D space
1071                 theName Object name; when specified, this parameter is used
1072                         for result publication in the study. Otherwise, if automatic
1073                         publication is switched on, default value is used for result name.
1074
1075             Returns:
1076                 New GEOM.GEOM_Object, containing the created point.
1077
1078             Example of usage:
1079                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1080             """
1081             # Example: see GEOM_TestAll.py
1082             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1083             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1084             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1085             anObj.SetParameters(Parameters)
1086             self._autoPublish(anObj, theName, "vertex")
1087             return anObj
1088
1089         ## Create a point, corresponding to the given length on the given curve.
1090         #  @param theRefCurve The referenced curve.
1091         #  @param theLength Length on the referenced curve. It can be negative.
1092         #  @param theStartPoint Point allowing to choose the direction for the calculation
1093         #                       of the length. If None, start from the first point of theRefCurve.
1094         #  @param theName Object name; when specified, this parameter is used
1095         #         for result publication in the study. Otherwise, if automatic
1096         #         publication is switched on, default value is used for result name.
1097         #
1098         #  @return New GEOM.GEOM_Object, containing the created point.
1099         #
1100         #  @ref tui_creation_point "Example"
1101         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1102             """
1103             Create a point, corresponding to the given length on the given curve.
1104
1105             Parameters:
1106                 theRefCurve The referenced curve.
1107                 theLength Length on the referenced curve. It can be negative.
1108                 theStartPoint Point allowing to choose the direction for the calculation
1109                               of the length. If None, start from the first point of theRefCurve.
1110                 theName Object name; when specified, this parameter is used
1111                         for result publication in the study. Otherwise, if automatic
1112                         publication is switched on, default value is used for result name.
1113
1114             Returns:
1115                 New GEOM.GEOM_Object, containing the created point.
1116             """
1117             # Example: see GEOM_TestAll.py
1118             theLength, Parameters = ParseParameters(theLength)
1119             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1120             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1121             anObj.SetParameters(Parameters)
1122             self._autoPublish(anObj, theName, "vertex")
1123             return anObj
1124
1125         ## Create a point, corresponding to the given parameters on the
1126         #    given surface.
1127         #  @param theRefSurf The referenced surface.
1128         #  @param theUParameter Value of U-parameter on the referenced surface.
1129         #  @param theVParameter Value of V-parameter on the referenced surface.
1130         #  @param theName Object name; when specified, this parameter is used
1131         #         for result publication in the study. Otherwise, if automatic
1132         #         publication is switched on, default value is used for result name.
1133         #
1134         #  @return New GEOM.GEOM_Object, containing the created point.
1135         #
1136         #  @ref swig_MakeVertexOnSurface "Example"
1137         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1138             """
1139             Create a point, corresponding to the given parameters on the
1140             given surface.
1141
1142             Parameters:
1143                 theRefSurf The referenced surface.
1144                 theUParameter Value of U-parameter on the referenced surface.
1145                 theVParameter Value of V-parameter on the referenced surface.
1146                 theName Object name; when specified, this parameter is used
1147                         for result publication in the study. Otherwise, if automatic
1148                         publication is switched on, default value is used for result name.
1149
1150             Returns:
1151                 New GEOM.GEOM_Object, containing the created point.
1152
1153             Example of usage:
1154                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1155             """
1156             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1157             # Example: see GEOM_TestAll.py
1158             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1159             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1160             anObj.SetParameters(Parameters);
1161             self._autoPublish(anObj, theName, "vertex")
1162             return anObj
1163
1164         ## Create a point by projection give coordinates on the given surface
1165         #  @param theRefSurf The referenced surface.
1166         #  @param theX X-coordinate in 3D space
1167         #  @param theY Y-coordinate in 3D space
1168         #  @param theZ Z-coordinate in 3D space
1169         #  @param theName Object name; when specified, this parameter is used
1170         #         for result publication in the study. Otherwise, if automatic
1171         #         publication is switched on, default value is used for result name.
1172         #
1173         #  @return New GEOM.GEOM_Object, containing the created point.
1174         #
1175         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1176         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1177             """
1178             Create a point by projection give coordinates on the given surface
1179
1180             Parameters:
1181                 theRefSurf The referenced surface.
1182                 theX X-coordinate in 3D space
1183                 theY Y-coordinate in 3D space
1184                 theZ Z-coordinate in 3D space
1185                 theName Object name; when specified, this parameter is used
1186                         for result publication in the study. Otherwise, if automatic
1187                         publication is switched on, default value is used for result name.
1188
1189             Returns:
1190                 New GEOM.GEOM_Object, containing the created point.
1191
1192             Example of usage:
1193                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1194             """
1195             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1196             # Example: see GEOM_TestAll.py
1197             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1198             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1199             anObj.SetParameters(Parameters);
1200             self._autoPublish(anObj, theName, "vertex")
1201             return anObj
1202
1203         ## Create a point, which lays on the given face.
1204         #  The point will lay in arbitrary place of the face.
1205         #  The only condition on it is a non-zero distance to the face boundary.
1206         #  Such point can be used to uniquely identify the face inside any
1207         #  shape in case, when the shape does not contain overlapped faces.
1208         #  @param theFace The referenced face.
1209         #  @param theName Object name; when specified, this parameter is used
1210         #         for result publication in the study. Otherwise, if automatic
1211         #         publication is switched on, default value is used for result name.
1212         #
1213         #  @return New GEOM.GEOM_Object, containing the created point.
1214         #
1215         #  @ref swig_MakeVertexInsideFace "Example"
1216         def MakeVertexInsideFace (self, theFace, theName=None):
1217             """
1218             Create a point, which lays on the given face.
1219             The point will lay in arbitrary place of the face.
1220             The only condition on it is a non-zero distance to the face boundary.
1221             Such point can be used to uniquely identify the face inside any
1222             shape in case, when the shape does not contain overlapped faces.
1223
1224             Parameters:
1225                 theFace The referenced face.
1226                 theName Object name; when specified, this parameter is used
1227                         for result publication in the study. Otherwise, if automatic
1228                         publication is switched on, default value is used for result name.
1229
1230             Returns:
1231                 New GEOM.GEOM_Object, containing the created point.
1232
1233             Example of usage:
1234                 p_on_face = geompy.MakeVertexInsideFace(Face)
1235             """
1236             # Example: see GEOM_TestAll.py
1237             anObj = self.BasicOp.MakePointOnFace(theFace)
1238             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1239             self._autoPublish(anObj, theName, "vertex")
1240             return anObj
1241
1242         ## Create a point on intersection of two lines.
1243         #  @param theRefLine1, theRefLine2 The referenced lines.
1244         #  @param theName Object name; when specified, this parameter is used
1245         #         for result publication in the study. Otherwise, if automatic
1246         #         publication is switched on, default value is used for result name.
1247         #
1248         #  @return New GEOM.GEOM_Object, containing the created point.
1249         #
1250         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1251         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1252             """
1253             Create a point on intersection of two lines.
1254
1255             Parameters:
1256                 theRefLine1, theRefLine2 The referenced lines.
1257                 theName Object name; when specified, this parameter is used
1258                         for result publication in the study. Otherwise, if automatic
1259                         publication is switched on, default value is used for result name.
1260
1261             Returns:
1262                 New GEOM.GEOM_Object, containing the created point.
1263             """
1264             # Example: see GEOM_TestAll.py
1265             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1266             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1267             self._autoPublish(anObj, theName, "vertex")
1268             return anObj
1269
1270         ## Create a tangent, corresponding to the given parameter on the given curve.
1271         #  @param theRefCurve The referenced curve.
1272         #  @param theParameter Value of parameter on the referenced curve.
1273         #  @param theName Object name; when specified, this parameter is used
1274         #         for result publication in the study. Otherwise, if automatic
1275         #         publication is switched on, default value is used for result name.
1276         #
1277         #  @return New GEOM.GEOM_Object, containing the created tangent.
1278         #
1279         #  @ref swig_MakeTangentOnCurve "Example"
1280         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1281             """
1282             Create a tangent, corresponding to the given parameter on the given curve.
1283
1284             Parameters:
1285                 theRefCurve The referenced curve.
1286                 theParameter Value of parameter on the referenced curve.
1287                 theName Object name; when specified, this parameter is used
1288                         for result publication in the study. Otherwise, if automatic
1289                         publication is switched on, default value is used for result name.
1290
1291             Returns:
1292                 New GEOM.GEOM_Object, containing the created tangent.
1293
1294             Example of usage:
1295                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1296             """
1297             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1298             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1299             self._autoPublish(anObj, theName, "tangent")
1300             return anObj
1301
1302         ## Create a tangent plane, corresponding to the given parameter on the given face.
1303         #  @param theFace The face for which tangent plane should be built.
1304         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1305         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1306         #  @param theTrimSize the size of plane.
1307         #  @param theName Object name; when specified, this parameter is used
1308         #         for result publication in the study. Otherwise, if automatic
1309         #         publication is switched on, default value is used for result name.
1310         #
1311         #  @return New GEOM.GEOM_Object, containing the created tangent.
1312         #
1313         #  @ref swig_MakeTangentPlaneOnFace "Example"
1314         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1315             """
1316             Create a tangent plane, corresponding to the given parameter on the given face.
1317
1318             Parameters:
1319                 theFace The face for which tangent plane should be built.
1320                 theParameterV vertical value of the center point (0.0 - 1.0).
1321                 theParameterU horisontal value of the center point (0.0 - 1.0).
1322                 theTrimSize the size of plane.
1323                 theName Object name; when specified, this parameter is used
1324                         for result publication in the study. Otherwise, if automatic
1325                         publication is switched on, default value is used for result name.
1326
1327            Returns: 
1328                 New GEOM.GEOM_Object, containing the created tangent.
1329
1330            Example of usage:
1331                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1332             """
1333             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1334             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1335             self._autoPublish(anObj, theName, "tangent")
1336             return anObj
1337
1338         ## Create a vector with the given components.
1339         #  @param theDX X component of the vector.
1340         #  @param theDY Y component of the vector.
1341         #  @param theDZ Z component of the vector.
1342         #  @param theName Object name; when specified, this parameter is used
1343         #         for result publication in the study. Otherwise, if automatic
1344         #         publication is switched on, default value is used for result name.
1345         #
1346         #  @return New GEOM.GEOM_Object, containing the created vector.
1347         #
1348         #  @ref tui_creation_vector "Example"
1349         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1350             """
1351             Create a vector with the given components.
1352
1353             Parameters:
1354                 theDX X component of the vector.
1355                 theDY Y component of the vector.
1356                 theDZ Z component of the vector.
1357                 theName Object name; when specified, this parameter is used
1358                         for result publication in the study. Otherwise, if automatic
1359                         publication is switched on, default value is used for result name.
1360
1361             Returns:     
1362                 New GEOM.GEOM_Object, containing the created vector.
1363             """
1364             # Example: see GEOM_TestAll.py
1365             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1366             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1367             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1368             anObj.SetParameters(Parameters)
1369             self._autoPublish(anObj, theName, "vector")
1370             return anObj
1371
1372         ## Create a vector between two points.
1373         #  @param thePnt1 Start point for the vector.
1374         #  @param thePnt2 End point for the vector.
1375         #  @param theName Object name; when specified, this parameter is used
1376         #         for result publication in the study. Otherwise, if automatic
1377         #         publication is switched on, default value is used for result name.
1378         #
1379         #  @return New GEOM.GEOM_Object, containing the created vector.
1380         #
1381         #  @ref tui_creation_vector "Example"
1382         def MakeVector(self, thePnt1, thePnt2, theName=None):
1383             """
1384             Create a vector between two points.
1385
1386             Parameters:
1387                 thePnt1 Start point for the vector.
1388                 thePnt2 End point for the vector.
1389                 theName Object name; when specified, this parameter is used
1390                         for result publication in the study. Otherwise, if automatic
1391                         publication is switched on, default value is used for result name.
1392
1393             Returns:        
1394                 New GEOM.GEOM_Object, containing the created vector.
1395             """
1396             # Example: see GEOM_TestAll.py
1397             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1398             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1399             self._autoPublish(anObj, theName, "vector")
1400             return anObj
1401
1402         ## Create a line, passing through the given point
1403         #  and parrallel to the given direction
1404         #  @param thePnt Point. The resulting line will pass through it.
1405         #  @param theDir Direction. The resulting line will be parallel to it.
1406         #  @param theName Object name; when specified, this parameter is used
1407         #         for result publication in the study. Otherwise, if automatic
1408         #         publication is switched on, default value is used for result name.
1409         #
1410         #  @return New GEOM.GEOM_Object, containing the created line.
1411         #
1412         #  @ref tui_creation_line "Example"
1413         def MakeLine(self, thePnt, theDir, theName=None):
1414             """
1415             Create a line, passing through the given point
1416             and parrallel to the given direction
1417
1418             Parameters:
1419                 thePnt Point. The resulting line will pass through it.
1420                 theDir Direction. The resulting line will be parallel to it.
1421                 theName Object name; when specified, this parameter is used
1422                         for result publication in the study. Otherwise, if automatic
1423                         publication is switched on, default value is used for result name.
1424
1425             Returns:
1426                 New GEOM.GEOM_Object, containing the created line.
1427             """
1428             # Example: see GEOM_TestAll.py
1429             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1430             RaiseIfFailed("MakeLine", self.BasicOp)
1431             self._autoPublish(anObj, theName, "line")
1432             return anObj
1433
1434         ## Create a line, passing through the given points
1435         #  @param thePnt1 First of two points, defining the line.
1436         #  @param thePnt2 Second of two points, defining the line.
1437         #  @param theName Object name; when specified, this parameter is used
1438         #         for result publication in the study. Otherwise, if automatic
1439         #         publication is switched on, default value is used for result name.
1440         #
1441         #  @return New GEOM.GEOM_Object, containing the created line.
1442         #
1443         #  @ref tui_creation_line "Example"
1444         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1445             """
1446             Create a line, passing through the given points
1447
1448             Parameters:
1449                 thePnt1 First of two points, defining the line.
1450                 thePnt2 Second of two points, defining the line.
1451                 theName Object name; when specified, this parameter is used
1452                         for result publication in the study. Otherwise, if automatic
1453                         publication is switched on, default value is used for result name.
1454
1455             Returns:
1456                 New GEOM.GEOM_Object, containing the created line.
1457             """
1458             # Example: see GEOM_TestAll.py
1459             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1460             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1461             self._autoPublish(anObj, theName, "line")
1462             return anObj
1463
1464         ## Create a line on two faces intersection.
1465         #  @param theFace1 First of two faces, defining the line.
1466         #  @param theFace2 Second of two faces, defining the line.
1467         #  @param theName Object name; when specified, this parameter is used
1468         #         for result publication in the study. Otherwise, if automatic
1469         #         publication is switched on, default value is used for result name.
1470         #
1471         #  @return New GEOM.GEOM_Object, containing the created line.
1472         #
1473         #  @ref swig_MakeLineTwoFaces "Example"
1474         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1475             """
1476             Create a line on two faces intersection.
1477
1478             Parameters:
1479                 theFace1 First of two faces, defining the line.
1480                 theFace2 Second of two faces, defining the line.
1481                 theName Object name; when specified, this parameter is used
1482                         for result publication in the study. Otherwise, if automatic
1483                         publication is switched on, default value is used for result name.
1484
1485             Returns:
1486                 New GEOM.GEOM_Object, containing the created line.
1487             """
1488             # Example: see GEOM_TestAll.py
1489             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1490             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1491             self._autoPublish(anObj, theName, "line")
1492             return anObj
1493
1494         ## Create a plane, passing through the given point
1495         #  and normal to the given vector.
1496         #  @param thePnt Point, the plane has to pass through.
1497         #  @param theVec Vector, defining the plane normal direction.
1498         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1499         #  @param theName Object name; when specified, this parameter is used
1500         #         for result publication in the study. Otherwise, if automatic
1501         #         publication is switched on, default value is used for result name.
1502         #
1503         #  @return New GEOM.GEOM_Object, containing the created plane.
1504         #
1505         #  @ref tui_creation_plane "Example"
1506         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1507             """
1508             Create a plane, passing through the given point
1509             and normal to the given vector.
1510
1511             Parameters:
1512                 thePnt Point, the plane has to pass through.
1513                 theVec Vector, defining the plane normal direction.
1514                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1515                 theName Object name; when specified, this parameter is used
1516                         for result publication in the study. Otherwise, if automatic
1517                         publication is switched on, default value is used for result name.
1518
1519             Returns:    
1520                 New GEOM.GEOM_Object, containing the created plane.
1521             """
1522             # Example: see GEOM_TestAll.py
1523             theTrimSize, Parameters = ParseParameters(theTrimSize);
1524             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1525             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1526             anObj.SetParameters(Parameters)
1527             self._autoPublish(anObj, theName, "plane")
1528             return anObj
1529
1530         ## Create a plane, passing through the three given points
1531         #  @param thePnt1 First of three points, defining the plane.
1532         #  @param thePnt2 Second of three points, defining the plane.
1533         #  @param thePnt3 Fird of three points, defining the plane.
1534         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1535         #  @param theName Object name; when specified, this parameter is used
1536         #         for result publication in the study. Otherwise, if automatic
1537         #         publication is switched on, default value is used for result name.
1538         #
1539         #  @return New GEOM.GEOM_Object, containing the created plane.
1540         #
1541         #  @ref tui_creation_plane "Example"
1542         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1543             """
1544             Create a plane, passing through the three given points
1545
1546             Parameters:
1547                 thePnt1 First of three points, defining the plane.
1548                 thePnt2 Second of three points, defining the plane.
1549                 thePnt3 Fird of three points, defining the plane.
1550                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1551                 theName Object name; when specified, this parameter is used
1552                         for result publication in the study. Otherwise, if automatic
1553                         publication is switched on, default value is used for result name.
1554
1555             Returns:
1556                 New GEOM.GEOM_Object, containing the created plane.
1557             """
1558             # Example: see GEOM_TestAll.py
1559             theTrimSize, Parameters = ParseParameters(theTrimSize);
1560             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1561             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1562             anObj.SetParameters(Parameters)
1563             self._autoPublish(anObj, theName, "plane")
1564             return anObj
1565
1566         ## Create a plane, similar to the existing one, but with another size of representing face.
1567         #  @param theFace Referenced plane or LCS(Marker).
1568         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1569         #  @param theName Object name; when specified, this parameter is used
1570         #         for result publication in the study. Otherwise, if automatic
1571         #         publication is switched on, default value is used for result name.
1572         #
1573         #  @return New GEOM.GEOM_Object, containing the created plane.
1574         #
1575         #  @ref tui_creation_plane "Example"
1576         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1577             """
1578             Create a plane, similar to the existing one, but with another size of representing face.
1579
1580             Parameters:
1581                 theFace Referenced plane or LCS(Marker).
1582                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1583                 theName Object name; when specified, this parameter is used
1584                         for result publication in the study. Otherwise, if automatic
1585                         publication is switched on, default value is used for result name.
1586
1587             Returns:
1588                 New GEOM.GEOM_Object, containing the created plane.
1589             """
1590             # Example: see GEOM_TestAll.py
1591             theTrimSize, Parameters = ParseParameters(theTrimSize);
1592             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1593             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1594             anObj.SetParameters(Parameters)
1595             self._autoPublish(anObj, theName, "plane")
1596             return anObj
1597
1598         ## Create a plane, passing through the 2 vectors
1599         #  with center in a start point of the first vector.
1600         #  @param theVec1 Vector, defining center point and plane direction.
1601         #  @param theVec2 Vector, defining the plane normal direction.
1602         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1603         #  @param theName Object name; when specified, this parameter is used
1604         #         for result publication in the study. Otherwise, if automatic
1605         #         publication is switched on, default value is used for result name.
1606         #
1607         #  @return New GEOM.GEOM_Object, containing the created plane.
1608         #
1609         #  @ref tui_creation_plane "Example"
1610         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1611             """
1612             Create a plane, passing through the 2 vectors
1613             with center in a start point of the first vector.
1614
1615             Parameters:
1616                 theVec1 Vector, defining center point and plane direction.
1617                 theVec2 Vector, defining the plane normal direction.
1618                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1619                 theName Object name; when specified, this parameter is used
1620                         for result publication in the study. Otherwise, if automatic
1621                         publication is switched on, default value is used for result name.
1622
1623             Returns: 
1624                 New GEOM.GEOM_Object, containing the created plane.
1625             """
1626             # Example: see GEOM_TestAll.py
1627             theTrimSize, Parameters = ParseParameters(theTrimSize);
1628             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1629             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1630             anObj.SetParameters(Parameters)
1631             self._autoPublish(anObj, theName, "plane")
1632             return anObj
1633
1634         ## Create a plane, based on a Local coordinate system.
1635         #  @param theLCS  coordinate system, defining plane.
1636         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1637         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1638         #  @param theName Object name; when specified, this parameter is used
1639         #         for result publication in the study. Otherwise, if automatic
1640         #         publication is switched on, default value is used for result name.
1641         #
1642         #  @return New GEOM.GEOM_Object, containing the created plane.
1643         #
1644         #  @ref tui_creation_plane "Example"
1645         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1646             """
1647             Create a plane, based on a Local coordinate system.
1648
1649            Parameters: 
1650                 theLCS  coordinate system, defining plane.
1651                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1652                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1653                 theName Object name; when specified, this parameter is used
1654                         for result publication in the study. Otherwise, if automatic
1655                         publication is switched on, default value is used for result name.
1656
1657             Returns: 
1658                 New GEOM.GEOM_Object, containing the created plane.
1659             """
1660             # Example: see GEOM_TestAll.py
1661             theTrimSize, Parameters = ParseParameters(theTrimSize);
1662             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1663             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1664             anObj.SetParameters(Parameters)
1665             self._autoPublish(anObj, theName, "plane")
1666             return anObj
1667
1668         ## Create a local coordinate system.
1669         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1670         #  @param XDX,XDY,XDZ Three components of OX direction
1671         #  @param YDX,YDY,YDZ Three components of OY direction
1672         #  @param theName Object name; when specified, this parameter is used
1673         #         for result publication in the study. Otherwise, if automatic
1674         #         publication is switched on, default value is used for result name.
1675         #
1676         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1677         #
1678         #  @ref swig_MakeMarker "Example"
1679         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1680             """
1681             Create a local coordinate system.
1682
1683             Parameters: 
1684                 OX,OY,OZ Three coordinates of coordinate system origin.
1685                 XDX,XDY,XDZ Three components of OX direction
1686                 YDX,YDY,YDZ Three components of OY direction
1687                 theName Object name; when specified, this parameter is used
1688                         for result publication in the study. Otherwise, if automatic
1689                         publication is switched on, default value is used for result name.
1690
1691             Returns: 
1692                 New GEOM.GEOM_Object, containing the created coordinate system.
1693             """
1694             # Example: see GEOM_TestAll.py
1695             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1696             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1697             RaiseIfFailed("MakeMarker", self.BasicOp)
1698             anObj.SetParameters(Parameters)
1699             self._autoPublish(anObj, theName, "lcs")
1700             return anObj
1701
1702         ## Create a local coordinate system from shape.
1703         #  @param theShape The initial shape to detect the coordinate system.
1704         #  @param theName Object name; when specified, this parameter is used
1705         #         for result publication in the study. Otherwise, if automatic
1706         #         publication is switched on, default value is used for result name.
1707         #
1708         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1709         #
1710         #  @ref tui_creation_lcs "Example"
1711         def MakeMarkerFromShape(self, theShape, theName=None):
1712             """
1713             Create a local coordinate system from shape.
1714
1715             Parameters:
1716                 theShape The initial shape to detect the coordinate system.
1717                 theName Object name; when specified, this parameter is used
1718                         for result publication in the study. Otherwise, if automatic
1719                         publication is switched on, default value is used for result name.
1720                 
1721             Returns: 
1722                 New GEOM.GEOM_Object, containing the created coordinate system.
1723             """
1724             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1725             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1726             self._autoPublish(anObj, theName, "lcs")
1727             return anObj
1728
1729         ## Create a local coordinate system from point and two vectors.
1730         #  @param theOrigin Point of coordinate system origin.
1731         #  @param theXVec Vector of X direction
1732         #  @param theYVec Vector of Y direction
1733         #  @param theName Object name; when specified, this parameter is used
1734         #         for result publication in the study. Otherwise, if automatic
1735         #         publication is switched on, default value is used for result name.
1736         #
1737         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1738         #
1739         #  @ref tui_creation_lcs "Example"
1740         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1741             """
1742             Create a local coordinate system from point and two vectors.
1743
1744             Parameters:
1745                 theOrigin Point of coordinate system origin.
1746                 theXVec Vector of X direction
1747                 theYVec Vector of Y direction
1748                 theName Object name; when specified, this parameter is used
1749                         for result publication in the study. Otherwise, if automatic
1750                         publication is switched on, default value is used for result name.
1751
1752             Returns: 
1753                 New GEOM.GEOM_Object, containing the created coordinate system.
1754
1755             """
1756             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1757             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1758             self._autoPublish(anObj, theName, "lcs")
1759             return anObj
1760
1761         # end of l3_basic_go
1762         ## @}
1763
1764         ## @addtogroup l4_curves
1765         ## @{
1766
1767         ##  Create an arc of circle, passing through three given points.
1768         #  @param thePnt1 Start point of the arc.
1769         #  @param thePnt2 Middle point of the arc.
1770         #  @param thePnt3 End point of the arc.
1771         #  @param theName Object name; when specified, this parameter is used
1772         #         for result publication in the study. Otherwise, if automatic
1773         #         publication is switched on, default value is used for result name.
1774         #
1775         #  @return New GEOM.GEOM_Object, containing the created arc.
1776         #
1777         #  @ref swig_MakeArc "Example"
1778         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1779             """
1780             Create an arc of circle, passing through three given points.
1781
1782             Parameters:
1783                 thePnt1 Start point of the arc.
1784                 thePnt2 Middle point of the arc.
1785                 thePnt3 End point of the arc.
1786                 theName Object name; when specified, this parameter is used
1787                         for result publication in the study. Otherwise, if automatic
1788                         publication is switched on, default value is used for result name.
1789
1790             Returns: 
1791                 New GEOM.GEOM_Object, containing the created arc.
1792             """
1793             # Example: see GEOM_TestAll.py
1794             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1795             RaiseIfFailed("MakeArc", self.CurvesOp)
1796             self._autoPublish(anObj, theName, "arc")
1797             return anObj
1798
1799         ##  Create an arc of circle from a center and 2 points.
1800         #  @param thePnt1 Center of the arc
1801         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1802         #  @param thePnt3 End point of the arc (Gives also a direction)
1803         #  @param theSense Orientation of the arc
1804         #  @param theName Object name; when specified, this parameter is used
1805         #         for result publication in the study. Otherwise, if automatic
1806         #         publication is switched on, default value is used for result name.
1807         #
1808         #  @return New GEOM.GEOM_Object, containing the created arc.
1809         #
1810         #  @ref swig_MakeArc "Example"
1811         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1812             """
1813             Create an arc of circle from a center and 2 points.
1814
1815             Parameters:
1816                 thePnt1 Center of the arc
1817                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1818                 thePnt3 End point of the arc (Gives also a direction)
1819                 theSense Orientation of the arc
1820                 theName Object name; when specified, this parameter is used
1821                         for result publication in the study. Otherwise, if automatic
1822                         publication is switched on, default value is used for result name.
1823
1824             Returns:
1825                 New GEOM.GEOM_Object, containing the created arc.
1826             """
1827             # Example: see GEOM_TestAll.py
1828             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1829             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1830             self._autoPublish(anObj, theName, "arc")
1831             return anObj
1832
1833         ##  Create an arc of ellipse, of center and two points.
1834         #  @param theCenter Center of the arc.
1835         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1836         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1837         #  @param theName Object name; when specified, this parameter is used
1838         #         for result publication in the study. Otherwise, if automatic
1839         #         publication is switched on, default value is used for result name.
1840         #
1841         #  @return New GEOM.GEOM_Object, containing the created arc.
1842         #
1843         #  @ref swig_MakeArc "Example"
1844         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1845             """
1846             Create an arc of ellipse, of center and two points.
1847
1848             Parameters:
1849                 theCenter Center of the arc.
1850                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1851                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1852                 theName Object name; when specified, this parameter is used
1853                         for result publication in the study. Otherwise, if automatic
1854                         publication is switched on, default value is used for result name.
1855
1856             Returns:
1857                 New GEOM.GEOM_Object, containing the created arc.
1858             """
1859             # Example: see GEOM_TestAll.py
1860             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1861             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1862             self._autoPublish(anObj, theName, "arc")
1863             return anObj
1864
1865         ## Create a circle with given center, normal vector and radius.
1866         #  @param thePnt Circle center.
1867         #  @param theVec Vector, normal to the plane of the circle.
1868         #  @param theR Circle radius.
1869         #  @param theName Object name; when specified, this parameter is used
1870         #         for result publication in the study. Otherwise, if automatic
1871         #         publication is switched on, default value is used for result name.
1872         #
1873         #  @return New GEOM.GEOM_Object, containing the created circle.
1874         #
1875         #  @ref tui_creation_circle "Example"
1876         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1877             """
1878             Create a circle with given center, normal vector and radius.
1879
1880             Parameters:
1881                 thePnt Circle center.
1882                 theVec Vector, normal to the plane of the circle.
1883                 theR Circle radius.
1884                 theName Object name; when specified, this parameter is used
1885                         for result publication in the study. Otherwise, if automatic
1886                         publication is switched on, default value is used for result name.
1887
1888             Returns:
1889                 New GEOM.GEOM_Object, containing the created circle.
1890             """
1891             # Example: see GEOM_TestAll.py
1892             theR, Parameters = ParseParameters(theR)
1893             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1894             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1895             anObj.SetParameters(Parameters)
1896             self._autoPublish(anObj, theName, "circle")
1897             return anObj
1898
1899         ## Create a circle with given radius.
1900         #  Center of the circle will be in the origin of global
1901         #  coordinate system and normal vector will be codirected with Z axis
1902         #  @param theR Circle radius.
1903         #  @param theName Object name; when specified, this parameter is used
1904         #         for result publication in the study. Otherwise, if automatic
1905         #         publication is switched on, default value is used for result name.
1906         #
1907         #  @return New GEOM.GEOM_Object, containing the created circle.
1908         def MakeCircleR(self, theR, theName=None):
1909             """
1910             Create a circle with given radius.
1911             Center of the circle will be in the origin of global
1912             coordinate system and normal vector will be codirected with Z axis
1913
1914             Parameters:
1915                 theR Circle radius.
1916                 theName Object name; when specified, this parameter is used
1917                         for result publication in the study. Otherwise, if automatic
1918                         publication is switched on, default value is used for result name.
1919
1920             Returns:
1921                 New GEOM.GEOM_Object, containing the created circle.
1922             """
1923             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1924             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1925             self._autoPublish(anObj, theName, "circle")
1926             return anObj
1927
1928         ## Create a circle, passing through three given points
1929         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1930         #  @param theName Object name; when specified, this parameter is used
1931         #         for result publication in the study. Otherwise, if automatic
1932         #         publication is switched on, default value is used for result name.
1933         #
1934         #  @return New GEOM.GEOM_Object, containing the created circle.
1935         #
1936         #  @ref tui_creation_circle "Example"
1937         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1938             """
1939             Create a circle, passing through three given points
1940
1941             Parameters:
1942                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1943                 theName Object name; when specified, this parameter is used
1944                         for result publication in the study. Otherwise, if automatic
1945                         publication is switched on, default value is used for result name.
1946
1947             Returns:
1948                 New GEOM.GEOM_Object, containing the created circle.
1949             """
1950             # Example: see GEOM_TestAll.py
1951             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1952             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1953             self._autoPublish(anObj, theName, "circle")
1954             return anObj
1955
1956         ## Create a circle, with given point1 as center,
1957         #  passing through the point2 as radius and laying in the plane,
1958         #  defined by all three given points.
1959         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1960         #  @param theName Object name; when specified, this parameter is used
1961         #         for result publication in the study. Otherwise, if automatic
1962         #         publication is switched on, default value is used for result name.
1963         #
1964         #  @return New GEOM.GEOM_Object, containing the created circle.
1965         #
1966         #  @ref swig_MakeCircle "Example"
1967         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1968             """
1969             Create a circle, with given point1 as center,
1970             passing through the point2 as radius and laying in the plane,
1971             defined by all three given points.
1972
1973             Parameters:
1974                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1975                 theName Object name; when specified, this parameter is used
1976                         for result publication in the study. Otherwise, if automatic
1977                         publication is switched on, default value is used for result name.
1978
1979             Returns:
1980                 New GEOM.GEOM_Object, containing the created circle.
1981             """
1982             # Example: see GEOM_example6.py
1983             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
1984             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
1985             self._autoPublish(anObj, theName, "circle")
1986             return anObj
1987
1988         ## Create an ellipse with given center, normal vector and radiuses.
1989         #  @param thePnt Ellipse center.
1990         #  @param theVec Vector, normal to the plane of the ellipse.
1991         #  @param theRMajor Major ellipse radius.
1992         #  @param theRMinor Minor ellipse radius.
1993         #  @param theVecMaj Vector, direction of the ellipse's main axis.
1994         #  @param theName Object name; when specified, this parameter is used
1995         #         for result publication in the study. Otherwise, if automatic
1996         #         publication is switched on, default value is used for result name.
1997         #
1998         #  @return New GEOM.GEOM_Object, containing the created ellipse.
1999         #
2000         #  @ref tui_creation_ellipse "Example"
2001         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2002             """
2003             Create an ellipse with given center, normal vector and radiuses.
2004
2005             Parameters:
2006                 thePnt Ellipse center.
2007                 theVec Vector, normal to the plane of the ellipse.
2008                 theRMajor Major ellipse radius.
2009                 theRMinor Minor ellipse radius.
2010                 theVecMaj Vector, direction of the ellipse's main axis.
2011                 theName Object name; when specified, this parameter is used
2012                         for result publication in the study. Otherwise, if automatic
2013                         publication is switched on, default value is used for result name.
2014
2015             Returns:    
2016                 New GEOM.GEOM_Object, containing the created ellipse.
2017             """
2018             # Example: see GEOM_TestAll.py
2019             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2020             if theVecMaj is not None:
2021                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2022             else:
2023                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2024                 pass
2025             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2026             anObj.SetParameters(Parameters)
2027             self._autoPublish(anObj, theName, "ellipse")
2028             return anObj
2029
2030         ## Create an ellipse with given radiuses.
2031         #  Center of the ellipse will be in the origin of global
2032         #  coordinate system and normal vector will be codirected with Z axis
2033         #  @param theRMajor Major ellipse radius.
2034         #  @param theRMinor Minor ellipse radius.
2035         #  @param theName Object name; when specified, this parameter is used
2036         #         for result publication in the study. Otherwise, if automatic
2037         #         publication is switched on, default value is used for result name.
2038         #
2039         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2040         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2041             """
2042             Create an ellipse with given radiuses.
2043             Center of the ellipse will be in the origin of global
2044             coordinate system and normal vector will be codirected with Z axis
2045
2046             Parameters:
2047                 theRMajor Major ellipse radius.
2048                 theRMinor Minor ellipse radius.
2049                 theName Object name; when specified, this parameter is used
2050                         for result publication in the study. Otherwise, if automatic
2051                         publication is switched on, default value is used for result name.
2052
2053             Returns:
2054             New GEOM.GEOM_Object, containing the created ellipse.
2055             """
2056             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2057             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2058             self._autoPublish(anObj, theName, "ellipse")
2059             return anObj
2060
2061         ## Create a polyline on the set of points.
2062         #  @param thePoints Sequence of points for the polyline.
2063         #  @param theIsClosed If True, build a closed wire.
2064         #  @param theName Object name; when specified, this parameter is used
2065         #         for result publication in the study. Otherwise, if automatic
2066         #         publication is switched on, default value is used for result name.
2067         #
2068         #  @return New GEOM.GEOM_Object, containing the created polyline.
2069         #
2070         #  @ref tui_creation_curve "Example"
2071         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2072             """
2073             Create a polyline on the set of points.
2074
2075             Parameters:
2076                 thePoints Sequence of points for the polyline.
2077                 theIsClosed If True, build a closed wire.
2078                 theName Object name; when specified, this parameter is used
2079                         for result publication in the study. Otherwise, if automatic
2080                         publication is switched on, default value is used for result name.
2081
2082             Returns:
2083                 New GEOM.GEOM_Object, containing the created polyline.
2084             """
2085             # Example: see GEOM_TestAll.py
2086             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2087             RaiseIfFailed("MakePolyline", self.CurvesOp)
2088             self._autoPublish(anObj, theName, "polyline")
2089             return anObj
2090
2091         ## Create bezier curve on the set of points.
2092         #  @param thePoints Sequence of points for the bezier curve.
2093         #  @param theIsClosed If True, build a closed curve.
2094         #  @param theName Object name; when specified, this parameter is used
2095         #         for result publication in the study. Otherwise, if automatic
2096         #         publication is switched on, default value is used for result name.
2097         #
2098         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2099         #
2100         #  @ref tui_creation_curve "Example"
2101         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2102             """
2103             Create bezier curve on the set of points.
2104
2105             Parameters:
2106                 thePoints Sequence of points for the bezier curve.
2107                 theIsClosed If True, build a closed curve.
2108                 theName Object name; when specified, this parameter is used
2109                         for result publication in the study. Otherwise, if automatic
2110                         publication is switched on, default value is used for result name.
2111
2112             Returns:
2113                 New GEOM.GEOM_Object, containing the created bezier curve.
2114             """
2115             # Example: see GEOM_TestAll.py
2116             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2117             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2118             self._autoPublish(anObj, theName, "bezier")
2119             return anObj
2120
2121         ## Create B-Spline curve on the set of points.
2122         #  @param thePoints Sequence of points for the B-Spline curve.
2123         #  @param theIsClosed If True, build a closed curve.
2124         #  @param theDoReordering If TRUE, the algo does not follow the order of
2125         #                         \a thePoints but searches for the closest vertex.
2126         #  @param theName Object name; when specified, this parameter is used
2127         #         for result publication in the study. Otherwise, if automatic
2128         #         publication is switched on, default value is used for result name.
2129         #
2130         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2131         #
2132         #  @ref tui_creation_curve "Example"
2133         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2134             """
2135             Create B-Spline curve on the set of points.
2136
2137             Parameters:
2138                 thePoints Sequence of points for the B-Spline curve.
2139                 theIsClosed If True, build a closed curve.
2140                 theDoReordering If True, the algo does not follow the order of
2141                                 thePoints but searches for the closest vertex.
2142                 theName Object name; when specified, this parameter is used
2143                         for result publication in the study. Otherwise, if automatic
2144                         publication is switched on, default value is used for result name.
2145
2146             Returns:                     
2147                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2148             """
2149             # Example: see GEOM_TestAll.py
2150             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2151             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2152             self._autoPublish(anObj, theName, "bspline")
2153             return anObj
2154
2155         ## Create B-Spline curve on the set of points.
2156         #  @param thePoints Sequence of points for the B-Spline curve.
2157         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2158         #  @param theLastVec Vector object, defining the curve direction at its last point.
2159         #  @param theName Object name; when specified, this parameter is used
2160         #         for result publication in the study. Otherwise, if automatic
2161         #         publication is switched on, default value is used for result name.
2162         #
2163         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2164         #
2165         #  @ref tui_creation_curve "Example"
2166         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2167             """
2168             Create B-Spline curve on the set of points.
2169
2170             Parameters:
2171                 thePoints Sequence of points for the B-Spline curve.
2172                 theFirstVec Vector object, defining the curve direction at its first point.
2173                 theLastVec Vector object, defining the curve direction at its last point.
2174                 theName Object name; when specified, this parameter is used
2175                         for result publication in the study. Otherwise, if automatic
2176                         publication is switched on, default value is used for result name.
2177
2178             Returns:                     
2179                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2180             """
2181             # Example: see GEOM_TestAll.py
2182             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2183             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2184             self._autoPublish(anObj, theName, "bspline")
2185             return anObj
2186
2187         ## Creates a curve using the parametric definition of the basic points.
2188         #  @param thexExpr parametric equation of the coordinates X.
2189         #  @param theyExpr parametric equation of the coordinates Y.
2190         #  @param thezExpr parametric equation of the coordinates Z.
2191         #  @param theParamMin the minimal value of the parameter.
2192         #  @param theParamMax the maximum value of the parameter.
2193         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2194         #  @param theCurveType the type of the curve.
2195         #  @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.
2196         #  @param theName Object name; when specified, this parameter is used
2197         #         for result publication in the study. Otherwise, if automatic
2198         #         publication is switched on, default value is used for result name.
2199         #
2200         #  @return New GEOM.GEOM_Object, containing the created curve.
2201         #
2202         #  @ref tui_creation_curve "Example"
2203         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2204                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2205             """
2206             Creates a curve using the parametric definition of the basic points.
2207
2208             Parameters:
2209                 thexExpr parametric equation of the coordinates X.
2210                 theyExpr parametric equation of the coordinates Y.
2211                 thezExpr parametric equation of the coordinates Z.
2212                 theParamMin the minimal value of the parameter.
2213                 theParamMax the maximum value of the parameter.
2214                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2215                 theCurveType the type of the curve.
2216                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2217                              method is used which can lead to a bug.
2218                 theName Object name; when specified, this parameter is used
2219                         for result publication in the study. Otherwise, if automatic
2220                         publication is switched on, default value is used for result name.
2221
2222             Returns:
2223                 New GEOM.GEOM_Object, containing the created curve.
2224             """
2225             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2226             if theNewMethod:
2227               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2228             else:
2229               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2230             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2231             anObj.SetParameters(Parameters)
2232             self._autoPublish(anObj, theName, "curve")
2233             return anObj
2234
2235         # end of l4_curves
2236         ## @}
2237
2238         ## @addtogroup l3_sketcher
2239         ## @{
2240
2241         ## Create a sketcher (wire or face), following the textual description,
2242         #  passed through <VAR>theCommand</VAR> argument. \n
2243         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2244         #  Format of the description string have to be the following:
2245         #
2246         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2247         #
2248         #  Where:
2249         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2250         #  - CMD is one of
2251         #     - "R angle" : Set the direction by angle
2252         #     - "D dx dy" : Set the direction by DX & DY
2253         #     .
2254         #       \n
2255         #     - "TT x y" : Create segment by point at X & Y
2256         #     - "T dx dy" : Create segment by point with DX & DY
2257         #     - "L length" : Create segment by direction & Length
2258         #     - "IX x" : Create segment by direction & Intersect. X
2259         #     - "IY y" : Create segment by direction & Intersect. Y
2260         #     .
2261         #       \n
2262         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2263         #     - "AA x y": Create arc by point at X & Y
2264         #     - "A dx dy" : Create arc by point with DX & DY
2265         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2266         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2267         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2268         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2269         #     .
2270         #       \n
2271         #     - "WW" : Close Wire (to finish)
2272         #     - "WF" : Close Wire and build face (to finish)
2273         #     .
2274         #        \n
2275         #  - Flag1 (= reverse) is 0 or 2 ...
2276         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2277         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2278         #     .
2279         #        \n
2280         #  - Flag2 (= control tolerance) is 0 or 1 ...
2281         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2282         #     - if 1 the wire is built only if the end point is on the arc
2283         #       with a tolerance of 10^-7 on the distance else the creation fails
2284         #
2285         #  @param theCommand String, defining the sketcher in local
2286         #                    coordinates of the working plane.
2287         #  @param theWorkingPlane Nine double values, defining origin,
2288         #                         OZ and OX directions of the working plane.
2289         #  @param theName Object name; when specified, this parameter is used
2290         #         for result publication in the study. Otherwise, if automatic
2291         #         publication is switched on, default value is used for result name.
2292         #
2293         #  @return New GEOM.GEOM_Object, containing the created wire.
2294         #
2295         #  @ref tui_sketcher_page "Example"
2296         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2297             """
2298             Create a sketcher (wire or face), following the textual description, passed
2299             through theCommand argument.
2300             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2301             Format of the description string have to be the following:
2302                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2303             Where:
2304             - x1, y1 are coordinates of the first sketcher point (zero by default),
2305             - CMD is one of
2306                - "R angle" : Set the direction by angle
2307                - "D dx dy" : Set the direction by DX & DY
2308                
2309                - "TT x y" : Create segment by point at X & Y
2310                - "T dx dy" : Create segment by point with DX & DY
2311                - "L length" : Create segment by direction & Length
2312                - "IX x" : Create segment by direction & Intersect. X
2313                - "IY y" : Create segment by direction & Intersect. Y
2314
2315                - "C radius length" : Create arc by direction, radius and length(in degree)
2316                - "AA x y": Create arc by point at X & Y
2317                - "A dx dy" : Create arc by point with DX & DY
2318                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2319                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2320                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2321                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2322
2323                - "WW" : Close Wire (to finish)
2324                - "WF" : Close Wire and build face (to finish)
2325             
2326             - Flag1 (= reverse) is 0 or 2 ...
2327                - if 0 the drawn arc is the one of lower angle (< Pi)
2328                - if 2 the drawn arc ius the one of greater angle (> Pi)
2329         
2330             - Flag2 (= control tolerance) is 0 or 1 ...
2331                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2332                - if 1 the wire is built only if the end point is on the arc
2333                  with a tolerance of 10^-7 on the distance else the creation fails
2334
2335             Parameters:
2336                 theCommand String, defining the sketcher in local
2337                            coordinates of the working plane.
2338                 theWorkingPlane Nine double values, defining origin,
2339                                 OZ and OX directions of the working plane.
2340                 theName Object name; when specified, this parameter is used
2341                         for result publication in the study. Otherwise, if automatic
2342                         publication is switched on, default value is used for result name.
2343
2344             Returns:
2345                 New GEOM.GEOM_Object, containing the created wire.
2346             """
2347             # Example: see GEOM_TestAll.py
2348             theCommand,Parameters = ParseSketcherCommand(theCommand)
2349             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2350             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2351             anObj.SetParameters(Parameters)
2352             self._autoPublish(anObj, theName, "wire")
2353             return anObj
2354
2355         ## Create a sketcher (wire or face), following the textual description,
2356         #  passed through <VAR>theCommand</VAR> argument. \n
2357         #  For format of the description string see MakeSketcher() method.\n
2358         #  @param theCommand String, defining the sketcher in local
2359         #                    coordinates of the working plane.
2360         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2361         #  @param theName Object name; when specified, this parameter is used
2362         #         for result publication in the study. Otherwise, if automatic
2363         #         publication is switched on, default value is used for result name.
2364         #
2365         #  @return New GEOM.GEOM_Object, containing the created wire.
2366         #
2367         #  @ref tui_sketcher_page "Example"
2368         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2369             """
2370             Create a sketcher (wire or face), following the textual description,
2371             passed through theCommand argument.
2372             For format of the description string see geompy.MakeSketcher() method.
2373
2374             Parameters:
2375                 theCommand String, defining the sketcher in local
2376                            coordinates of the working plane.
2377                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2378                 theName Object name; when specified, this parameter is used
2379                         for result publication in the study. Otherwise, if automatic
2380                         publication is switched on, default value is used for result name.
2381
2382             Returns:
2383                 New GEOM.GEOM_Object, containing the created wire.
2384             """
2385             theCommand,Parameters = ParseSketcherCommand(theCommand)
2386             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2387             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2388             anObj.SetParameters(Parameters)
2389             self._autoPublish(anObj, theName, "wire")
2390             return anObj
2391
2392         ## Create a sketcher wire, following the numerical description,
2393         #  passed through <VAR>theCoordinates</VAR> argument. \n
2394         #  @param theCoordinates double values, defining points to create a wire,
2395         #                                                      passing from it.
2396         #  @param theName Object name; when specified, this parameter is used
2397         #         for result publication in the study. Otherwise, if automatic
2398         #         publication is switched on, default value is used for result name.
2399         #
2400         #  @return New GEOM.GEOM_Object, containing the created wire.
2401         #
2402         #  @ref tui_3dsketcher_page "Example"
2403         def Make3DSketcher(self, theCoordinates, theName=None):
2404             """
2405             Create a sketcher wire, following the numerical description,
2406             passed through theCoordinates argument.
2407
2408             Parameters:
2409                 theCoordinates double values, defining points to create a wire,
2410                                passing from it.
2411                 theName Object name; when specified, this parameter is used
2412                         for result publication in the study. Otherwise, if automatic
2413                         publication is switched on, default value is used for result name.
2414
2415             Returns:
2416                 New GEOM_Object, containing the created wire.
2417             """
2418             theCoordinates,Parameters = ParseParameters(theCoordinates)
2419             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2420             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2421             anObj.SetParameters(Parameters)
2422             self._autoPublish(anObj, theName, "wire")
2423             return anObj
2424
2425         ## Obtain a 3D sketcher interface
2426         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2427         #
2428         #  @ref tui_3dsketcher_page "Example"
2429         def Sketcher3D (self):
2430             """
2431             Obtain a 3D sketcher interface.
2432
2433             Example of usage:
2434                 sk = geompy.Sketcher3D()
2435                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2436                 sk.addPointsRelative(0, 0, 130)
2437                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2438                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2439                 sk.close()
2440                 a3D_Sketcher_1 = sk.wire()
2441             """
2442             sk = Sketcher3D (self)
2443             return sk
2444
2445         # end of l3_sketcher
2446         ## @}
2447
2448         ## @addtogroup l3_3d_primitives
2449         ## @{
2450
2451         ## Create a box by coordinates of two opposite vertices.
2452         #
2453         #  @param x1,y1,z1 double values, defining first point it.
2454         #  @param x2,y2,z2 double values, defining first point it.
2455         #  @param theName Object name; when specified, this parameter is used
2456         #         for result publication in the study. Otherwise, if automatic
2457         #         publication is switched on, default value is used for result name.
2458         #
2459         #  @return New GEOM.GEOM_Object, containing the created box.
2460         #
2461         #  @ref tui_creation_box "Example"
2462         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2463             """
2464             Create a box by coordinates of two opposite vertices.
2465             
2466             Parameters:
2467                 x1,y1,z1 double values, defining first point.
2468                 x2,y2,z2 double values, defining second point.
2469                 theName Object name; when specified, this parameter is used
2470                         for result publication in the study. Otherwise, if automatic
2471                         publication is switched on, default value is used for result name.
2472                 
2473             Returns:
2474                 New GEOM.GEOM_Object, containing the created box.
2475             """
2476             # Example: see GEOM_TestAll.py
2477             pnt1 = self.MakeVertex(x1,y1,z1)
2478             pnt2 = self.MakeVertex(x2,y2,z2)
2479             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2480             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2481
2482         ## Create a box with specified dimensions along the coordinate axes
2483         #  and with edges, parallel to the coordinate axes.
2484         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2485         #  @param theDX Length of Box edges, parallel to OX axis.
2486         #  @param theDY Length of Box edges, parallel to OY axis.
2487         #  @param theDZ Length of Box edges, parallel to OZ axis.
2488         #  @param theName Object name; when specified, this parameter is used
2489         #         for result publication in the study. Otherwise, if automatic
2490         #         publication is switched on, default value is used for result name.
2491         #
2492         #  @return New GEOM.GEOM_Object, containing the created box.
2493         #
2494         #  @ref tui_creation_box "Example"
2495         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2496             """
2497             Create a box with specified dimensions along the coordinate axes
2498             and with edges, parallel to the coordinate axes.
2499             Center of the box will be at point (DX/2, DY/2, DZ/2).
2500
2501             Parameters:
2502                 theDX Length of Box edges, parallel to OX axis.
2503                 theDY Length of Box edges, parallel to OY axis.
2504                 theDZ Length of Box edges, parallel to OZ axis.
2505                 theName Object name; when specified, this parameter is used
2506                         for result publication in the study. Otherwise, if automatic
2507                         publication is switched on, default value is used for result name.
2508
2509             Returns:   
2510                 New GEOM.GEOM_Object, containing the created box.
2511             """
2512             # Example: see GEOM_TestAll.py
2513             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2514             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2515             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2516             anObj.SetParameters(Parameters)
2517             self._autoPublish(anObj, theName, "box")
2518             return anObj
2519
2520         ## Create a box with two specified opposite vertices,
2521         #  and with edges, parallel to the coordinate axes
2522         #  @param thePnt1 First of two opposite vertices.
2523         #  @param thePnt2 Second of two opposite vertices.
2524         #  @param theName Object name; when specified, this parameter is used
2525         #         for result publication in the study. Otherwise, if automatic
2526         #         publication is switched on, default value is used for result name.
2527         #
2528         #  @return New GEOM.GEOM_Object, containing the created box.
2529         #
2530         #  @ref tui_creation_box "Example"
2531         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2532             """
2533             Create a box with two specified opposite vertices,
2534             and with edges, parallel to the coordinate axes
2535
2536             Parameters:
2537                 thePnt1 First of two opposite vertices.
2538                 thePnt2 Second of two opposite vertices.
2539                 theName Object name; when specified, this parameter is used
2540                         for result publication in the study. Otherwise, if automatic
2541                         publication is switched on, default value is used for result name.
2542
2543             Returns:
2544                 New GEOM.GEOM_Object, containing the created box.
2545             """
2546             # Example: see GEOM_TestAll.py
2547             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2548             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2549             self._autoPublish(anObj, theName, "box")
2550             return anObj
2551
2552         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2553         #  @param theH height of Face.
2554         #  @param theW width of Face.
2555         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2556         #  @param theName Object name; when specified, this parameter is used
2557         #         for result publication in the study. Otherwise, if automatic
2558         #         publication is switched on, default value is used for result name.
2559         #
2560         #  @return New GEOM.GEOM_Object, containing the created face.
2561         #
2562         #  @ref tui_creation_face "Example"
2563         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2564             """
2565             Create a face with specified dimensions with edges parallel to coordinate axes.
2566
2567             Parameters:
2568                 theH height of Face.
2569                 theW width of Face.
2570                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2571                 theName Object name; when specified, this parameter is used
2572                         for result publication in the study. Otherwise, if automatic
2573                         publication is switched on, default value is used for result name.
2574
2575             Returns:
2576                 New GEOM.GEOM_Object, containing the created face.
2577             """
2578             # Example: see GEOM_TestAll.py
2579             theH,theW,Parameters = ParseParameters(theH, theW)
2580             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2581             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2582             anObj.SetParameters(Parameters)
2583             self._autoPublish(anObj, theName, "rectangle")
2584             return anObj
2585
2586         ## Create a face from another plane and two sizes,
2587         #  vertical size and horisontal size.
2588         #  @param theObj   Normale vector to the creating face or
2589         #  the face object.
2590         #  @param theH     Height (vertical size).
2591         #  @param theW     Width (horisontal size).
2592         #  @param theName Object name; when specified, this parameter is used
2593         #         for result publication in the study. Otherwise, if automatic
2594         #         publication is switched on, default value is used for result name.
2595         #
2596         #  @return New GEOM.GEOM_Object, containing the created face.
2597         #
2598         #  @ref tui_creation_face "Example"
2599         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2600             """
2601             Create a face from another plane and two sizes,
2602             vertical size and horisontal size.
2603
2604             Parameters:
2605                 theObj   Normale vector to the creating face or
2606                          the face object.
2607                 theH     Height (vertical size).
2608                 theW     Width (horisontal size).
2609                 theName Object name; when specified, this parameter is used
2610                         for result publication in the study. Otherwise, if automatic
2611                         publication is switched on, default value is used for result name.
2612
2613             Returns:
2614                 New GEOM_Object, containing the created face.
2615             """
2616             # Example: see GEOM_TestAll.py
2617             theH,theW,Parameters = ParseParameters(theH, theW)
2618             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2619             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2620             anObj.SetParameters(Parameters)
2621             self._autoPublish(anObj, theName, "rectangle")
2622             return anObj
2623
2624         ## Create a disk with given center, normal vector and radius.
2625         #  @param thePnt Disk center.
2626         #  @param theVec Vector, normal to the plane of the disk.
2627         #  @param theR Disk radius.
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created disk.
2633         #
2634         #  @ref tui_creation_disk "Example"
2635         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2636             """
2637             Create a disk with given center, normal vector and radius.
2638
2639             Parameters:
2640                 thePnt Disk center.
2641                 theVec Vector, normal to the plane of the disk.
2642                 theR Disk radius.
2643                 theName Object name; when specified, this parameter is used
2644                         for result publication in the study. Otherwise, if automatic
2645                         publication is switched on, default value is used for result name.
2646
2647             Returns:    
2648                 New GEOM.GEOM_Object, containing the created disk.
2649             """
2650             # Example: see GEOM_TestAll.py
2651             theR,Parameters = ParseParameters(theR)
2652             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2653             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2654             anObj.SetParameters(Parameters)
2655             self._autoPublish(anObj, theName, "disk")
2656             return anObj
2657
2658         ## Create a disk, passing through three given points
2659         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2660         #  @param theName Object name; when specified, this parameter is used
2661         #         for result publication in the study. Otherwise, if automatic
2662         #         publication is switched on, default value is used for result name.
2663         #
2664         #  @return New GEOM.GEOM_Object, containing the created disk.
2665         #
2666         #  @ref tui_creation_disk "Example"
2667         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2668             """
2669             Create a disk, passing through three given points
2670
2671             Parameters:
2672                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2673                 theName Object name; when specified, this parameter is used
2674                         for result publication in the study. Otherwise, if automatic
2675                         publication is switched on, default value is used for result name.
2676
2677             Returns:    
2678                 New GEOM.GEOM_Object, containing the created disk.
2679             """
2680             # Example: see GEOM_TestAll.py
2681             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2682             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2683             self._autoPublish(anObj, theName, "disk")
2684             return anObj
2685
2686         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2687         #  @param theR Radius of Face.
2688         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2689         #  @param theName Object name; when specified, this parameter is used
2690         #         for result publication in the study. Otherwise, if automatic
2691         #         publication is switched on, default value is used for result name.
2692         #
2693         #  @return New GEOM.GEOM_Object, containing the created disk.
2694         #
2695         #  @ref tui_creation_face "Example"
2696         def MakeDiskR(self, theR, theOrientation, theName=None):
2697             """
2698             Create a disk with specified dimensions along OX-OY coordinate axes.
2699
2700             Parameters:
2701                 theR Radius of Face.
2702                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2703                 theName Object name; when specified, this parameter is used
2704                         for result publication in the study. Otherwise, if automatic
2705                         publication is switched on, default value is used for result name.
2706
2707             Returns: 
2708                 New GEOM.GEOM_Object, containing the created disk.
2709
2710             Example of usage:
2711                 Disk3 = geompy.MakeDiskR(100., 1)
2712             """
2713             # Example: see GEOM_TestAll.py
2714             theR,Parameters = ParseParameters(theR)
2715             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2716             RaiseIfFailed("MakeDiskR", self.PrimOp)
2717             anObj.SetParameters(Parameters)
2718             self._autoPublish(anObj, theName, "disk")
2719             return anObj
2720
2721         ## Create a cylinder with given base point, axis, radius and height.
2722         #  @param thePnt Central point of cylinder base.
2723         #  @param theAxis Cylinder axis.
2724         #  @param theR Cylinder radius.
2725         #  @param theH Cylinder height.
2726         #  @param theName Object name; when specified, this parameter is used
2727         #         for result publication in the study. Otherwise, if automatic
2728         #         publication is switched on, default value is used for result name.
2729         #
2730         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2731         #
2732         #  @ref tui_creation_cylinder "Example"
2733         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2734             """
2735             Create a cylinder with given base point, axis, radius and height.
2736
2737             Parameters:
2738                 thePnt Central point of cylinder base.
2739                 theAxis Cylinder axis.
2740                 theR Cylinder radius.
2741                 theH Cylinder height.
2742                 theName Object name; when specified, this parameter is used
2743                         for result publication in the study. Otherwise, if automatic
2744                         publication is switched on, default value is used for result name.
2745
2746             Returns: 
2747                 New GEOM.GEOM_Object, containing the created cylinder.
2748             """
2749             # Example: see GEOM_TestAll.py
2750             theR,theH,Parameters = ParseParameters(theR, theH)
2751             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2752             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2753             anObj.SetParameters(Parameters)
2754             self._autoPublish(anObj, theName, "cylinder")
2755             return anObj
2756
2757         ## Create a cylinder with given radius and height at
2758         #  the origin of coordinate system. Axis of the cylinder
2759         #  will be collinear to the OZ axis of the coordinate system.
2760         #  @param theR Cylinder radius.
2761         #  @param theH Cylinder height.
2762         #  @param theName Object name; when specified, this parameter is used
2763         #         for result publication in the study. Otherwise, if automatic
2764         #         publication is switched on, default value is used for result name.
2765         #
2766         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2767         #
2768         #  @ref tui_creation_cylinder "Example"
2769         def MakeCylinderRH(self, theR, theH, theName=None):
2770             """
2771             Create a cylinder with given radius and height at
2772             the origin of coordinate system. Axis of the cylinder
2773             will be collinear to the OZ axis of the coordinate system.
2774
2775             Parameters:
2776                 theR Cylinder radius.
2777                 theH Cylinder height.
2778                 theName Object name; when specified, this parameter is used
2779                         for result publication in the study. Otherwise, if automatic
2780                         publication is switched on, default value is used for result name.
2781
2782             Returns:    
2783                 New GEOM.GEOM_Object, containing the created cylinder.
2784             """
2785             # Example: see GEOM_TestAll.py
2786             theR,theH,Parameters = ParseParameters(theR, theH)
2787             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2788             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2789             anObj.SetParameters(Parameters)
2790             self._autoPublish(anObj, theName, "cylinder")
2791             return anObj
2792
2793         ## Create a sphere with given center and radius.
2794         #  @param thePnt Sphere center.
2795         #  @param theR Sphere radius.
2796         #  @param theName Object name; when specified, this parameter is used
2797         #         for result publication in the study. Otherwise, if automatic
2798         #         publication is switched on, default value is used for result name.
2799         #
2800         #  @return New GEOM.GEOM_Object, containing the created sphere.
2801         #
2802         #  @ref tui_creation_sphere "Example"
2803         def MakeSpherePntR(self, thePnt, theR, theName=None):
2804             """
2805             Create a sphere with given center and radius.
2806
2807             Parameters:
2808                 thePnt Sphere center.
2809                 theR Sphere radius.
2810                 theName Object name; when specified, this parameter is used
2811                         for result publication in the study. Otherwise, if automatic
2812                         publication is switched on, default value is used for result name.
2813
2814             Returns:    
2815                 New GEOM.GEOM_Object, containing the created sphere.            
2816             """
2817             # Example: see GEOM_TestAll.py
2818             theR,Parameters = ParseParameters(theR)
2819             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2820             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2821             anObj.SetParameters(Parameters)
2822             self._autoPublish(anObj, theName, "sphere")
2823             return anObj
2824
2825         ## Create a sphere with given center and radius.
2826         #  @param x,y,z Coordinates of sphere center.
2827         #  @param theR Sphere radius.
2828         #  @param theName Object name; when specified, this parameter is used
2829         #         for result publication in the study. Otherwise, if automatic
2830         #         publication is switched on, default value is used for result name.
2831         #
2832         #  @return New GEOM.GEOM_Object, containing the created sphere.
2833         #
2834         #  @ref tui_creation_sphere "Example"
2835         def MakeSphere(self, x, y, z, theR, theName=None):
2836             """
2837             Create a sphere with given center and radius.
2838
2839             Parameters: 
2840                 x,y,z Coordinates of sphere center.
2841                 theR Sphere radius.
2842                 theName Object name; when specified, this parameter is used
2843                         for result publication in the study. Otherwise, if automatic
2844                         publication is switched on, default value is used for result name.
2845
2846             Returns:
2847                 New GEOM.GEOM_Object, containing the created sphere.
2848             """
2849             # Example: see GEOM_TestAll.py
2850             point = self.MakeVertex(x, y, z)
2851             # note: auto-publishing is done in self.MakeSpherePntR()
2852             anObj = self.MakeSpherePntR(point, theR, theName)
2853             return anObj
2854
2855         ## Create a sphere with given radius at the origin of coordinate system.
2856         #  @param theR Sphere radius.
2857         #  @param theName Object name; when specified, this parameter is used
2858         #         for result publication in the study. Otherwise, if automatic
2859         #         publication is switched on, default value is used for result name.
2860         #
2861         #  @return New GEOM.GEOM_Object, containing the created sphere.
2862         #
2863         #  @ref tui_creation_sphere "Example"
2864         def MakeSphereR(self, theR, theName=None):
2865             """
2866             Create a sphere with given radius at the origin of coordinate system.
2867
2868             Parameters: 
2869                 theR Sphere radius.
2870                 theName Object name; when specified, this parameter is used
2871                         for result publication in the study. Otherwise, if automatic
2872                         publication is switched on, default value is used for result name.
2873
2874             Returns:
2875                 New GEOM.GEOM_Object, containing the created sphere.            
2876             """
2877             # Example: see GEOM_TestAll.py
2878             theR,Parameters = ParseParameters(theR)
2879             anObj = self.PrimOp.MakeSphereR(theR)
2880             RaiseIfFailed("MakeSphereR", self.PrimOp)
2881             anObj.SetParameters(Parameters)
2882             self._autoPublish(anObj, theName, "sphere")
2883             return anObj
2884
2885         ## Create a cone with given base point, axis, height and radiuses.
2886         #  @param thePnt Central point of the first cone base.
2887         #  @param theAxis Cone axis.
2888         #  @param theR1 Radius of the first cone base.
2889         #  @param theR2 Radius of the second cone base.
2890         #    \note If both radiuses are non-zero, the cone will be truncated.
2891         #    \note If the radiuses are equal, a cylinder will be created instead.
2892         #  @param theH Cone height.
2893         #  @param theName Object name; when specified, this parameter is used
2894         #         for result publication in the study. Otherwise, if automatic
2895         #         publication is switched on, default value is used for result name.
2896         #
2897         #  @return New GEOM.GEOM_Object, containing the created cone.
2898         #
2899         #  @ref tui_creation_cone "Example"
2900         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2901             """
2902             Create a cone with given base point, axis, height and radiuses.
2903
2904             Parameters: 
2905                 thePnt Central point of the first cone base.
2906                 theAxis Cone axis.
2907                 theR1 Radius of the first cone base.
2908                 theR2 Radius of the second cone base.
2909                 theH Cone height.
2910                 theName Object name; when specified, this parameter is used
2911                         for result publication in the study. Otherwise, if automatic
2912                         publication is switched on, default value is used for result name.
2913
2914             Note:
2915                 If both radiuses are non-zero, the cone will be truncated.
2916                 If the radiuses are equal, a cylinder will be created instead.
2917
2918             Returns:
2919                 New GEOM.GEOM_Object, containing the created cone.
2920             """
2921             # Example: see GEOM_TestAll.py
2922             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2923             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2924             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2925             anObj.SetParameters(Parameters)
2926             self._autoPublish(anObj, theName, "cone")
2927             return anObj
2928
2929         ## Create a cone with given height and radiuses at
2930         #  the origin of coordinate system. Axis of the cone will
2931         #  be collinear to the OZ axis of the coordinate system.
2932         #  @param theR1 Radius of the first cone base.
2933         #  @param theR2 Radius of the second cone base.
2934         #    \note If both radiuses are non-zero, the cone will be truncated.
2935         #    \note If the radiuses are equal, a cylinder will be created instead.
2936         #  @param theH Cone height.
2937         #  @param theName Object name; when specified, this parameter is used
2938         #         for result publication in the study. Otherwise, if automatic
2939         #         publication is switched on, default value is used for result name.
2940         #
2941         #  @return New GEOM.GEOM_Object, containing the created cone.
2942         #
2943         #  @ref tui_creation_cone "Example"
2944         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
2945             """
2946             Create a cone with given height and radiuses at
2947             the origin of coordinate system. Axis of the cone will
2948             be collinear to the OZ axis of the coordinate system.
2949
2950             Parameters: 
2951                 theR1 Radius of the first cone base.
2952                 theR2 Radius of the second cone base.
2953                 theH Cone height.
2954                 theName Object name; when specified, this parameter is used
2955                         for result publication in the study. Otherwise, if automatic
2956                         publication is switched on, default value is used for result name.
2957
2958             Note:
2959                 If both radiuses are non-zero, the cone will be truncated.
2960                 If the radiuses are equal, a cylinder will be created instead.
2961
2962             Returns:
2963                 New GEOM.GEOM_Object, containing the created cone.
2964             """
2965             # Example: see GEOM_TestAll.py
2966             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2967             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
2968             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
2969             anObj.SetParameters(Parameters)
2970             self._autoPublish(anObj, theName, "cone")
2971             return anObj
2972
2973         ## Create a torus with given center, normal vector and radiuses.
2974         #  @param thePnt Torus central point.
2975         #  @param theVec Torus axis of symmetry.
2976         #  @param theRMajor Torus major radius.
2977         #  @param theRMinor Torus minor radius.
2978         #  @param theName Object name; when specified, this parameter is used
2979         #         for result publication in the study. Otherwise, if automatic
2980         #         publication is switched on, default value is used for result name.
2981         #
2982         #  @return New GEOM.GEOM_Object, containing the created torus.
2983         #
2984         #  @ref tui_creation_torus "Example"
2985         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
2986             """
2987             Create a torus with given center, normal vector and radiuses.
2988
2989             Parameters: 
2990                 thePnt Torus central point.
2991                 theVec Torus axis of symmetry.
2992                 theRMajor Torus major radius.
2993                 theRMinor Torus minor radius.
2994                 theName Object name; when specified, this parameter is used
2995                         for result publication in the study. Otherwise, if automatic
2996                         publication is switched on, default value is used for result name.
2997
2998            Returns:
2999                 New GEOM.GEOM_Object, containing the created torus.
3000             """
3001             # Example: see GEOM_TestAll.py
3002             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3003             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3004             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3005             anObj.SetParameters(Parameters)
3006             self._autoPublish(anObj, theName, "torus")
3007             return anObj
3008
3009         ## Create a torus with given radiuses at the origin of coordinate system.
3010         #  @param theRMajor Torus major radius.
3011         #  @param theRMinor Torus minor radius.
3012         #  @param theName Object name; when specified, this parameter is used
3013         #         for result publication in the study. Otherwise, if automatic
3014         #         publication is switched on, default value is used for result name.
3015         #
3016         #  @return New GEOM.GEOM_Object, containing the created torus.
3017         #
3018         #  @ref tui_creation_torus "Example"
3019         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3020             """
3021            Create a torus with given radiuses at the origin of coordinate system.
3022
3023            Parameters: 
3024                 theRMajor Torus major radius.
3025                 theRMinor Torus minor radius.
3026                 theName Object name; when specified, this parameter is used
3027                         for result publication in the study. Otherwise, if automatic
3028                         publication is switched on, default value is used for result name.
3029
3030            Returns:
3031                 New GEOM.GEOM_Object, containing the created torus.            
3032             """
3033             # Example: see GEOM_TestAll.py
3034             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3035             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3036             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3037             anObj.SetParameters(Parameters)
3038             self._autoPublish(anObj, theName, "torus")
3039             return anObj
3040
3041         # end of l3_3d_primitives
3042         ## @}
3043
3044         ## @addtogroup l3_complex
3045         ## @{
3046
3047         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3048         #  @param theBase Base shape to be extruded.
3049         #  @param thePoint1 First end of extrusion vector.
3050         #  @param thePoint2 Second end of extrusion vector.
3051         #  @param theScaleFactor Use it to make prism with scaled second base.
3052         #                        Nagative value means not scaled second base.
3053         #  @param theName Object name; when specified, this parameter is used
3054         #         for result publication in the study. Otherwise, if automatic
3055         #         publication is switched on, default value is used for result name.
3056         #
3057         #  @return New GEOM.GEOM_Object, containing the created prism.
3058         #
3059         #  @ref tui_creation_prism "Example"
3060         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3061             """
3062             Create a shape by extrusion of the base shape along a vector, defined by two points.
3063
3064             Parameters: 
3065                 theBase Base shape to be extruded.
3066                 thePoint1 First end of extrusion vector.
3067                 thePoint2 Second end of extrusion vector.
3068                 theScaleFactor Use it to make prism with scaled second base.
3069                                Nagative value means not scaled second base.
3070                 theName Object name; when specified, this parameter is used
3071                         for result publication in the study. Otherwise, if automatic
3072                         publication is switched on, default value is used for result name.
3073
3074             Returns:
3075                 New GEOM.GEOM_Object, containing the created prism.
3076             """
3077             # Example: see GEOM_TestAll.py
3078             anObj = None
3079             Parameters = ""
3080             if theScaleFactor > 0:
3081                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3082                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3083             else:
3084                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3085             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3086             anObj.SetParameters(Parameters)
3087             self._autoPublish(anObj, theName, "prism")
3088             return anObj
3089
3090         ## Create a shape by extrusion of the base shape along a
3091         #  vector, defined by two points, in 2 Ways (forward/backward).
3092         #  @param theBase Base shape to be extruded.
3093         #  @param thePoint1 First end of extrusion vector.
3094         #  @param thePoint2 Second end of extrusion vector.
3095         #  @param theName Object name; when specified, this parameter is used
3096         #         for result publication in the study. Otherwise, if automatic
3097         #         publication is switched on, default value is used for result name.
3098         #
3099         #  @return New GEOM.GEOM_Object, containing the created prism.
3100         #
3101         #  @ref tui_creation_prism "Example"
3102         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3103             """
3104             Create a shape by extrusion of the base shape along a
3105             vector, defined by two points, in 2 Ways (forward/backward).
3106
3107             Parameters: 
3108                 theBase Base shape to be extruded.
3109                 thePoint1 First end of extrusion vector.
3110                 thePoint2 Second end of extrusion vector.
3111                 theName Object name; when specified, this parameter is used
3112                         for result publication in the study. Otherwise, if automatic
3113                         publication is switched on, default value is used for result name.
3114
3115             Returns:
3116                 New GEOM.GEOM_Object, containing the created prism.
3117             """
3118             # Example: see GEOM_TestAll.py
3119             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3120             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3121             self._autoPublish(anObj, theName, "prism")
3122             return anObj
3123
3124         ## Create a shape by extrusion of the base shape along the vector,
3125         #  i.e. all the space, transfixed by the base shape during its translation
3126         #  along the vector on the given distance.
3127         #  @param theBase Base shape to be extruded.
3128         #  @param theVec Direction of extrusion.
3129         #  @param theH Prism dimension along theVec.
3130         #  @param theScaleFactor Use it to make prism with scaled second base.
3131         #                        Negative value means not scaled second base.
3132         #  @param theName Object name; when specified, this parameter is used
3133         #         for result publication in the study. Otherwise, if automatic
3134         #         publication is switched on, default value is used for result name.
3135         #
3136         #  @return New GEOM.GEOM_Object, containing the created prism.
3137         #
3138         #  @ref tui_creation_prism "Example"
3139         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3140             """
3141             Create a shape by extrusion of the base shape along the vector,
3142             i.e. all the space, transfixed by the base shape during its translation
3143             along the vector on the given distance.
3144
3145             Parameters: 
3146                 theBase Base shape to be extruded.
3147                 theVec Direction of extrusion.
3148                 theH Prism dimension along theVec.
3149                 theScaleFactor Use it to make prism with scaled second base.
3150                                Negative value means not scaled second base.
3151                 theName Object name; when specified, this parameter is used
3152                         for result publication in the study. Otherwise, if automatic
3153                         publication is switched on, default value is used for result name.
3154
3155             Returns:
3156                 New GEOM.GEOM_Object, containing the created prism.
3157             """
3158             # Example: see GEOM_TestAll.py
3159             anObj = None
3160             Parameters = ""
3161             if theScaleFactor > 0:
3162                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3163                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3164             else:
3165                 theH,Parameters = ParseParameters(theH)
3166                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3167             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3168             anObj.SetParameters(Parameters)
3169             self._autoPublish(anObj, theName, "prism")
3170             return anObj
3171
3172         ## Create a shape by extrusion of the base shape along the vector,
3173         #  i.e. all the space, transfixed by the base shape during its translation
3174         #  along the vector on the given distance in 2 Ways (forward/backward).
3175         #  @param theBase Base shape to be extruded.
3176         #  @param theVec Direction of extrusion.
3177         #  @param theH Prism dimension along theVec in forward direction.
3178         #  @param theName Object name; when specified, this parameter is used
3179         #         for result publication in the study. Otherwise, if automatic
3180         #         publication is switched on, default value is used for result name.
3181         #
3182         #  @return New GEOM.GEOM_Object, containing the created prism.
3183         #
3184         #  @ref tui_creation_prism "Example"
3185         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3186             """
3187             Create a shape by extrusion of the base shape along the vector,
3188             i.e. all the space, transfixed by the base shape during its translation
3189             along the vector on the given distance in 2 Ways (forward/backward).
3190
3191             Parameters:
3192                 theBase Base shape to be extruded.
3193                 theVec Direction of extrusion.
3194                 theH Prism dimension along theVec in forward direction.
3195                 theName Object name; when specified, this parameter is used
3196                         for result publication in the study. Otherwise, if automatic
3197                         publication is switched on, default value is used for result name.
3198
3199             Returns:
3200                 New GEOM.GEOM_Object, containing the created prism.
3201             """
3202             # Example: see GEOM_TestAll.py
3203             theH,Parameters = ParseParameters(theH)
3204             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3205             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3206             anObj.SetParameters(Parameters)
3207             self._autoPublish(anObj, theName, "prism")
3208             return anObj
3209
3210         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3211         #  @param theBase Base shape to be extruded.
3212         #  @param theDX, theDY, theDZ Directions of extrusion.
3213         #  @param theScaleFactor Use it to make prism with scaled second base.
3214         #                        Nagative value means not scaled second base.
3215         #  @param theName Object name; when specified, this parameter is used
3216         #         for result publication in the study. Otherwise, if automatic
3217         #         publication is switched on, default value is used for result name.
3218         #
3219         #  @return New GEOM.GEOM_Object, containing the created prism.
3220         #
3221         #  @ref tui_creation_prism "Example"
3222         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3223             """
3224             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3225
3226             Parameters:
3227                 theBase Base shape to be extruded.
3228                 theDX, theDY, theDZ Directions of extrusion.
3229                 theScaleFactor Use it to make prism with scaled second base.
3230                                Nagative value means not scaled second base.
3231                 theName Object name; when specified, this parameter is used
3232                         for result publication in the study. Otherwise, if automatic
3233                         publication is switched on, default value is used for result name.
3234
3235             Returns: 
3236                 New GEOM.GEOM_Object, containing the created prism.
3237             """
3238             # Example: see GEOM_TestAll.py
3239             anObj = None
3240             Parameters = ""
3241             if theScaleFactor > 0:
3242                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3243                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3244             else:
3245                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3246                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3247             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3248             anObj.SetParameters(Parameters)
3249             self._autoPublish(anObj, theName, "prism")
3250             return anObj
3251
3252         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3253         #  i.e. all the space, transfixed by the base shape during its translation
3254         #  along the vector on the given distance in 2 Ways (forward/backward).
3255         #  @param theBase Base shape to be extruded.
3256         #  @param theDX, theDY, theDZ Directions of extrusion.
3257         #  @param theName Object name; when specified, this parameter is used
3258         #         for result publication in the study. Otherwise, if automatic
3259         #         publication is switched on, default value is used for result name.
3260         #
3261         #  @return New GEOM.GEOM_Object, containing the created prism.
3262         #
3263         #  @ref tui_creation_prism "Example"
3264         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3265             """
3266             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3267             i.e. all the space, transfixed by the base shape during its translation
3268             along the vector on the given distance in 2 Ways (forward/backward).
3269
3270             Parameters:
3271                 theBase Base shape to be extruded.
3272                 theDX, theDY, theDZ Directions of extrusion.
3273                 theName Object name; when specified, this parameter is used
3274                         for result publication in the study. Otherwise, if automatic
3275                         publication is switched on, default value is used for result name.
3276
3277             Returns:
3278                 New GEOM.GEOM_Object, containing the created prism.
3279             """
3280             # Example: see GEOM_TestAll.py
3281             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3282             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3283             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3284             anObj.SetParameters(Parameters)
3285             self._autoPublish(anObj, theName, "prism")
3286             return anObj
3287
3288         ## Create a shape by revolution of the base shape around the axis
3289         #  on the given angle, i.e. all the space, transfixed by the base
3290         #  shape during its rotation around the axis on the given angle.
3291         #  @param theBase Base shape to be rotated.
3292         #  @param theAxis Rotation axis.
3293         #  @param theAngle Rotation angle in radians.
3294         #  @param theName Object name; when specified, this parameter is used
3295         #         for result publication in the study. Otherwise, if automatic
3296         #         publication is switched on, default value is used for result name.
3297         #
3298         #  @return New GEOM.GEOM_Object, containing the created revolution.
3299         #
3300         #  @ref tui_creation_revolution "Example"
3301         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3302             """
3303             Create a shape by revolution of the base shape around the axis
3304             on the given angle, i.e. all the space, transfixed by the base
3305             shape during its rotation around the axis on the given angle.
3306
3307             Parameters:
3308                 theBase Base shape to be rotated.
3309                 theAxis Rotation axis.
3310                 theAngle Rotation angle in radians.
3311                 theName Object name; when specified, this parameter is used
3312                         for result publication in the study. Otherwise, if automatic
3313                         publication is switched on, default value is used for result name.
3314
3315             Returns: 
3316                 New GEOM.GEOM_Object, containing the created revolution.
3317             """
3318             # Example: see GEOM_TestAll.py
3319             theAngle,Parameters = ParseParameters(theAngle)
3320             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3321             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3322             anObj.SetParameters(Parameters)
3323             self._autoPublish(anObj, theName, "revolution")
3324             return anObj
3325
3326         ## Create a shape by revolution of the base shape around the axis
3327         #  on the given angle, i.e. all the space, transfixed by the base
3328         #  shape during its rotation around the axis on the given angle in
3329         #  both directions (forward/backward)
3330         #  @param theBase Base shape to be rotated.
3331         #  @param theAxis Rotation axis.
3332         #  @param theAngle Rotation angle in radians.
3333         #  @param theName Object name; when specified, this parameter is used
3334         #         for result publication in the study. Otherwise, if automatic
3335         #         publication is switched on, default value is used for result name.
3336         #
3337         #  @return New GEOM.GEOM_Object, containing the created revolution.
3338         #
3339         #  @ref tui_creation_revolution "Example"
3340         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3341             """
3342             Create a shape by revolution of the base shape around the axis
3343             on the given angle, i.e. all the space, transfixed by the base
3344             shape during its rotation around the axis on the given angle in
3345             both directions (forward/backward).
3346
3347             Parameters:
3348                 theBase Base shape to be rotated.
3349                 theAxis Rotation axis.
3350                 theAngle Rotation angle in radians.
3351                 theName Object name; when specified, this parameter is used
3352                         for result publication in the study. Otherwise, if automatic
3353                         publication is switched on, default value is used for result name.
3354
3355             Returns: 
3356                 New GEOM.GEOM_Object, containing the created revolution.
3357             """
3358             theAngle,Parameters = ParseParameters(theAngle)
3359             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3360             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3361             anObj.SetParameters(Parameters)
3362             self._autoPublish(anObj, theName, "revolution")
3363             return anObj
3364
3365         ## Create a filling from the given compound of contours.
3366         #  @param theShape the compound of contours
3367         #  @param theMinDeg a minimal degree of BSpline surface to create
3368         #  @param theMaxDeg a maximal degree of BSpline surface to create
3369         #  @param theTol2D a 2d tolerance to be reached
3370         #  @param theTol3D a 3d tolerance to be reached
3371         #  @param theNbIter a number of iteration of approximation algorithm
3372         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3373         #  @param isApprox if True, BSpline curves are generated in the process
3374         #                  of surface construction. By default it is False, that means
3375         #                  the surface is created using given curves. The usage of
3376         #                  Approximation makes the algorithm work slower, but allows
3377         #                  building the surface for rather complex cases.
3378         #  @param theName Object name; when specified, this parameter is used
3379         #         for result publication in the study. Otherwise, if automatic
3380         #         publication is switched on, default value is used for result name.
3381         #
3382         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3383         #
3384         #  @ref tui_creation_filling "Example"
3385         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3386                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3387             """
3388             Create a filling from the given compound of contours.
3389
3390             Parameters:
3391                 theShape the compound of contours
3392                 theMinDeg a minimal degree of BSpline surface to create
3393                 theMaxDeg a maximal degree of BSpline surface to create
3394                 theTol2D a 2d tolerance to be reached
3395                 theTol3D a 3d tolerance to be reached
3396                 theNbIter a number of iteration of approximation algorithm
3397                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3398                 isApprox if True, BSpline curves are generated in the process
3399                          of surface construction. By default it is False, that means
3400                          the surface is created using given curves. The usage of
3401                          Approximation makes the algorithm work slower, but allows
3402                          building the surface for rather complex cases
3403                 theName Object name; when specified, this parameter is used
3404                         for result publication in the study. Otherwise, if automatic
3405                         publication is switched on, default value is used for result name.
3406
3407             Returns: 
3408                 New GEOM.GEOM_Object, containing the created filling surface.
3409
3410             Example of usage:
3411                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3412             """
3413             # Example: see GEOM_TestAll.py
3414             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3415             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3416                                             theTol2D, theTol3D, theNbIter,
3417                                             theMethod, isApprox)
3418             RaiseIfFailed("MakeFilling", self.PrimOp)
3419             anObj.SetParameters(Parameters)
3420             self._autoPublish(anObj, theName, "filling")
3421             return anObj
3422
3423
3424         ## Create a filling from the given compound of contours.
3425         #  This method corresponds to MakeFilling with isApprox=True
3426         #  @param theShape the compound of contours
3427         #  @param theMinDeg a minimal degree of BSpline surface to create
3428         #  @param theMaxDeg a maximal degree of BSpline surface to create
3429         #  @param theTol3D a 3d tolerance to be reached
3430         #  @param theName Object name; when specified, this parameter is used
3431         #         for result publication in the study. Otherwise, if automatic
3432         #         publication is switched on, default value is used for result name.
3433         #
3434         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3435         #
3436         #  @ref tui_creation_filling "Example"
3437         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3438             """
3439             Create a filling from the given compound of contours.
3440             This method corresponds to MakeFilling with isApprox=True
3441
3442             Parameters:
3443                 theShape the compound of contours
3444                 theMinDeg a minimal degree of BSpline surface to create
3445                 theMaxDeg a maximal degree of BSpline surface to create
3446                 theTol3D a 3d tolerance to be reached
3447                 theName Object name; when specified, this parameter is used
3448                         for result publication in the study. Otherwise, if automatic
3449                         publication is switched on, default value is used for result name.
3450
3451             Returns: 
3452                 New GEOM.GEOM_Object, containing the created filling surface.
3453
3454             Example of usage:
3455                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3456             """
3457             # Example: see GEOM_TestAll.py
3458             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3459             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3460                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3461             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3462             anObj.SetParameters(Parameters)
3463             self._autoPublish(anObj, theName, "filling")
3464             return anObj
3465
3466         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3467         #  @param theSeqSections - set of specified sections.
3468         #  @param theModeSolid - mode defining building solid or shell
3469         #  @param thePreci - precision 3D used for smoothing
3470         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3471         #  @param theName Object name; when specified, this parameter is used
3472         #         for result publication in the study. Otherwise, if automatic
3473         #         publication is switched on, default value is used for result name.
3474         #
3475         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3476         #
3477         #  @ref swig_todo "Example"
3478         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3479             """
3480             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3481
3482             Parameters:
3483                 theSeqSections - set of specified sections.
3484                 theModeSolid - mode defining building solid or shell
3485                 thePreci - precision 3D used for smoothing
3486                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3487                 theName Object name; when specified, this parameter is used
3488                         for result publication in the study. Otherwise, if automatic
3489                         publication is switched on, default value is used for result name.
3490
3491             Returns:
3492                 New GEOM.GEOM_Object, containing the created shell or solid.
3493             """
3494             # Example: see GEOM_TestAll.py
3495             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3496             RaiseIfFailed("MakeThruSections", self.PrimOp)
3497             self._autoPublish(anObj, theName, "filling")
3498             return anObj
3499
3500         ## Create a shape by extrusion of the base shape along
3501         #  the path shape. The path shape can be a wire or an edge.
3502         #  @param theBase Base shape to be extruded.
3503         #  @param thePath Path shape to extrude the base shape along it.
3504         #  @param theName Object name; when specified, this parameter is used
3505         #         for result publication in the study. Otherwise, if automatic
3506         #         publication is switched on, default value is used for result name.
3507         #
3508         #  @return New GEOM.GEOM_Object, containing the created pipe.
3509         #
3510         #  @ref tui_creation_pipe "Example"
3511         def MakePipe(self, theBase, thePath, theName=None):
3512             """
3513             Create a shape by extrusion of the base shape along
3514             the path shape. The path shape can be a wire or an edge.
3515
3516             Parameters:
3517                 theBase Base shape to be extruded.
3518                 thePath Path shape to extrude the base shape along it.
3519                 theName Object name; when specified, this parameter is used
3520                         for result publication in the study. Otherwise, if automatic
3521                         publication is switched on, default value is used for result name.
3522
3523             Returns:
3524                 New GEOM.GEOM_Object, containing the created pipe.
3525             """
3526             # Example: see GEOM_TestAll.py
3527             anObj = self.PrimOp.MakePipe(theBase, thePath)
3528             RaiseIfFailed("MakePipe", self.PrimOp)
3529             self._autoPublish(anObj, theName, "pipe")
3530             return anObj
3531
3532         ## Create a shape by extrusion of the profile shape along
3533         #  the path shape. The path shape can be a wire or an edge.
3534         #  the several profiles can be specified in the several locations of path.
3535         #  @param theSeqBases - list of  Bases shape to be extruded.
3536         #  @param theLocations - list of locations on the path corresponding
3537         #                        specified list of the Bases shapes. Number of locations
3538         #                        should be equal to number of bases or list of locations can be empty.
3539         #  @param thePath - Path shape to extrude the base shape along it.
3540         #  @param theWithContact - the mode defining that the section is translated to be in
3541         #                          contact with the spine.
3542         #  @param theWithCorrection - defining that the section is rotated to be
3543         #                             orthogonal to the spine tangent in the correspondent point
3544         #  @param theName Object name; when specified, this parameter is used
3545         #         for result publication in the study. Otherwise, if automatic
3546         #         publication is switched on, default value is used for result name.
3547         #
3548         #  @return New GEOM.GEOM_Object, containing the created pipe.
3549         #
3550         #  @ref tui_creation_pipe_with_diff_sec "Example"
3551         def MakePipeWithDifferentSections(self, theSeqBases,
3552                                           theLocations, thePath,
3553                                           theWithContact, theWithCorrection, theName=None):
3554             """
3555             Create a shape by extrusion of the profile shape along
3556             the path shape. The path shape can be a wire or an edge.
3557             the several profiles can be specified in the several locations of path.
3558
3559             Parameters:
3560                 theSeqBases - list of  Bases shape to be extruded.
3561                 theLocations - list of locations on the path corresponding
3562                                specified list of the Bases shapes. Number of locations
3563                                should be equal to number of bases or list of locations can be empty.
3564                 thePath - Path shape to extrude the base shape along it.
3565                 theWithContact - the mode defining that the section is translated to be in
3566                                  contact with the spine(0/1)
3567                 theWithCorrection - defining that the section is rotated to be
3568                                     orthogonal to the spine tangent in the correspondent point (0/1)
3569                 theName Object name; when specified, this parameter is used
3570                         for result publication in the study. Otherwise, if automatic
3571                         publication is switched on, default value is used for result name.
3572
3573             Returns:
3574                 New GEOM.GEOM_Object, containing the created pipe.
3575             """
3576             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3577                                                               theLocations, thePath,
3578                                                               theWithContact, theWithCorrection)
3579             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3580             self._autoPublish(anObj, theName, "pipe")
3581             return anObj
3582
3583         ## Create a shape by extrusion of the profile shape along
3584         #  the path shape. The path shape can be a wire or a edge.
3585         #  the several profiles can be specified in the several locations of path.
3586         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3587         #                       shell or face. If number of faces in neighbour sections
3588         #                       aren't coincided result solid between such sections will
3589         #                       be created using external boundaries of this shells.
3590         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3591         #                          This list is used for searching correspondences between
3592         #                          faces in the sections. Size of this list must be equal
3593         #                          to size of list of base shapes.
3594         #  @param theLocations - list of locations on the path corresponding
3595         #                        specified list of the Bases shapes. Number of locations
3596         #                        should be equal to number of bases. First and last
3597         #                        locations must be coincided with first and last vertexes
3598         #                        of path correspondingly.
3599         #  @param thePath - Path shape to extrude the base shape along it.
3600         #  @param theWithContact - the mode defining that the section is translated to be in
3601         #                          contact with the spine.
3602         #  @param theWithCorrection - defining that the section is rotated to be
3603         #                             orthogonal to the spine tangent in the correspondent point
3604         #  @param theName Object name; when specified, this parameter is used
3605         #         for result publication in the study. Otherwise, if automatic
3606         #         publication is switched on, default value is used for result name.
3607         #
3608         #  @return New GEOM.GEOM_Object, containing the created solids.
3609         #
3610         #  @ref tui_creation_pipe_with_shell_sec "Example"
3611         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3612                                       theLocations, thePath,
3613                                       theWithContact, theWithCorrection, theName=None):
3614             """
3615             Create a shape by extrusion of the profile shape along
3616             the path shape. The path shape can be a wire or a edge.
3617             the several profiles can be specified in the several locations of path.
3618
3619             Parameters:
3620                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3621                               shell or face. If number of faces in neighbour sections
3622                               aren't coincided result solid between such sections will
3623                               be created using external boundaries of this shells.
3624                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3625                                  This list is used for searching correspondences between
3626                                  faces in the sections. Size of this list must be equal
3627                                  to size of list of base shapes.
3628                 theLocations - list of locations on the path corresponding
3629                                specified list of the Bases shapes. Number of locations
3630                                should be equal to number of bases. First and last
3631                                locations must be coincided with first and last vertexes
3632                                of path correspondingly.
3633                 thePath - Path shape to extrude the base shape along it.
3634                 theWithContact - the mode defining that the section is translated to be in
3635                                  contact with the spine (0/1)
3636                 theWithCorrection - defining that the section is rotated to be
3637                                     orthogonal to the spine tangent in the correspondent point (0/1)
3638                 theName Object name; when specified, this parameter is used
3639                         for result publication in the study. Otherwise, if automatic
3640                         publication is switched on, default value is used for result name.
3641
3642             Returns:                           
3643                 New GEOM.GEOM_Object, containing the created solids.
3644             """
3645             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3646                                                           theLocations, thePath,
3647                                                           theWithContact, theWithCorrection)
3648             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3649             self._autoPublish(anObj, theName, "pipe")
3650             return anObj
3651
3652         ## Create a shape by extrusion of the profile shape along
3653         #  the path shape. This function is used only for debug pipe
3654         #  functionality - it is a version of function MakePipeWithShellSections()
3655         #  which give a possibility to recieve information about
3656         #  creating pipe between each pair of sections step by step.
3657         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3658                                              theLocations, thePath,
3659                                              theWithContact, theWithCorrection, theName=None):
3660             """
3661             Create a shape by extrusion of the profile shape along
3662             the path shape. This function is used only for debug pipe
3663             functionality - it is a version of previous function
3664             geompy.MakePipeWithShellSections() which give a possibility to
3665             recieve information about creating pipe between each pair of
3666             sections step by step.
3667             """
3668             res = []
3669             nbsect = len(theSeqBases)
3670             nbsubsect = len(theSeqSubBases)
3671             #print "nbsect = ",nbsect
3672             for i in range(1,nbsect):
3673                 #print "  i = ",i
3674                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3675                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3676                 tmpSeqSubBases = []
3677                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3678                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3679                                                               tmpLocations, thePath,
3680                                                               theWithContact, theWithCorrection)
3681                 if self.PrimOp.IsDone() == 0:
3682                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3683                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3684                     break
3685                 else:
3686                     print "Pipe between ",i," and ",i+1," sections is OK"
3687                     res.append(anObj)
3688                     pass
3689                 pass
3690
3691             resc = self.MakeCompound(res)
3692             #resc = self.MakeSewing(res, 0.001)
3693             #print "resc: ",resc
3694             self._autoPublish(resc, theName, "pipe")
3695             return resc
3696
3697         ## Create solids between given sections
3698         #  @param theSeqBases - list of sections (shell or face).
3699         #  @param theLocations - list of corresponding vertexes
3700         #  @param theName Object name; when specified, this parameter is used
3701         #         for result publication in the study. Otherwise, if automatic
3702         #         publication is switched on, default value is used for result name.
3703         #
3704         #  @return New GEOM.GEOM_Object, containing the created solids.
3705         #
3706         #  @ref tui_creation_pipe_without_path "Example"
3707         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3708             """
3709             Create solids between given sections
3710
3711             Parameters:
3712                 theSeqBases - list of sections (shell or face).
3713                 theLocations - list of corresponding vertexes
3714                 theName Object name; when specified, this parameter is used
3715                         for result publication in the study. Otherwise, if automatic
3716                         publication is switched on, default value is used for result name.
3717
3718             Returns:
3719                 New GEOM.GEOM_Object, containing the created solids.
3720             """
3721             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3722             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3723             self._autoPublish(anObj, theName, "pipe")
3724             return anObj
3725
3726         ## Create a shape by extrusion of the base shape along
3727         #  the path shape with constant bi-normal direction along the given vector.
3728         #  The path shape can be a wire or an edge.
3729         #  @param theBase Base shape to be extruded.
3730         #  @param thePath Path shape to extrude the base shape along it.
3731         #  @param theVec Vector defines a constant binormal direction to keep the
3732         #                same angle beetween the direction and the sections
3733         #                along the sweep surface.
3734         #  @param theName Object name; when specified, this parameter is used
3735         #         for result publication in the study. Otherwise, if automatic
3736         #         publication is switched on, default value is used for result name.
3737         #
3738         #  @return New GEOM.GEOM_Object, containing the created pipe.
3739         #
3740         #  @ref tui_creation_pipe "Example"
3741         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3742             """
3743             Create a shape by extrusion of the base shape along
3744             the path shape with constant bi-normal direction along the given vector.
3745             The path shape can be a wire or an edge.
3746
3747             Parameters:
3748                 theBase Base shape to be extruded.
3749                 thePath Path shape to extrude the base shape along it.
3750                 theVec Vector defines a constant binormal direction to keep the
3751                        same angle beetween the direction and the sections
3752                        along the sweep surface.
3753                 theName Object name; when specified, this parameter is used
3754                         for result publication in the study. Otherwise, if automatic
3755                         publication is switched on, default value is used for result name.
3756
3757             Returns:              
3758                 New GEOM.GEOM_Object, containing the created pipe.
3759             """
3760             # Example: see GEOM_TestAll.py
3761             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3762             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3763             self._autoPublish(anObj, theName, "pipe")
3764             return anObj
3765               
3766         ## Makes a thick solid from a face or a shell
3767         #  @param theShape Face or Shell to be thicken
3768         #  @param theThickness Thickness of the resulting solid
3769         #  @param theName Object name; when specified, this parameter is used
3770         #         for result publication in the study. Otherwise, if automatic
3771         #         publication is switched on, default value is used for result name.
3772         #
3773         #  @return New GEOM.GEOM_Object, containing the created solid
3774         #
3775         def MakeThickSolid(self, theShape, theThickness, theName=None):
3776             """
3777             Make a thick solid from a face or a shell
3778
3779             Parameters:
3780                  theShape Face or Shell to be thicken
3781                  theThickness Thickness of the resulting solid
3782                  theName Object name; when specified, this parameter is used
3783                  for result publication in the study. Otherwise, if automatic
3784                  publication is switched on, default value is used for result name.
3785                  
3786             Returns:
3787                 New GEOM.GEOM_Object, containing the created solid
3788             """
3789             # Example: see GEOM_TestAll.py
3790             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3791             RaiseIfFailed("MakeThickening", self.PrimOp)
3792             self._autoPublish(anObj, theName, "pipe")
3793             return anObj
3794             
3795
3796         ## Modifies a face or a shell to make it a thick solid
3797         #  @param theShape Face or Shell to be thicken
3798         #  @param theThickness Thickness of the resulting solid
3799         #
3800         #  @return The modified shape
3801         #
3802         def Thicken(self, theShape, theThickness):
3803             """
3804             Modifies a face or a shell to make it a thick solid
3805
3806             Parameters:
3807                 theBase Base shape to be extruded.
3808                 thePath Path shape to extrude the base shape along it.
3809                 theName Object name; when specified, this parameter is used
3810                         for result publication in the study. Otherwise, if automatic
3811                         publication is switched on, default value is used for result name.
3812
3813             Returns:
3814                 The modified shape
3815             """
3816             # Example: see GEOM_TestAll.py
3817             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3818             RaiseIfFailed("MakeThickening", self.PrimOp)
3819             return anObj
3820
3821         ## Build a middle path of a pipe-like shape.
3822         #  The path shape can be a wire or an edge.
3823         #  @param theShape It can be closed or unclosed pipe-like shell
3824         #                  or a pipe-like solid.
3825         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3826         #                            should be wires or faces of theShape.
3827         #  @param theName Object name; when specified, this parameter is used
3828         #         for result publication in the study. Otherwise, if automatic
3829         #         publication is switched on, default value is used for result name.
3830         #
3831         #  @note It is not assumed that exact or approximate copy of theShape
3832         #        can be obtained by applying existing Pipe operation on the
3833         #        resulting "Path" wire taking theBase1 as the base - it is not
3834         #        always possible; though in some particular cases it might work
3835         #        it is not guaranteed. Thus, RestorePath function should not be
3836         #        considered as an exact reverse operation of the Pipe.
3837         #
3838         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3839         #                                source pipe's "path".
3840         #
3841         #  @ref tui_creation_pipe_path "Example"
3842         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3843             """
3844             Build a middle path of a pipe-like shape.
3845             The path shape can be a wire or an edge.
3846
3847             Parameters:
3848                 theShape It can be closed or unclosed pipe-like shell
3849                          or a pipe-like solid.
3850                 theBase1, theBase2 Two bases of the supposed pipe. This
3851                                    should be wires or faces of theShape.
3852                 theName Object name; when specified, this parameter is used
3853                         for result publication in the study. Otherwise, if automatic
3854                         publication is switched on, default value is used for result name.
3855
3856             Returns:
3857                 New GEOM_Object, containing an edge or wire that represent
3858                                  source pipe's path.
3859             """
3860             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3861             RaiseIfFailed("RestorePath", self.PrimOp)
3862             self._autoPublish(anObj, theName, "path")
3863             return anObj
3864
3865         ## Build a middle path of a pipe-like shape.
3866         #  The path shape can be a wire or an edge.
3867         #  @param theShape It can be closed or unclosed pipe-like shell
3868         #                  or a pipe-like solid.
3869         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3870         #                                should be lists of edges of theShape.
3871         #  @param theName Object name; when specified, this parameter is used
3872         #         for result publication in the study. Otherwise, if automatic
3873         #         publication is switched on, default value is used for result name.
3874         #
3875         #  @note It is not assumed that exact or approximate copy of theShape
3876         #        can be obtained by applying existing Pipe operation on the
3877         #        resulting "Path" wire taking theBase1 as the base - it is not
3878         #        always possible; though in some particular cases it might work
3879         #        it is not guaranteed. Thus, RestorePath function should not be
3880         #        considered as an exact reverse operation of the Pipe.
3881         #
3882         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3883         #                                source pipe's "path".
3884         #
3885         #  @ref tui_creation_pipe_path "Example"
3886         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3887             """
3888             Build a middle path of a pipe-like shape.
3889             The path shape can be a wire or an edge.
3890
3891             Parameters:
3892                 theShape It can be closed or unclosed pipe-like shell
3893                          or a pipe-like solid.
3894                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3895                                        should be lists of edges of theShape.
3896                 theName Object name; when specified, this parameter is used
3897                         for result publication in the study. Otherwise, if automatic
3898                         publication is switched on, default value is used for result name.
3899
3900             Returns:
3901                 New GEOM_Object, containing an edge or wire that represent
3902                                  source pipe's path.
3903             """
3904             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3905             RaiseIfFailed("RestorePath", self.PrimOp)
3906             self._autoPublish(anObj, theName, "path")
3907             return anObj
3908
3909         # end of l3_complex
3910         ## @}
3911
3912         ## @addtogroup l3_advanced
3913         ## @{
3914
3915         ## Create a linear edge with specified ends.
3916         #  @param thePnt1 Point for the first end of edge.
3917         #  @param thePnt2 Point for the second end of edge.
3918         #  @param theName Object name; when specified, this parameter is used
3919         #         for result publication in the study. Otherwise, if automatic
3920         #         publication is switched on, default value is used for result name.
3921         #
3922         #  @return New GEOM.GEOM_Object, containing the created edge.
3923         #
3924         #  @ref tui_creation_edge "Example"
3925         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3926             """
3927             Create a linear edge with specified ends.
3928
3929             Parameters:
3930                 thePnt1 Point for the first end of edge.
3931                 thePnt2 Point for the second end of edge.
3932                 theName Object name; when specified, this parameter is used
3933                         for result publication in the study. Otherwise, if automatic
3934                         publication is switched on, default value is used for result name.
3935
3936             Returns:           
3937                 New GEOM.GEOM_Object, containing the created edge.
3938             """
3939             # Example: see GEOM_TestAll.py
3940             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
3941             RaiseIfFailed("MakeEdge", self.ShapesOp)
3942             self._autoPublish(anObj, theName, "edge")
3943             return anObj
3944
3945         ## Create a new edge, corresponding to the given length on the given curve.
3946         #  @param theRefCurve The referenced curve (edge).
3947         #  @param theLength Length on the referenced curve. It can be negative.
3948         #  @param theStartPoint Any point can be selected for it, the new edge will begin
3949         #                       at the end of \a theRefCurve, close to the selected point.
3950         #                       If None, start from the first point of \a theRefCurve.
3951         #  @param theName Object name; when specified, this parameter is used
3952         #         for result publication in the study. Otherwise, if automatic
3953         #         publication is switched on, default value is used for result name.
3954         #
3955         #  @return New GEOM.GEOM_Object, containing the created edge.
3956         #
3957         #  @ref tui_creation_edge "Example"
3958         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
3959             """
3960             Create a new edge, corresponding to the given length on the given curve.
3961
3962             Parameters:
3963                 theRefCurve The referenced curve (edge).
3964                 theLength Length on the referenced curve. It can be negative.
3965                 theStartPoint Any point can be selected for it, the new edge will begin
3966                               at the end of theRefCurve, close to the selected point.
3967                               If None, start from the first point of theRefCurve.
3968                 theName Object name; when specified, this parameter is used
3969                         for result publication in the study. Otherwise, if automatic
3970                         publication is switched on, default value is used for result name.
3971
3972             Returns:              
3973                 New GEOM.GEOM_Object, containing the created edge.
3974             """
3975             # Example: see GEOM_TestAll.py
3976             theLength, Parameters = ParseParameters(theLength)
3977             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
3978             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
3979             anObj.SetParameters(Parameters)
3980             self._autoPublish(anObj, theName, "edge")
3981             return anObj
3982
3983         ## Create an edge from specified wire.
3984         #  @param theWire source Wire
3985         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
3986         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
3987         #  @param theName Object name; when specified, this parameter is used
3988         #         for result publication in the study. Otherwise, if automatic
3989         #         publication is switched on, default value is used for result name.
3990         #
3991         #  @return New GEOM.GEOM_Object, containing the created edge.
3992         #
3993         #  @ref tui_creation_edge "Example"
3994         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
3995             """
3996             Create an edge from specified wire.
3997
3998             Parameters:
3999                 theWire source Wire
4000                 theLinearTolerance linear tolerance value (default = 1e-07)
4001                 theAngularTolerance angular tolerance value (default = 1e-12)
4002                 theName Object name; when specified, this parameter is used
4003                         for result publication in the study. Otherwise, if automatic
4004                         publication is switched on, default value is used for result name.
4005
4006             Returns:
4007                 New GEOM.GEOM_Object, containing the created edge.
4008             """
4009             # Example: see GEOM_TestAll.py
4010             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4011             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4012             self._autoPublish(anObj, theName, "edge")
4013             return anObj
4014
4015         ## Create a wire from the set of edges and wires.
4016         #  @param theEdgesAndWires List of edges and/or wires.
4017         #  @param theTolerance Maximum distance between vertices, that will be merged.
4018         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4019         #  @param theName Object name; when specified, this parameter is used
4020         #         for result publication in the study. Otherwise, if automatic
4021         #         publication is switched on, default value is used for result name.
4022         #
4023         #  @return New GEOM.GEOM_Object, containing the created wire.
4024         #
4025         #  @ref tui_creation_wire "Example"
4026         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4027             """
4028             Create a wire from the set of edges and wires.
4029
4030             Parameters:
4031                 theEdgesAndWires List of edges and/or wires.
4032                 theTolerance Maximum distance between vertices, that will be merged.
4033                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4034                 theName Object name; when specified, this parameter is used
4035                         for result publication in the study. Otherwise, if automatic
4036                         publication is switched on, default value is used for result name.
4037
4038             Returns:                    
4039                 New GEOM.GEOM_Object, containing the created wire.
4040             """
4041             # Example: see GEOM_TestAll.py
4042             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4043             RaiseIfFailed("MakeWire", self.ShapesOp)
4044             self._autoPublish(anObj, theName, "wire")
4045             return anObj
4046
4047         ## Create a face on the given wire.
4048         #  @param theWire closed Wire or Edge to build the face on.
4049         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4050         #                        If the tolerance of the obtained planar face is less
4051         #                        than 1e-06, this face will be returned, otherwise the
4052         #                        algorithm tries to build any suitable face on the given
4053         #                        wire and prints a warning message.
4054         #  @param theName Object name; when specified, this parameter is used
4055         #         for result publication in the study. Otherwise, if automatic
4056         #         publication is switched on, default value is used for result name.
4057         #
4058         #  @return New GEOM.GEOM_Object, containing the created face.
4059         #
4060         #  @ref tui_creation_face "Example"
4061         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4062             """
4063             Create a face on the given wire.
4064
4065             Parameters:
4066                 theWire closed Wire or Edge to build the face on.
4067                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4068                                If the tolerance of the obtained planar face is less
4069                                than 1e-06, this face will be returned, otherwise the
4070                                algorithm tries to build any suitable face on the given
4071                                wire and prints a warning message.
4072                 theName Object name; when specified, this parameter is used
4073                         for result publication in the study. Otherwise, if automatic
4074                         publication is switched on, default value is used for result name.
4075
4076             Returns:
4077                 New GEOM.GEOM_Object, containing the created face.
4078             """
4079             # Example: see GEOM_TestAll.py
4080             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4081             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4082                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4083             else:
4084                 RaiseIfFailed("MakeFace", self.ShapesOp)
4085             self._autoPublish(anObj, theName, "face")
4086             return anObj
4087
4088         ## Create a face on the given wires set.
4089         #  @param theWires List of closed wires or edges to build the face on.
4090         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4091         #                        If the tolerance of the obtained planar face is less
4092         #                        than 1e-06, this face will be returned, otherwise the
4093         #                        algorithm tries to build any suitable face on the given
4094         #                        wire and prints a warning message.
4095         #  @param theName Object name; when specified, this parameter is used
4096         #         for result publication in the study. Otherwise, if automatic
4097         #         publication is switched on, default value is used for result name.
4098         #
4099         #  @return New GEOM.GEOM_Object, containing the created face.
4100         #
4101         #  @ref tui_creation_face "Example"
4102         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4103             """
4104             Create a face on the given wires set.
4105
4106             Parameters:
4107                 theWires List of closed wires or edges to build the face on.
4108                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4109                                If the tolerance of the obtained planar face is less
4110                                than 1e-06, this face will be returned, otherwise the
4111                                algorithm tries to build any suitable face on the given
4112                                wire and prints a warning message.
4113                 theName Object name; when specified, this parameter is used
4114                         for result publication in the study. Otherwise, if automatic
4115                         publication is switched on, default value is used for result name.
4116
4117             Returns: 
4118                 New GEOM.GEOM_Object, containing the created face.
4119             """
4120             # Example: see GEOM_TestAll.py
4121             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4122             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4123                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4124             else:
4125                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4126             self._autoPublish(anObj, theName, "face")
4127             return anObj
4128
4129         ## See MakeFaceWires() method for details.
4130         #
4131         #  @ref tui_creation_face "Example 1"
4132         #  \n @ref swig_MakeFaces  "Example 2"
4133         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4134             """
4135             See geompy.MakeFaceWires() method for details.
4136             """
4137             # Example: see GEOM_TestOthers.py
4138             # note: auto-publishing is done in self.MakeFaceWires()
4139             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4140             return anObj
4141
4142         ## Create a shell from the set of faces and shells.
4143         #  @param theFacesAndShells List of faces and/or shells.
4144         #  @param theName Object name; when specified, this parameter is used
4145         #         for result publication in the study. Otherwise, if automatic
4146         #         publication is switched on, default value is used for result name.
4147         #
4148         #  @return New GEOM.GEOM_Object, containing the created shell.
4149         #
4150         #  @ref tui_creation_shell "Example"
4151         def MakeShell(self, theFacesAndShells, theName=None):
4152             """
4153             Create a shell from the set of faces and shells.
4154
4155             Parameters:
4156                 theFacesAndShells List of faces and/or shells.
4157                 theName Object name; when specified, this parameter is used
4158                         for result publication in the study. Otherwise, if automatic
4159                         publication is switched on, default value is used for result name.
4160
4161             Returns:
4162                 New GEOM.GEOM_Object, containing the created shell.
4163             """
4164             # Example: see GEOM_TestAll.py
4165             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4166             RaiseIfFailed("MakeShell", self.ShapesOp)
4167             self._autoPublish(anObj, theName, "shell")
4168             return anObj
4169
4170         ## Create a solid, bounded by the given shells.
4171         #  @param theShells Sequence of bounding shells.
4172         #  @param theName Object name; when specified, this parameter is used
4173         #         for result publication in the study. Otherwise, if automatic
4174         #         publication is switched on, default value is used for result name.
4175         #
4176         #  @return New GEOM.GEOM_Object, containing the created solid.
4177         #
4178         #  @ref tui_creation_solid "Example"
4179         def MakeSolid(self, theShells, theName=None):
4180             """
4181             Create a solid, bounded by the given shells.
4182
4183             Parameters:
4184                 theShells Sequence of bounding shells.
4185                 theName Object name; when specified, this parameter is used
4186                         for result publication in the study. Otherwise, if automatic
4187                         publication is switched on, default value is used for result name.
4188
4189             Returns:
4190                 New GEOM.GEOM_Object, containing the created solid.
4191             """
4192             # Example: see GEOM_TestAll.py
4193             if len(theShells) == 1:
4194                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4195                 #if len(descr) > 0:
4196                 #    raise RuntimeError, "MakeSolidShells : " + descr
4197                 if descr == "WRN_SHAPE_UNCLOSED":
4198                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4199             anObj = self.ShapesOp.MakeSolidShells(theShells)
4200             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4201             self._autoPublish(anObj, theName, "solid")
4202             return anObj
4203
4204         ## Create a compound of the given shapes.
4205         #  @param theShapes List of shapes to put in compound.
4206         #  @param theName Object name; when specified, this parameter is used
4207         #         for result publication in the study. Otherwise, if automatic
4208         #         publication is switched on, default value is used for result name.
4209         #
4210         #  @return New GEOM.GEOM_Object, containing the created compound.
4211         #
4212         #  @ref tui_creation_compound "Example"
4213         def MakeCompound(self, theShapes, theName=None):
4214             """
4215             Create a compound of the given shapes.
4216
4217             Parameters:
4218                 theShapes List of shapes to put in compound.
4219                 theName Object name; when specified, this parameter is used
4220                         for result publication in the study. Otherwise, if automatic
4221                         publication is switched on, default value is used for result name.
4222
4223             Returns:
4224                 New GEOM.GEOM_Object, containing the created compound.
4225             """
4226             # Example: see GEOM_TestAll.py
4227             anObj = self.ShapesOp.MakeCompound(theShapes)
4228             RaiseIfFailed("MakeCompound", self.ShapesOp)
4229             self._autoPublish(anObj, theName, "compound")
4230             return anObj
4231
4232         # end of l3_advanced
4233         ## @}
4234
4235         ## @addtogroup l2_measure
4236         ## @{
4237
4238         ## Gives quantity of faces in the given shape.
4239         #  @param theShape Shape to count faces of.
4240         #  @return Quantity of faces.
4241         #
4242         #  @ref swig_NumberOf "Example"
4243         def NumberOfFaces(self, theShape):
4244             """
4245             Gives quantity of faces in the given shape.
4246
4247             Parameters:
4248                 theShape Shape to count faces of.
4249
4250             Returns:    
4251                 Quantity of faces.
4252             """
4253             # Example: see GEOM_TestOthers.py
4254             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4255             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4256             return nb_faces
4257
4258         ## Gives quantity of edges in the given shape.
4259         #  @param theShape Shape to count edges of.
4260         #  @return Quantity of edges.
4261         #
4262         #  @ref swig_NumberOf "Example"
4263         def NumberOfEdges(self, theShape):
4264             """
4265             Gives quantity of edges in the given shape.
4266
4267             Parameters:
4268                 theShape Shape to count edges of.
4269
4270             Returns:    
4271                 Quantity of edges.
4272             """
4273             # Example: see GEOM_TestOthers.py
4274             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4275             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4276             return nb_edges
4277
4278         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4279         #  @param theShape Shape to count sub-shapes of.
4280         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4281         #  @return Quantity of sub-shapes of given type.
4282         #
4283         #  @ref swig_NumberOf "Example"
4284         def NumberOfSubShapes(self, theShape, theShapeType):
4285             """
4286             Gives quantity of sub-shapes of type theShapeType in the given shape.
4287
4288             Parameters:
4289                 theShape Shape to count sub-shapes of.
4290                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4291
4292             Returns:
4293                 Quantity of sub-shapes of given type.
4294             """
4295             # Example: see GEOM_TestOthers.py
4296             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4297             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4298             return nb_ss
4299
4300         ## Gives quantity of solids in the given shape.
4301         #  @param theShape Shape to count solids in.
4302         #  @return Quantity of solids.
4303         #
4304         #  @ref swig_NumberOf "Example"
4305         def NumberOfSolids(self, theShape):
4306             """
4307             Gives quantity of solids in the given shape.
4308
4309             Parameters:
4310                 theShape Shape to count solids in.
4311
4312             Returns:
4313                 Quantity of solids.
4314             """
4315             # Example: see GEOM_TestOthers.py
4316             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4317             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4318             return nb_solids
4319
4320         # end of l2_measure
4321         ## @}
4322
4323         ## @addtogroup l3_healing
4324         ## @{
4325
4326         ## Reverses an orientation the given shape.
4327         #  @param theShape Shape to be reversed.
4328         #  @param theName Object name; when specified, this parameter is used
4329         #         for result publication in the study. Otherwise, if automatic
4330         #         publication is switched on, default value is used for result name.
4331         #
4332         #  @return The reversed copy of theShape.
4333         #
4334         #  @ref swig_ChangeOrientation "Example"
4335         def ChangeOrientation(self, theShape, theName=None):
4336             """
4337             Reverses an orientation the given shape.
4338
4339             Parameters:
4340                 theShape Shape to be reversed.
4341                 theName Object name; when specified, this parameter is used
4342                         for result publication in the study. Otherwise, if automatic
4343                         publication is switched on, default value is used for result name.
4344
4345             Returns:   
4346                 The reversed copy of theShape.
4347             """
4348             # Example: see GEOM_TestAll.py
4349             anObj = self.ShapesOp.ChangeOrientation(theShape)
4350             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4351             self._autoPublish(anObj, theName, "reversed")
4352             return anObj
4353
4354         ## See ChangeOrientation() method for details.
4355         #
4356         #  @ref swig_OrientationChange "Example"
4357         def OrientationChange(self, theShape, theName=None):
4358             """
4359             See geompy.ChangeOrientation method for details.
4360             """
4361             # Example: see GEOM_TestOthers.py
4362             # note: auto-publishing is done in self.ChangeOrientation()
4363             anObj = self.ChangeOrientation(theShape, theName)
4364             return anObj
4365
4366         # end of l3_healing
4367         ## @}
4368
4369         ## @addtogroup l4_obtain
4370         ## @{
4371
4372         ## Retrieve all free faces from the given shape.
4373         #  Free face is a face, which is not shared between two shells of the shape.
4374         #  @param theShape Shape to find free faces in.
4375         #  @return List of IDs of all free faces, contained in theShape.
4376         #
4377         #  @ref tui_measurement_tools_page "Example"
4378         def GetFreeFacesIDs(self,theShape):
4379             """
4380             Retrieve all free faces from the given shape.
4381             Free face is a face, which is not shared between two shells of the shape.
4382
4383             Parameters:
4384                 theShape Shape to find free faces in.
4385
4386             Returns:
4387                 List of IDs of all free faces, contained in theShape.
4388             """
4389             # Example: see GEOM_TestOthers.py
4390             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4391             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4392             return anIDs
4393
4394         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4395         #  @param theShape1 Shape to find sub-shapes in.
4396         #  @param theShape2 Shape to find shared sub-shapes with.
4397         #  @param theShapeType Type of sub-shapes to be retrieved.
4398         #  @param theName Object name; when specified, this parameter is used
4399         #         for result publication in the study. Otherwise, if automatic
4400         #         publication is switched on, default value is used for result name.
4401         #
4402         #  @return List of sub-shapes of theShape1, shared with theShape2.
4403         #
4404         #  @ref swig_GetSharedShapes "Example"
4405         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4406             """
4407             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4408
4409             Parameters:
4410                 theShape1 Shape to find sub-shapes in.
4411                 theShape2 Shape to find shared sub-shapes with.
4412                 theShapeType Type of sub-shapes to be retrieved.
4413                 theName Object name; when specified, this parameter is used
4414                         for result publication in the study. Otherwise, if automatic
4415                         publication is switched on, default value is used for result name.
4416
4417             Returns:
4418                 List of sub-shapes of theShape1, shared with theShape2.
4419             """
4420             # Example: see GEOM_TestOthers.py
4421             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4422             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4423             self._autoPublish(aList, theName, "shared")
4424             return aList
4425
4426         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4427         #  @param theShapes Shapes to find common sub-shapes of.
4428         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4429         #  @param 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         #  @return List of objects, that are sub-shapes of all given shapes.
4434         #
4435         #  @ref swig_GetSharedShapes "Example"
4436         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4437             """
4438             Get all sub-shapes, shared by all shapes in the list theShapes.
4439
4440             Parameters:
4441                 theShapes Shapes to find common sub-shapes of.
4442                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4443                 theName Object name; when specified, this parameter is used
4444                         for result publication in the study. Otherwise, if automatic
4445                         publication is switched on, default value is used for result name.
4446
4447             Returns:    
4448                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4449             """
4450             # Example: see GEOM_TestOthers.py
4451             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4452             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4453             self._autoPublish(aList, theName, "shared")
4454             return aList
4455
4456         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4457         #  situated relatively the specified plane by the certain way,
4458         #  defined through <VAR>theState</VAR> parameter.
4459         #  @param theShape Shape to find sub-shapes of.
4460         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4461         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4462         #                direction and location of the plane to find shapes on.
4463         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4464         #  @param theName Object name; when specified, this parameter is used
4465         #         for result publication in the study. Otherwise, if automatic
4466         #         publication is switched on, default value is used for result name.
4467         #
4468         #  @return List of all found sub-shapes.
4469         #
4470         #  @ref swig_GetShapesOnPlane "Example"
4471         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4472             """
4473             Find in theShape all sub-shapes of type theShapeType,
4474             situated relatively the specified plane by the certain way,
4475             defined through theState parameter.
4476
4477             Parameters:
4478                 theShape Shape to find sub-shapes of.
4479                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4480                 theAx1 Vector (or line, or linear edge), specifying normal
4481                        direction and location of the plane to find shapes on.
4482                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4483                 theName Object name; when specified, this parameter is used
4484                         for result publication in the study. Otherwise, if automatic
4485                         publication is switched on, default value is used for result name.
4486
4487             Returns:
4488                 List of all found sub-shapes.
4489             """
4490             # Example: see GEOM_TestOthers.py
4491             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4492             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4493             self._autoPublish(aList, theName, "shapeOnPlane")
4494             return aList
4495
4496         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4497         #  situated relatively the specified plane by the certain way,
4498         #  defined through <VAR>theState</VAR> parameter.
4499         #  @param theShape Shape to find sub-shapes of.
4500         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4501         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4502         #                direction and location of the plane to find shapes on.
4503         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4504         #
4505         #  @return List of all found sub-shapes indices.
4506         #
4507         #  @ref swig_GetShapesOnPlaneIDs "Example"
4508         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4509             """
4510             Find in theShape all sub-shapes of type theShapeType,
4511             situated relatively the specified plane by the certain way,
4512             defined through theState parameter.
4513
4514             Parameters:
4515                 theShape Shape to find sub-shapes of.
4516                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4517                 theAx1 Vector (or line, or linear edge), specifying normal
4518                        direction and location of the plane to find shapes on.
4519                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4520
4521             Returns:
4522                 List of all found sub-shapes indices.
4523             """
4524             # Example: see GEOM_TestOthers.py
4525             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4526             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4527             return aList
4528
4529         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4530         #  situated relatively the specified plane by the certain way,
4531         #  defined through <VAR>theState</VAR> parameter.
4532         #  @param theShape Shape to find sub-shapes of.
4533         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4534         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4535         #                direction of the plane to find shapes on.
4536         #  @param thePnt Point specifying location of the plane to find shapes on.
4537         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4538         #  @param theName Object name; when specified, this parameter is used
4539         #         for result publication in the study. Otherwise, if automatic
4540         #         publication is switched on, default value is used for result name.
4541         #
4542         #  @return List of all found sub-shapes.
4543         #
4544         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4545         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4546             """
4547             Find in theShape all sub-shapes of type theShapeType,
4548             situated relatively the specified plane by the certain way,
4549             defined through theState parameter.
4550
4551             Parameters:
4552                 theShape Shape to find sub-shapes of.
4553                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4554                 theAx1 Vector (or line, or linear edge), specifying normal
4555                        direction and location of the plane to find shapes on.
4556                 thePnt Point specifying location of the plane to find shapes on.
4557                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4558                 theName Object name; when specified, this parameter is used
4559                         for result publication in the study. Otherwise, if automatic
4560                         publication is switched on, default value is used for result name.
4561
4562             Returns:
4563                 List of all found sub-shapes.
4564             """
4565             # Example: see GEOM_TestOthers.py
4566             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4567                                                                theAx1, thePnt, theState)
4568             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4569             self._autoPublish(aList, theName, "shapeOnPlane")
4570             return aList
4571
4572         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4573         #  situated relatively the specified plane by the certain way,
4574         #  defined through <VAR>theState</VAR> parameter.
4575         #  @param theShape Shape to find sub-shapes of.
4576         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4577         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4578         #                direction of the plane to find shapes on.
4579         #  @param thePnt Point specifying location of the plane to find shapes on.
4580         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4581         #
4582         #  @return List of all found sub-shapes indices.
4583         #
4584         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4585         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4586             """
4587             Find in theShape all sub-shapes of type theShapeType,
4588             situated relatively the specified plane by the certain way,
4589             defined through theState parameter.
4590
4591             Parameters:
4592                 theShape Shape to find sub-shapes of.
4593                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4594                 theAx1 Vector (or line, or linear edge), specifying normal
4595                        direction and location of the plane to find shapes on.
4596                 thePnt Point specifying location of the plane to find shapes on.
4597                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4598
4599             Returns:
4600                 List of all found sub-shapes indices.
4601             """
4602             # Example: see GEOM_TestOthers.py
4603             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4604                                                                   theAx1, thePnt, theState)
4605             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4606             return aList
4607
4608         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4609         #  the specified cylinder by the certain way, defined through \a theState parameter.
4610         #  @param theShape Shape to find sub-shapes of.
4611         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4612         #  @param theAxis Vector (or line, or linear edge), specifying
4613         #                 axis of the cylinder to find shapes on.
4614         #  @param theRadius Radius of the cylinder to find shapes on.
4615         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4616         #  @param theName Object name; when specified, this parameter is used
4617         #         for result publication in the study. Otherwise, if automatic
4618         #         publication is switched on, default value is used for result name.
4619         #
4620         #  @return List of all found sub-shapes.
4621         #
4622         #  @ref swig_GetShapesOnCylinder "Example"
4623         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4624             """
4625             Find in theShape all sub-shapes of type theShapeType, situated relatively
4626             the specified cylinder by the certain way, defined through theState parameter.
4627
4628             Parameters:
4629                 theShape Shape to find sub-shapes of.
4630                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4631                 theAxis Vector (or line, or linear edge), specifying
4632                         axis of the cylinder to find shapes on.
4633                 theRadius Radius of the cylinder to find shapes on.
4634                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4635                 theName Object name; when specified, this parameter is used
4636                         for result publication in the study. Otherwise, if automatic
4637                         publication is switched on, default value is used for result name.
4638
4639             Returns:
4640                 List of all found sub-shapes.
4641             """
4642             # Example: see GEOM_TestOthers.py
4643             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4644             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4645             self._autoPublish(aList, theName, "shapeOnCylinder")
4646             return aList
4647
4648         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4649         #  the specified cylinder by the certain way, defined through \a theState parameter.
4650         #  @param theShape Shape to find sub-shapes of.
4651         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4652         #  @param theAxis Vector (or line, or linear edge), specifying
4653         #                 axis of the cylinder to find shapes on.
4654         #  @param theRadius Radius of the cylinder to find shapes on.
4655         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4656         #
4657         #  @return List of all found sub-shapes indices.
4658         #
4659         #  @ref swig_GetShapesOnCylinderIDs "Example"
4660         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4661             """
4662             Find in theShape all sub-shapes of type theShapeType, situated relatively
4663             the specified cylinder by the certain way, defined through theState parameter.
4664
4665             Parameters:
4666                 theShape Shape to find sub-shapes of.
4667                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4668                 theAxis Vector (or line, or linear edge), specifying
4669                         axis of the cylinder to find shapes on.
4670                 theRadius Radius of the cylinder to find shapes on.
4671                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4672
4673             Returns:
4674                 List of all found sub-shapes indices.
4675             """
4676             # Example: see GEOM_TestOthers.py
4677             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4678             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4679             return aList
4680
4681         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4682         #  the specified cylinder by the certain way, defined through \a theState parameter.
4683         #  @param theShape Shape to find sub-shapes of.
4684         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4685         #  @param theAxis Vector (or line, or linear edge), specifying
4686         #                 axis of the cylinder to find shapes on.
4687         #  @param thePnt Point specifying location of the bottom of the cylinder.
4688         #  @param theRadius Radius of the cylinder to find shapes on.
4689         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4690         #  @param theName Object name; when specified, this parameter is used
4691         #         for result publication in the study. Otherwise, if automatic
4692         #         publication is switched on, default value is used for result name.
4693         #
4694         #  @return List of all found sub-shapes.
4695         #
4696         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4697         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4698             """
4699             Find in theShape all sub-shapes of type theShapeType, situated relatively
4700             the specified cylinder by the certain way, defined through theState parameter.
4701
4702             Parameters:
4703                 theShape Shape to find sub-shapes of.
4704                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4705                 theAxis Vector (or line, or linear edge), specifying
4706                         axis of the cylinder to find shapes on.
4707                 theRadius Radius of the cylinder to find shapes on.
4708                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4709                 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             Returns:
4714                 List of all found sub-shapes.
4715             """
4716             # Example: see GEOM_TestOthers.py
4717             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4718             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4719             self._autoPublish(aList, theName, "shapeOnCylinder")
4720             return aList
4721
4722         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4723         #  the specified cylinder by the certain way, defined through \a theState parameter.
4724         #  @param theShape Shape to find sub-shapes of.
4725         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4726         #  @param theAxis Vector (or line, or linear edge), specifying
4727         #                 axis of the cylinder to find shapes on.
4728         #  @param thePnt Point specifying location of the bottom of the cylinder.
4729         #  @param theRadius Radius of the cylinder to find shapes on.
4730         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4731         #
4732         #  @return List of all found sub-shapes indices
4733         #
4734         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4735         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4736             """
4737             Find in theShape all sub-shapes of type theShapeType, situated relatively
4738             the specified cylinder by the certain way, defined through theState parameter.
4739
4740             Parameters:
4741                 theShape Shape to find sub-shapes of.
4742                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4743                 theAxis Vector (or line, or linear edge), specifying
4744                         axis of the cylinder to find shapes on.
4745                 theRadius Radius of the cylinder to find shapes on.
4746                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4747
4748             Returns:
4749                 List of all found sub-shapes indices.            
4750             """
4751             # Example: see GEOM_TestOthers.py
4752             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4753             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4754             return aList
4755
4756         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4757         #  the specified sphere by the certain way, defined through \a theState parameter.
4758         #  @param theShape Shape to find sub-shapes of.
4759         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4760         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4761         #  @param theRadius Radius of the sphere to find shapes on.
4762         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4763         #  @param theName Object name; when specified, this parameter is used
4764         #         for result publication in the study. Otherwise, if automatic
4765         #         publication is switched on, default value is used for result name.
4766         #
4767         #  @return List of all found sub-shapes.
4768         #
4769         #  @ref swig_GetShapesOnSphere "Example"
4770         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4771             """
4772             Find in theShape all sub-shapes of type theShapeType, situated relatively
4773             the specified sphere by the certain way, defined through theState parameter.
4774
4775             Parameters:
4776                 theShape Shape to find sub-shapes of.
4777                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4778                 theCenter Point, specifying center of the sphere to find shapes on.
4779                 theRadius Radius of the sphere to find shapes on.
4780                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4781                 theName Object name; when specified, this parameter is used
4782                         for result publication in the study. Otherwise, if automatic
4783                         publication is switched on, default value is used for result name.
4784
4785             Returns:
4786                 List of all found sub-shapes.
4787             """
4788             # Example: see GEOM_TestOthers.py
4789             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4790             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4791             self._autoPublish(aList, theName, "shapeOnSphere")
4792             return aList
4793
4794         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4795         #  the specified sphere by the certain way, defined through \a theState parameter.
4796         #  @param theShape Shape to find sub-shapes of.
4797         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4798         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4799         #  @param theRadius Radius of the sphere to find shapes on.
4800         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4801         #
4802         #  @return List of all found sub-shapes indices.
4803         #
4804         #  @ref swig_GetShapesOnSphereIDs "Example"
4805         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4806             """
4807             Find in theShape all sub-shapes of type theShapeType, situated relatively
4808             the specified sphere by the certain way, defined through theState parameter.
4809
4810             Parameters:
4811                 theShape Shape to find sub-shapes of.
4812                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4813                 theCenter Point, specifying center of the sphere to find shapes on.
4814                 theRadius Radius of the sphere to find shapes on.
4815                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4816
4817             Returns:
4818                 List of all found sub-shapes indices.
4819             """
4820             # Example: see GEOM_TestOthers.py
4821             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4822             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4823             return aList
4824
4825         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4826         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4827         #  @param theShape Shape to find sub-shapes of.
4828         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4829         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4830         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4831         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4832         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4833         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4834         #  @param theName Object name; when specified, this parameter is used
4835         #         for result publication in the study. Otherwise, if automatic
4836         #         publication is switched on, default value is used for result name.
4837         #
4838         #  @return List of all found sub-shapes.
4839         #
4840         #  @ref swig_GetShapesOnQuadrangle "Example"
4841         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4842                                   theTopLeftPoint, theTopRigthPoint,
4843                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4844             """
4845             Find in theShape all sub-shapes of type theShapeType, situated relatively
4846             the specified quadrangle by the certain way, defined through theState parameter.
4847
4848             Parameters:
4849                 theShape Shape to find sub-shapes of.
4850                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4851                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4852                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4853                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4854                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4855                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4856                 theName Object name; when specified, this parameter is used
4857                         for result publication in the study. Otherwise, if automatic
4858                         publication is switched on, default value is used for result name.
4859
4860             Returns:
4861                 List of all found sub-shapes.
4862             """
4863             # Example: see GEOM_TestOthers.py
4864             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4865                                                         theTopLeftPoint, theTopRigthPoint,
4866                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4867             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4868             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4869             return aList
4870
4871         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4872         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4873         #  @param theShape Shape to find sub-shapes of.
4874         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4875         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4876         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4877         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4878         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4879         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4880         #
4881         #  @return List of all found sub-shapes indices.
4882         #
4883         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4884         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4885                                      theTopLeftPoint, theTopRigthPoint,
4886                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4887             """
4888             Find in theShape all sub-shapes of type theShapeType, situated relatively
4889             the specified quadrangle by the certain way, defined through theState parameter.
4890
4891             Parameters:
4892                 theShape Shape to find sub-shapes of.
4893                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4894                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4895                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4896                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4897                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4898                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4899
4900             Returns:
4901                 List of all found sub-shapes indices.
4902             """
4903
4904             # Example: see GEOM_TestOthers.py
4905             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4906                                                            theTopLeftPoint, theTopRigthPoint,
4907                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4908             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4909             return aList
4910
4911         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4912         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4913         #  @param theBox Shape for relative comparing.
4914         #  @param theShape Shape to find sub-shapes of.
4915         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4916         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4917         #  @param theName Object name; when specified, this parameter is used
4918         #         for result publication in the study. Otherwise, if automatic
4919         #         publication is switched on, default value is used for result name.
4920         #
4921         #  @return List of all found sub-shapes.
4922         #
4923         #  @ref swig_GetShapesOnBox "Example"
4924         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4925             """
4926             Find in theShape all sub-shapes of type theShapeType, situated relatively
4927             the specified theBox by the certain way, defined through theState parameter.
4928
4929             Parameters:
4930                 theBox Shape for relative comparing.
4931                 theShape Shape to find sub-shapes of.
4932                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4933                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4934                 theName Object name; when specified, this parameter is used
4935                         for result publication in the study. Otherwise, if automatic
4936                         publication is switched on, default value is used for result name.
4937
4938             Returns:
4939                 List of all found sub-shapes.
4940             """
4941             # Example: see GEOM_TestOthers.py
4942             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
4943             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
4944             self._autoPublish(aList, theName, "shapeOnBox")
4945             return aList
4946
4947         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4948         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4949         #  @param theBox Shape for relative comparing.
4950         #  @param theShape Shape to find sub-shapes of.
4951         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4952         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4953         #
4954         #  @return List of all found sub-shapes indices.
4955         #
4956         #  @ref swig_GetShapesOnBoxIDs "Example"
4957         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
4958             """
4959             Find in theShape all sub-shapes of type theShapeType, situated relatively
4960             the specified theBox by the certain way, defined through theState parameter.
4961
4962             Parameters:
4963                 theBox Shape for relative comparing.
4964                 theShape Shape to find sub-shapes of.
4965                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4966                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4967
4968             Returns:
4969                 List of all found sub-shapes indices.
4970             """
4971             # Example: see GEOM_TestOthers.py
4972             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
4973             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
4974             return aList
4975
4976         ## Find in \a theShape all sub-shapes of type \a theShapeType,
4977         #  situated relatively the specified \a theCheckShape by the
4978         #  certain way, defined through \a theState parameter.
4979         #  @param theCheckShape Shape for relative comparing. It must be a solid.
4980         #  @param theShape Shape to find sub-shapes of.
4981         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
4982         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4983         #  @param theName Object name; when specified, this parameter is used
4984         #         for result publication in the study. Otherwise, if automatic
4985         #         publication is switched on, default value is used for result name.
4986         #
4987         #  @return List of all found sub-shapes.
4988         #
4989         #  @ref swig_GetShapesOnShape "Example"
4990         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
4991             """
4992             Find in theShape all sub-shapes of type theShapeType,
4993             situated relatively the specified theCheckShape by the
4994             certain way, defined through theState parameter.
4995
4996             Parameters:
4997                 theCheckShape Shape for relative comparing. It must be a solid.
4998                 theShape Shape to find sub-shapes of.
4999                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5000                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5001                 theName Object name; when specified, this parameter is used
5002                         for result publication in the study. Otherwise, if automatic
5003                         publication is switched on, default value is used for result name.
5004
5005             Returns:
5006                 List of all found sub-shapes.
5007             """
5008             # Example: see GEOM_TestOthers.py
5009             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5010                                                    theShapeType, theState)
5011             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5012             self._autoPublish(aList, theName, "shapeOnShape")
5013             return aList
5014
5015         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5016         #  situated relatively the specified \a theCheckShape by the
5017         #  certain way, defined through \a theState parameter.
5018         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5019         #  @param theShape Shape to find sub-shapes of.
5020         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5021         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5022         #  @param theName Object name; when specified, this parameter is used
5023         #         for result publication in the study. Otherwise, if automatic
5024         #         publication is switched on, default value is used for result name.
5025         #
5026         #  @return All found sub-shapes as compound.
5027         #
5028         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5029         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5030             """
5031             Find in theShape all sub-shapes of type theShapeType,
5032             situated relatively the specified theCheckShape by the
5033             certain way, defined through theState parameter.
5034
5035             Parameters:
5036                 theCheckShape Shape for relative comparing. It must be a solid.
5037                 theShape Shape to find sub-shapes of.
5038                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5039                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5040                 theName Object name; when specified, this parameter is used
5041                         for result publication in the study. Otherwise, if automatic
5042                         publication is switched on, default value is used for result name.
5043
5044             Returns:
5045                 All found sub-shapes as compound.
5046             """
5047             # Example: see GEOM_TestOthers.py
5048             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5049                                                              theShapeType, theState)
5050             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5051             self._autoPublish(anObj, theName, "shapeOnShape")
5052             return anObj
5053
5054         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5055         #  situated relatively the specified \a theCheckShape by the
5056         #  certain way, defined through \a theState parameter.
5057         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5058         #  @param theShape Shape to find sub-shapes of.
5059         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5060         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5061         #
5062         #  @return List of all found sub-shapes indices.
5063         #
5064         #  @ref swig_GetShapesOnShapeIDs "Example"
5065         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5066             """
5067             Find in theShape all sub-shapes of type theShapeType,
5068             situated relatively the specified theCheckShape by the
5069             certain way, defined through theState parameter.
5070
5071             Parameters:
5072                 theCheckShape Shape for relative comparing. It must be a solid.
5073                 theShape Shape to find sub-shapes of.
5074                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5075                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5076
5077             Returns:
5078                 List of all found sub-shapes indices.
5079             """
5080             # Example: see GEOM_TestOthers.py
5081             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5082                                                       theShapeType, theState)
5083             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5084             return aList
5085
5086         ## Get sub-shape(s) of theShapeWhere, which are
5087         #  coincident with \a theShapeWhat or could be a part of it.
5088         #  @param theShapeWhere Shape to find sub-shapes of.
5089         #  @param theShapeWhat Shape, specifying what to find.
5090         #  @param isNewImplementation implementation of GetInPlace functionality
5091         #             (default = False, old alghorithm based on shape properties)
5092         #  @param theName Object name; when specified, this parameter is used
5093         #         for result publication in the study. Otherwise, if automatic
5094         #         publication is switched on, default value is used for result name.
5095         #
5096         #  @return Group of all found sub-shapes or a single found sub-shape.
5097         #
5098         #  @note This function has a restriction on argument shapes.
5099         #        If \a theShapeWhere has curved parts with significantly
5100         #        outstanding centres (i.e. the mass centre of a part is closer to
5101         #        \a theShapeWhat than to the part), such parts will not be found.
5102         #        @image html get_in_place_lost_part.png
5103         #
5104         #  @ref swig_GetInPlace "Example"
5105         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5106             """
5107             Get sub-shape(s) of theShapeWhere, which are
5108             coincident with  theShapeWhat or could be a part of it.
5109
5110             Parameters:
5111                 theShapeWhere Shape to find sub-shapes of.
5112                 theShapeWhat Shape, specifying what to find.
5113                 isNewImplementation Implementation of GetInPlace functionality
5114                                     (default = False, old alghorithm based on shape properties)
5115                 theName Object name; when specified, this parameter is used
5116                         for result publication in the study. Otherwise, if automatic
5117                         publication is switched on, default value is used for result name.
5118
5119             Returns:
5120                 Group of all found sub-shapes or a single found sub-shape.
5121
5122                 
5123             Note:
5124                 This function has a restriction on argument shapes.
5125                 If theShapeWhere has curved parts with significantly
5126                 outstanding centres (i.e. the mass centre of a part is closer to
5127                 theShapeWhat than to the part), such parts will not be found.
5128             """
5129             # Example: see GEOM_TestOthers.py
5130             anObj = None
5131             if isNewImplementation:
5132                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5133             else:
5134                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5135                 pass
5136             RaiseIfFailed("GetInPlace", self.ShapesOp)
5137             self._autoPublish(anObj, theName, "inplace")
5138             return anObj
5139
5140         ## Get sub-shape(s) of \a theShapeWhere, which are
5141         #  coincident with \a theShapeWhat or could be a part of it.
5142         #
5143         #  Implementation of this method is based on a saved history of an operation,
5144         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5145         #  arguments (an argument shape or a sub-shape of an argument shape).
5146         #  The operation could be the Partition or one of boolean operations,
5147         #  performed on simple shapes (not on compounds).
5148         #
5149         #  @param theShapeWhere Shape to find sub-shapes of.
5150         #  @param theShapeWhat Shape, specifying what to find (must be in the
5151         #                      building history of the ShapeWhere).
5152         #  @param theName Object name; when specified, this parameter is used
5153         #         for result publication in the study. Otherwise, if automatic
5154         #         publication is switched on, default value is used for result name.
5155         #
5156         #  @return Group of all found sub-shapes or a single found sub-shape.
5157         #
5158         #  @ref swig_GetInPlace "Example"
5159         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5160             """
5161             Implementation of this method is based on a saved history of an operation,
5162             produced theShapeWhere. The theShapeWhat must be among this operation's
5163             arguments (an argument shape or a sub-shape of an argument shape).
5164             The operation could be the Partition or one of boolean operations,
5165             performed on simple shapes (not on compounds).
5166
5167             Parameters:
5168                 theShapeWhere Shape to find sub-shapes of.
5169                 theShapeWhat Shape, specifying what to find (must be in the
5170                                 building history of the ShapeWhere).
5171                 theName Object name; when specified, this parameter is used
5172                         for result publication in the study. Otherwise, if automatic
5173                         publication is switched on, default value is used for result name.
5174
5175             Returns:
5176                 Group of all found sub-shapes or a single found sub-shape.
5177             """
5178             # Example: see GEOM_TestOthers.py
5179             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5180             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5181             self._autoPublish(anObj, theName, "inplace")
5182             return anObj
5183
5184         ## Get sub-shape of theShapeWhere, which is
5185         #  equal to \a theShapeWhat.
5186         #  @param theShapeWhere Shape to find sub-shape of.
5187         #  @param theShapeWhat Shape, specifying what to find.
5188         #  @param theName Object name; when specified, this parameter is used
5189         #         for result publication in the study. Otherwise, if automatic
5190         #         publication is switched on, default value is used for result name.
5191         #
5192         #  @return New GEOM.GEOM_Object for found sub-shape.
5193         #
5194         #  @ref swig_GetSame "Example"
5195         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5196             """
5197             Get sub-shape of theShapeWhere, which is
5198             equal to theShapeWhat.
5199
5200             Parameters:
5201                 theShapeWhere Shape to find sub-shape of.
5202                 theShapeWhat Shape, specifying what to find.
5203                 theName Object name; when specified, this parameter is used
5204                         for result publication in the study. Otherwise, if automatic
5205                         publication is switched on, default value is used for result name.
5206
5207             Returns:
5208                 New GEOM.GEOM_Object for found sub-shape.
5209             """
5210             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5211             RaiseIfFailed("GetSame", self.ShapesOp)
5212             self._autoPublish(anObj, theName, "sameShape")
5213             return anObj
5214
5215
5216         ## Get sub-shape indices of theShapeWhere, which is
5217         #  equal to \a theShapeWhat.
5218         #  @param theShapeWhere Shape to find sub-shape of.
5219         #  @param theShapeWhat Shape, specifying what to find.
5220         #  @return List of all found sub-shapes indices. 
5221         #
5222         #  @ref swig_GetSame "Example"
5223         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5224             """
5225             Get sub-shape indices of theShapeWhere, which is
5226             equal to theShapeWhat.
5227
5228             Parameters:
5229                 theShapeWhere Shape to find sub-shape of.
5230                 theShapeWhat Shape, specifying what to find.
5231
5232             Returns:
5233                 List of all found sub-shapes indices.
5234             """
5235             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5236             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5237             return anObj
5238
5239
5240         # end of l4_obtain
5241         ## @}
5242
5243         ## @addtogroup l4_access
5244         ## @{
5245
5246         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5247         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5248         #  @param aShape Shape to get sub-shape of.
5249         #  @param ListOfID List of sub-shapes indices.
5250         #  @param theName Object name; when specified, this parameter is used
5251         #         for result publication in the study. Otherwise, if automatic
5252         #         publication is switched on, default value is used for result name.
5253         #
5254         #  @return Found sub-shape.
5255         #
5256         #  @ref swig_all_decompose "Example"
5257         def GetSubShape(self, aShape, ListOfID, theName=None):
5258             """
5259             Obtain a composite sub-shape of aShape, composed from sub-shapes
5260             of aShape, selected by their unique IDs inside aShape
5261
5262             Parameters:
5263                 aShape Shape to get sub-shape of.
5264                 ListOfID List of sub-shapes indices.
5265                 theName Object name; when specified, this parameter is used
5266                         for result publication in the study. Otherwise, if automatic
5267                         publication is switched on, default value is used for result name.
5268
5269             Returns:
5270                 Found sub-shape.
5271             """
5272             # Example: see GEOM_TestAll.py
5273             anObj = self.AddSubShape(aShape,ListOfID)
5274             self._autoPublish(anObj, theName, "subshape")
5275             return anObj
5276
5277         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5278         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5279         #  @param aShape Shape to get sub-shape of.
5280         #  @param aSubShape Sub-shapes of aShape.
5281         #  @return ID of found sub-shape.
5282         #
5283         #  @ref swig_all_decompose "Example"
5284         def GetSubShapeID(self, aShape, aSubShape):
5285             """
5286             Obtain unique ID of sub-shape aSubShape inside aShape
5287             of aShape, selected by their unique IDs inside aShape
5288
5289             Parameters:
5290                aShape Shape to get sub-shape of.
5291                aSubShape Sub-shapes of aShape.
5292
5293             Returns:
5294                ID of found sub-shape.
5295             """
5296             # Example: see GEOM_TestAll.py
5297             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5298             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5299             return anID
5300             
5301         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5302         #  This function is provided for performance purpose. The complexity is O(n) with n
5303         #  the number of subobjects of aShape
5304         #  @param aShape Shape to get sub-shape of.
5305         #  @param aSubShapes Sub-shapes of aShape.
5306         #  @return list of IDs of found sub-shapes.
5307         #
5308         #  @ref swig_all_decompose "Example"
5309         def GetSubShapesIDs(self, aShape, aSubShapes):
5310             """
5311             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5312             This function is provided for performance purpose. The complexity is O(n) with n
5313             the number of subobjects of aShape
5314
5315             Parameters:
5316                aShape Shape to get sub-shape of.
5317                aSubShapes Sub-shapes of aShape.
5318
5319             Returns:
5320                List of IDs of found sub-shape.
5321             """
5322             # Example: see GEOM_TestAll.py
5323             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5324             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5325             return anIDs
5326
5327         # end of l4_access
5328         ## @}
5329
5330         ## @addtogroup l4_decompose
5331         ## @{
5332
5333         ## Get all sub-shapes and groups of \a theShape,
5334         #  that were created already by any other methods.
5335         #  @param theShape Any shape.
5336         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5337         #                       returned, else all found sub-shapes and groups.
5338         #  @return List of existing sub-objects of \a theShape.
5339         #
5340         #  @ref swig_all_decompose "Example"
5341         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5342             """
5343             Get all sub-shapes and groups of theShape,
5344             that were created already by any other methods.
5345
5346             Parameters:
5347                 theShape Any shape.
5348                 theGroupsOnly If this parameter is TRUE, only groups will be
5349                                  returned, else all found sub-shapes and groups.
5350
5351             Returns:
5352                 List of existing sub-objects of theShape.
5353             """
5354             # Example: see GEOM_TestAll.py
5355             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5356             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5357             return ListObj
5358
5359         ## Get all groups of \a theShape,
5360         #  that were created already by any other methods.
5361         #  @param theShape Any shape.
5362         #  @return List of existing groups of \a theShape.
5363         #
5364         #  @ref swig_all_decompose "Example"
5365         def GetGroups(self, theShape):
5366             """
5367             Get all groups of theShape,
5368             that were created already by any other methods.
5369
5370             Parameters:
5371                 theShape Any shape.
5372
5373             Returns:
5374                 List of existing groups of theShape.
5375             """
5376             # Example: see GEOM_TestAll.py
5377             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5378             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5379             return ListObj
5380
5381         ## Explode a shape on sub-shapes of a given type.
5382         #  If the shape itself matches the type, it is also returned.
5383         #  @param aShape Shape to be exploded.
5384         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5385         #  @param theName Object name; when specified, this parameter is used
5386         #         for result publication in the study. Otherwise, if automatic
5387         #         publication is switched on, default value is used for result name.
5388         #
5389         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5390         #
5391         #  @ref swig_all_decompose "Example"
5392         def SubShapeAll(self, aShape, aType, theName=None):
5393             """
5394             Explode a shape on sub-shapes of a given type.
5395             If the shape itself matches the type, it is also returned.
5396
5397             Parameters:
5398                 aShape Shape to be exploded.
5399                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5400                 theName Object name; when specified, this parameter is used
5401                         for result publication in the study. Otherwise, if automatic
5402                         publication is switched on, default value is used for result name.
5403
5404             Returns:
5405                 List of sub-shapes of type theShapeType, contained in theShape.
5406             """
5407             # Example: see GEOM_TestAll.py
5408             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5409             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5410             self._autoPublish(ListObj, theName, "subshape")
5411             return ListObj
5412
5413         ## Explode a shape on sub-shapes of a given type.
5414         #  @param aShape Shape to be exploded.
5415         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5416         #  @return List of IDs of sub-shapes.
5417         #
5418         #  @ref swig_all_decompose "Example"
5419         def SubShapeAllIDs(self, aShape, aType):
5420             """
5421             Explode a shape on sub-shapes of a given type.
5422
5423             Parameters:
5424                 aShape Shape to be exploded (see geompy.ShapeType)
5425                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5426
5427             Returns:
5428                 List of IDs of sub-shapes.
5429             """
5430             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5431             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5432             return ListObj
5433
5434         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5435         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
5436         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5437         #  @param aShape Shape to get sub-shape of.
5438         #  @param ListOfInd List of sub-shapes indices.
5439         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5440         #  @param 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         #  @return A compound of sub-shapes of aShape.
5445         #
5446         #  @ref swig_all_decompose "Example"
5447         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5448             """
5449             Obtain a compound of sub-shapes of aShape,
5450             selected by they indices in list of all sub-shapes of type aType.
5451             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5452             
5453             Parameters:
5454                 aShape Shape to get sub-shape of.
5455                 ListOfID List of sub-shapes indices.
5456                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5457                 theName Object name; when specified, this parameter is used
5458                         for result publication in the study. Otherwise, if automatic
5459                         publication is switched on, default value is used for result name.
5460
5461             Returns:
5462                 A compound of sub-shapes of aShape.
5463             """
5464             # Example: see GEOM_TestAll.py
5465             ListOfIDs = []
5466             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5467             for ind in ListOfInd:
5468                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5469             # note: auto-publishing is done in self.GetSubShape()
5470             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5471             return anObj
5472
5473         ## Explode a shape on sub-shapes of a given type.
5474         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5475         #  If the shape itself matches the type, it is also returned.
5476         #  @param aShape Shape to be exploded.
5477         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5478         #  @param theName Object name; when specified, this parameter is used
5479         #         for result publication in the study. Otherwise, if automatic
5480         #         publication is switched on, default value is used for result name.
5481         #
5482         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5483         #
5484         #  @ref swig_SubShapeAllSorted "Example"
5485         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5486             """
5487             Explode a shape on sub-shapes of a given type.
5488             Sub-shapes will be sorted by coordinates of their gravity centers.
5489             If the shape itself matches the type, it is also returned.
5490
5491             Parameters: 
5492                 aShape Shape to be exploded.
5493                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5494                 theName Object name; when specified, this parameter is used
5495                         for result publication in the study. Otherwise, if automatic
5496                         publication is switched on, default value is used for result name.
5497
5498             Returns: 
5499                 List of sub-shapes of type theShapeType, contained in theShape.
5500             """
5501             # Example: see GEOM_TestAll.py
5502             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5503             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5504             self._autoPublish(ListObj, theName, "subshape")
5505             return ListObj
5506
5507         ## Explode a shape on sub-shapes of a given type.
5508         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5509         #  @param aShape Shape to be exploded.
5510         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5511         #  @return List of IDs of sub-shapes.
5512         #
5513         #  @ref swig_all_decompose "Example"
5514         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5515             """
5516             Explode a shape on sub-shapes of a given type.
5517             Sub-shapes will be sorted by coordinates of their gravity centers.
5518
5519             Parameters: 
5520                 aShape Shape to be exploded.
5521                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5522
5523             Returns: 
5524                 List of IDs of sub-shapes.
5525             """
5526             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5527             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5528             return ListIDs
5529
5530         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5531         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5532         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5533         #  @param aShape Shape to get sub-shape of.
5534         #  @param ListOfInd List of sub-shapes indices.
5535         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5536         #  @param theName Object name; when specified, this parameter is used
5537         #         for result publication in the study. Otherwise, if automatic
5538         #         publication is switched on, default value is used for result name.
5539         #
5540         #  @return A compound of sub-shapes of aShape.
5541         #
5542         #  @ref swig_all_decompose "Example"
5543         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5544             """
5545             Obtain a compound of sub-shapes of aShape,
5546             selected by they indices in sorted list of all sub-shapes of type aType.
5547             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5548
5549             Parameters:
5550                 aShape Shape to get sub-shape of.
5551                 ListOfID List of sub-shapes indices.
5552                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5553                 theName Object name; when specified, this parameter is used
5554                         for result publication in the study. Otherwise, if automatic
5555                         publication is switched on, default value is used for result name.
5556
5557             Returns:
5558                 A compound of sub-shapes of aShape.
5559             """
5560             # Example: see GEOM_TestAll.py
5561             ListOfIDs = []
5562             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5563             for ind in ListOfInd:
5564                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5565             # note: auto-publishing is done in self.GetSubShape()
5566             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5567             return anObj
5568
5569         ## Extract shapes (excluding the main shape) of given type.
5570         #  @param aShape The shape.
5571         #  @param aType  The shape type (see ShapeType())
5572         #  @param isSorted Boolean flag to switch sorting on/off.
5573         #  @param theName Object name; when specified, this parameter is used
5574         #         for result publication in the study. Otherwise, if automatic
5575         #         publication is switched on, default value is used for result name.
5576         #
5577         #  @return List of sub-shapes of type aType, contained in aShape.
5578         #
5579         #  @ref swig_FilletChamfer "Example"
5580         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5581             """
5582             Extract shapes (excluding the main shape) of given type.
5583
5584             Parameters:
5585                 aShape The shape.
5586                 aType  The shape type (see geompy.ShapeType)
5587                 isSorted Boolean flag to switch sorting on/off.
5588                 theName Object name; when specified, this parameter is used
5589                         for result publication in the study. Otherwise, if automatic
5590                         publication is switched on, default value is used for result name.
5591
5592             Returns:     
5593                 List of sub-shapes of type aType, contained in aShape.
5594             """
5595             # Example: see GEOM_TestAll.py
5596             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5597             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5598             self._autoPublish(ListObj, theName, "subshape")
5599             return ListObj
5600
5601         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5602         #  @param aShape Main shape.
5603         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5604         #  @param theName Object name; when specified, this parameter is used
5605         #         for result publication in the study. Otherwise, if automatic
5606         #         publication is switched on, default value is used for result name.
5607         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5608         #
5609         #  @ref swig_all_decompose "Example"
5610         def SubShapes(self, aShape, anIDs, theName=None):
5611             """
5612             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5613
5614             Parameters:
5615                 aShape Main shape.
5616                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5617                 theName Object name; when specified, this parameter is used
5618                         for result publication in the study. Otherwise, if automatic
5619                         publication is switched on, default value is used for result name.
5620
5621             Returns:      
5622                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5623             """
5624             # Example: see GEOM_TestAll.py
5625             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5626             RaiseIfFailed("SubShapes", self.ShapesOp)
5627             self._autoPublish(ListObj, theName, "subshape")
5628             return ListObj
5629
5630         # end of l4_decompose
5631         ## @}
5632
5633         ## @addtogroup l4_decompose_d
5634         ## @{
5635
5636         ## Deprecated method
5637         #  It works like SubShapeAllSortedCentres(), but wrongly
5638         #  defines centres of faces, shells and solids.
5639         def SubShapeAllSorted(self, aShape, aType, theName=None):
5640             """
5641             Deprecated method
5642             It works like geompy.SubShapeAllSortedCentres, but wrongly
5643             defines centres of faces, shells and solids.
5644             """
5645             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5646             RaiseIfFailed("MakeExplode", self.ShapesOp)
5647             self._autoPublish(ListObj, theName, "subshape")
5648             return ListObj
5649
5650         ## Deprecated method
5651         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5652         #  defines centres of faces, shells and solids.
5653         def SubShapeAllSortedIDs(self, aShape, aType):
5654             """
5655             Deprecated method
5656             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5657             defines centres of faces, shells and solids.
5658             """
5659             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5660             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5661             return ListIDs
5662
5663         ## Deprecated method
5664         #  It works like SubShapeSortedCentres(), but has a bug
5665         #  (wrongly defines centres of faces, shells and solids).
5666         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5667             """
5668             Deprecated method
5669             It works like geompy.SubShapeSortedCentres, but has a bug
5670             (wrongly defines centres of faces, shells and solids).
5671             """
5672             ListOfIDs = []
5673             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5674             for ind in ListOfInd:
5675                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5676             # note: auto-publishing is done in self.GetSubShape()
5677             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5678             return anObj
5679
5680         # end of l4_decompose_d
5681         ## @}
5682
5683         ## @addtogroup l3_healing
5684         ## @{
5685
5686         ## Apply a sequence of Shape Healing operators to the given object.
5687         #  @param theShape Shape to be processed.
5688         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5689         #  @param theParameters List of names of parameters
5690         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5691         #  @param theValues List of values of parameters, in the same order
5692         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5693         #  @param theName Object name; when specified, this parameter is used
5694         #         for result publication in the study. Otherwise, if automatic
5695         #         publication is switched on, default value is used for result name.
5696         #
5697         #  <b> Operators and Parameters: </b> \n
5698         #
5699         #  * \b FixShape - corrects invalid shapes. \n
5700         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5701         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5702         #
5703         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5704         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5705         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5706         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5707         #
5708         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5709         #    surfaces in segments using a certain angle. \n
5710         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5711         #    if Angle=180, four if Angle=90, etc). \n
5712         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5713         #
5714         #  * \b SplitClosedFaces - splits closed faces in segments.
5715         #    The number of segments depends on the number of splitting points.\n
5716         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5717         #
5718         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5719         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5720         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5721         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5722         #   This and the previous parameters can take the following values:\n
5723         #   \b Parametric \b Continuity \n
5724         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5725         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5726         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5727         #    ruling out sharp edges).\n
5728         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5729         #       are of the same magnitude).\n
5730         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5731         #    or surfaces (d/du C(u)) are the same at junction. \n
5732         #   \b Geometric \b Continuity \n
5733         #   \b G1: first derivatives are proportional at junction.\n
5734         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5735         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5736         #   \b G2: first and second derivatives are proportional at junction.
5737         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5738         #    continuity requires that the underlying parameterization was continuous as well.
5739         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5740         #
5741         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5742         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5743         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5744         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5745         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5746         #       with the specified parameters.\n
5747         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5748         #       with the specified parameters.\n
5749         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5750         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5751         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5752         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5753         #
5754         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5755         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5756         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5757         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5758         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5759         #
5760         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5761         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5762         #
5763         #
5764         #  @return New GEOM.GEOM_Object, containing processed shape.
5765         #
5766         #  \n @ref tui_shape_processing "Example"
5767         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5768             """
5769             Apply a sequence of Shape Healing operators to the given object.
5770
5771             Parameters:
5772                 theShape Shape to be processed.
5773                 theValues List of values of parameters, in the same order
5774                           as parameters are listed in theParameters list.
5775                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5776                 theParameters List of names of parameters
5777                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5778                 theName Object name; when specified, this parameter is used
5779                         for result publication in the study. Otherwise, if automatic
5780                         publication is switched on, default value is used for result name.
5781
5782                 Operators and Parameters:
5783
5784                  * FixShape - corrects invalid shapes.
5785                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5786                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5787                  * FixFaceSize - removes small faces, such as spots and strips.
5788                      * FixFaceSize.Tolerance - defines minimum possible face size.
5789                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5790                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5791                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5792                                 in segments using a certain angle.
5793                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5794                                           if Angle=180, four if Angle=90, etc).
5795                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5796                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5797                                       splitting points.
5798                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5799                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5800                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5801                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5802                      * SplitContinuity.CurveContinuity - required continuity for curves.
5803                        This and the previous parameters can take the following values:
5804                        
5805                        Parametric Continuity:
5806                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5807                                                    coincidental. The curves or surfaces may still meet at an angle,
5808                                                    giving rise to a sharp corner or edge).
5809                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5810                                                    are parallel, ruling out sharp edges).
5811                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5812                                                   or surfaces are of the same magnitude).
5813                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5814                           curves or surfaces (d/du C(u)) are the same at junction.
5815                           
5816                        Geometric Continuity:
5817                        G1: first derivatives are proportional at junction.
5818                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5819                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5820                        G2: first and second derivatives are proportional at junction. As the names imply,
5821                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5822                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5823                            geometric continuity of order n, but not vice-versa.
5824                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5825                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5826                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5827                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5828                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5829                                                         the specified parameters.
5830                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5831                                                         the specified parameters.
5832                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5833                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5834                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5835                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5836                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5837                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5838                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5839                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5840                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5841                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5842                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5843
5844             Returns:
5845                 New GEOM.GEOM_Object, containing processed shape.
5846
5847             Note: For more information look through SALOME Geometry User's Guide->
5848                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5849             """
5850             # Example: see GEOM_TestHealing.py
5851             theValues,Parameters = ParseList(theValues)
5852             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5853             # To avoid script failure in case of good argument shape
5854             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5855                 return theShape
5856             RaiseIfFailed("ProcessShape", self.HealOp)
5857             for string in (theOperators + theParameters):
5858                 Parameters = ":" + Parameters
5859                 pass
5860             anObj.SetParameters(Parameters)
5861             self._autoPublish(anObj, theName, "healed")
5862             return anObj
5863
5864         ## Remove faces from the given object (shape).
5865         #  @param theObject Shape to be processed.
5866         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5867         #                  removes ALL faces of the given object.
5868         #  @param theName Object name; when specified, this parameter is used
5869         #         for result publication in the study. Otherwise, if automatic
5870         #         publication is switched on, default value is used for result name.
5871         #
5872         #  @return New GEOM.GEOM_Object, containing processed shape.
5873         #
5874         #  @ref tui_suppress_faces "Example"
5875         def SuppressFaces(self, theObject, theFaces, theName=None):
5876             """
5877             Remove faces from the given object (shape).
5878
5879             Parameters:
5880                 theObject Shape to be processed.
5881                 theFaces Indices of faces to be removed, if EMPTY then the method
5882                          removes ALL faces of the given object.
5883                 theName Object name; when specified, this parameter is used
5884                         for result publication in the study. Otherwise, if automatic
5885                         publication is switched on, default value is used for result name.
5886
5887             Returns:
5888                 New GEOM.GEOM_Object, containing processed shape.
5889             """
5890             # Example: see GEOM_TestHealing.py
5891             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5892             RaiseIfFailed("SuppressFaces", self.HealOp)
5893             self._autoPublish(anObj, theName, "suppressFaces")
5894             return anObj
5895
5896         ## Sewing of some shapes into single shape.
5897         #  @param ListShape Shapes to be processed.
5898         #  @param theTolerance Required tolerance value.
5899         #  @param theName Object name; when specified, this parameter is used
5900         #         for result publication in the study. Otherwise, if automatic
5901         #         publication is switched on, default value is used for result name.
5902         #
5903         #  @return New GEOM.GEOM_Object, containing processed shape.
5904         #
5905         #  @ref tui_sewing "Example"
5906         def MakeSewing(self, ListShape, theTolerance, theName=None):
5907             """
5908             Sewing of some shapes into single shape.
5909
5910             Parameters:
5911                 ListShape Shapes to be processed.
5912                 theTolerance Required tolerance value.
5913                 theName Object name; when specified, this parameter is used
5914                         for result publication in the study. Otherwise, if automatic
5915                         publication is switched on, default value is used for result name.
5916
5917             Returns:
5918                 New GEOM.GEOM_Object, containing processed shape.
5919             """
5920             # Example: see GEOM_TestHealing.py
5921             comp = self.MakeCompound(ListShape)
5922             # note: auto-publishing is done in self.Sew()
5923             anObj = self.Sew(comp, theTolerance, theName)
5924             return anObj
5925
5926         ## Sewing of the given object.
5927         #  @param theObject Shape to be processed.
5928         #  @param theTolerance Required tolerance value.
5929         #  @param theName Object name; when specified, this parameter is used
5930         #         for result publication in the study. Otherwise, if automatic
5931         #         publication is switched on, default value is used for result name.
5932         #
5933         #  @return New GEOM.GEOM_Object, containing processed shape.
5934         def Sew(self, theObject, theTolerance, theName=None):
5935             """
5936             Sewing of the given object.
5937
5938             Parameters:
5939                 theObject Shape to be processed.
5940                 theTolerance Required tolerance value.
5941                 theName Object name; when specified, this parameter is used
5942                         for result publication in the study. Otherwise, if automatic
5943                         publication is switched on, default value is used for result name.
5944
5945             Returns:
5946                 New GEOM.GEOM_Object, containing processed shape.
5947             """
5948             # Example: see MakeSewing() above
5949             theTolerance,Parameters = ParseParameters(theTolerance)
5950             anObj = self.HealOp.Sew(theObject, theTolerance)
5951             RaiseIfFailed("Sew", self.HealOp)
5952             anObj.SetParameters(Parameters)
5953             self._autoPublish(anObj, theName, "sewed")
5954             return anObj
5955
5956         ## Remove internal wires and edges from the given object (face).
5957         #  @param theObject Shape to be processed.
5958         #  @param theWires Indices of wires to be removed, if EMPTY then the method
5959         #                  removes ALL internal wires of the given object.
5960         #  @param theName Object name; when specified, this parameter is used
5961         #         for result publication in the study. Otherwise, if automatic
5962         #         publication is switched on, default value is used for result name.
5963         #
5964         #  @return New GEOM.GEOM_Object, containing processed shape.
5965         #
5966         #  @ref tui_suppress_internal_wires "Example"
5967         def SuppressInternalWires(self, theObject, theWires, theName=None):
5968             """
5969             Remove internal wires and edges from the given object (face).
5970
5971             Parameters:
5972                 theObject Shape to be processed.
5973                 theWires Indices of wires to be removed, if EMPTY then the method
5974                          removes ALL internal wires of the given object.
5975                 theName Object name; when specified, this parameter is used
5976                         for result publication in the study. Otherwise, if automatic
5977                         publication is switched on, default value is used for result name.
5978
5979             Returns:                
5980                 New GEOM.GEOM_Object, containing processed shape.
5981             """
5982             # Example: see GEOM_TestHealing.py
5983             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
5984             RaiseIfFailed("RemoveIntWires", self.HealOp)
5985             self._autoPublish(anObj, theName, "suppressWires")
5986             return anObj
5987
5988         ## Remove internal closed contours (holes) from the given object.
5989         #  @param theObject Shape to be processed.
5990         #  @param theWires Indices of wires to be removed, if EMPTY then the method
5991         #                  removes ALL internal holes of the given object
5992         #  @param theName Object name; when specified, this parameter is used
5993         #         for result publication in the study. Otherwise, if automatic
5994         #         publication is switched on, default value is used for result name.
5995         #
5996         #  @return New GEOM.GEOM_Object, containing processed shape.
5997         #
5998         #  @ref tui_suppress_holes "Example"
5999         def SuppressHoles(self, theObject, theWires, theName=None):
6000             """
6001             Remove internal closed contours (holes) from the given object.
6002
6003             Parameters:
6004                 theObject Shape to be processed.
6005                 theWires Indices of wires to be removed, if EMPTY then the method
6006                          removes ALL internal holes of the given object
6007                 theName Object name; when specified, this parameter is used
6008                         for result publication in the study. Otherwise, if automatic
6009                         publication is switched on, default value is used for result name.
6010
6011             Returns:    
6012                 New GEOM.GEOM_Object, containing processed shape.
6013             """
6014             # Example: see GEOM_TestHealing.py
6015             anObj = self.HealOp.FillHoles(theObject, theWires)
6016             RaiseIfFailed("FillHoles", self.HealOp)
6017             self._autoPublish(anObj, theName, "suppressHoles")
6018             return anObj
6019
6020         ## Close an open wire.
6021         #  @param theObject Shape to be processed.
6022         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6023         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6024         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6025         #                        If False : closure by creation of an edge between ends.
6026         #  @param theName Object name; when specified, this parameter is used
6027         #         for result publication in the study. Otherwise, if automatic
6028         #         publication is switched on, default value is used for result name.
6029         #
6030         #  @return New GEOM.GEOM_Object, containing processed shape.
6031         #
6032         #  @ref tui_close_contour "Example"
6033         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6034             """
6035             Close an open wire.
6036
6037             Parameters: 
6038                 theObject Shape to be processed.
6039                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6040                          if [ ], then theObject itself is a wire.
6041                 isCommonVertex If True  : closure by creation of a common vertex,
6042                                If False : closure by creation of an edge between ends.
6043                 theName Object name; when specified, this parameter is used
6044                         for result publication in the study. Otherwise, if automatic
6045                         publication is switched on, default value is used for result name.
6046
6047             Returns:                      
6048                 New GEOM.GEOM_Object, containing processed shape. 
6049             """
6050             # Example: see GEOM_TestHealing.py
6051             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6052             RaiseIfFailed("CloseContour", self.HealOp)
6053             self._autoPublish(anObj, theName, "closeContour")
6054             return anObj
6055
6056         ## Addition of a point to a given edge object.
6057         #  @param theObject Shape to be processed.
6058         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6059         #                      if -1, then theObject itself is the edge.
6060         #  @param theValue Value of parameter on edge or length parameter,
6061         #                  depending on \a isByParameter.
6062         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6063         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6064         #  @param theName Object name; when specified, this parameter is used
6065         #         for result publication in the study. Otherwise, if automatic
6066         #         publication is switched on, default value is used for result name.
6067         #
6068         #  @return New GEOM.GEOM_Object, containing processed shape.
6069         #
6070         #  @ref tui_add_point_on_edge "Example"
6071         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6072             """
6073             Addition of a point to a given edge object.
6074
6075             Parameters: 
6076                 theObject Shape to be processed.
6077                 theEdgeIndex Index of edge to be divided within theObject's shape,
6078                              if -1, then theObject itself is the edge.
6079                 theValue Value of parameter on edge or length parameter,
6080                          depending on isByParameter.
6081                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6082                               if FALSE : theValue is treated as a length parameter [0..1]
6083                 theName Object name; when specified, this parameter is used
6084                         for result publication in the study. Otherwise, if automatic
6085                         publication is switched on, default value is used for result name.
6086
6087             Returns:  
6088                 New GEOM.GEOM_Object, containing processed shape.
6089             """
6090             # Example: see GEOM_TestHealing.py
6091             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6092             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6093             RaiseIfFailed("DivideEdge", self.HealOp)
6094             anObj.SetParameters(Parameters)
6095             self._autoPublish(anObj, theName, "divideEdge")
6096             return anObj
6097
6098         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6099         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6100         #  @param theVertices A list of vertices to suppress. If the list
6101         #                     is empty, all vertices in a wire will be assumed.
6102         #  @param theName Object name; when specified, this parameter is used
6103         #         for result publication in the study. Otherwise, if automatic
6104         #         publication is switched on, default value is used for result name.
6105         #
6106         #  @return New GEOM.GEOM_Object with modified wire.
6107         #
6108         #  @ref tui_fuse_collinear_edges "Example"
6109         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6110             """
6111             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6112
6113             Parameters: 
6114                 theWire Wire to minimize the number of C1 continuous edges in.
6115                 theVertices A list of vertices to suppress. If the list
6116                             is empty, all vertices in a wire will be assumed.
6117                 theName Object name; when specified, this parameter is used
6118                         for result publication in the study. Otherwise, if automatic
6119                         publication is switched on, default value is used for result name.
6120
6121             Returns:  
6122                 New GEOM.GEOM_Object with modified wire.
6123             """
6124             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6125             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6126             self._autoPublish(anObj, theName, "fuseEdges")
6127             return anObj
6128
6129         ## Change orientation of the given object. Updates given shape.
6130         #  @param theObject Shape to be processed.
6131         #  @return Updated <var>theObject</var>
6132         #
6133         #  @ref swig_todo "Example"
6134         def ChangeOrientationShell(self,theObject):
6135             """
6136             Change orientation of the given object. Updates given shape.
6137
6138             Parameters: 
6139                 theObject Shape to be processed.
6140
6141             Returns:  
6142                 Updated theObject
6143             """
6144             theObject = self.HealOp.ChangeOrientation(theObject)
6145             RaiseIfFailed("ChangeOrientation", self.HealOp)
6146             pass
6147
6148         ## Change orientation of the given object.
6149         #  @param theObject Shape to be processed.
6150         #  @param theName Object name; when specified, this parameter is used
6151         #         for result publication in the study. Otherwise, if automatic
6152         #         publication is switched on, default value is used for result name.
6153         #
6154         #  @return New GEOM.GEOM_Object, containing processed shape.
6155         #
6156         #  @ref swig_todo "Example"
6157         def ChangeOrientationShellCopy(self, theObject, theName=None):
6158             """
6159             Change orientation of the given object.
6160
6161             Parameters:
6162                 theObject Shape to be processed.
6163                 theName Object name; when specified, this parameter is used
6164                         for result publication in the study. Otherwise, if automatic
6165                         publication is switched on, default value is used for result name.
6166
6167             Returns:   
6168                 New GEOM.GEOM_Object, containing processed shape.
6169             """
6170             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6171             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6172             self._autoPublish(anObj, theName, "reversed")
6173             return anObj
6174
6175         ## Try to limit tolerance of the given object by value \a theTolerance.
6176         #  @param theObject Shape to be processed.
6177         #  @param theTolerance Required tolerance value.
6178         #  @param theName Object name; when specified, this parameter is used
6179         #         for result publication in the study. Otherwise, if automatic
6180         #         publication is switched on, default value is used for result name.
6181         #
6182         #  @return New GEOM.GEOM_Object, containing processed shape.
6183         #
6184         #  @ref tui_limit_tolerance "Example"
6185         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6186             """
6187             Try to limit tolerance of the given object by value theTolerance.
6188
6189             Parameters:
6190                 theObject Shape to be processed.
6191                 theTolerance Required tolerance value.
6192                 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             Returns:   
6197                 New GEOM.GEOM_Object, containing processed shape.
6198             """
6199             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6200             RaiseIfFailed("LimitTolerance", self.HealOp)
6201             self._autoPublish(anObj, theName, "limitTolerance")
6202             return anObj
6203
6204         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6205         #  that constitute a free boundary of the given shape.
6206         #  @param theObject Shape to get free boundary of.
6207         #  @param theName Object name; when specified, this parameter is used
6208         #         for result publication in the study. Otherwise, if automatic
6209         #         publication is switched on, default value is used for result name.
6210         #
6211         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6212         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6213         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6214         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6215         #
6216         #  @ref tui_measurement_tools_page "Example"
6217         def GetFreeBoundary(self, theObject, theName=None):
6218             """
6219             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6220             that constitute a free boundary of the given shape.
6221
6222             Parameters:
6223                 theObject Shape to get free boundary of.
6224                 theName Object name; when specified, this parameter is used
6225                         for result publication in the study. Otherwise, if automatic
6226                         publication is switched on, default value is used for result name.
6227
6228             Returns: 
6229                 [status, theClosedWires, theOpenWires]
6230                  status: FALSE, if an error(s) occured during the method execution.
6231                  theClosedWires: Closed wires on the free boundary of the given shape.
6232                  theOpenWires: Open wires on the free boundary of the given shape.
6233             """
6234             # Example: see GEOM_TestHealing.py
6235             anObj = self.HealOp.GetFreeBoundary(theObject)
6236             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6237             self._autoPublish(anObj[1], theName, "closedWire")
6238             self._autoPublish(anObj[2], theName, "openWire")
6239             return anObj
6240
6241         ## Replace coincident faces in theShape by one face.
6242         #  @param theShape Initial shape.
6243         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6244         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6245         #                         otherwise all initial shapes.
6246         #  @param theName Object name; when specified, this parameter is used
6247         #         for result publication in the study. Otherwise, if automatic
6248         #         publication is switched on, default value is used for result name.
6249         #
6250         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6251         #
6252         #  @ref tui_glue_faces "Example"
6253         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6254             """
6255             Replace coincident faces in theShape by one face.
6256
6257             Parameters:
6258                 theShape Initial shape.
6259                 theTolerance Maximum distance between faces, which can be considered as coincident.
6260                 doKeepNonSolids If FALSE, only solids will present in the result,
6261                                 otherwise all initial shapes.
6262                 theName Object name; when specified, this parameter is used
6263                         for result publication in the study. Otherwise, if automatic
6264                         publication is switched on, default value is used for result name.
6265
6266             Returns:
6267                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6268             """
6269             # Example: see GEOM_Spanner.py
6270             theTolerance,Parameters = ParseParameters(theTolerance)
6271             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6272             if anObj is None:
6273                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6274             anObj.SetParameters(Parameters)
6275             self._autoPublish(anObj, theName, "glueFaces")
6276             return anObj
6277
6278         ## Find coincident faces in theShape for possible gluing.
6279         #  @param theShape Initial shape.
6280         #  @param theTolerance Maximum distance between faces,
6281         #                      which can be considered as coincident.
6282         #  @param theName Object name; when specified, this parameter is used
6283         #         for result publication in the study. Otherwise, if automatic
6284         #         publication is switched on, default value is used for result name.
6285         #
6286         #  @return GEOM.ListOfGO
6287         #
6288         #  @ref tui_glue_faces "Example"
6289         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6290             """
6291             Find coincident faces in theShape for possible gluing.
6292
6293             Parameters:
6294                 theShape Initial shape.
6295                 theTolerance Maximum distance between faces,
6296                              which can be considered as coincident.
6297                 theName Object name; when specified, this parameter is used
6298                         for result publication in the study. Otherwise, if automatic
6299                         publication is switched on, default value is used for result name.
6300
6301             Returns:                    
6302                 GEOM.ListOfGO
6303             """
6304             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6305             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6306             self._autoPublish(anObj, theName, "facesToGlue")
6307             return anObj
6308
6309         ## Replace coincident faces in theShape by one face
6310         #  in compliance with given list of faces
6311         #  @param theShape Initial shape.
6312         #  @param theTolerance Maximum distance between faces,
6313         #                      which can be considered as coincident.
6314         #  @param theFaces List of faces for gluing.
6315         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6316         #                         otherwise all initial shapes.
6317         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6318         #                        will be glued, otherwise only the edges,
6319         #                        belonging to <VAR>theFaces</VAR>.
6320         #  @param theName Object name; when specified, this parameter is used
6321         #         for result publication in the study. Otherwise, if automatic
6322         #         publication is switched on, default value is used for result name.
6323         #
6324         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6325         #          without some faces.
6326         #
6327         #  @ref tui_glue_faces "Example"
6328         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6329                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6330             """
6331             Replace coincident faces in theShape by one face
6332             in compliance with given list of faces
6333
6334             Parameters:
6335                 theShape Initial shape.
6336                 theTolerance Maximum distance between faces,
6337                              which can be considered as coincident.
6338                 theFaces List of faces for gluing.
6339                 doKeepNonSolids If FALSE, only solids will present in the result,
6340                                 otherwise all initial shapes.
6341                 doGlueAllEdges If TRUE, all coincident edges of theShape
6342                                will be glued, otherwise only the edges,
6343                                belonging to theFaces.
6344                 theName Object name; when specified, this parameter is used
6345                         for result publication in the study. Otherwise, if automatic
6346                         publication is switched on, default value is used for result name.
6347
6348             Returns:
6349                 New GEOM.GEOM_Object, containing a copy of theShape
6350                     without some faces.
6351             """
6352             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6353                                                       doKeepNonSolids, doGlueAllEdges)
6354             if anObj is None:
6355                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6356             self._autoPublish(anObj, theName, "glueFaces")
6357             return anObj
6358
6359         ## Replace coincident edges in theShape by one edge.
6360         #  @param theShape Initial shape.
6361         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6362         #  @param theName Object name; when specified, this parameter is used
6363         #         for result publication in the study. Otherwise, if automatic
6364         #         publication is switched on, default value is used for result name.
6365         #
6366         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6367         #
6368         #  @ref tui_glue_edges "Example"
6369         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6370             """
6371             Replace coincident edges in theShape by one edge.
6372
6373             Parameters:
6374                 theShape Initial shape.
6375                 theTolerance Maximum distance between edges, which can be considered as coincident.
6376                 theName Object name; when specified, this parameter is used
6377                         for result publication in the study. Otherwise, if automatic
6378                         publication is switched on, default value is used for result name.
6379
6380             Returns:    
6381                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6382             """
6383             theTolerance,Parameters = ParseParameters(theTolerance)
6384             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6385             if anObj is None:
6386                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6387             anObj.SetParameters(Parameters)
6388             self._autoPublish(anObj, theName, "glueEdges")
6389             return anObj
6390
6391         ## Find coincident edges in theShape for possible gluing.
6392         #  @param theShape Initial shape.
6393         #  @param theTolerance Maximum distance between edges,
6394         #                      which can be considered as coincident.
6395         #  @param theName Object name; when specified, this parameter is used
6396         #         for result publication in the study. Otherwise, if automatic
6397         #         publication is switched on, default value is used for result name.
6398         #
6399         #  @return GEOM.ListOfGO
6400         #
6401         #  @ref tui_glue_edges "Example"
6402         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6403             """
6404             Find coincident edges in theShape for possible gluing.
6405
6406             Parameters:
6407                 theShape Initial shape.
6408                 theTolerance Maximum distance between edges,
6409                              which can be considered as coincident.
6410                 theName Object name; when specified, this parameter is used
6411                         for result publication in the study. Otherwise, if automatic
6412                         publication is switched on, default value is used for result name.
6413
6414             Returns:                         
6415                 GEOM.ListOfGO
6416             """
6417             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6418             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6419             self._autoPublish(anObj, theName, "edgesToGlue")
6420             return anObj
6421
6422         ## Replace coincident edges in theShape by one edge
6423         #  in compliance with given list of edges.
6424         #  @param theShape Initial shape.
6425         #  @param theTolerance Maximum distance between edges,
6426         #                      which can be considered as coincident.
6427         #  @param theEdges List of edges for gluing.
6428         #  @param theName Object name; when specified, this parameter is used
6429         #         for result publication in the study. Otherwise, if automatic
6430         #         publication is switched on, default value is used for result name.
6431         #
6432         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6433         #          without some edges.
6434         #
6435         #  @ref tui_glue_edges "Example"
6436         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6437             """
6438             Replace coincident edges in theShape by one edge
6439             in compliance with given list of edges.
6440
6441             Parameters:
6442                 theShape Initial shape.
6443                 theTolerance Maximum distance between edges,
6444                              which can be considered as coincident.
6445                 theEdges List of edges for gluing.
6446                 theName Object name; when specified, this parameter is used
6447                         for result publication in the study. Otherwise, if automatic
6448                         publication is switched on, default value is used for result name.
6449
6450             Returns:  
6451                 New GEOM.GEOM_Object, containing a copy of theShape
6452                 without some edges.
6453             """
6454             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6455             if anObj is None:
6456                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6457             self._autoPublish(anObj, theName, "glueEdges")
6458             return anObj
6459
6460         # end of l3_healing
6461         ## @}
6462
6463         ## @addtogroup l3_boolean Boolean Operations
6464         ## @{
6465
6466         # -----------------------------------------------------------------------------
6467         # Boolean (Common, Cut, Fuse, Section)
6468         # -----------------------------------------------------------------------------
6469
6470         ## Perform one of boolean operations on two given shapes.
6471         #  @param theShape1 First argument for boolean operation.
6472         #  @param theShape2 Second argument for boolean operation.
6473         #  @param theOperation Indicates the operation to be done:\n
6474         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6475         #  @param theName Object name; when specified, this parameter is used
6476         #         for result publication in the study. Otherwise, if automatic
6477         #         publication is switched on, default value is used for result name.
6478         #
6479         #  @return New GEOM.GEOM_Object, containing the result shape.
6480         #
6481         #  @ref tui_fuse "Example"
6482         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6483             """
6484             Perform one of boolean operations on two given shapes.
6485
6486             Parameters: 
6487                 theShape1 First argument for boolean operation.
6488                 theShape2 Second argument for boolean operation.
6489                 theOperation Indicates the operation to be done:
6490                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6491                 theName Object name; when specified, this parameter is used
6492                         for result publication in the study. Otherwise, if automatic
6493                         publication is switched on, default value is used for result name.
6494
6495             Returns:   
6496                 New GEOM.GEOM_Object, containing the result shape.
6497             """
6498             # Example: see GEOM_TestAll.py
6499             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6500             RaiseIfFailed("MakeBoolean", self.BoolOp)
6501             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6502             self._autoPublish(anObj, theName, def_names[theOperation])
6503             return anObj
6504
6505         ## Perform Common boolean operation on two given shapes.
6506         #  @param theShape1 First argument for boolean operation.
6507         #  @param theShape2 Second argument for boolean operation.
6508         #  @param theName Object name; when specified, this parameter is used
6509         #         for result publication in the study. Otherwise, if automatic
6510         #         publication is switched on, default value is used for result name.
6511         #
6512         #  @return New GEOM.GEOM_Object, containing the result shape.
6513         #
6514         #  @ref tui_common "Example 1"
6515         #  \n @ref swig_MakeCommon "Example 2"
6516         def MakeCommon(self, theShape1, theShape2, theName=None):
6517             """
6518             Perform Common boolean operation on two given shapes.
6519
6520             Parameters: 
6521                 theShape1 First argument for boolean operation.
6522                 theShape2 Second argument for boolean operation.
6523                 theName Object name; when specified, this parameter is used
6524                         for result publication in the study. Otherwise, if automatic
6525                         publication is switched on, default value is used for result name.
6526
6527             Returns:   
6528                 New GEOM.GEOM_Object, containing the result shape.
6529             """
6530             # Example: see GEOM_TestOthers.py
6531             # note: auto-publishing is done in self.MakeBoolean()
6532             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6533
6534         ## Perform Cut boolean operation on two given shapes.
6535         #  @param theShape1 First argument for boolean operation.
6536         #  @param theShape2 Second argument for boolean operation.
6537         #  @param theName Object name; when specified, this parameter is used
6538         #         for result publication in the study. Otherwise, if automatic
6539         #         publication is switched on, default value is used for result name.
6540         #
6541         #  @return New GEOM.GEOM_Object, containing the result shape.
6542         #
6543         #  @ref tui_cut "Example 1"
6544         #  \n @ref swig_MakeCommon "Example 2"
6545         def MakeCut(self, theShape1, theShape2, theName=None):
6546             """
6547             Perform Cut boolean operation on two given shapes.
6548
6549             Parameters: 
6550                 theShape1 First argument for boolean operation.
6551                 theShape2 Second argument for boolean operation.
6552                 theName Object name; when specified, this parameter is used
6553                         for result publication in the study. Otherwise, if automatic
6554                         publication is switched on, default value is used for result name.
6555
6556             Returns:   
6557                 New GEOM.GEOM_Object, containing the result shape.
6558             
6559             """
6560             # Example: see GEOM_TestOthers.py
6561             # note: auto-publishing is done in self.MakeBoolean()
6562             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6563
6564         ## Perform Fuse boolean operation on two given shapes.
6565         #  @param theShape1 First argument for boolean operation.
6566         #  @param theShape2 Second argument for boolean operation.
6567         #  @param theName Object name; when specified, this parameter is used
6568         #         for result publication in the study. Otherwise, if automatic
6569         #         publication is switched on, default value is used for result name.
6570         #
6571         #  @return New GEOM.GEOM_Object, containing the result shape.
6572         #
6573         #  @ref tui_fuse "Example 1"
6574         #  \n @ref swig_MakeCommon "Example 2"
6575         def MakeFuse(self, theShape1, theShape2, theName=None):
6576             """
6577             Perform Fuse boolean operation on two given shapes.
6578
6579             Parameters: 
6580                 theShape1 First argument for boolean operation.
6581                 theShape2 Second argument for boolean operation.
6582                 theName Object name; when specified, this parameter is used
6583                         for result publication in the study. Otherwise, if automatic
6584                         publication is switched on, default value is used for result name.
6585
6586             Returns:   
6587                 New GEOM.GEOM_Object, containing the result shape.
6588             
6589             """
6590             # Example: see GEOM_TestOthers.py
6591             # note: auto-publishing is done in self.MakeBoolean()
6592             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6593
6594         ## Perform Section boolean operation on two given shapes.
6595         #  @param theShape1 First argument for boolean operation.
6596         #  @param theShape2 Second argument for boolean operation.
6597         #  @param theName Object name; when specified, this parameter is used
6598         #         for result publication in the study. Otherwise, if automatic
6599         #         publication is switched on, default value is used for result name.
6600         #
6601         #  @return New GEOM.GEOM_Object, containing the result shape.
6602         #
6603         #  @ref tui_section "Example 1"
6604         #  \n @ref swig_MakeCommon "Example 2"
6605         def MakeSection(self, theShape1, theShape2, theName=None):
6606             """
6607             Perform Section boolean operation on two given shapes.
6608
6609             Parameters: 
6610                 theShape1 First argument for boolean operation.
6611                 theShape2 Second argument for boolean operation.
6612                 theName Object name; when specified, this parameter is used
6613                         for result publication in the study. Otherwise, if automatic
6614                         publication is switched on, default value is used for result name.
6615
6616             Returns:   
6617                 New GEOM.GEOM_Object, containing the result shape.
6618             
6619             """
6620             # Example: see GEOM_TestOthers.py
6621             # note: auto-publishing is done in self.MakeBoolean()
6622             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6623
6624         # end of l3_boolean
6625         ## @}
6626
6627         ## @addtogroup l3_basic_op
6628         ## @{
6629
6630         ## Perform partition operation.
6631         #  @param ListShapes Shapes to be intersected.
6632         #  @param ListTools Shapes to intersect theShapes.
6633         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6634         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6635         #         type will be detected automatically.
6636         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6637         #                             target type (equal to Limit) are kept in the result,
6638         #                             else standalone shapes of lower dimension
6639         #                             are kept also (if they exist).
6640         #  @param theName Object name; when specified, this parameter is used
6641         #         for result publication in the study. Otherwise, if automatic
6642         #         publication is switched on, default value is used for result name.
6643         #
6644         #  @note Each compound from ListShapes and ListTools will be exploded
6645         #        in order to avoid possible intersection between shapes from this compound.
6646         #
6647         #  After implementation new version of PartitionAlgo (October 2006)
6648         #  other parameters are ignored by current functionality. They are kept
6649         #  in this function only for support old versions.
6650         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6651         #         Each shape from theKeepInside must belong to theShapes also.
6652         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6653         #         Each shape from theRemoveInside must belong to theShapes also.
6654         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6655         #      @param ListMaterials Material indices for each shape. Make sence,
6656         #         only if theRemoveWebs is TRUE.
6657         #
6658         #  @return New GEOM.GEOM_Object, containing the result shapes.
6659         #
6660         #  @ref tui_partition "Example"
6661         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6662                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6663                           KeepNonlimitShapes=0, theName=None):
6664             """
6665             Perform partition operation.
6666
6667             Parameters: 
6668                 ListShapes Shapes to be intersected.
6669                 ListTools Shapes to intersect theShapes.
6670                 Limit Type of resulting shapes (see geompy.ShapeType)
6671                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6672                       type will be detected automatically.
6673                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6674                                     target type (equal to Limit) are kept in the result,
6675                                     else standalone shapes of lower dimension
6676                                     are kept also (if they exist).
6677                 theName Object name; when specified, this parameter is used
6678                         for result publication in the study. Otherwise, if automatic
6679                         publication is switched on, default value is used for result name.
6680             Note:
6681                     Each compound from ListShapes and ListTools will be exploded
6682                     in order to avoid possible intersection between shapes from
6683                     this compound.
6684                     
6685             After implementation new version of PartitionAlgo (October 2006) other
6686             parameters are ignored by current functionality. They are kept in this
6687             function only for support old versions.
6688             
6689             Ignored parameters:
6690                 ListKeepInside Shapes, outside which the results will be deleted.
6691                                Each shape from theKeepInside must belong to theShapes also.
6692                 ListRemoveInside Shapes, inside which the results will be deleted.
6693                                  Each shape from theRemoveInside must belong to theShapes also.
6694                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6695                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6696
6697             Returns:   
6698                 New GEOM.GEOM_Object, containing the result shapes.
6699             """
6700             # Example: see GEOM_TestAll.py
6701             if Limit == self.ShapeType["AUTO"]:
6702                 # automatic detection of the most appropriate shape limit type
6703                 lim = GEOM.SHAPE
6704                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6705                 Limit = EnumToLong(lim)
6706                 pass
6707             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6708                                               ListKeepInside, ListRemoveInside,
6709                                               Limit, RemoveWebs, ListMaterials,
6710                                               KeepNonlimitShapes);
6711             RaiseIfFailed("MakePartition", self.BoolOp)
6712             self._autoPublish(anObj, theName, "partition")
6713             return anObj
6714
6715         ## Perform partition operation.
6716         #  This method may be useful if it is needed to make a partition for
6717         #  compound contains nonintersected shapes. Performance will be better
6718         #  since intersection between shapes from compound is not performed.
6719         #
6720         #  Description of all parameters as in previous method MakePartition()
6721         #
6722         #  @note Passed compounds (via ListShapes or via ListTools)
6723         #           have to consist of nonintersecting shapes.
6724         #
6725         #  @return New GEOM.GEOM_Object, containing the result shapes.
6726         #
6727         #  @ref swig_todo "Example"
6728         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6729                                                  ListKeepInside=[], ListRemoveInside=[],
6730                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6731                                                  ListMaterials=[], KeepNonlimitShapes=0,
6732                                                  theName=None):
6733             """
6734             Perform partition operation.
6735             This method may be useful if it is needed to make a partition for
6736             compound contains nonintersected shapes. Performance will be better
6737             since intersection between shapes from compound is not performed.
6738
6739             Parameters: 
6740                 Description of all parameters as in method geompy.MakePartition
6741         
6742             NOTE:
6743                 Passed compounds (via ListShapes or via ListTools)
6744                 have to consist of nonintersecting shapes.
6745
6746             Returns:   
6747                 New GEOM.GEOM_Object, containing the result shapes.
6748             """
6749             if Limit == self.ShapeType["AUTO"]:
6750                 # automatic detection of the most appropriate shape limit type
6751                 lim = GEOM.SHAPE
6752                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6753                 Limit = EnumToLong(lim)
6754                 pass
6755             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6756                                                                      ListKeepInside, ListRemoveInside,
6757                                                                      Limit, RemoveWebs, ListMaterials,
6758                                                                      KeepNonlimitShapes);
6759             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6760             self._autoPublish(anObj, theName, "partition")
6761             return anObj
6762
6763         ## See method MakePartition() for more information.
6764         #
6765         #  @ref tui_partition "Example 1"
6766         #  \n @ref swig_Partition "Example 2"
6767         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6768                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6769                       KeepNonlimitShapes=0, theName=None):
6770             """
6771             See method geompy.MakePartition for more information.
6772             """
6773             # Example: see GEOM_TestOthers.py
6774             # note: auto-publishing is done in self.MakePartition()
6775             anObj = self.MakePartition(ListShapes, ListTools,
6776                                        ListKeepInside, ListRemoveInside,
6777                                        Limit, RemoveWebs, ListMaterials,
6778                                        KeepNonlimitShapes, theName);
6779             return anObj
6780
6781         ## Perform partition of the Shape with the Plane
6782         #  @param theShape Shape to be intersected.
6783         #  @param thePlane Tool shape, to intersect theShape.
6784         #  @param theName Object name; when specified, this parameter is used
6785         #         for result publication in the study. Otherwise, if automatic
6786         #         publication is switched on, default value is used for result name.
6787         #
6788         #  @return New GEOM.GEOM_Object, containing the result shape.
6789         #
6790         #  @ref tui_partition "Example"
6791         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6792             """
6793             Perform partition of the Shape with the Plane
6794
6795             Parameters: 
6796                 theShape Shape to be intersected.
6797                 thePlane Tool shape, to intersect theShape.
6798                 theName Object name; when specified, this parameter is used
6799                         for result publication in the study. Otherwise, if automatic
6800                         publication is switched on, default value is used for result name.
6801
6802             Returns:  
6803                 New GEOM.GEOM_Object, containing the result shape.
6804             """
6805             # Example: see GEOM_TestAll.py
6806             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
6807             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
6808             self._autoPublish(anObj, theName, "partition")
6809             return anObj
6810
6811         # end of l3_basic_op
6812         ## @}
6813
6814         ## @addtogroup l3_transform
6815         ## @{
6816
6817         ## Translate the given object along the vector, specified
6818         #  by its end points.
6819         #  @param theObject The object to be translated.
6820         #  @param thePoint1 Start point of translation vector.
6821         #  @param thePoint2 End point of translation vector.
6822         #  @param theCopy Flag used to translate object itself or create a copy.
6823         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6824         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6825         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
6826             """
6827             Translate the given object along the vector, specified by its end points.
6828
6829             Parameters: 
6830                 theObject The object to be translated.
6831                 thePoint1 Start point of translation vector.
6832                 thePoint2 End point of translation vector.
6833                 theCopy Flag used to translate object itself or create a copy.
6834
6835             Returns: 
6836                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6837                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6838             """
6839             if theCopy:
6840                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6841             else:
6842                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
6843             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
6844             return anObj
6845
6846         ## Translate the given object along the vector, specified
6847         #  by its end points, creating its copy before the translation.
6848         #  @param theObject The object to be translated.
6849         #  @param thePoint1 Start point of translation vector.
6850         #  @param thePoint2 End point of translation vector.
6851         #  @param theName Object name; when specified, this parameter is used
6852         #         for result publication in the study. Otherwise, if automatic
6853         #         publication is switched on, default value is used for result name.
6854         #
6855         #  @return New GEOM.GEOM_Object, containing the translated object.
6856         #
6857         #  @ref tui_translation "Example 1"
6858         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
6859         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
6860             """
6861             Translate the given object along the vector, specified
6862             by its end points, creating its copy before the translation.
6863
6864             Parameters: 
6865                 theObject The object to be translated.
6866                 thePoint1 Start point of translation vector.
6867                 thePoint2 End point of translation vector.
6868                 theName Object name; when specified, this parameter is used
6869                         for result publication in the study. Otherwise, if automatic
6870                         publication is switched on, default value is used for result name.
6871
6872             Returns:  
6873                 New GEOM.GEOM_Object, containing the translated object.
6874             """
6875             # Example: see GEOM_TestAll.py
6876             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6877             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
6878             self._autoPublish(anObj, theName, "translated")
6879             return anObj
6880
6881         ## Translate the given object along the vector, specified by its components.
6882         #  @param theObject The object to be translated.
6883         #  @param theDX,theDY,theDZ Components of translation vector.
6884         #  @param theCopy Flag used to translate object itself or create a copy.
6885         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6886         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6887         #
6888         #  @ref tui_translation "Example"
6889         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
6890             """
6891             Translate the given object along the vector, specified by its components.
6892
6893             Parameters: 
6894                 theObject The object to be translated.
6895                 theDX,theDY,theDZ Components of translation vector.
6896                 theCopy Flag used to translate object itself or create a copy.
6897
6898             Returns: 
6899                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6900                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6901             """
6902             # Example: see GEOM_TestAll.py
6903             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
6904             if theCopy:
6905                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
6906             else:
6907                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
6908             anObj.SetParameters(Parameters)
6909             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
6910             return anObj
6911
6912         ## Translate the given object along the vector, specified
6913         #  by its components, creating its copy before the translation.
6914         #  @param theObject The object to be translated.
6915         #  @param theDX,theDY,theDZ Components of translation vector.
6916         #  @param theName Object name; when specified, this parameter is used
6917         #         for result publication in the study. Otherwise, if automatic
6918         #         publication is switched on, default value is used for result name.
6919         #
6920         #  @return New GEOM.GEOM_Object, containing the translated object.
6921         #
6922         #  @ref tui_translation "Example"
6923         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
6924             """
6925             Translate the given object along the vector, specified
6926             by its components, creating its copy before the translation.
6927
6928             Parameters: 
6929                 theObject The object to be translated.
6930                 theDX,theDY,theDZ Components of translation vector.
6931                 theName Object name; when specified, this parameter is used
6932                         for result publication in the study. Otherwise, if automatic
6933                         publication is switched on, default value is used for result name.
6934
6935             Returns: 
6936                 New GEOM.GEOM_Object, containing the translated object.
6937             """
6938             # Example: see GEOM_TestAll.py
6939             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
6940             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
6941             anObj.SetParameters(Parameters)
6942             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
6943             self._autoPublish(anObj, theName, "translated")
6944             return anObj
6945
6946         ## Translate the given object along the given vector.
6947         #  @param theObject The object to be translated.
6948         #  @param theVector The translation vector.
6949         #  @param theCopy Flag used to translate object itself or create a copy.
6950         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6951         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6952         def TranslateVector(self, theObject, theVector, theCopy=False):
6953             """
6954             Translate the given object along the given vector.
6955
6956             Parameters: 
6957                 theObject The object to be translated.
6958                 theVector The translation vector.
6959                 theCopy Flag used to translate object itself or create a copy.
6960
6961             Returns: 
6962                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6963                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6964             """
6965             if theCopy:
6966                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
6967             else:
6968                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
6969             RaiseIfFailed("TranslateVector", self.TrsfOp)
6970             return anObj
6971
6972         ## Translate the given object along the given vector,
6973         #  creating its copy before the translation.
6974         #  @param theObject The object to be translated.
6975         #  @param theVector The translation vector.
6976         #  @param theName Object name; when specified, this parameter is used
6977         #         for result publication in the study. Otherwise, if automatic
6978         #         publication is switched on, default value is used for result name.
6979         #
6980         #  @return New GEOM.GEOM_Object, containing the translated object.
6981         #
6982         #  @ref tui_translation "Example"
6983         def MakeTranslationVector(self, theObject, theVector, theName=None):
6984             """
6985             Translate the given object along the given vector,
6986             creating its copy before the translation.
6987
6988             Parameters: 
6989                 theObject The object to be translated.
6990                 theVector The translation vector.
6991                 theName Object name; when specified, this parameter is used
6992                         for result publication in the study. Otherwise, if automatic
6993                         publication is switched on, default value is used for result name.
6994
6995             Returns: 
6996                 New GEOM.GEOM_Object, containing the translated object.
6997             """
6998             # Example: see GEOM_TestAll.py
6999             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7000             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7001             self._autoPublish(anObj, theName, "translated")
7002             return anObj
7003
7004         ## Translate the given object along the given vector on given distance.
7005         #  @param theObject The object to be translated.
7006         #  @param theVector The translation vector.
7007         #  @param theDistance The translation distance.
7008         #  @param theCopy Flag used to translate object itself or create a copy.
7009         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7010         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7011         #
7012         #  @ref tui_translation "Example"
7013         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7014             """
7015             Translate the given object along the given vector on given distance.
7016
7017             Parameters: 
7018                 theObject The object to be translated.
7019                 theVector The translation vector.
7020                 theDistance The translation distance.
7021                 theCopy Flag used to translate object itself or create a copy.
7022
7023             Returns: 
7024                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7025                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7026             """
7027             # Example: see GEOM_TestAll.py
7028             theDistance,Parameters = ParseParameters(theDistance)
7029             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7030             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7031             anObj.SetParameters(Parameters)
7032             return anObj
7033
7034         ## Translate the given object along the given vector on given distance,
7035         #  creating its copy before the translation.
7036         #  @param theObject The object to be translated.
7037         #  @param theVector The translation vector.
7038         #  @param theDistance The translation distance.
7039         #  @param theName Object name; when specified, this parameter is used
7040         #         for result publication in the study. Otherwise, if automatic
7041         #         publication is switched on, default value is used for result name.
7042         #
7043         #  @return New GEOM.GEOM_Object, containing the translated object.
7044         #
7045         #  @ref tui_translation "Example"
7046         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7047             """
7048             Translate the given object along the given vector on given distance,
7049             creating its copy before the translation.
7050
7051             Parameters:
7052                 theObject The object to be translated.
7053                 theVector The translation vector.
7054                 theDistance The translation distance.
7055                 theName Object name; when specified, this parameter is used
7056                         for result publication in the study. Otherwise, if automatic
7057                         publication is switched on, default value is used for result name.
7058
7059             Returns: 
7060                 New GEOM.GEOM_Object, containing the translated object.
7061             """
7062             # Example: see GEOM_TestAll.py
7063             theDistance,Parameters = ParseParameters(theDistance)
7064             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7065             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7066             anObj.SetParameters(Parameters)
7067             self._autoPublish(anObj, theName, "translated")
7068             return anObj
7069
7070         ## Rotate the given object around the given axis on the given angle.
7071         #  @param theObject The object to be rotated.
7072         #  @param theAxis Rotation axis.
7073         #  @param theAngle Rotation angle in radians.
7074         #  @param theCopy Flag used to rotate object itself or create a copy.
7075         #
7076         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7077         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7078         #
7079         #  @ref tui_rotation "Example"
7080         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7081             """
7082             Rotate the given object around the given axis on the given angle.
7083
7084             Parameters:
7085                 theObject The object to be rotated.
7086                 theAxis Rotation axis.
7087                 theAngle Rotation angle in radians.
7088                 theCopy Flag used to rotate object itself or create a copy.
7089
7090             Returns:
7091                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7092                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7093             """
7094             # Example: see GEOM_TestAll.py
7095             flag = False
7096             if isinstance(theAngle,str):
7097                 flag = True
7098             theAngle, Parameters = ParseParameters(theAngle)
7099             if flag:
7100                 theAngle = theAngle*math.pi/180.0
7101             if theCopy:
7102                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7103             else:
7104                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7105             RaiseIfFailed("Rotate", self.TrsfOp)
7106             anObj.SetParameters(Parameters)
7107             return anObj
7108
7109         ## Rotate the given object around the given axis
7110         #  on the given angle, creating its copy before the rotatation.
7111         #  @param theObject The object to be rotated.
7112         #  @param theAxis Rotation axis.
7113         #  @param theAngle Rotation angle in radians.
7114         #  @param theName Object name; when specified, this parameter is used
7115         #         for result publication in the study. Otherwise, if automatic
7116         #         publication is switched on, default value is used for result name.
7117         #
7118         #  @return New GEOM.GEOM_Object, containing the rotated object.
7119         #
7120         #  @ref tui_rotation "Example"
7121         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7122             """
7123             Rotate the given object around the given axis
7124             on the given angle, creating its copy before the rotatation.
7125
7126             Parameters:
7127                 theObject The object to be rotated.
7128                 theAxis Rotation axis.
7129                 theAngle Rotation angle in radians.
7130                 theName Object name; when specified, this parameter is used
7131                         for result publication in the study. Otherwise, if automatic
7132                         publication is switched on, default value is used for result name.
7133
7134             Returns:
7135                 New GEOM.GEOM_Object, containing the rotated object.
7136             """
7137             # Example: see GEOM_TestAll.py
7138             flag = False
7139             if isinstance(theAngle,str):
7140                 flag = True
7141             theAngle, Parameters = ParseParameters(theAngle)
7142             if flag:
7143                 theAngle = theAngle*math.pi/180.0
7144             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7145             RaiseIfFailed("RotateCopy", self.TrsfOp)
7146             anObj.SetParameters(Parameters)
7147             self._autoPublish(anObj, theName, "rotated")
7148             return anObj
7149
7150         ## Rotate given object around vector perpendicular to plane
7151         #  containing three points.
7152         #  @param theObject The object to be rotated.
7153         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7154         #  containing the three points.
7155         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7156         #  @param theCopy Flag used to rotate object itself or create a copy.
7157         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7158         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7159         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7160             """
7161             Rotate given object around vector perpendicular to plane
7162             containing three points.
7163
7164             Parameters:
7165                 theObject The object to be rotated.
7166                 theCentPoint central point  the axis is the vector perpendicular to the plane
7167                              containing the three points.
7168                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7169                 theCopy Flag used to rotate object itself or create a copy.
7170
7171             Returns:
7172                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7173                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7174             """
7175             if theCopy:
7176                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7177             else:
7178                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7179             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7180             return anObj
7181
7182         ## Rotate given object around vector perpendicular to plane
7183         #  containing three points, creating its copy before the rotatation.
7184         #  @param theObject The object to be rotated.
7185         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7186         #  containing the three points.
7187         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7188         #  @param theName Object name; when specified, this parameter is used
7189         #         for result publication in the study. Otherwise, if automatic
7190         #         publication is switched on, default value is used for result name.
7191         #
7192         #  @return New GEOM.GEOM_Object, containing the rotated object.
7193         #
7194         #  @ref tui_rotation "Example"
7195         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7196             """
7197             Rotate given object around vector perpendicular to plane
7198             containing three points, creating its copy before the rotatation.
7199
7200             Parameters:
7201                 theObject The object to be rotated.
7202                 theCentPoint central point  the axis is the vector perpendicular to the plane
7203                              containing the three points.
7204                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7205                 theName Object name; when specified, this parameter is used
7206                         for result publication in the study. Otherwise, if automatic
7207                         publication is switched on, default value is used for result name.
7208
7209             Returns:
7210                 New GEOM.GEOM_Object, containing the rotated object.
7211             """
7212             # Example: see GEOM_TestAll.py
7213             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7214             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7215             self._autoPublish(anObj, theName, "rotated")
7216             return anObj
7217
7218         ## Scale the given object by the specified factor.
7219         #  @param theObject The object to be scaled.
7220         #  @param thePoint Center point for scaling.
7221         #                  Passing None for it means scaling relatively the origin of global CS.
7222         #  @param theFactor Scaling factor value.
7223         #  @param theCopy Flag used to scale object itself or create a copy.
7224         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7225         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7226         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7227             """
7228             Scale the given object by the specified factor.
7229
7230             Parameters:
7231                 theObject The object to be scaled.
7232                 thePoint Center point for scaling.
7233                          Passing None for it means scaling relatively the origin of global CS.
7234                 theFactor Scaling factor value.
7235                 theCopy Flag used to scale object itself or create a copy.
7236
7237             Returns:    
7238                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7239                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7240             """
7241             # Example: see GEOM_TestAll.py
7242             theFactor, Parameters = ParseParameters(theFactor)
7243             if theCopy:
7244                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7245             else:
7246                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7247             RaiseIfFailed("Scale", self.TrsfOp)
7248             anObj.SetParameters(Parameters)
7249             return anObj
7250
7251         ## Scale the given object by the factor, creating its copy before the scaling.
7252         #  @param theObject The object to be scaled.
7253         #  @param thePoint Center point for scaling.
7254         #                  Passing None for it means scaling relatively the origin of global CS.
7255         #  @param theFactor Scaling factor value.
7256         #  @param theName Object name; when specified, this parameter is used
7257         #         for result publication in the study. Otherwise, if automatic
7258         #         publication is switched on, default value is used for result name.
7259         #
7260         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7261         #
7262         #  @ref tui_scale "Example"
7263         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7264             """
7265             Scale the given object by the factor, creating its copy before the scaling.
7266
7267             Parameters:
7268                 theObject The object to be scaled.
7269                 thePoint Center point for scaling.
7270                          Passing None for it means scaling relatively the origin of global CS.
7271                 theFactor Scaling factor value.
7272                 theName Object name; when specified, this parameter is used
7273                         for result publication in the study. Otherwise, if automatic
7274                         publication is switched on, default value is used for result name.
7275
7276             Returns:    
7277                 New GEOM.GEOM_Object, containing the scaled shape.
7278             """
7279             # Example: see GEOM_TestAll.py
7280             theFactor, Parameters = ParseParameters(theFactor)
7281             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7282             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7283             anObj.SetParameters(Parameters)
7284             self._autoPublish(anObj, theName, "scaled")
7285             return anObj
7286
7287         ## Scale the given object by different factors along coordinate axes.
7288         #  @param theObject The object to be scaled.
7289         #  @param thePoint Center point for scaling.
7290         #                  Passing None for it means scaling relatively the origin of global CS.
7291         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7292         #  @param theCopy Flag used to scale object itself or create a copy.
7293         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7294         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7295         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7296             """
7297             Scale the given object by different factors along coordinate axes.
7298
7299             Parameters:
7300                 theObject The object to be scaled.
7301                 thePoint Center point for scaling.
7302                             Passing None for it means scaling relatively the origin of global CS.
7303                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7304                 theCopy Flag used to scale object itself or create a copy.
7305
7306             Returns:    
7307                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7308                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7309             """
7310             # Example: see GEOM_TestAll.py
7311             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7312             if theCopy:
7313                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7314                                                             theFactorX, theFactorY, theFactorZ)
7315             else:
7316                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7317                                                         theFactorX, theFactorY, theFactorZ)
7318             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7319             anObj.SetParameters(Parameters)
7320             return anObj
7321
7322         ## Scale the given object by different factors along coordinate axes,
7323         #  creating its copy before the scaling.
7324         #  @param theObject The object to be scaled.
7325         #  @param thePoint Center point for scaling.
7326         #                  Passing None for it means scaling relatively the origin of global CS.
7327         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7328         #  @param theName Object name; when specified, this parameter is used
7329         #         for result publication in the study. Otherwise, if automatic
7330         #         publication is switched on, default value is used for result name.
7331         #
7332         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7333         #
7334         #  @ref swig_scale "Example"
7335         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7336             """
7337             Scale the given object by different factors along coordinate axes,
7338             creating its copy before the scaling.
7339
7340             Parameters:
7341                 theObject The object to be scaled.
7342                 thePoint Center point for scaling.
7343                             Passing None for it means scaling relatively the origin of global CS.
7344                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7345                 theName Object name; when specified, this parameter is used
7346                         for result publication in the study. Otherwise, if automatic
7347                         publication is switched on, default value is used for result name.
7348
7349             Returns:
7350                 New GEOM.GEOM_Object, containing the scaled shape.
7351             """
7352             # Example: see GEOM_TestAll.py
7353             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7354             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7355                                                         theFactorX, theFactorY, theFactorZ)
7356             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7357             anObj.SetParameters(Parameters)
7358             self._autoPublish(anObj, theName, "scaled")
7359             return anObj
7360
7361         ## Mirror an object relatively the given plane.
7362         #  @param theObject The object to be mirrored.
7363         #  @param thePlane Plane of symmetry.
7364         #  @param theCopy Flag used to mirror object itself or create a copy.
7365         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7366         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7367         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7368             """
7369             Mirror an object relatively the given plane.
7370
7371             Parameters:
7372                 theObject The object to be mirrored.
7373                 thePlane Plane of symmetry.
7374                 theCopy Flag used to mirror object itself or create a copy.
7375
7376             Returns:
7377                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7378                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7379             """
7380             if theCopy:
7381                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7382             else:
7383                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7384             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7385             return anObj
7386
7387         ## Create an object, symmetrical
7388         #  to the given one relatively the given plane.
7389         #  @param theObject The object to be mirrored.
7390         #  @param thePlane Plane of symmetry.
7391         #  @param theName Object name; when specified, this parameter is used
7392         #         for result publication in the study. Otherwise, if automatic
7393         #         publication is switched on, default value is used for result name.
7394         #
7395         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7396         #
7397         #  @ref tui_mirror "Example"
7398         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7399             """
7400             Create an object, symmetrical to the given one relatively the given plane.
7401
7402             Parameters:
7403                 theObject The object to be mirrored.
7404                 thePlane Plane of symmetry.
7405                 theName Object name; when specified, this parameter is used
7406                         for result publication in the study. Otherwise, if automatic
7407                         publication is switched on, default value is used for result name.
7408
7409             Returns:
7410                 New GEOM.GEOM_Object, containing the mirrored shape.
7411             """
7412             # Example: see GEOM_TestAll.py
7413             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7414             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7415             self._autoPublish(anObj, theName, "mirrored")
7416             return anObj
7417
7418         ## Mirror an object relatively the given axis.
7419         #  @param theObject The object to be mirrored.
7420         #  @param theAxis Axis of symmetry.
7421         #  @param theCopy Flag used to mirror object itself or create a copy.
7422         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7423         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7424         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7425             """
7426             Mirror an object relatively the given axis.
7427
7428             Parameters:
7429                 theObject The object to be mirrored.
7430                 theAxis Axis of symmetry.
7431                 theCopy Flag used to mirror object itself or create a copy.
7432
7433             Returns:
7434                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7435                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7436             """
7437             if theCopy:
7438                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7439             else:
7440                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7441             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7442             return anObj
7443
7444         ## Create an object, symmetrical
7445         #  to the given one relatively the given axis.
7446         #  @param theObject The object to be mirrored.
7447         #  @param theAxis Axis of symmetry.
7448         #  @param theName Object name; when specified, this parameter is used
7449         #         for result publication in the study. Otherwise, if automatic
7450         #         publication is switched on, default value is used for result name.
7451         #
7452         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7453         #
7454         #  @ref tui_mirror "Example"
7455         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7456             """
7457             Create an object, symmetrical to the given one relatively the given axis.
7458
7459             Parameters:
7460                 theObject The object to be mirrored.
7461                 theAxis Axis of symmetry.
7462                 theName Object name; when specified, this parameter is used
7463                         for result publication in the study. Otherwise, if automatic
7464                         publication is switched on, default value is used for result name.
7465
7466             Returns: 
7467                 New GEOM.GEOM_Object, containing the mirrored shape.
7468             """
7469             # Example: see GEOM_TestAll.py
7470             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7471             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7472             self._autoPublish(anObj, theName, "mirrored")
7473             return anObj
7474
7475         ## Mirror an object relatively the given point.
7476         #  @param theObject The object to be mirrored.
7477         #  @param thePoint Point of symmetry.
7478         #  @param theCopy Flag used to mirror object itself or create a copy.
7479         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7480         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7481         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7482             """
7483             Mirror an object relatively the given point.
7484
7485             Parameters:
7486                 theObject The object to be mirrored.
7487                 thePoint Point of symmetry.
7488                 theCopy Flag used to mirror object itself or create a copy.
7489
7490             Returns:
7491                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7492                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7493             """
7494             # Example: see GEOM_TestAll.py
7495             if theCopy:
7496                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7497             else:
7498                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7499             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7500             return anObj
7501
7502         ## Create an object, symmetrical
7503         #  to the given one relatively the given point.
7504         #  @param theObject The object to be mirrored.
7505         #  @param thePoint Point of symmetry.
7506         #  @param theName Object name; when specified, this parameter is used
7507         #         for result publication in the study. Otherwise, if automatic
7508         #         publication is switched on, default value is used for result name.
7509         #
7510         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7511         #
7512         #  @ref tui_mirror "Example"
7513         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7514             """
7515             Create an object, symmetrical
7516             to the given one relatively the given point.
7517
7518             Parameters:
7519                 theObject The object to be mirrored.
7520                 thePoint Point of symmetry.
7521                 theName Object name; when specified, this parameter is used
7522                         for result publication in the study. Otherwise, if automatic
7523                         publication is switched on, default value is used for result name.
7524
7525             Returns:  
7526                 New GEOM.GEOM_Object, containing the mirrored shape.
7527             """
7528             # Example: see GEOM_TestAll.py
7529             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7530             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7531             self._autoPublish(anObj, theName, "mirrored")
7532             return anObj
7533
7534         ## Modify the location of the given object.
7535         #  @param theObject The object to be displaced.
7536         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7537         #                     If \a theStartLCS is NULL, displacement
7538         #                     will be performed from global CS.\n
7539         #                     If \a theObject itself is used as \a theStartLCS,
7540         #                     its location will be changed to \a theEndLCS.
7541         #  @param theEndLCS Coordinate system to perform displacement to it.
7542         #  @param theCopy Flag used to displace object itself or create a copy.
7543         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7544         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7545         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7546             """
7547             Modify the Location of the given object by LCS, creating its copy before the setting.
7548
7549             Parameters:
7550                 theObject The object to be displaced.
7551                 theStartLCS Coordinate system to perform displacement from it.
7552                             If theStartLCS is NULL, displacement
7553                             will be performed from global CS.
7554                             If theObject itself is used as theStartLCS,
7555                             its location will be changed to theEndLCS.
7556                 theEndLCS Coordinate system to perform displacement to it.
7557                 theCopy Flag used to displace object itself or create a copy.
7558
7559             Returns:
7560                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7561                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7562             """
7563             # Example: see GEOM_TestAll.py
7564             if theCopy:
7565                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7566             else:
7567                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7568             RaiseIfFailed("Displace", self.TrsfOp)
7569             return anObj
7570
7571         ## Modify the Location of the given object by LCS,
7572         #  creating its copy before the setting.
7573         #  @param theObject The object to be displaced.
7574         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7575         #                     If \a theStartLCS is NULL, displacement
7576         #                     will be performed from global CS.\n
7577         #                     If \a theObject itself is used as \a theStartLCS,
7578         #                     its location will be changed to \a theEndLCS.
7579         #  @param theEndLCS Coordinate system to perform displacement to it.
7580         #  @param theName Object name; when specified, this parameter is used
7581         #         for result publication in the study. Otherwise, if automatic
7582         #         publication is switched on, default value is used for result name.
7583         #
7584         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7585         #
7586         #  @ref tui_modify_location "Example"
7587         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7588             """
7589             Modify the Location of the given object by LCS, creating its copy before the setting.
7590
7591             Parameters:
7592                 theObject The object to be displaced.
7593                 theStartLCS Coordinate system to perform displacement from it.
7594                             If theStartLCS is NULL, displacement
7595                             will be performed from global CS.
7596                             If theObject itself is used as theStartLCS,
7597                             its location will be changed to theEndLCS.
7598                 theEndLCS Coordinate system to perform displacement to it.
7599                 theName Object name; when specified, this parameter is used
7600                         for result publication in the study. Otherwise, if automatic
7601                         publication is switched on, default value is used for result name.
7602
7603             Returns:  
7604                 New GEOM.GEOM_Object, containing the displaced shape.
7605
7606             Example of usage:
7607                 # create local coordinate systems
7608                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7609                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7610                 # modify the location of the given object
7611                 position = geompy.MakePosition(cylinder, cs1, cs2)
7612             """
7613             # Example: see GEOM_TestAll.py
7614             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7615             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7616             self._autoPublish(anObj, theName, "displaced")
7617             return anObj
7618
7619         ## Modify the Location of the given object by Path.
7620         #  @param  theObject The object to be displaced.
7621         #  @param  thePath Wire or Edge along that the object will be translated.
7622         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7623         #  @param  theCopy is to create a copy objects if true.
7624         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7625         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7626         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7627         #
7628         #  @ref tui_modify_location "Example"
7629         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7630             """
7631             Modify the Location of the given object by Path.
7632
7633             Parameters:
7634                  theObject The object to be displaced.
7635                  thePath Wire or Edge along that the object will be translated.
7636                  theDistance progress of Path (0 = start location, 1 = end of path location).
7637                  theCopy is to create a copy objects if true.
7638                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7639
7640             Returns:  
7641                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7642                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7643
7644             Example of usage:
7645                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7646             """
7647             # Example: see GEOM_TestAll.py
7648             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7649             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7650             return anObj
7651
7652         ## Modify the Location of the given object by Path, creating its copy before the operation.
7653         #  @param theObject The object to be displaced.
7654         #  @param thePath Wire or Edge along that the object will be translated.
7655         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7656         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7657         #  @param theName Object name; when specified, this parameter is used
7658         #         for result publication in the study. Otherwise, if automatic
7659         #         publication is switched on, default value is used for result name.
7660         #
7661         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7662         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7663             """
7664             Modify the Location of the given object by Path, creating its copy before the operation.
7665
7666             Parameters:
7667                  theObject The object to be displaced.
7668                  thePath Wire or Edge along that the object will be translated.
7669                  theDistance progress of Path (0 = start location, 1 = end of path location).
7670                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7671                  theName Object name; when specified, this parameter is used
7672                          for result publication in the study. Otherwise, if automatic
7673                          publication is switched on, default value is used for result name.
7674
7675             Returns:  
7676                 New GEOM.GEOM_Object, containing the displaced shape.
7677             """
7678             # Example: see GEOM_TestAll.py
7679             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7680             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7681             self._autoPublish(anObj, theName, "displaced")
7682             return anObj
7683
7684         ## Offset given shape.
7685         #  @param theObject The base object for the offset.
7686         #  @param theOffset Offset value.
7687         #  @param theCopy Flag used to offset object itself or create a copy.
7688         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7689         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7690         def Offset(self, theObject, theOffset, theCopy=False):
7691             """
7692             Offset given shape.
7693
7694             Parameters:
7695                 theObject The base object for the offset.
7696                 theOffset Offset value.
7697                 theCopy Flag used to offset object itself or create a copy.
7698
7699             Returns: 
7700                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7701                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7702             """
7703             theOffset, Parameters = ParseParameters(theOffset)
7704             if theCopy:
7705                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7706             else:
7707                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7708             RaiseIfFailed("Offset", self.TrsfOp)
7709             anObj.SetParameters(Parameters)
7710             return anObj
7711
7712         ## Create new object as offset of the given one.
7713         #  @param theObject The base object for the offset.
7714         #  @param theOffset Offset value.
7715         #  @param theName Object name; when specified, this parameter is used
7716         #         for result publication in the study. Otherwise, if automatic
7717         #         publication is switched on, default value is used for result name.
7718         #
7719         #  @return New GEOM.GEOM_Object, containing the offset object.
7720         #
7721         #  @ref tui_offset "Example"
7722         def MakeOffset(self, theObject, theOffset, theName=None):
7723             """
7724             Create new object as offset of the given one.
7725
7726             Parameters:
7727                 theObject The base object for the offset.
7728                 theOffset Offset value.
7729                 theName Object name; when specified, this parameter is used
7730                         for result publication in the study. Otherwise, if automatic
7731                         publication is switched on, default value is used for result name.
7732
7733             Returns:  
7734                 New GEOM.GEOM_Object, containing the offset object.
7735
7736             Example of usage:
7737                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7738                  # create a new object as offset of the given object
7739                  offset = geompy.MakeOffset(box, 70.)
7740             """
7741             # Example: see GEOM_TestAll.py
7742             theOffset, Parameters = ParseParameters(theOffset)
7743             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7744             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7745             anObj.SetParameters(Parameters)
7746             self._autoPublish(anObj, theName, "offset")
7747             return anObj
7748
7749         ## Create new object as projection of the given one on a 2D surface.
7750         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7751         #  @param theTarget The target object. It can be planar or cylindrical face.
7752         #  @param theName Object name; when specified, this parameter is used
7753         #         for result publication in the study. Otherwise, if automatic
7754         #         publication is switched on, default value is used for result name.
7755         #
7756         #  @return New GEOM.GEOM_Object, containing the projection.
7757         #
7758         #  @ref tui_projection "Example"
7759         def MakeProjection(self, theSource, theTarget, theName=None):
7760             """
7761             Create new object as projection of the given one on a 2D surface.
7762
7763             Parameters:
7764                 theSource The source object for the projection. It can be a point, edge or wire.
7765                 theTarget The target object. It can be planar or cylindrical face.
7766                 theName Object name; when specified, this parameter is used
7767                         for result publication in the study. Otherwise, if automatic
7768                         publication is switched on, default value is used for result name.
7769
7770             Returns:  
7771                 New GEOM.GEOM_Object, containing the projection.
7772             """
7773             # Example: see GEOM_TestAll.py
7774             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7775             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7776             self._autoPublish(anObj, theName, "projection")
7777             return anObj
7778
7779         # -----------------------------------------------------------------------------
7780         # Patterns
7781         # -----------------------------------------------------------------------------
7782
7783         ## Translate the given object along the given vector a given number times
7784         #  @param theObject The object to be translated.
7785         #  @param theVector Direction of the translation. DX if None.
7786         #  @param theStep Distance to translate on.
7787         #  @param theNbTimes Quantity of translations to be done.
7788         #  @param theName Object name; when specified, this parameter is used
7789         #         for result publication in the study. Otherwise, if automatic
7790         #         publication is switched on, default value is used for result name.
7791         #
7792         #  @return New GEOM.GEOM_Object, containing compound of all
7793         #          the shapes, obtained after each translation.
7794         #
7795         #  @ref tui_multi_translation "Example"
7796         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7797             """
7798             Translate the given object along the given vector a given number times
7799
7800             Parameters:
7801                 theObject The object to be translated.
7802                 theVector Direction of the translation. DX if None.
7803                 theStep Distance to translate on.
7804                 theNbTimes Quantity of translations to be done.
7805                 theName Object name; when specified, this parameter is used
7806                         for result publication in the study. Otherwise, if automatic
7807                         publication is switched on, default value is used for result name.
7808
7809             Returns:     
7810                 New GEOM.GEOM_Object, containing compound of all
7811                 the shapes, obtained after each translation.
7812
7813             Example of usage:
7814                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
7815             """
7816             # Example: see GEOM_TestAll.py
7817             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
7818             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
7819             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
7820             anObj.SetParameters(Parameters)
7821             self._autoPublish(anObj, theName, "multitranslation")
7822             return anObj
7823
7824         ## Conseqently apply two specified translations to theObject specified number of times.
7825         #  @param theObject The object to be translated.
7826         #  @param theVector1 Direction of the first translation. DX if None.
7827         #  @param theStep1 Step of the first translation.
7828         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
7829         #  @param theVector2 Direction of the second translation. DY if None.
7830         #  @param theStep2 Step of the second translation.
7831         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
7832         #  @param theName Object name; when specified, this parameter is used
7833         #         for result publication in the study. Otherwise, if automatic
7834         #         publication is switched on, default value is used for result name.
7835         #
7836         #  @return New GEOM.GEOM_Object, containing compound of all
7837         #          the shapes, obtained after each translation.
7838         #
7839         #  @ref tui_multi_translation "Example"
7840         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
7841                                    theVector2, theStep2, theNbTimes2, theName=None):
7842             """
7843             Conseqently apply two specified translations to theObject specified number of times.
7844
7845             Parameters:
7846                 theObject The object to be translated.
7847                 theVector1 Direction of the first translation. DX if None.
7848                 theStep1 Step of the first translation.
7849                 theNbTimes1 Quantity of translations to be done along theVector1.
7850                 theVector2 Direction of the second translation. DY if None.
7851                 theStep2 Step of the second translation.
7852                 theNbTimes2 Quantity of translations to be done along theVector2.
7853                 theName Object name; when specified, this parameter is used
7854                         for result publication in the study. Otherwise, if automatic
7855                         publication is switched on, default value is used for result name.
7856
7857             Returns:
7858                 New GEOM.GEOM_Object, containing compound of all
7859                 the shapes, obtained after each translation.
7860
7861             Example of usage:
7862                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
7863             """
7864             # Example: see GEOM_TestAll.py
7865             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
7866             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
7867                                                  theVector2, theStep2, theNbTimes2)
7868             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
7869             anObj.SetParameters(Parameters)
7870             self._autoPublish(anObj, theName, "multitranslation")
7871             return anObj
7872
7873         ## Rotate the given object around the given axis a given number times.
7874         #  Rotation angle will be 2*PI/theNbTimes.
7875         #  @param theObject The object to be rotated.
7876         #  @param theAxis The rotation axis. DZ if None.
7877         #  @param theNbTimes Quantity of rotations to be done.
7878         #  @param theName Object name; when specified, this parameter is used
7879         #         for result publication in the study. Otherwise, if automatic
7880         #         publication is switched on, default value is used for result name.
7881         #
7882         #  @return New GEOM.GEOM_Object, containing compound of all the
7883         #          shapes, obtained after each rotation.
7884         #
7885         #  @ref tui_multi_rotation "Example"
7886         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
7887             """
7888             Rotate the given object around the given axis a given number times.
7889             Rotation angle will be 2*PI/theNbTimes.
7890
7891             Parameters:
7892                 theObject The object to be rotated.
7893                 theAxis The rotation axis. DZ if None.
7894                 theNbTimes Quantity of rotations to be done.
7895                 theName Object name; when specified, this parameter is used
7896                         for result publication in the study. Otherwise, if automatic
7897                         publication is switched on, default value is used for result name.
7898
7899             Returns:     
7900                 New GEOM.GEOM_Object, containing compound of all the
7901                 shapes, obtained after each rotation.
7902
7903             Example of usage:
7904                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
7905             """
7906             # Example: see GEOM_TestAll.py
7907             theNbTimes, Parameters = ParseParameters(theNbTimes)
7908             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
7909             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
7910             anObj.SetParameters(Parameters)
7911             self._autoPublish(anObj, theName, "multirotation")
7912             return anObj
7913
7914         ## Rotate the given object around the given axis
7915         #  a given number times on the given angle.
7916         #  @param theObject The object to be rotated.
7917         #  @param theAxis The rotation axis. DZ if None.
7918         #  @param theAngleStep Rotation angle in radians.
7919         #  @param theNbTimes Quantity of rotations to be done.
7920         #  @param theName Object name; when specified, this parameter is used
7921         #         for result publication in the study. Otherwise, if automatic
7922         #         publication is switched on, default value is used for result name.
7923         #
7924         #  @return New GEOM.GEOM_Object, containing compound of all the
7925         #          shapes, obtained after each rotation.
7926         #
7927         #  @ref tui_multi_rotation "Example"
7928         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
7929             """
7930             Rotate the given object around the given axis
7931             a given number times on the given angle.
7932
7933             Parameters:
7934                 theObject The object to be rotated.
7935                 theAxis The rotation axis. DZ if None.
7936                 theAngleStep Rotation angle in radians.
7937                 theNbTimes Quantity of rotations to be done.
7938                 theName Object name; when specified, this parameter is used
7939                         for result publication in the study. Otherwise, if automatic
7940                         publication is switched on, default value is used for result name.
7941
7942             Returns:     
7943                 New GEOM.GEOM_Object, containing compound of all the
7944                 shapes, obtained after each rotation.
7945
7946             Example of usage:
7947                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
7948             """
7949             # Example: see GEOM_TestAll.py
7950             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
7951             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
7952             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
7953             anObj.SetParameters(Parameters)
7954             self._autoPublish(anObj, theName, "multirotation")
7955             return anObj
7956
7957         ## Rotate the given object around the given axis a given
7958         #  number times and multi-translate each rotation result.
7959         #  Rotation angle will be 2*PI/theNbTimes1.
7960         #  Translation direction passes through center of gravity
7961         #  of rotated shape and its projection on the rotation axis.
7962         #  @param theObject The object to be rotated.
7963         #  @param theAxis Rotation axis. DZ if None.
7964         #  @param theNbTimes1 Quantity of rotations to be done.
7965         #  @param theRadialStep Translation distance.
7966         #  @param theNbTimes2 Quantity of translations to be done.
7967         #  @param theName Object name; when specified, this parameter is used
7968         #         for result publication in the study. Otherwise, if automatic
7969         #         publication is switched on, default value is used for result name.
7970         #
7971         #  @return New GEOM.GEOM_Object, containing compound of all the
7972         #          shapes, obtained after each transformation.
7973         #
7974         #  @ref tui_multi_rotation "Example"
7975         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
7976             """
7977             Rotate the given object around the
7978             given axis on the given angle a given number
7979             times and multi-translate each rotation result.
7980             Translation direction passes through center of gravity
7981             of rotated shape and its projection on the rotation axis.
7982
7983             Parameters:
7984                 theObject The object to be rotated.
7985                 theAxis Rotation axis. DZ if None.
7986                 theNbTimes1 Quantity of rotations to be done.
7987                 theRadialStep Translation distance.
7988                 theNbTimes2 Quantity of translations to be done.
7989                 theName Object name; when specified, this parameter is used
7990                         for result publication in the study. Otherwise, if automatic
7991                         publication is switched on, default value is used for result name.
7992
7993             Returns:    
7994                 New GEOM.GEOM_Object, containing compound of all the
7995                 shapes, obtained after each transformation.
7996
7997             Example of usage:
7998                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
7999             """
8000             # Example: see GEOM_TestAll.py
8001             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8002             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8003             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8004             anObj.SetParameters(Parameters)
8005             self._autoPublish(anObj, theName, "multirotation")
8006             return anObj
8007
8008         ## Rotate the given object around the
8009         #  given axis on the given angle a given number
8010         #  times and multi-translate each rotation result.
8011         #  Translation direction passes through center of gravity
8012         #  of rotated shape and its projection on the rotation axis.
8013         #  @param theObject The object to be rotated.
8014         #  @param theAxis Rotation axis. DZ if None.
8015         #  @param theAngleStep Rotation angle in radians.
8016         #  @param theNbTimes1 Quantity of rotations to be done.
8017         #  @param theRadialStep Translation distance.
8018         #  @param theNbTimes2 Quantity of translations to be done.
8019         #  @param theName Object name; when specified, this parameter is used
8020         #         for result publication in the study. Otherwise, if automatic
8021         #         publication is switched on, default value is used for result name.
8022         #
8023         #  @return New GEOM.GEOM_Object, containing compound of all the
8024         #          shapes, obtained after each transformation.
8025         #
8026         #  @ref tui_multi_rotation "Example"
8027         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8028             """
8029             Rotate the given object around the
8030             given axis on the given angle a given number
8031             times and multi-translate each rotation result.
8032             Translation direction passes through center of gravity
8033             of rotated shape and its projection on the rotation axis.
8034
8035             Parameters:
8036                 theObject The object to be rotated.
8037                 theAxis Rotation axis. DZ if None.
8038                 theAngleStep Rotation angle in radians.
8039                 theNbTimes1 Quantity of rotations to be done.
8040                 theRadialStep Translation distance.
8041                 theNbTimes2 Quantity of translations to be done.
8042                 theName Object name; when specified, this parameter is used
8043                         for result publication in the study. Otherwise, if automatic
8044                         publication is switched on, default value is used for result name.
8045
8046             Returns:    
8047                 New GEOM.GEOM_Object, containing compound of all the
8048                 shapes, obtained after each transformation.
8049
8050             Example of usage:
8051                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8052             """
8053             # Example: see GEOM_TestAll.py
8054             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8055             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8056             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8057             anObj.SetParameters(Parameters)
8058             self._autoPublish(anObj, theName, "multirotation")
8059             return anObj
8060
8061         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8062         #
8063         #  @ref swig_MakeMultiRotation "Example"
8064         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8065             """
8066             The same, as geompy.MultiRotate1DNbTimes, 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                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8072             """
8073             # Example: see GEOM_TestOthers.py
8074             aVec = self.MakeLine(aPoint,aDir)
8075             # note: auto-publishing is done in self.MultiRotate1D()
8076             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8077             return anObj
8078
8079         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8080         #
8081         #  @ref swig_MakeMultiRotation "Example"
8082         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8083             """
8084             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8085
8086             Example of usage:
8087                 pz = geompy.MakeVertex(0, 0, 100)
8088                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8089                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8090             """
8091             # Example: see GEOM_TestOthers.py
8092             aVec = self.MakeLine(aPoint,aDir)
8093             # note: auto-publishing is done in self.MultiRotate1D()
8094             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8095             return anObj
8096
8097         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8098         #
8099         #  @ref swig_MakeMultiRotation "Example"
8100         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8101             """
8102             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8103             
8104             Example of usage:
8105                 pz = geompy.MakeVertex(0, 0, 100)
8106                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8107                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8108             """
8109             # Example: see GEOM_TestOthers.py
8110             aVec = self.MakeLine(aPoint,aDir)
8111             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8112             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8113             return anObj
8114
8115         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8116         #
8117         #  @ref swig_MakeMultiRotation "Example"
8118         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8119             """
8120             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8121             
8122             Example of usage:
8123                 pz = geompy.MakeVertex(0, 0, 100)
8124                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8125                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8126             """
8127             # Example: see GEOM_TestOthers.py
8128             aVec = self.MakeLine(aPoint,aDir)
8129             # note: auto-publishing is done in self.MultiRotate2D()
8130             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8131             return anObj
8132
8133         # end of l3_transform
8134         ## @}
8135
8136         ## @addtogroup l3_transform_d
8137         ## @{
8138
8139         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8140         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8141             """
8142             Deprecated method. Use MultiRotate1DNbTimes instead.
8143             """
8144             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8145             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8146
8147         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8148         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8149         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8150             """
8151             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8152             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8153
8154             Example of usage:
8155                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8156             """
8157             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8158             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8159             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8160             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8161             anObj.SetParameters(Parameters)
8162             self._autoPublish(anObj, theName, "multirotation")
8163             return anObj
8164
8165         ## The same, as MultiRotate1D(), but axis is given by direction and point
8166         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8167         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8168             """
8169             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8170             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8171
8172             Example of usage:
8173                 pz = geompy.MakeVertex(0, 0, 100)
8174                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8175                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8176             """
8177             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8178             aVec = self.MakeLine(aPoint,aDir)
8179             # note: auto-publishing is done in self.MultiRotate1D()
8180             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8181             return anObj
8182
8183         ## The same, as MultiRotate2D(), but axis is given by direction and point
8184         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8185         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8186             """
8187             The same, as MultiRotate2D(), but axis is given by direction and point
8188             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8189             
8190             Example of usage:
8191                 pz = geompy.MakeVertex(0, 0, 100)
8192                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8193                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8194             """
8195             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8196             aVec = self.MakeLine(aPoint,aDir)
8197             # note: auto-publishing is done in self.MultiRotate2D()
8198             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8199             return anObj
8200
8201         # end of l3_transform_d
8202         ## @}
8203
8204         ## @addtogroup l3_local
8205         ## @{
8206
8207         ## Perform a fillet on all edges of the given shape.
8208         #  @param theShape Shape, to perform fillet on.
8209         #  @param theR Fillet radius.
8210         #  @param theName Object name; when specified, this parameter is used
8211         #         for result publication in the study. Otherwise, if automatic
8212         #         publication is switched on, default value is used for result name.
8213         #
8214         #  @return New GEOM.GEOM_Object, containing the result shape.
8215         #
8216         #  @ref tui_fillet "Example 1"
8217         #  \n @ref swig_MakeFilletAll "Example 2"
8218         def MakeFilletAll(self, theShape, theR, theName=None):
8219             """
8220             Perform a fillet on all edges of the given shape.
8221
8222             Parameters:
8223                 theShape Shape, to perform fillet on.
8224                 theR Fillet radius.
8225                 theName Object name; when specified, this parameter is used
8226                         for result publication in the study. Otherwise, if automatic
8227                         publication is switched on, default value is used for result name.
8228
8229             Returns: 
8230                 New GEOM.GEOM_Object, containing the result shape.
8231
8232             Example of usage: 
8233                filletall = geompy.MakeFilletAll(prism, 10.)
8234             """
8235             # Example: see GEOM_TestOthers.py
8236             theR,Parameters = ParseParameters(theR)
8237             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8238             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8239             anObj.SetParameters(Parameters)
8240             self._autoPublish(anObj, theName, "fillet")
8241             return anObj
8242
8243         ## Perform a fillet on the specified edges/faces of the given shape
8244         #  @param theShape Shape, to perform fillet on.
8245         #  @param theR Fillet radius.
8246         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8247         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8248         #  @param theName Object name; when specified, this parameter is used
8249         #         for result publication in the study. Otherwise, if automatic
8250         #         publication is switched on, default value is used for result name.
8251         #
8252         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8253         #
8254         #  @return New GEOM.GEOM_Object, containing the result shape.
8255         #
8256         #  @ref tui_fillet "Example"
8257         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8258             """
8259             Perform a fillet on the specified edges/faces of the given shape
8260
8261             Parameters:
8262                 theShape Shape, to perform fillet on.
8263                 theR Fillet radius.
8264                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8265                 theListShapes Global indices of edges/faces to perform fillet on.
8266                 theName Object name; when specified, this parameter is used
8267                         for result publication in the study. Otherwise, if automatic
8268                         publication is switched on, default value is used for result name.
8269
8270             Note:
8271                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8272
8273             Returns: 
8274                 New GEOM.GEOM_Object, containing the result shape.
8275
8276             Example of usage:
8277                 # get the list of IDs (IDList) for the fillet
8278                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8279                 IDlist_e = []
8280                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8281                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8282                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8283                 # make a fillet on the specified edges of the given shape
8284                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8285             """
8286             # Example: see GEOM_TestAll.py
8287             theR,Parameters = ParseParameters(theR)
8288             anObj = None
8289             if theShapeType == self.ShapeType["EDGE"]:
8290                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8291                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8292             else:
8293                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8294                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8295             anObj.SetParameters(Parameters)
8296             self._autoPublish(anObj, theName, "fillet")
8297             return anObj
8298
8299         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8300         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8301             """
8302             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8303
8304             Example of usage:
8305                 # get the list of IDs (IDList) for the fillet
8306                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8307                 IDlist_e = []
8308                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8309                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8310                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8311                 # make a fillet on the specified edges of the given shape
8312                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8313             """
8314             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8315             anObj = None
8316             if theShapeType == self.ShapeType["EDGE"]:
8317                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8318                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8319             else:
8320                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8321                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8322             anObj.SetParameters(Parameters)
8323             self._autoPublish(anObj, theName, "fillet")
8324             return anObj
8325
8326         ## Perform a fillet on the specified edges of the given shape
8327         #  @param theShape  Wire Shape to perform fillet on.
8328         #  @param theR  Fillet radius.
8329         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8330         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8331         #    \note The list of vertices could be empty,
8332         #          in this case fillet will done done at all vertices in wire
8333         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8334         #         by the length of the edges, nearest to the fillet vertex.
8335         #         But sometimes the next edge is C1 continuous with the one, nearest to
8336         #         the fillet point, and such two (or more) edges can be united to allow
8337         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8338         #         thus ignoring the secant vertex (vertices).
8339         #  @param theName Object name; when specified, this parameter is used
8340         #         for result publication in the study. Otherwise, if automatic
8341         #         publication is switched on, default value is used for result name.
8342         #
8343         #  @return New GEOM.GEOM_Object, containing the result shape.
8344         #
8345         #  @ref tui_fillet2d "Example"
8346         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8347             """
8348             Perform a fillet on the specified edges of the given shape
8349
8350             Parameters:
8351                 theShape  Wire Shape to perform fillet on.
8352                 theR  Fillet radius.
8353                 theListOfVertexes Global indices of vertexes to perform fillet on.
8354                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8355                     by the length of the edges, nearest to the fillet vertex.
8356                     But sometimes the next edge is C1 continuous with the one, nearest to
8357                     the fillet point, and such two (or more) edges can be united to allow
8358                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8359                     thus ignoring the secant vertex (vertices).
8360                 theName Object name; when specified, this parameter is used
8361                         for result publication in the study. Otherwise, if automatic
8362                         publication is switched on, default value is used for result name.
8363             Note:
8364                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8365
8366                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8367
8368             Returns: 
8369                 New GEOM.GEOM_Object, containing the result shape.
8370
8371             Example of usage:  
8372                 # create wire
8373                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8374                 # make fillet at given wire vertices with giver radius
8375                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8376             """
8377             # Example: see GEOM_TestAll.py
8378             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8379             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8380             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8381             anObj.SetParameters(Parameters)
8382             self._autoPublish(anObj, theName, "fillet")
8383             return anObj
8384
8385         ## Perform a fillet at the specified vertices of the given face/shell.
8386         #  @param theShape Face or Shell shape to perform fillet on.
8387         #  @param theR Fillet radius.
8388         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8389         #  @param theName Object name; when specified, this parameter is used
8390         #         for result publication in the study. Otherwise, if automatic
8391         #         publication is switched on, default value is used for result name.
8392         #
8393         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8394         #
8395         #  @return New GEOM.GEOM_Object, containing the result shape.
8396         #
8397         #  @ref tui_fillet2d "Example"
8398         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8399             """
8400             Perform a fillet at the specified vertices of the given face/shell.
8401
8402             Parameters:
8403                 theShape  Face or Shell shape to perform fillet on.
8404                 theR  Fillet radius.
8405                 theListOfVertexes Global indices of vertexes to perform fillet on.
8406                 theName Object name; when specified, this parameter is used
8407                         for result publication in the study. Otherwise, if automatic
8408                         publication is switched on, default value is used for result name.
8409             Note:
8410                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8411
8412             Returns: 
8413                 New GEOM.GEOM_Object, containing the result shape.
8414
8415             Example of usage:
8416                 face = geompy.MakeFaceHW(100, 100, 1)
8417                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8418             """
8419             # Example: see GEOM_TestAll.py
8420             theR,Parameters = ParseParameters(theR)
8421             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8422             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8423             anObj.SetParameters(Parameters)
8424             self._autoPublish(anObj, theName, "fillet")
8425             return anObj
8426
8427         ## Perform a symmetric chamfer on all edges of the given shape.
8428         #  @param theShape Shape, to perform chamfer on.
8429         #  @param theD Chamfer size along each face.
8430         #  @param theName Object name; when specified, this parameter is used
8431         #         for result publication in the study. Otherwise, if automatic
8432         #         publication is switched on, default value is used for result name.
8433         #
8434         #  @return New GEOM.GEOM_Object, containing the result shape.
8435         #
8436         #  @ref tui_chamfer "Example 1"
8437         #  \n @ref swig_MakeChamferAll "Example 2"
8438         def MakeChamferAll(self, theShape, theD, theName=None):
8439             """
8440             Perform a symmetric chamfer on all edges of the given shape.
8441
8442             Parameters:
8443                 theShape Shape, to perform chamfer on.
8444                 theD Chamfer size along each face.
8445                 theName Object name; when specified, this parameter is used
8446                         for result publication in the study. Otherwise, if automatic
8447                         publication is switched on, default value is used for result name.
8448
8449             Returns:     
8450                 New GEOM.GEOM_Object, containing the result shape.
8451
8452             Example of usage:
8453                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8454             """
8455             # Example: see GEOM_TestOthers.py
8456             theD,Parameters = ParseParameters(theD)
8457             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8458             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8459             anObj.SetParameters(Parameters)
8460             self._autoPublish(anObj, theName, "chamfer")
8461             return anObj
8462
8463         ## Perform a chamfer on edges, common to the specified faces,
8464         #  with distance D1 on the Face1
8465         #  @param theShape Shape, to perform chamfer on.
8466         #  @param theD1 Chamfer size along \a theFace1.
8467         #  @param theD2 Chamfer size along \a theFace2.
8468         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8469         #  @param theName Object name; when specified, this parameter is used
8470         #         for result publication in the study. Otherwise, if automatic
8471         #         publication is switched on, default value is used for result name.
8472         #
8473         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8474         #
8475         #  @return New GEOM.GEOM_Object, containing the result shape.
8476         #
8477         #  @ref tui_chamfer "Example"
8478         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8479             """
8480             Perform a chamfer on edges, common to the specified faces,
8481             with distance D1 on the Face1
8482
8483             Parameters:
8484                 theShape Shape, to perform chamfer on.
8485                 theD1 Chamfer size along theFace1.
8486                 theD2 Chamfer size along theFace2.
8487                 theFace1,theFace2 Global indices of two faces of theShape.
8488                 theName Object name; when specified, this parameter is used
8489                         for result publication in the study. Otherwise, if automatic
8490                         publication is switched on, default value is used for result name.
8491
8492             Note:
8493                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8494
8495             Returns:      
8496                 New GEOM.GEOM_Object, containing the result shape.
8497
8498             Example of usage:
8499                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8500                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8501                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8502                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8503             """
8504             # Example: see GEOM_TestAll.py
8505             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8506             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8507             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8508             anObj.SetParameters(Parameters)
8509             self._autoPublish(anObj, theName, "chamfer")
8510             return anObj
8511
8512         ## Perform a chamfer on edges
8513         #  @param theShape Shape, to perform chamfer on.
8514         #  @param theD Chamfer length
8515         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8516         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8517         #  @param theName Object name; when specified, this parameter is used
8518         #         for result publication in the study. Otherwise, if automatic
8519         #         publication is switched on, default value is used for result name.
8520         #
8521         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8522         #
8523         #  @return New GEOM.GEOM_Object, containing the result shape.
8524         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8525             """
8526             Perform a chamfer on edges
8527
8528             Parameters:
8529                 theShape Shape, to perform chamfer on.
8530                 theD1 Chamfer size along theFace1.
8531                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8532                 theFace1,theFace2 Global indices of two faces of theShape.
8533                 theName Object name; when specified, this parameter is used
8534                         for result publication in the study. Otherwise, if automatic
8535                         publication is switched on, default value is used for result name.
8536
8537             Note:
8538                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8539
8540             Returns:      
8541                 New GEOM.GEOM_Object, containing the result shape.
8542
8543             Example of usage:
8544                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8545                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8546                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8547                 ang = 30
8548                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8549             """
8550             flag = False
8551             if isinstance(theAngle,str):
8552                 flag = True
8553             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8554             if flag:
8555                 theAngle = theAngle*math.pi/180.0
8556             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8557             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8558             anObj.SetParameters(Parameters)
8559             self._autoPublish(anObj, theName, "chamfer")
8560             return anObj
8561
8562         ## Perform a chamfer on all edges of the specified faces,
8563         #  with distance D1 on the first specified face (if several for one edge)
8564         #  @param theShape Shape, to perform chamfer on.
8565         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8566         #               connected to the edge, are in \a theFaces, \a theD1
8567         #               will be get along face, which is nearer to \a theFaces beginning.
8568         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8569         #  @param theFaces Sequence of global indices of faces of \a theShape.
8570         #  @param theName Object name; when specified, this parameter is used
8571         #         for result publication in the study. Otherwise, if automatic
8572         #         publication is switched on, default value is used for result name.
8573         #
8574         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8575         #
8576         #  @return New GEOM.GEOM_Object, containing the result shape.
8577         #
8578         #  @ref tui_chamfer "Example"
8579         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8580             """
8581             Perform a chamfer on all edges of the specified faces,
8582             with distance D1 on the first specified face (if several for one edge)
8583
8584             Parameters:
8585                 theShape Shape, to perform chamfer on.
8586                 theD1 Chamfer size along face from  theFaces. If both faces,
8587                       connected to the edge, are in theFaces, theD1
8588                       will be get along face, which is nearer to theFaces beginning.
8589                 theD2 Chamfer size along another of two faces, connected to the edge.
8590                 theFaces Sequence of global indices of faces of theShape.
8591                 theName Object name; when specified, this parameter is used
8592                         for result publication in the study. Otherwise, if automatic
8593                         publication is switched on, default value is used for result name.
8594                 
8595             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8596
8597             Returns:  
8598                 New GEOM.GEOM_Object, containing the result shape.
8599             """
8600             # Example: see GEOM_TestAll.py
8601             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8602             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8603             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8604             anObj.SetParameters(Parameters)
8605             self._autoPublish(anObj, theName, "chamfer")
8606             return anObj
8607
8608         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8609         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8610         #
8611         #  @ref swig_FilletChamfer "Example"
8612         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8613             """
8614             The Same that geompy.MakeChamferFaces 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.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8624             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8625             anObj.SetParameters(Parameters)
8626             self._autoPublish(anObj, theName, "chamfer")
8627             return anObj
8628
8629         ## Perform a chamfer on edges,
8630         #  with distance D1 on the first specified face (if several for one edge)
8631         #  @param theShape Shape, to perform chamfer on.
8632         #  @param theD1,theD2 Chamfer size
8633         #  @param theEdges Sequence of edges of \a theShape.
8634         #  @param theName Object name; when specified, this parameter is used
8635         #         for result publication in the study. Otherwise, if automatic
8636         #         publication is switched on, default value is used for result name.
8637         #
8638         #  @return New GEOM.GEOM_Object, containing the result shape.
8639         #
8640         #  @ref swig_FilletChamfer "Example"
8641         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8642             """
8643             Perform a chamfer on edges,
8644             with distance D1 on the first specified face (if several for one edge)
8645             
8646             Parameters:
8647                 theShape Shape, to perform chamfer on.
8648                 theD1,theD2 Chamfer size
8649                 theEdges Sequence of edges of theShape.
8650                 theName Object name; when specified, this parameter is used
8651                         for result publication in the study. Otherwise, if automatic
8652                         publication is switched on, default value is used for result name.
8653
8654             Returns:
8655                 New GEOM.GEOM_Object, containing the result shape.
8656             """
8657             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8658             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8659             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8660             anObj.SetParameters(Parameters)
8661             self._autoPublish(anObj, theName, "chamfer")
8662             return anObj
8663
8664         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8665         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8666         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8667             """
8668             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8669             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8670             """
8671             flag = False
8672             if isinstance(theAngle,str):
8673                 flag = True
8674             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8675             if flag:
8676                 theAngle = theAngle*math.pi/180.0
8677             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8678             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8679             anObj.SetParameters(Parameters)
8680             self._autoPublish(anObj, theName, "chamfer")
8681             return anObj
8682
8683         ## @sa MakeChamferEdge(), MakeChamferFaces()
8684         #
8685         #  @ref swig_MakeChamfer "Example"
8686         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8687             """
8688             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8689             """
8690             # Example: see GEOM_TestOthers.py
8691             anObj = None
8692             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8693             if aShapeType == self.ShapeType["EDGE"]:
8694                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8695             else:
8696                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8697             return anObj
8698             
8699         ## Remove material from a solid by extrusion of the base shape on the given distance.
8700         #  @param theInit Shape to remove material from. It must be a solid or 
8701         #  a compound made of a single solid.
8702         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8703         #  @param theH Prism dimension along the normal to theBase
8704         #  @param theAngle Draft angle in degrees.
8705         #  @param theName Object name; when specified, this parameter is used
8706         #         for result publication in the study. Otherwise, if automatic
8707         #         publication is switched on, default value is used for result name.
8708         #
8709         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8710         #
8711         #  @ref tui_creation_prism "Example"
8712         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8713             """
8714             Add material to a solid by extrusion of the base shape on the given distance.
8715
8716             Parameters:
8717                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8718                 theBase Closed edge or wire defining the base shape to be extruded.
8719                 theH Prism dimension along the normal  to theBase
8720                 theAngle Draft angle in degrees.
8721                 theName Object name; when specified, this parameter is used
8722                         for result publication in the study. Otherwise, if automatic
8723                         publication is switched on, default value is used for result name.
8724
8725             Returns:
8726                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8727             """
8728             # Example: see GEOM_TestAll.py
8729             #theH,Parameters = ParseParameters(theH)
8730             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8731             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8732             #anObj.SetParameters(Parameters)
8733             self._autoPublish(anObj, theName, "extrudedCut")
8734             return anObj   
8735             
8736         ## Add material to a solid by extrusion of the base shape on the given distance.
8737         #  @param theInit Shape to add material to. It must be a solid or 
8738         #  a compound made of a single solid.
8739         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8740         #  @param theH Prism dimension along the normal to theBase
8741         #  @param theAngle Draft angle in degrees.
8742         #  @param theName Object name; when specified, this parameter is used
8743         #         for result publication in the study. Otherwise, if automatic
8744         #         publication is switched on, default value is used for result name.
8745         #
8746         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8747         #
8748         #  @ref tui_creation_prism "Example"
8749         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8750             """
8751             Add material to a solid by extrusion of the base shape on the given distance.
8752
8753             Parameters:
8754                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8755                 theBase Closed edge or wire defining the base shape to be extruded.
8756                 theH Prism dimension along the normal  to theBase
8757                 theAngle Draft angle in degrees.
8758                 theName Object name; when specified, this parameter is used
8759                         for result publication in the study. Otherwise, if automatic
8760                         publication is switched on, default value is used for result name.
8761
8762             Returns:
8763                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8764             """
8765             # Example: see GEOM_TestAll.py
8766             #theH,Parameters = ParseParameters(theH)
8767             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8768             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8769             #anObj.SetParameters(Parameters)
8770             self._autoPublish(anObj, theName, "extrudedBoss")
8771             return anObj   
8772
8773         # end of l3_local
8774         ## @}
8775
8776         ## @addtogroup l3_basic_op
8777         ## @{
8778
8779         ## Perform an Archimde operation on the given shape with given parameters.
8780         #  The object presenting the resulting face is returned.
8781         #  @param theShape Shape to be put in water.
8782         #  @param theWeight Weight og the shape.
8783         #  @param theWaterDensity Density of the water.
8784         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8785         #  @param theName Object name; when specified, this parameter is used
8786         #         for result publication in the study. Otherwise, if automatic
8787         #         publication is switched on, default value is used for result name.
8788         #
8789         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8790         #          by a plane, corresponding to water level.
8791         #
8792         #  @ref tui_archimede "Example"
8793         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8794             """
8795             Perform an Archimde operation on the given shape with given parameters.
8796             The object presenting the resulting face is returned.
8797
8798             Parameters: 
8799                 theShape Shape to be put in water.
8800                 theWeight Weight og the shape.
8801                 theWaterDensity Density of the water.
8802                 theMeshDeflection Deflection of the mesh, using to compute the section.
8803                 theName Object name; when specified, this parameter is used
8804                         for result publication in the study. Otherwise, if automatic
8805                         publication is switched on, default value is used for result name.
8806
8807             Returns: 
8808                 New GEOM.GEOM_Object, containing a section of theShape
8809                 by a plane, corresponding to water level.
8810             """
8811             # Example: see GEOM_TestAll.py
8812             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
8813               theWeight,theWaterDensity,theMeshDeflection)
8814             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
8815             RaiseIfFailed("MakeArchimede", self.LocalOp)
8816             anObj.SetParameters(Parameters)
8817             self._autoPublish(anObj, theName, "archimede")
8818             return anObj
8819
8820         # end of l3_basic_op
8821         ## @}
8822
8823         ## @addtogroup l2_measure
8824         ## @{
8825
8826         ## Get point coordinates
8827         #  @return [x, y, z]
8828         #
8829         #  @ref tui_measurement_tools_page "Example"
8830         def PointCoordinates(self,Point):
8831             """
8832             Get point coordinates
8833
8834             Returns:
8835                 [x, y, z]
8836             """
8837             # Example: see GEOM_TestMeasures.py
8838             aTuple = self.MeasuOp.PointCoordinates(Point)
8839             RaiseIfFailed("PointCoordinates", self.MeasuOp)
8840             return aTuple 
8841         
8842         ## Get vector coordinates
8843         #  @return [x, y, z]
8844         #
8845         #  @ref tui_measurement_tools_page "Example"
8846         def VectorCoordinates(self,Vector):
8847             """
8848             Get vector coordinates
8849
8850             Returns:
8851                 [x, y, z]
8852             """
8853
8854             p1=self.GetFirstVertex(Vector)
8855             p2=self.GetLastVertex(Vector)
8856             
8857             X1=self.PointCoordinates(p1)
8858             X2=self.PointCoordinates(p2)
8859
8860             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
8861
8862
8863         ## Compute cross product
8864         #  @return vector w=u^v
8865         #
8866         #  @ref tui_measurement_tools_page "Example"
8867         def CrossProduct(self, Vector1, Vector2):
8868             """ 
8869             Compute cross product
8870             
8871             Returns: vector w=u^v
8872             """
8873             u=self.VectorCoordinates(Vector1)
8874             v=self.VectorCoordinates(Vector2)
8875             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])
8876             
8877             return w
8878         
8879         ## Compute cross product
8880         #  @return dot product  p=u.v
8881         #
8882         #  @ref tui_measurement_tools_page "Example"
8883         def DotProduct(self, Vector1, Vector2):
8884             """ 
8885             Compute cross product
8886             
8887             Returns: dot product  p=u.v
8888             """
8889             u=self.VectorCoordinates(Vector1)
8890             v=self.VectorCoordinates(Vector2)
8891             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
8892             
8893             return p
8894
8895
8896         ## Get summarized length of all wires,
8897         #  area of surface and volume of the given shape.
8898         #  @param theShape Shape to define properties of.
8899         #  @return [theLength, theSurfArea, theVolume]\n
8900         #  theLength:   Summarized length of all wires of the given shape.\n
8901         #  theSurfArea: Area of surface of the given shape.\n
8902         #  theVolume:   Volume of the given shape.
8903         #
8904         #  @ref tui_measurement_tools_page "Example"
8905         def BasicProperties(self,theShape):
8906             """
8907             Get summarized length of all wires,
8908             area of surface and volume of the given shape.
8909
8910             Parameters: 
8911                 theShape Shape to define properties of.
8912
8913             Returns:
8914                 [theLength, theSurfArea, theVolume]
8915                  theLength:   Summarized length of all wires of the given shape.
8916                  theSurfArea: Area of surface of the given shape.
8917                  theVolume:   Volume of the given shape.
8918             """
8919             # Example: see GEOM_TestMeasures.py
8920             aTuple = self.MeasuOp.GetBasicProperties(theShape)
8921             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
8922             return aTuple
8923
8924         ## Get parameters of bounding box of the given shape
8925         #  @param theShape Shape to obtain bounding box of.
8926         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
8927         #  Xmin,Xmax: Limits of shape along OX axis.
8928         #  Ymin,Ymax: Limits of shape along OY axis.
8929         #  Zmin,Zmax: Limits of shape along OZ axis.
8930         #
8931         #  @ref tui_measurement_tools_page "Example"
8932         def BoundingBox (self, theShape):
8933             """
8934             Get parameters of bounding box of the given shape
8935
8936             Parameters: 
8937                 theShape Shape to obtain bounding box of.
8938
8939             Returns:
8940                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
8941                  Xmin,Xmax: Limits of shape along OX axis.
8942                  Ymin,Ymax: Limits of shape along OY axis.
8943                  Zmin,Zmax: Limits of shape along OZ axis.
8944             """
8945             # Example: see GEOM_TestMeasures.py
8946             aTuple = self.MeasuOp.GetBoundingBox(theShape)
8947             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
8948             return aTuple
8949
8950         ## Get bounding box of the given shape
8951         #  @param theShape Shape to obtain bounding box of.
8952         #  @param theName Object name; when specified, this parameter is used
8953         #         for result publication in the study. Otherwise, if automatic
8954         #         publication is switched on, default value is used for result name.
8955         #
8956         #  @return New GEOM.GEOM_Object, containing the created box.
8957         #
8958         #  @ref tui_measurement_tools_page "Example"
8959         def MakeBoundingBox (self, theShape, theName=None):
8960             """
8961             Get bounding box of the given shape
8962
8963             Parameters: 
8964                 theShape Shape to obtain bounding box of.
8965                 theName Object name; when specified, this parameter is used
8966                         for result publication in the study. Otherwise, if automatic
8967                         publication is switched on, default value is used for result name.
8968
8969             Returns:
8970                 New GEOM.GEOM_Object, containing the created box.
8971             """
8972             # Example: see GEOM_TestMeasures.py
8973             anObj = self.MeasuOp.MakeBoundingBox(theShape)
8974             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
8975             self._autoPublish(anObj, theName, "bndbox")
8976             return anObj
8977
8978         ## Get inertia matrix and moments of inertia of theShape.
8979         #  @param theShape Shape to calculate inertia of.
8980         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
8981         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
8982         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
8983         #
8984         #  @ref tui_measurement_tools_page "Example"
8985         def Inertia(self,theShape):
8986             """
8987             Get inertia matrix and moments of inertia of theShape.
8988
8989             Parameters: 
8990                 theShape Shape to calculate inertia of.
8991
8992             Returns:
8993                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
8994                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
8995                  Ix,Iy,Iz:    Moments of inertia of the given shape.
8996             """
8997             # Example: see GEOM_TestMeasures.py
8998             aTuple = self.MeasuOp.GetInertia(theShape)
8999             RaiseIfFailed("GetInertia", self.MeasuOp)
9000             return aTuple
9001
9002         ## Get if coords are included in the shape (ST_IN or ST_ON)
9003         #  @param theShape Shape
9004         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9005         #  @param tolerance to be used (default is 1.0e-7)
9006         #  @return list_of_boolean = [res1, res2, ...]
9007         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9008             """
9009             Get if coords are included in the shape (ST_IN or ST_ON)
9010             
9011             Parameters: 
9012                 theShape Shape
9013                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9014                 tolerance to be used (default is 1.0e-7)
9015
9016             Returns:
9017                 list_of_boolean = [res1, res2, ...]
9018             """
9019             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9020
9021         ## Get minimal distance between the given shapes.
9022         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9023         #  @return Value of the minimal distance between the given shapes.
9024         #
9025         #  @ref tui_measurement_tools_page "Example"
9026         def MinDistance(self, theShape1, theShape2):
9027             """
9028             Get minimal distance between the given shapes.
9029             
9030             Parameters: 
9031                 theShape1,theShape2 Shapes to find minimal distance between.
9032
9033             Returns:    
9034                 Value of the minimal distance between the given shapes.
9035             """
9036             # Example: see GEOM_TestMeasures.py
9037             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9038             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9039             return aTuple[0]
9040
9041         ## Get minimal distance between the given shapes.
9042         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9043         #  @return Value of the minimal distance between the given shapes, in form of list
9044         #          [Distance, DX, DY, DZ].
9045         #
9046         #  @ref swig_all_measure "Example"
9047         def MinDistanceComponents(self, theShape1, theShape2):
9048             """
9049             Get minimal distance between the given shapes.
9050
9051             Parameters: 
9052                 theShape1,theShape2 Shapes to find minimal distance between.
9053
9054             Returns:  
9055                 Value of the minimal distance between the given shapes, in form of list
9056                 [Distance, DX, DY, DZ]
9057             """
9058             # Example: see GEOM_TestMeasures.py
9059             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9060             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9061             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9062             return aRes
9063
9064         ## Get closest points of the given shapes.
9065         #  @param theShape1,theShape2 Shapes to find closest points of.
9066         #  @return The number of found solutions (-1 in case of infinite number of
9067         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9068         #
9069         #  @ref tui_measurement_tools_page "Example"
9070         def ClosestPoints (self, theShape1, theShape2):
9071             """
9072             Get closest points of the given shapes.
9073
9074             Parameters: 
9075                 theShape1,theShape2 Shapes to find closest points of.
9076
9077             Returns:    
9078                 The number of found solutions (-1 in case of infinite number of
9079                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9080             """
9081             # Example: see GEOM_TestMeasures.py
9082             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9083             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9084             return aTuple
9085
9086         ## Get angle between the given shapes in degrees.
9087         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9088         #  @note If both arguments are vectors, the angle is computed in accordance
9089         #        with their orientations, otherwise the minimum angle is computed.
9090         #  @return Value of the angle between the given shapes in degrees.
9091         #
9092         #  @ref tui_measurement_tools_page "Example"
9093         def GetAngle(self, theShape1, theShape2):
9094             """
9095             Get angle between the given shapes in degrees.
9096
9097             Parameters: 
9098                 theShape1,theShape2 Lines or linear edges to find angle between.
9099
9100             Note:
9101                 If both arguments are vectors, the angle is computed in accordance
9102                 with their orientations, otherwise the minimum angle is computed.
9103
9104             Returns:  
9105                 Value of the angle between the given shapes in degrees.
9106             """
9107             # Example: see GEOM_TestMeasures.py
9108             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9109             RaiseIfFailed("GetAngle", self.MeasuOp)
9110             return anAngle
9111
9112         ## Get angle between the given shapes in radians.
9113         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9114         #  @note If both arguments are vectors, the angle is computed in accordance
9115         #        with their orientations, otherwise the minimum angle is computed.
9116         #  @return Value of the angle between the given shapes in radians.
9117         #
9118         #  @ref tui_measurement_tools_page "Example"
9119         def GetAngleRadians(self, theShape1, theShape2):
9120             """
9121             Get angle between the given shapes in radians.
9122
9123             Parameters: 
9124                 theShape1,theShape2 Lines or linear edges to find angle between.
9125
9126                 
9127             Note:
9128                 If both arguments are vectors, the angle is computed in accordance
9129                 with their orientations, otherwise the minimum angle is computed.
9130
9131             Returns:  
9132                 Value of the angle between the given shapes in radians.
9133             """
9134             # Example: see GEOM_TestMeasures.py
9135             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9136             RaiseIfFailed("GetAngle", self.MeasuOp)
9137             return anAngle
9138
9139         ## Get angle between the given vectors in degrees.
9140         #  @param theShape1,theShape2 Vectors to find angle between.
9141         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9142         #                 if False, the opposite vector to the normal vector is used.
9143         #  @return Value of the angle between the given vectors in degrees.
9144         #
9145         #  @ref tui_measurement_tools_page "Example"
9146         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9147             """
9148             Get angle between the given vectors in degrees.
9149
9150             Parameters: 
9151                 theShape1,theShape2 Vectors to find angle between.
9152                 theFlag If True, the normal vector is defined by the two vectors cross,
9153                         if False, the opposite vector to the normal vector is used.
9154
9155             Returns:  
9156                 Value of the angle between the given vectors in degrees.
9157             """
9158             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9159             if not theFlag:
9160                 anAngle = 360. - anAngle
9161             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9162             return anAngle
9163
9164         ## The same as GetAngleVectors, but the result is in radians.
9165         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9166             """
9167             Get angle between the given vectors in radians.
9168
9169             Parameters: 
9170                 theShape1,theShape2 Vectors to find angle between.
9171                 theFlag If True, the normal vector is defined by the two vectors cross,
9172                         if False, the opposite vector to the normal vector is used.
9173
9174             Returns:  
9175                 Value of the angle between the given vectors in radians.
9176             """
9177             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9178             return anAngle
9179
9180         ## @name Curve Curvature Measurement
9181         #  Methods for receiving radius of curvature of curves
9182         #  in the given point
9183         ## @{
9184
9185         ## Measure curvature of a curve at a point, set by parameter.
9186         #  @param theCurve a curve.
9187         #  @param theParam parameter.
9188         #  @return radius of curvature of \a theCurve.
9189         #
9190         #  @ref swig_todo "Example"
9191         def CurveCurvatureByParam(self, theCurve, theParam):
9192             """
9193             Measure curvature of a curve at a point, set by parameter.
9194
9195             Parameters: 
9196                 theCurve a curve.
9197                 theParam parameter.
9198
9199             Returns: 
9200                 radius of curvature of theCurve.
9201             """
9202             # Example: see GEOM_TestMeasures.py
9203             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9204             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9205             return aCurv
9206
9207         ## Measure curvature of a curve at a point.
9208         #  @param theCurve a curve.
9209         #  @param thePoint given point.
9210         #  @return radius of curvature of \a theCurve.
9211         #
9212         #  @ref swig_todo "Example"
9213         def CurveCurvatureByPoint(self, theCurve, thePoint):
9214             """
9215             Measure curvature of a curve at a point.
9216
9217             Parameters: 
9218                 theCurve a curve.
9219                 thePoint given point.
9220
9221             Returns: 
9222                 radius of curvature of theCurve.           
9223             """
9224             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9225             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9226             return aCurv
9227         ## @}
9228
9229         ## @name Surface Curvature Measurement
9230         #  Methods for receiving max and min radius of curvature of surfaces
9231         #  in the given point
9232         ## @{
9233
9234         ## Measure max radius of curvature of surface.
9235         #  @param theSurf the given surface.
9236         #  @param theUParam Value of U-parameter on the referenced surface.
9237         #  @param theVParam Value of V-parameter on the referenced surface.
9238         #  @return max radius of curvature of theSurf.
9239         #
9240         ## @ref swig_todo "Example"
9241         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9242             """
9243             Measure max radius of curvature of surface.
9244
9245             Parameters: 
9246                 theSurf the given surface.
9247                 theUParam Value of U-parameter on the referenced surface.
9248                 theVParam Value of V-parameter on the referenced surface.
9249                 
9250             Returns:     
9251                 max radius of curvature of theSurf.
9252             """
9253             # Example: see GEOM_TestMeasures.py
9254             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9255             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9256             return aSurf
9257
9258         ## Measure max radius of curvature of surface in the given point
9259         #  @param theSurf the given surface.
9260         #  @param thePoint given point.
9261         #  @return max radius of curvature of theSurf.
9262         #
9263         ## @ref swig_todo "Example"
9264         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9265             """
9266             Measure max radius of curvature of surface in the given point.
9267
9268             Parameters: 
9269                 theSurf the given surface.
9270                 thePoint given point.
9271                 
9272             Returns:     
9273                 max radius of curvature of theSurf.          
9274             """
9275             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9276             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9277             return aSurf
9278
9279         ## Measure min radius of curvature of surface.
9280         #  @param theSurf the given surface.
9281         #  @param theUParam Value of U-parameter on the referenced surface.
9282         #  @param theVParam Value of V-parameter on the referenced surface.
9283         #  @return min radius of curvature of theSurf.
9284         #   
9285         ## @ref swig_todo "Example"
9286         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9287             """
9288             Measure min radius of curvature of surface.
9289
9290             Parameters: 
9291                 theSurf the given surface.
9292                 theUParam Value of U-parameter on the referenced surface.
9293                 theVParam Value of V-parameter on the referenced surface.
9294                 
9295             Returns:     
9296                 Min radius of curvature of theSurf.
9297             """
9298             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9299             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9300             return aSurf
9301
9302         ## Measure min radius of curvature of surface in the given point
9303         #  @param theSurf the given surface.
9304         #  @param thePoint given point.
9305         #  @return min radius of curvature of theSurf.
9306         #
9307         ## @ref swig_todo "Example"
9308         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9309             """
9310             Measure min radius of curvature of surface in the given point.
9311
9312             Parameters: 
9313                 theSurf the given surface.
9314                 thePoint given point.
9315                 
9316             Returns:     
9317                 Min radius of curvature of theSurf.          
9318             """
9319             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9320             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9321             return aSurf
9322         ## @}
9323
9324         ## Get min and max tolerances of sub-shapes of theShape
9325         #  @param theShape Shape, to get tolerances of.
9326         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9327         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9328         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9329         #  VertMin,VertMax: Min and max tolerances of the vertices.
9330         #
9331         #  @ref tui_measurement_tools_page "Example"
9332         def Tolerance(self,theShape):
9333             """
9334             Get min and max tolerances of sub-shapes of theShape
9335
9336             Parameters: 
9337                 theShape Shape, to get tolerances of.
9338
9339             Returns:    
9340                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9341                  FaceMin,FaceMax: Min and max tolerances of the faces.
9342                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9343                  VertMin,VertMax: Min and max tolerances of the vertices.
9344             """
9345             # Example: see GEOM_TestMeasures.py
9346             aTuple = self.MeasuOp.GetTolerance(theShape)
9347             RaiseIfFailed("GetTolerance", self.MeasuOp)
9348             return aTuple
9349
9350         ## Obtain description of the given shape (number of sub-shapes of each type)
9351         #  @param theShape Shape to be described.
9352         #  @return Description of the given shape.
9353         #
9354         #  @ref tui_measurement_tools_page "Example"
9355         def WhatIs(self,theShape):
9356             """
9357             Obtain description of the given shape (number of sub-shapes of each type)
9358
9359             Parameters:
9360                 theShape Shape to be described.
9361
9362             Returns:
9363                 Description of the given shape.
9364             """
9365             # Example: see GEOM_TestMeasures.py
9366             aDescr = self.MeasuOp.WhatIs(theShape)
9367             RaiseIfFailed("WhatIs", self.MeasuOp)
9368             return aDescr
9369
9370         ## Obtain quantity of shapes of the given type in \a theShape.
9371         #  If \a theShape is of type \a theType, it is also counted.
9372         #  @param theShape Shape to be described.
9373         #  @param theType the given ShapeType().
9374         #  @return Quantity of shapes of type \a theType in \a theShape.
9375         #
9376         #  @ref tui_measurement_tools_page "Example"
9377         def NbShapes (self, theShape, theType):
9378             """
9379             Obtain quantity of shapes of the given type in theShape.
9380             If theShape is of type theType, it is also counted.
9381
9382             Parameters:
9383                 theShape Shape to be described.
9384                 theType the given geompy.ShapeType
9385
9386             Returns:
9387                 Quantity of shapes of type theType in theShape.
9388             """
9389             # Example: see GEOM_TestMeasures.py
9390             listSh = self.SubShapeAllIDs(theShape, theType)
9391             Nb = len(listSh)
9392             t       = EnumToLong(theShape.GetShapeType())
9393             theType = EnumToLong(theType)
9394             if t == theType:
9395                 Nb = Nb + 1
9396                 pass
9397             return Nb
9398
9399         ## Obtain quantity of shapes of each type in \a theShape.
9400         #  The \a theShape is also counted.
9401         #  @param theShape Shape to be described.
9402         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9403         #
9404         #  @ref tui_measurement_tools_page "Example"
9405         def ShapeInfo (self, theShape):
9406             """
9407             Obtain quantity of shapes of each type in theShape.
9408             The theShape is also counted.
9409
9410             Parameters:
9411                 theShape Shape to be described.
9412
9413             Returns:
9414                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9415             """
9416             # Example: see GEOM_TestMeasures.py
9417             aDict = {}
9418             for typeSh in self.ShapeType:
9419                 if typeSh in ( "AUTO", "SHAPE" ): continue
9420                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9421                 Nb = len(listSh)
9422                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9423                     Nb = Nb + 1
9424                     pass
9425                 aDict[typeSh] = Nb
9426                 pass
9427             return aDict
9428
9429         ## Get a point, situated at the centre of mass of theShape.
9430         #  @param theShape Shape to define centre of mass of.
9431         #  @param theName Object name; when specified, this parameter is used
9432         #         for result publication in the study. Otherwise, if automatic
9433         #         publication is switched on, default value is used for result name.
9434         #
9435         #  @return New GEOM.GEOM_Object, containing the created point.
9436         #
9437         #  @ref tui_measurement_tools_page "Example"
9438         def MakeCDG(self, theShape, theName=None):
9439             """
9440             Get a point, situated at the centre of mass of theShape.
9441
9442             Parameters:
9443                 theShape Shape to define centre of mass of.
9444                 theName Object name; when specified, this parameter is used
9445                         for result publication in the study. Otherwise, if automatic
9446                         publication is switched on, default value is used for result name.
9447
9448             Returns:
9449                 New GEOM.GEOM_Object, containing the created point.
9450             """
9451             # Example: see GEOM_TestMeasures.py
9452             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9453             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9454             self._autoPublish(anObj, theName, "centerOfMass")
9455             return anObj
9456
9457         ## Get a vertex sub-shape by index depended with orientation.
9458         #  @param theShape Shape to find sub-shape.
9459         #  @param theIndex Index to find vertex by this index (starting from zero)
9460         #  @param theName Object name; when specified, this parameter is used
9461         #         for result publication in the study. Otherwise, if automatic
9462         #         publication is switched on, default value is used for result name.
9463         #
9464         #  @return New GEOM.GEOM_Object, containing the created vertex.
9465         #
9466         #  @ref tui_measurement_tools_page "Example"
9467         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9468             """
9469             Get a vertex sub-shape by index depended with orientation.
9470
9471             Parameters:
9472                 theShape Shape to find sub-shape.
9473                 theIndex Index to find vertex by this index (starting from zero)
9474                 theName Object name; when specified, this parameter is used
9475                         for result publication in the study. Otherwise, if automatic
9476                         publication is switched on, default value is used for result name.
9477
9478             Returns:
9479                 New GEOM.GEOM_Object, containing the created vertex.
9480             """
9481             # Example: see GEOM_TestMeasures.py
9482             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9483             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9484             self._autoPublish(anObj, theName, "vertex")
9485             return anObj
9486
9487         ## Get the first vertex of wire/edge depended orientation.
9488         #  @param theShape Shape to find first vertex.
9489         #  @param theName Object name; when specified, this parameter is used
9490         #         for result publication in the study. Otherwise, if automatic
9491         #         publication is switched on, default value is used for result name.
9492         #
9493         #  @return New GEOM.GEOM_Object, containing the created vertex.
9494         #
9495         #  @ref tui_measurement_tools_page "Example"
9496         def GetFirstVertex(self, theShape, theName=None):
9497             """
9498             Get the first vertex of wire/edge depended orientation.
9499
9500             Parameters:
9501                 theShape Shape to find first vertex.
9502                 theName Object name; when specified, this parameter is used
9503                         for result publication in the study. Otherwise, if automatic
9504                         publication is switched on, default value is used for result name.
9505
9506             Returns:    
9507                 New GEOM.GEOM_Object, containing the created vertex.
9508             """
9509             # Example: see GEOM_TestMeasures.py
9510             # note: auto-publishing is done in self.GetVertexByIndex()
9511             anObj = self.GetVertexByIndex(theShape, 0, theName)
9512             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9513             return anObj
9514
9515         ## Get the last vertex of wire/edge depended orientation.
9516         #  @param theShape Shape to find last vertex.
9517         #  @param theName Object name; when specified, this parameter is used
9518         #         for result publication in the study. Otherwise, if automatic
9519         #         publication is switched on, default value is used for result name.
9520         #
9521         #  @return New GEOM.GEOM_Object, containing the created vertex.
9522         #
9523         #  @ref tui_measurement_tools_page "Example"
9524         def GetLastVertex(self, theShape, theName=None):
9525             """
9526             Get the last vertex of wire/edge depended orientation.
9527
9528             Parameters: 
9529                 theShape Shape to find last vertex.
9530                 theName Object name; when specified, this parameter is used
9531                         for result publication in the study. Otherwise, if automatic
9532                         publication is switched on, default value is used for result name.
9533
9534             Returns:   
9535                 New GEOM.GEOM_Object, containing the created vertex.
9536             """
9537             # Example: see GEOM_TestMeasures.py
9538             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9539             # note: auto-publishing is done in self.GetVertexByIndex()
9540             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9541             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9542             return anObj
9543
9544         ## Get a normale to the given face. If the point is not given,
9545         #  the normale is calculated at the center of mass.
9546         #  @param theFace Face to define normale of.
9547         #  @param theOptionalPoint Point to compute the normale at.
9548         #  @param theName Object name; when specified, this parameter is used
9549         #         for result publication in the study. Otherwise, if automatic
9550         #         publication is switched on, default value is used for result name.
9551         #
9552         #  @return New GEOM.GEOM_Object, containing the created vector.
9553         #
9554         #  @ref swig_todo "Example"
9555         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9556             """
9557             Get a normale to the given face. If the point is not given,
9558             the normale is calculated at the center of mass.
9559             
9560             Parameters: 
9561                 theFace Face to define normale of.
9562                 theOptionalPoint Point to compute the normale at.
9563                 theName Object name; when specified, this parameter is used
9564                         for result publication in the study. Otherwise, if automatic
9565                         publication is switched on, default value is used for result name.
9566
9567             Returns:   
9568                 New GEOM.GEOM_Object, containing the created vector.
9569             """
9570             # Example: see GEOM_TestMeasures.py
9571             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9572             RaiseIfFailed("GetNormal", self.MeasuOp)
9573             self._autoPublish(anObj, theName, "normal")
9574             return anObj
9575
9576         ## Check a topology of the given shape.
9577         #  @param theShape Shape to check validity of.
9578         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9579         #                        if TRUE, the shape's geometry will be checked also.
9580         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9581         #                        of problem is printed.
9582         #                        if TRUE and if theShape is invalid, the description 
9583         #                        of problem is also returned.
9584         #  @return TRUE, if the shape "seems to be valid".
9585         #
9586         #  @ref tui_measurement_tools_page "Example"
9587         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9588             """
9589             Check a topology of the given shape.
9590
9591             Parameters: 
9592                 theShape Shape to check validity of.
9593                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9594                                if TRUE, the shape's geometry will be checked also.
9595                 theReturnStatus If FALSE and if theShape is invalid, a description
9596                                 of problem is printed.
9597                                 if TRUE and if theShape is invalid, the description 
9598                                 of problem is returned.
9599
9600             Returns:   
9601                 TRUE, if the shape "seems to be valid".
9602                 If theShape is invalid, prints a description of problem.
9603                 This description can also be returned.
9604             """
9605             # Example: see GEOM_TestMeasures.py
9606             if theIsCheckGeom:
9607                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9608                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9609             else:
9610                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9611                 RaiseIfFailed("CheckShape", self.MeasuOp)
9612             if IsValid == 0:
9613                 if theReturnStatus == 0:
9614                     print Status
9615             if theReturnStatus == 1:
9616               return (IsValid, Status)
9617             return IsValid
9618
9619         ## Detect self-intersections in the given shape.
9620         #  @param theShape Shape to check.
9621         #  @return TRUE, if the shape contains no self-intersections.
9622         #
9623         #  @ref tui_measurement_tools_page "Example"
9624         def CheckSelfIntersections(self, theShape):
9625             """
9626             Detect self-intersections in the given shape.
9627
9628             Parameters: 
9629                 theShape Shape to check.
9630
9631             Returns:   
9632                 TRUE, if the shape contains no self-intersections.
9633             """
9634             # Example: see GEOM_TestMeasures.py
9635             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9636             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9637             return IsValid
9638
9639         ## Get position (LCS) of theShape.
9640         #
9641         #  Origin of the LCS is situated at the shape's center of mass.
9642         #  Axes of the LCS are obtained from shape's location or,
9643         #  if the shape is a planar face, from position of its plane.
9644         #
9645         #  @param theShape Shape to calculate position of.
9646         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9647         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9648         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9649         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9650         #
9651         #  @ref swig_todo "Example"
9652         def GetPosition(self,theShape):
9653             """
9654             Get position (LCS) of theShape.
9655             Origin of the LCS is situated at the shape's center of mass.
9656             Axes of the LCS are obtained from shape's location or,
9657             if the shape is a planar face, from position of its plane.
9658
9659             Parameters: 
9660                 theShape Shape to calculate position of.
9661
9662             Returns:  
9663                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9664                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9665                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9666                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9667             """
9668             # Example: see GEOM_TestMeasures.py
9669             aTuple = self.MeasuOp.GetPosition(theShape)
9670             RaiseIfFailed("GetPosition", self.MeasuOp)
9671             return aTuple
9672
9673         ## Get kind of theShape.
9674         #
9675         #  @param theShape Shape to get a kind of.
9676         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9677         #          and a list of parameters, describing the shape.
9678         #  @note  Concrete meaning of each value, returned via \a theIntegers
9679         #         or \a theDoubles list depends on the kind() of the shape.
9680         #
9681         #  @ref swig_todo "Example"
9682         def KindOfShape(self,theShape):
9683             """
9684             Get kind of theShape.
9685          
9686             Parameters: 
9687                 theShape Shape to get a kind of.
9688
9689             Returns:
9690                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9691                     and a list of parameters, describing the shape.
9692             Note:
9693                 Concrete meaning of each value, returned via theIntegers
9694                 or theDoubles list depends on the geompy.kind of the shape
9695             """
9696             # Example: see GEOM_TestMeasures.py
9697             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9698             RaiseIfFailed("KindOfShape", self.MeasuOp)
9699
9700             aKind  = aRoughTuple[0]
9701             anInts = aRoughTuple[1]
9702             aDbls  = aRoughTuple[2]
9703
9704             # Now there is no exception from this rule:
9705             aKindTuple = [aKind] + aDbls + anInts
9706
9707             # If they are we will regroup parameters for such kind of shape.
9708             # For example:
9709             #if aKind == kind.SOME_KIND:
9710             #    #  SOME_KIND     int int double int double double
9711             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9712
9713             return aKindTuple
9714
9715         # end of l2_measure
9716         ## @}
9717
9718         ## @addtogroup l2_import_export
9719         ## @{
9720
9721         ## Import a shape from the BREP or IGES or STEP file
9722         #  (depends on given format) with given name.
9723         #  @param theFileName The file, containing the shape.
9724         #  @param theFormatName Specify format for the file reading.
9725         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9726         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9727         #            format 'STEP_SCALE' is used instead of 'STEP',
9728         #            length unit will be set to 'meter' and result model will be scaled.
9729         #  @param theName Object name; when specified, this parameter is used
9730         #         for result publication in the study. Otherwise, if automatic
9731         #         publication is switched on, default value is used for result name.
9732         #
9733         #  @return New GEOM.GEOM_Object, containing the imported shape.
9734         #
9735         #  @ref swig_Import_Export "Example"
9736         def ImportFile(self, theFileName, theFormatName, theName=None):
9737             """
9738             Import a shape from the BREP or IGES or STEP file
9739             (depends on given format) with given name.
9740
9741             Parameters: 
9742                 theFileName The file, containing the shape.
9743                 theFormatName Specify format for the file reading.
9744                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9745                     If format 'IGES_SCALE' is used instead of 'IGES' or
9746                        format 'STEP_SCALE' is used instead of 'STEP',
9747                        length unit will be set to 'meter' and result model will be scaled.
9748                 theName Object name; when specified, this parameter is used
9749                         for result publication in the study. Otherwise, if automatic
9750                         publication is switched on, default value is used for result name.
9751
9752             Returns:
9753                 New GEOM.GEOM_Object, containing the imported shape.
9754             """
9755             # Example: see GEOM_TestOthers.py
9756             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9757             RaiseIfFailed("ImportFile", self.InsertOp)
9758             self._autoPublish(anObj, theName, "imported")
9759             return anObj
9760
9761         ## Deprecated analog of ImportFile()
9762         def Import(self, theFileName, theFormatName, theName=None):
9763             """
9764             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9765             """
9766             print "WARNING: Function Import is deprecated, use ImportFile instead"
9767             # note: auto-publishing is done in self.ImportFile()
9768             return self.ImportFile(theFileName, theFormatName, theName)
9769
9770         ## Shortcut to ImportFile() for BREP format.
9771         #  Import a shape from the BREP file with given name.
9772         #  @param theFileName The file, containing the shape.
9773         #  @param theName Object name; when specified, this parameter is used
9774         #         for result publication in the study. Otherwise, if automatic
9775         #         publication is switched on, default value is used for result name.
9776         #
9777         #  @return New GEOM.GEOM_Object, containing the imported shape.
9778         #
9779         #  @ref swig_Import_Export "Example"
9780         def ImportBREP(self, theFileName, theName=None):
9781             """
9782             geompy.ImportFile(...) function for BREP format
9783             Import a shape from the BREP file with given name.
9784
9785             Parameters: 
9786                 theFileName The file, containing the shape.
9787                 theName Object name; when specified, this parameter is used
9788                         for result publication in the study. Otherwise, if automatic
9789                         publication is switched on, default value is used for result name.
9790
9791             Returns:
9792                 New GEOM.GEOM_Object, containing the imported shape.
9793             """
9794             # Example: see GEOM_TestOthers.py
9795             # note: auto-publishing is done in self.ImportFile()
9796             return self.ImportFile(theFileName, "BREP", theName)
9797
9798         ## Shortcut to ImportFile() for IGES format
9799         #  Import a shape from the IGES 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 ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
9812             """
9813             geompy.ImportFile(...) function for IGES 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, "IGES_SCALE", theName)
9831             return self.ImportFile(theFileName, "IGES", theName)
9832
9833         ## Return length unit from given IGES 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 GetIGESUnit(self, theFileName):
9839             """
9840             Return length units from given IGES 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, "IGES", "LEN_UNITS")
9850             return aUnitName
9851
9852         ## Shortcut to ImportFile() for STEP format
9853         #  Import a shape from the STEP file with given name.
9854         #  @param theFileName The file, containing the shape.
9855         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9856         #                     and result model will be scaled, if its units are not meters.
9857         #                     If False (default), file length units will be taken into account.
9858         #  @param theName Object name; when specified, this parameter is used
9859         #         for result publication in the study. Otherwise, if automatic
9860         #         publication is switched on, default value is used for result name.
9861         #
9862         #  @return New GEOM.GEOM_Object, containing the imported shape.
9863         #
9864         #  @ref swig_Import_Export "Example"
9865         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
9866             """
9867             geompy.ImportFile(...) function for STEP format
9868
9869             Parameters:
9870                 theFileName The file, containing the shape.
9871                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9872                             and result model will be scaled, if its units are not meters.
9873                             If False (default), file length units will be taken into account.
9874                 theName Object name; when specified, this parameter is used
9875                         for result publication in the study. Otherwise, if automatic
9876                         publication is switched on, default value is used for result name.
9877
9878             Returns:
9879                 New GEOM.GEOM_Object, containing the imported shape.
9880             """
9881             # Example: see GEOM_TestOthers.py
9882             # note: auto-publishing is done in self.ImportFile()
9883             if ignoreUnits:
9884                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
9885             return self.ImportFile(theFileName, "STEP", theName)
9886
9887         ## Return length unit from given IGES or STEP file
9888         #  @param theFileName The file, containing the shape.
9889         #  @return String, containing the units name.
9890         #
9891         #  @ref swig_Import_Export "Example"
9892         def GetSTEPUnit(self, theFileName):
9893             """
9894             Return length units from given STEP file
9895
9896             Parameters:
9897                 theFileName The file, containing the shape.
9898
9899             Returns:
9900                 String, containing the units name.
9901             """
9902             # Example: see GEOM_TestOthers.py
9903             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
9904             return aUnitName
9905
9906         ## Read a shape from the binary stream, containing its bounding representation (BRep).
9907         #  @note This method will not be dumped to the python script by DumpStudy functionality.
9908         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
9909         #  @param theStream The BRep binary stream.
9910         #  @param theName Object name; when specified, this parameter is used
9911         #         for result publication in the study. Otherwise, if automatic
9912         #         publication is switched on, default value is used for result name.
9913         #
9914         #  @return New GEOM_Object, containing the shape, read from theStream.
9915         #
9916         #  @ref swig_Import_Export "Example"
9917         def RestoreShape (self, theStream, theName=None):
9918             """
9919             Read a shape from the binary stream, containing its bounding representation (BRep).
9920
9921             Note:
9922                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
9923
9924             Parameters: 
9925                 theStream The BRep binary stream.
9926                 theName Object name; when specified, this parameter is used
9927                         for result publication in the study. Otherwise, if automatic
9928                         publication is switched on, default value is used for result name.
9929
9930             Returns:
9931                 New GEOM_Object, containing the shape, read from theStream.
9932             """
9933             # Example: see GEOM_TestOthers.py
9934             anObj = self.InsertOp.RestoreShape(theStream)
9935             RaiseIfFailed("RestoreShape", self.InsertOp)
9936             self._autoPublish(anObj, theName, "restored")
9937             return anObj
9938
9939         ## Export the given shape into a file with given name.
9940         #  @param theObject Shape to be stored in the file.
9941         #  @param theFileName Name of the file to store the given shape in.
9942         #  @param theFormatName Specify format for the shape storage.
9943         #         Available formats can be obtained with
9944         #         geompy.InsertOp.ExportTranslators()[0] method.
9945         #
9946         #  @ref swig_Import_Export "Example"
9947         def Export(self, theObject, theFileName, theFormatName):
9948             """
9949             Export the given shape into a file with given name.
9950
9951             Parameters: 
9952                 theObject Shape to be stored in the file.
9953                 theFileName Name of the file to store the given shape in.
9954                 theFormatName Specify format for the shape storage.
9955                               Available formats can be obtained with
9956                               geompy.InsertOp.ExportTranslators()[0] method.
9957             """
9958             # Example: see GEOM_TestOthers.py
9959             self.InsertOp.Export(theObject, theFileName, theFormatName)
9960             if self.InsertOp.IsDone() == 0:
9961                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
9962                 pass
9963             pass
9964
9965         ## Shortcut to Export() for BREP format
9966         #
9967         #  @ref swig_Import_Export "Example"
9968         def ExportBREP(self,theObject, theFileName):
9969             """
9970             geompy.Export(...) function for BREP format
9971             """
9972             # Example: see GEOM_TestOthers.py
9973             return self.Export(theObject, theFileName, "BREP")
9974
9975         ## Shortcut to Export() for IGES format
9976         #
9977         #  @ref swig_Import_Export "Example"
9978         def ExportIGES(self,theObject, theFileName):
9979             """
9980             geompy.Export(...) function for IGES format
9981             """
9982             # Example: see GEOM_TestOthers.py
9983             return self.Export(theObject, theFileName, "IGES")
9984
9985         ## Shortcut to Export() for STEP format
9986         #
9987         #  @ref swig_Import_Export "Example"
9988         def ExportSTEP(self,theObject, theFileName):
9989             """
9990             geompy.Export(...) function for STEP format
9991             """
9992             # Example: see GEOM_TestOthers.py
9993             return self.Export(theObject, theFileName, "STEP")
9994
9995         # end of l2_import_export
9996         ## @}
9997
9998         ## @addtogroup l3_blocks
9999         ## @{
10000
10001         ## Create a quadrangle face from four edges. Order of Edges is not
10002         #  important. It is  not necessary that edges share the same vertex.
10003         #  @param E1,E2,E3,E4 Edges for the face bound.
10004         #  @param theName Object name; when specified, this parameter is used
10005         #         for result publication in the study. Otherwise, if automatic
10006         #         publication is switched on, default value is used for result name.
10007         #
10008         #  @return New GEOM.GEOM_Object, containing the created face.
10009         #
10010         #  @ref tui_building_by_blocks_page "Example"
10011         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10012             """
10013             Create a quadrangle face from four edges. Order of Edges is not
10014             important. It is  not necessary that edges share the same vertex.
10015
10016             Parameters: 
10017                 E1,E2,E3,E4 Edges for the face bound.
10018                 theName Object name; when specified, this parameter is used
10019                         for result publication in the study. Otherwise, if automatic
10020                         publication is switched on, default value is used for result name.
10021
10022             Returns: 
10023                 New GEOM.GEOM_Object, containing the created face.
10024
10025             Example of usage:               
10026                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10027             """
10028             # Example: see GEOM_Spanner.py
10029             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10030             RaiseIfFailed("MakeQuad", self.BlocksOp)
10031             self._autoPublish(anObj, theName, "quad")
10032             return anObj
10033
10034         ## Create a quadrangle face on two edges.
10035         #  The missing edges will be built by creating the shortest ones.
10036         #  @param E1,E2 Two opposite edges for the face.
10037         #  @param theName Object name; when specified, this parameter is used
10038         #         for result publication in the study. Otherwise, if automatic
10039         #         publication is switched on, default value is used for result name.
10040         #
10041         #  @return New GEOM.GEOM_Object, containing the created face.
10042         #
10043         #  @ref tui_building_by_blocks_page "Example"
10044         def MakeQuad2Edges(self, E1, E2, theName=None):
10045             """
10046             Create a quadrangle face on two edges.
10047             The missing edges will be built by creating the shortest ones.
10048
10049             Parameters: 
10050                 E1,E2 Two opposite edges for the face.
10051                 theName Object name; when specified, this parameter is used
10052                         for result publication in the study. Otherwise, if automatic
10053                         publication is switched on, default value is used for result name.
10054
10055             Returns: 
10056                 New GEOM.GEOM_Object, containing the created face.
10057             
10058             Example of usage:
10059                 # create vertices
10060                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10061                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10062                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10063                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10064                 # create edges
10065                 edge1 = geompy.MakeEdge(p1, p2)
10066                 edge2 = geompy.MakeEdge(p3, p4)
10067                 # create a quadrangle face from two edges
10068                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10069             """
10070             # Example: see GEOM_Spanner.py
10071             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10072             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10073             self._autoPublish(anObj, theName, "quad")
10074             return anObj
10075
10076         ## Create a quadrangle face with specified corners.
10077         #  The missing edges will be built by creating the shortest ones.
10078         #  @param V1,V2,V3,V4 Corner vertices for the face.
10079         #  @param theName Object name; when specified, this parameter is used
10080         #         for result publication in the study. Otherwise, if automatic
10081         #         publication is switched on, default value is used for result name.
10082         #
10083         #  @return New GEOM.GEOM_Object, containing the created face.
10084         #
10085         #  @ref tui_building_by_blocks_page "Example 1"
10086         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10087         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10088             """
10089             Create a quadrangle face with specified corners.
10090             The missing edges will be built by creating the shortest ones.
10091
10092             Parameters: 
10093                 V1,V2,V3,V4 Corner vertices for the face.
10094                 theName Object name; when specified, this parameter is used
10095                         for result publication in the study. Otherwise, if automatic
10096                         publication is switched on, default value is used for result name.
10097
10098             Returns: 
10099                 New GEOM.GEOM_Object, containing the created face.
10100
10101             Example of usage:
10102                 # create vertices
10103                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10104                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10105                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10106                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10107                 # create a quadrangle from four points in its corners
10108                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10109             """
10110             # Example: see GEOM_Spanner.py
10111             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10112             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10113             self._autoPublish(anObj, theName, "quad")
10114             return anObj
10115
10116         ## Create a hexahedral solid, bounded by the six given faces. Order of
10117         #  faces is not important. It is  not necessary that Faces share the same edge.
10118         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10119         #  @param theName Object name; when specified, this parameter is used
10120         #         for result publication in the study. Otherwise, if automatic
10121         #         publication is switched on, default value is used for result name.
10122         #
10123         #  @return New GEOM.GEOM_Object, containing the created solid.
10124         #
10125         #  @ref tui_building_by_blocks_page "Example 1"
10126         #  \n @ref swig_MakeHexa "Example 2"
10127         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10128             """
10129             Create a hexahedral solid, bounded by the six given faces. Order of
10130             faces is not important. It is  not necessary that Faces share the same edge.
10131
10132             Parameters: 
10133                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10134                 theName Object name; when specified, this parameter is used
10135                         for result publication in the study. Otherwise, if automatic
10136                         publication is switched on, default value is used for result name.
10137
10138             Returns:    
10139                 New GEOM.GEOM_Object, containing the created solid.
10140
10141             Example of usage:
10142                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10143             """
10144             # Example: see GEOM_Spanner.py
10145             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10146             RaiseIfFailed("MakeHexa", self.BlocksOp)
10147             self._autoPublish(anObj, theName, "hexa")
10148             return anObj
10149
10150         ## Create a hexahedral solid between two given faces.
10151         #  The missing faces will be built by creating the smallest ones.
10152         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10153         #  @param theName Object name; when specified, this parameter is used
10154         #         for result publication in the study. Otherwise, if automatic
10155         #         publication is switched on, default value is used for result name.
10156         #
10157         #  @return New GEOM.GEOM_Object, containing the created solid.
10158         #
10159         #  @ref tui_building_by_blocks_page "Example 1"
10160         #  \n @ref swig_MakeHexa2Faces "Example 2"
10161         def MakeHexa2Faces(self, F1, F2, theName=None):
10162             """
10163             Create a hexahedral solid between two given faces.
10164             The missing faces will be built by creating the smallest ones.
10165
10166             Parameters: 
10167                 F1,F2 Two opposite faces for the hexahedral solid.
10168                 theName Object name; when specified, this parameter is used
10169                         for result publication in the study. Otherwise, if automatic
10170                         publication is switched on, default value is used for result name.
10171
10172             Returns:
10173                 New GEOM.GEOM_Object, containing the created solid.
10174
10175             Example of usage:
10176                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10177             """
10178             # Example: see GEOM_Spanner.py
10179             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10180             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10181             self._autoPublish(anObj, theName, "hexa")
10182             return anObj
10183
10184         # end of l3_blocks
10185         ## @}
10186
10187         ## @addtogroup l3_blocks_op
10188         ## @{
10189
10190         ## Get a vertex, found in the given shape by its coordinates.
10191         #  @param theShape Block or a compound of blocks.
10192         #  @param theX,theY,theZ Coordinates of the sought vertex.
10193         #  @param theEpsilon Maximum allowed distance between the resulting
10194         #                    vertex and point with the given coordinates.
10195         #  @param theName Object name; when specified, this parameter is used
10196         #         for result publication in the study. Otherwise, if automatic
10197         #         publication is switched on, default value is used for result name.
10198         #
10199         #  @return New GEOM.GEOM_Object, containing the found vertex.
10200         #
10201         #  @ref swig_GetPoint "Example"
10202         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10203             """
10204             Get a vertex, found in the given shape by its coordinates.
10205
10206             Parameters: 
10207                 theShape Block or a compound of blocks.
10208                 theX,theY,theZ Coordinates of the sought vertex.
10209                 theEpsilon Maximum allowed distance between the resulting
10210                            vertex and point with the given coordinates.
10211                 theName Object name; when specified, this parameter is used
10212                         for result publication in the study. Otherwise, if automatic
10213                         publication is switched on, default value is used for result name.
10214
10215             Returns:                  
10216                 New GEOM.GEOM_Object, containing the found vertex.
10217
10218             Example of usage:
10219                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10220             """
10221             # Example: see GEOM_TestOthers.py
10222             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10223             RaiseIfFailed("GetPoint", self.BlocksOp)
10224             self._autoPublish(anObj, theName, "vertex")
10225             return anObj
10226
10227         ## Find a vertex of the given shape, which has minimal distance to the given point.
10228         #  @param theShape Any shape.
10229         #  @param thePoint Point, close to the desired vertex.
10230         #  @param theName Object name; when specified, this parameter is used
10231         #         for result publication in the study. Otherwise, if automatic
10232         #         publication is switched on, default value is used for result name.
10233         #
10234         #  @return New GEOM.GEOM_Object, containing the found vertex.
10235         #
10236         #  @ref swig_GetVertexNearPoint "Example"
10237         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10238             """
10239             Find a vertex of the given shape, which has minimal distance to the given point.
10240
10241             Parameters: 
10242                 theShape Any shape.
10243                 thePoint Point, close to the desired vertex.
10244                 theName Object name; when specified, this parameter is used
10245                         for result publication in the study. Otherwise, if automatic
10246                         publication is switched on, default value is used for result name.
10247
10248             Returns:
10249                 New GEOM.GEOM_Object, containing the found vertex.
10250
10251             Example of usage:
10252                 pmidle = geompy.MakeVertex(50, 0, 50)
10253                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10254             """
10255             # Example: see GEOM_TestOthers.py
10256             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10257             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10258             self._autoPublish(anObj, theName, "vertex")
10259             return anObj
10260
10261         ## Get an edge, found in the given shape by two given vertices.
10262         #  @param theShape Block or a compound of blocks.
10263         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10264         #  @param theName Object name; when specified, this parameter is used
10265         #         for result publication in the study. Otherwise, if automatic
10266         #         publication is switched on, default value is used for result name.
10267         #
10268         #  @return New GEOM.GEOM_Object, containing the found edge.
10269         #
10270         #  @ref swig_GetEdge "Example"
10271         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10272             """
10273             Get an edge, found in the given shape by two given vertices.
10274
10275             Parameters: 
10276                 theShape Block or a compound of blocks.
10277                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10278                 theName Object name; when specified, this parameter is used
10279                         for result publication in the study. Otherwise, if automatic
10280                         publication is switched on, default value is used for result name.
10281
10282             Returns:
10283                 New GEOM.GEOM_Object, containing the found edge.
10284             """
10285             # Example: see GEOM_Spanner.py
10286             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10287             RaiseIfFailed("GetEdge", self.BlocksOp)
10288             self._autoPublish(anObj, theName, "edge")
10289             return anObj
10290
10291         ## Find an edge of the given shape, which has minimal distance to the given point.
10292         #  @param theShape Block or a compound of blocks.
10293         #  @param thePoint Point, close to the desired edge.
10294         #  @param theName Object name; when specified, this parameter is used
10295         #         for result publication in the study. Otherwise, if automatic
10296         #         publication is switched on, default value is used for result name.
10297         #
10298         #  @return New GEOM.GEOM_Object, containing the found edge.
10299         #
10300         #  @ref swig_GetEdgeNearPoint "Example"
10301         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10302             """
10303             Find an edge of the given shape, which has minimal distance to the given point.
10304
10305             Parameters: 
10306                 theShape Block or a compound of blocks.
10307                 thePoint Point, close to the desired edge.
10308                 theName Object name; when specified, this parameter is used
10309                         for result publication in the study. Otherwise, if automatic
10310                         publication is switched on, default value is used for result name.
10311
10312             Returns:
10313                 New GEOM.GEOM_Object, containing the found edge.
10314             """
10315             # Example: see GEOM_TestOthers.py
10316             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10317             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10318             self._autoPublish(anObj, theName, "edge")
10319             return anObj
10320
10321         ## Returns a face, found in the given shape by four given corner vertices.
10322         #  @param theShape Block or a compound of blocks.
10323         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10324         #  @param theName Object name; when specified, this parameter is used
10325         #         for result publication in the study. Otherwise, if automatic
10326         #         publication is switched on, default value is used for result name.
10327         #
10328         #  @return New GEOM.GEOM_Object, containing the found face.
10329         #
10330         #  @ref swig_todo "Example"
10331         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10332             """
10333             Returns a face, found in the given shape by four given corner vertices.
10334
10335             Parameters:
10336                 theShape Block or a compound of blocks.
10337                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10338                 theName Object name; when specified, this parameter is used
10339                         for result publication in the study. Otherwise, if automatic
10340                         publication is switched on, default value is used for result name.
10341
10342             Returns:
10343                 New GEOM.GEOM_Object, containing the found face.
10344             """
10345             # Example: see GEOM_Spanner.py
10346             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10347             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10348             self._autoPublish(anObj, theName, "face")
10349             return anObj
10350
10351         ## Get a face of block, found in the given shape by two given edges.
10352         #  @param theShape Block or a compound of blocks.
10353         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10354         #  @param theName Object name; when specified, this parameter is used
10355         #         for result publication in the study. Otherwise, if automatic
10356         #         publication is switched on, default value is used for result name.
10357         #
10358         #  @return New GEOM.GEOM_Object, containing the found face.
10359         #
10360         #  @ref swig_todo "Example"
10361         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10362             """
10363             Get a face of block, found in the given shape by two given edges.
10364
10365             Parameters:
10366                 theShape Block or a compound of blocks.
10367                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10368                 theName Object name; when specified, this parameter is used
10369                         for result publication in the study. Otherwise, if automatic
10370                         publication is switched on, default value is used for result name.
10371
10372             Returns:
10373                 New GEOM.GEOM_Object, containing the found face.
10374             """
10375             # Example: see GEOM_Spanner.py
10376             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10377             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10378             self._autoPublish(anObj, theName, "face")
10379             return anObj
10380
10381         ## Find a face, opposite to the given one in the given block.
10382         #  @param theBlock Must be a hexahedral solid.
10383         #  @param theFace Face of \a theBlock, opposite to the desired face.
10384         #  @param theName Object name; when specified, this parameter is used
10385         #         for result publication in the study. Otherwise, if automatic
10386         #         publication is switched on, default value is used for result name.
10387         #
10388         #  @return New GEOM.GEOM_Object, containing the found face.
10389         #
10390         #  @ref swig_GetOppositeFace "Example"
10391         def GetOppositeFace(self, theBlock, theFace, theName=None):
10392             """
10393             Find a face, opposite to the given one in the given block.
10394
10395             Parameters:
10396                 theBlock Must be a hexahedral solid.
10397                 theFace Face of theBlock, opposite to the desired face.
10398                 theName Object name; when specified, this parameter is used
10399                         for result publication in the study. Otherwise, if automatic
10400                         publication is switched on, default value is used for result name.
10401
10402             Returns: 
10403                 New GEOM.GEOM_Object, containing the found face.
10404             """
10405             # Example: see GEOM_Spanner.py
10406             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10407             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10408             self._autoPublish(anObj, theName, "face")
10409             return anObj
10410
10411         ## Find a face of the given shape, which has minimal distance to the given point.
10412         #  @param theShape Block or a compound of blocks.
10413         #  @param thePoint Point, close to the desired face.
10414         #  @param theName Object name; when specified, this parameter is used
10415         #         for result publication in the study. Otherwise, if automatic
10416         #         publication is switched on, default value is used for result name.
10417         #
10418         #  @return New GEOM.GEOM_Object, containing the found face.
10419         #
10420         #  @ref swig_GetFaceNearPoint "Example"
10421         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10422             """
10423             Find a face of the given shape, which has minimal distance to the given point.
10424
10425             Parameters:
10426                 theShape Block or a compound of blocks.
10427                 thePoint Point, close to the desired face.
10428                 theName Object name; when specified, this parameter is used
10429                         for result publication in the study. Otherwise, if automatic
10430                         publication is switched on, default value is used for result name.
10431
10432             Returns:
10433                 New GEOM.GEOM_Object, containing the found face.
10434             """
10435             # Example: see GEOM_Spanner.py
10436             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10437             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10438             self._autoPublish(anObj, theName, "face")
10439             return anObj
10440
10441         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10442         #  @param theBlock Block or a compound of blocks.
10443         #  @param theVector Vector, close to the normale of the desired face.
10444         #  @param theName Object name; when specified, this parameter is used
10445         #         for result publication in the study. Otherwise, if automatic
10446         #         publication is switched on, default value is used for result name.
10447         #
10448         #  @return New GEOM.GEOM_Object, containing the found face.
10449         #
10450         #  @ref swig_todo "Example"
10451         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10452             """
10453             Find a face of block, whose outside normale has minimal angle with the given vector.
10454
10455             Parameters:
10456                 theBlock Block or a compound of blocks.
10457                 theVector Vector, close to the normale of the desired face.
10458                 theName Object name; when specified, this parameter is used
10459                         for result publication in the study. Otherwise, if automatic
10460                         publication is switched on, default value is used for result name.
10461
10462             Returns:
10463                 New GEOM.GEOM_Object, containing the found face.
10464             """
10465             # Example: see GEOM_Spanner.py
10466             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10467             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10468             self._autoPublish(anObj, theName, "face")
10469             return anObj
10470
10471         ## Find all sub-shapes of type \a theShapeType of the given shape,
10472         #  which have minimal distance to the given point.
10473         #  @param theShape Any shape.
10474         #  @param thePoint Point, close to the desired shape.
10475         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10476         #  @param theTolerance The tolerance for distances comparison. All shapes
10477         #                      with distances to the given point in interval
10478         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10479         #  @param theName Object name; when specified, this parameter is used
10480         #         for result publication in the study. Otherwise, if automatic
10481         #         publication is switched on, default value is used for result name.
10482         #
10483         #  @return New GEOM_Object, containing a group of all found shapes.
10484         #
10485         #  @ref swig_GetShapesNearPoint "Example"
10486         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10487             """
10488             Find all sub-shapes of type theShapeType of the given shape,
10489             which have minimal distance to the given point.
10490
10491             Parameters:
10492                 theShape Any shape.
10493                 thePoint Point, close to the desired shape.
10494                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10495                 theTolerance The tolerance for distances comparison. All shapes
10496                                 with distances to the given point in interval
10497                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10498                 theName Object name; when specified, this parameter is used
10499                         for result publication in the study. Otherwise, if automatic
10500                         publication is switched on, default value is used for result name.
10501
10502             Returns:
10503                 New GEOM_Object, containing a group of all found shapes.
10504             """
10505             # Example: see GEOM_TestOthers.py
10506             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10507             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10508             self._autoPublish(anObj, theName, "group")
10509             return anObj
10510
10511         # end of l3_blocks_op
10512         ## @}
10513
10514         ## @addtogroup l4_blocks_measure
10515         ## @{
10516
10517         ## Check, if the compound of blocks is given.
10518         #  To be considered as a compound of blocks, the
10519         #  given shape must satisfy the following conditions:
10520         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10521         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10522         #  - The compound should be connexe.
10523         #  - The glue between two quadrangle faces should be applied.
10524         #  @param theCompound The compound to check.
10525         #  @return TRUE, if the given shape is a compound of blocks.
10526         #  If theCompound is not valid, prints all discovered errors.
10527         #
10528         #  @ref tui_measurement_tools_page "Example 1"
10529         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10530         def CheckCompoundOfBlocks(self,theCompound):
10531             """
10532             Check, if the compound of blocks is given.
10533             To be considered as a compound of blocks, the
10534             given shape must satisfy the following conditions:
10535             - Each element of the compound should be a Block (6 faces and 12 edges).
10536             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10537             - The compound should be connexe.
10538             - The glue between two quadrangle faces should be applied.
10539
10540             Parameters:
10541                 theCompound The compound to check.
10542
10543             Returns:
10544                 TRUE, if the given shape is a compound of blocks.
10545                 If theCompound is not valid, prints all discovered errors.            
10546             """
10547             # Example: see GEOM_Spanner.py
10548             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10549             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10550             if IsValid == 0:
10551                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10552                 print Descr
10553             return IsValid
10554
10555         ## Retrieve all non blocks solids and faces from \a theShape.
10556         #  @param theShape The shape to explore.
10557         #  @param theName Object name; when specified, this parameter is used
10558         #         for result publication in the study. Otherwise, if automatic
10559         #         publication is switched on, default value is used for result name.
10560         #
10561         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10562         #          non block solids (= not 6 faces, or with 6 faces, but with the
10563         #          presence of non-quadrangular faces). The second object is a
10564         #          group of all non quadrangular faces.
10565         #
10566         #  @ref tui_measurement_tools_page "Example 1"
10567         #  \n @ref swig_GetNonBlocks "Example 2"
10568         def GetNonBlocks (self, theShape, theName=None):
10569             """
10570             Retrieve all non blocks solids and faces from theShape.
10571
10572             Parameters:
10573                 theShape The shape to explore.
10574                 theName Object name; when specified, this parameter is used
10575                         for result publication in the study. Otherwise, if automatic
10576                         publication is switched on, default value is used for result name.
10577
10578             Returns:
10579                 A tuple of two GEOM_Objects. The first object is a group of all
10580                 non block solids (= not 6 faces, or with 6 faces, but with the
10581                 presence of non-quadrangular faces). The second object is a
10582                 group of all non quadrangular faces.
10583
10584             Usage:
10585                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10586             """
10587             # Example: see GEOM_Spanner.py
10588             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10589             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10590             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10591             return aTuple
10592
10593         ## Remove all seam and degenerated edges from \a theShape.
10594         #  Unite faces and edges, sharing one surface. It means that
10595         #  this faces must have references to one C++ surface object (handle).
10596         #  @param theShape The compound or single solid to remove irregular edges from.
10597         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10598         #         do not unite faces.
10599         #  @param theName Object name; when specified, this parameter is used
10600         #         for result publication in the study. Otherwise, if automatic
10601         #         publication is switched on, default value is used for result name.
10602         #
10603         #  @return Improved shape.
10604         #
10605         #  @ref swig_RemoveExtraEdges "Example"
10606         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10607             """
10608             Remove all seam and degenerated edges from theShape.
10609             Unite faces and edges, sharing one surface. It means that
10610             this faces must have references to one C++ surface object (handle).
10611
10612             Parameters:
10613                 theShape The compound or single solid to remove irregular edges from.
10614                 doUnionFaces If True, then unite faces. If False (the default value),
10615                              do not unite faces.
10616                 theName Object name; when specified, this parameter is used
10617                         for result publication in the study. Otherwise, if automatic
10618                         publication is switched on, default value is used for result name.
10619
10620             Returns: 
10621                 Improved shape.
10622             """
10623             # Example: see GEOM_TestOthers.py
10624             nbFacesOptimum = -1 # -1 means do not unite faces
10625             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10626             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10627             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10628             self._autoPublish(anObj, theName, "removeExtraEdges")
10629             return anObj
10630
10631         ## Check, if the given shape is a blocks compound.
10632         #  Fix all detected errors.
10633         #    \note Single block can be also fixed by this method.
10634         #  @param theShape The compound to check and improve.
10635         #  @param theName Object name; when specified, this parameter is used
10636         #         for result publication in the study. Otherwise, if automatic
10637         #         publication is switched on, default value is used for result name.
10638         #
10639         #  @return Improved compound.
10640         #
10641         #  @ref swig_CheckAndImprove "Example"
10642         def CheckAndImprove(self, theShape, theName=None):
10643             """
10644             Check, if the given shape is a blocks compound.
10645             Fix all detected errors.
10646
10647             Note:
10648                 Single block can be also fixed by this method.
10649
10650             Parameters:
10651                 theShape The compound to check and improve.
10652                 theName Object name; when specified, this parameter is used
10653                         for result publication in the study. Otherwise, if automatic
10654                         publication is switched on, default value is used for result name.
10655
10656             Returns: 
10657                 Improved compound.
10658             """
10659             # Example: see GEOM_TestOthers.py
10660             anObj = self.BlocksOp.CheckAndImprove(theShape)
10661             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10662             self._autoPublish(anObj, theName, "improved")
10663             return anObj
10664
10665         # end of l4_blocks_measure
10666         ## @}
10667
10668         ## @addtogroup l3_blocks_op
10669         ## @{
10670
10671         ## Get all the blocks, contained in the given compound.
10672         #  @param theCompound The compound to explode.
10673         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10674         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10675         #  @param theName Object name; when specified, this parameter is used
10676         #         for result publication in the study. Otherwise, if automatic
10677         #         publication is switched on, default value is used for result name.
10678         #
10679         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10680         #
10681         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10682         #
10683         #  @ref tui_explode_on_blocks "Example 1"
10684         #  \n @ref swig_MakeBlockExplode "Example 2"
10685         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10686             """
10687             Get all the blocks, contained in the given compound.
10688
10689             Parameters:
10690                 theCompound The compound to explode.
10691                 theMinNbFaces If solid has lower number of faces, it is not a block.
10692                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10693                 theName Object name; when specified, this parameter is used
10694                         for result publication in the study. Otherwise, if automatic
10695                         publication is switched on, default value is used for result name.
10696
10697             Note:
10698                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10699
10700             Returns:  
10701                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10702             """
10703             # Example: see GEOM_TestOthers.py
10704             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10705             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10706             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10707             for anObj in aList:
10708                 anObj.SetParameters(Parameters)
10709                 pass
10710             self._autoPublish(aList, theName, "block")
10711             return aList
10712
10713         ## Find block, containing the given point inside its volume or on boundary.
10714         #  @param theCompound Compound, to find block in.
10715         #  @param thePoint Point, close to the desired block. If the point lays on
10716         #         boundary between some blocks, we return block with nearest center.
10717         #  @param theName Object name; when specified, this parameter is used
10718         #         for result publication in the study. Otherwise, if automatic
10719         #         publication is switched on, default value is used for result name.
10720         #
10721         #  @return New GEOM.GEOM_Object, containing the found block.
10722         #
10723         #  @ref swig_todo "Example"
10724         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10725             """
10726             Find block, containing the given point inside its volume or on boundary.
10727
10728             Parameters:
10729                 theCompound Compound, to find block in.
10730                 thePoint Point, close to the desired block. If the point lays on
10731                          boundary between some blocks, we return block with nearest center.
10732                 theName Object name; when specified, this parameter is used
10733                         for result publication in the study. Otherwise, if automatic
10734                         publication is switched on, default value is used for result name.
10735
10736             Returns:
10737                 New GEOM.GEOM_Object, containing the found block.
10738             """
10739             # Example: see GEOM_Spanner.py
10740             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10741             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10742             self._autoPublish(anObj, theName, "block")
10743             return anObj
10744
10745         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10746         #  @param theCompound Compound, to find block in.
10747         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10748         #  @param theName Object name; when specified, this parameter is used
10749         #         for result publication in the study. Otherwise, if automatic
10750         #         publication is switched on, default value is used for result name.
10751         #
10752         #  @return New GEOM.GEOM_Object, containing the found block.
10753         #
10754         #  @ref swig_GetBlockByParts "Example"
10755         def GetBlockByParts(self, theCompound, theParts, theName=None):
10756             """
10757              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10758
10759              Parameters:
10760                 theCompound Compound, to find block in.
10761                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
10762                 theName Object name; when specified, this parameter is used
10763                         for result publication in the study. Otherwise, if automatic
10764                         publication is switched on, default value is used for result name.
10765
10766             Returns: 
10767                 New GEOM_Object, containing the found block.
10768             """
10769             # Example: see GEOM_TestOthers.py
10770             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
10771             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
10772             self._autoPublish(anObj, theName, "block")
10773             return anObj
10774
10775         ## Return all blocks, containing all the elements, passed as the parts.
10776         #  @param theCompound Compound, to find blocks in.
10777         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10778         #  @param theName Object name; when specified, this parameter is used
10779         #         for result publication in the study. Otherwise, if automatic
10780         #         publication is switched on, default value is used for result name.
10781         #
10782         #  @return List of GEOM.GEOM_Object, containing the found blocks.
10783         #
10784         #  @ref swig_todo "Example"
10785         def GetBlocksByParts(self, theCompound, theParts, theName=None):
10786             """
10787             Return all blocks, containing all the elements, passed as the parts.
10788
10789             Parameters:
10790                 theCompound Compound, to find blocks in.
10791                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10792                 theName Object name; when specified, this parameter is used
10793                         for result publication in the study. Otherwise, if automatic
10794                         publication is switched on, default value is used for result name.
10795
10796             Returns:
10797                 List of GEOM.GEOM_Object, containing the found blocks.
10798             """
10799             # Example: see GEOM_Spanner.py
10800             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
10801             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
10802             self._autoPublish(aList, theName, "block")
10803             return aList
10804
10805         ## Multi-transformate block and glue the result.
10806         #  Transformation is defined so, as to superpose direction faces.
10807         #  @param Block Hexahedral solid to be multi-transformed.
10808         #  @param DirFace1 ID of First direction face.
10809         #  @param DirFace2 ID of Second direction face.
10810         #  @param NbTimes Quantity of transformations to be done.
10811         #  @param theName Object name; when specified, this parameter is used
10812         #         for result publication in the study. Otherwise, if automatic
10813         #         publication is switched on, default value is used for result name.
10814         #
10815         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10816         #
10817         #  @return New GEOM.GEOM_Object, containing the result shape.
10818         #
10819         #  @ref tui_multi_transformation "Example"
10820         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
10821             """
10822             Multi-transformate block and glue the result.
10823             Transformation is defined so, as to superpose direction faces.
10824
10825             Parameters:
10826                 Block Hexahedral solid to be multi-transformed.
10827                 DirFace1 ID of First direction face.
10828                 DirFace2 ID of Second direction face.
10829                 NbTimes Quantity of transformations to be done.
10830                 theName Object name; when specified, this parameter is used
10831                         for result publication in the study. Otherwise, if automatic
10832                         publication is switched on, default value is used for result name.
10833
10834             Note:
10835                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10836
10837             Returns:
10838                 New GEOM.GEOM_Object, containing the result shape.
10839             """
10840             # Example: see GEOM_Spanner.py
10841             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
10842             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
10843             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
10844             anObj.SetParameters(Parameters)
10845             self._autoPublish(anObj, theName, "transformed")
10846             return anObj
10847
10848         ## Multi-transformate block and glue the result.
10849         #  @param Block Hexahedral solid to be multi-transformed.
10850         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
10851         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
10852         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
10853         #  @param theName Object name; when specified, this parameter is used
10854         #         for result publication in the study. Otherwise, if automatic
10855         #         publication is switched on, default value is used for result name.
10856         #
10857         #  @return New GEOM.GEOM_Object, containing the result shape.
10858         #
10859         #  @ref tui_multi_transformation "Example"
10860         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
10861                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
10862             """
10863             Multi-transformate block and glue the result.
10864
10865             Parameters:
10866                 Block Hexahedral solid to be multi-transformed.
10867                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
10868                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
10869                 NbTimesU,NbTimesV Quantity of transformations to be done.
10870                 theName Object name; when specified, this parameter is used
10871                         for result publication in the study. Otherwise, if automatic
10872                         publication is switched on, default value is used for result name.
10873
10874             Returns:
10875                 New GEOM.GEOM_Object, containing the result shape.
10876             """
10877             # Example: see GEOM_Spanner.py
10878             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
10879               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
10880             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
10881                                                             DirFace1V, DirFace2V, NbTimesV)
10882             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
10883             anObj.SetParameters(Parameters)
10884             self._autoPublish(anObj, theName, "transformed")
10885             return anObj
10886
10887         ## Build all possible propagation groups.
10888         #  Propagation group is a set of all edges, opposite to one (main)
10889         #  edge of this group directly or through other opposite edges.
10890         #  Notion of Opposite Edge make sence only on quadrangle face.
10891         #  @param theShape Shape to build propagation groups on.
10892         #  @param 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         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
10897         #
10898         #  @ref swig_Propagate "Example"
10899         def Propagate(self, theShape, theName=None):
10900             """
10901             Build all possible propagation groups.
10902             Propagation group is a set of all edges, opposite to one (main)
10903             edge of this group directly or through other opposite edges.
10904             Notion of Opposite Edge make sence only on quadrangle face.
10905
10906             Parameters:
10907                 theShape Shape to build propagation groups on.
10908                 theName Object name; when specified, this parameter is used
10909                         for result publication in the study. Otherwise, if automatic
10910                         publication is switched on, default value is used for result name.
10911
10912             Returns:
10913                 List of GEOM.GEOM_Object, each of them is a propagation group.
10914             """
10915             # Example: see GEOM_TestOthers.py
10916             listChains = self.BlocksOp.Propagate(theShape)
10917             RaiseIfFailed("Propagate", self.BlocksOp)
10918             self._autoPublish(listChains, theName, "propagate")
10919             return listChains
10920
10921         # end of l3_blocks_op
10922         ## @}
10923
10924         ## @addtogroup l3_groups
10925         ## @{
10926
10927         ## Creates a new group which will store sub-shapes of theMainShape
10928         #  @param theMainShape is a GEOM object on which the group is selected
10929         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
10930         #  @param theName Object name; when specified, this parameter is used
10931         #         for result publication in the study. Otherwise, if automatic
10932         #         publication is switched on, default value is used for result name.
10933         #
10934         #  @return a newly created GEOM group (GEOM.GEOM_Object)
10935         #
10936         #  @ref tui_working_with_groups_page "Example 1"
10937         #  \n @ref swig_CreateGroup "Example 2"
10938         def CreateGroup(self, theMainShape, theShapeType, theName=None):
10939             """
10940             Creates a new group which will store sub-shapes of theMainShape
10941
10942             Parameters:
10943                theMainShape is a GEOM object on which the group is selected
10944                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
10945                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
10946                 theName Object name; when specified, this parameter is used
10947                         for result publication in the study. Otherwise, if automatic
10948                         publication is switched on, default value is used for result name.
10949
10950             Returns:
10951                a newly created GEOM group
10952
10953             Example of usage:
10954                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
10955                 
10956             """
10957             # Example: see GEOM_TestOthers.py
10958             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
10959             RaiseIfFailed("CreateGroup", self.GroupOp)
10960             self._autoPublish(anObj, theName, "group")
10961             return anObj
10962
10963         ## Adds a sub-object with ID theSubShapeId to the group
10964         #  @param theGroup is a GEOM group to which the new sub-shape is added
10965         #  @param theSubShapeID is a sub-shape ID in the main object.
10966         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
10967         #
10968         #  @ref tui_working_with_groups_page "Example"
10969         def AddObject(self,theGroup, theSubShapeID):
10970             """
10971             Adds a sub-object with ID theSubShapeId to the group
10972
10973             Parameters:
10974                 theGroup       is a GEOM group to which the new sub-shape is added
10975                 theSubShapeID  is a sub-shape ID in the main object.
10976
10977             Note:
10978                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
10979             """
10980             # Example: see GEOM_TestOthers.py
10981             self.GroupOp.AddObject(theGroup, theSubShapeID)
10982             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
10983                 RaiseIfFailed("AddObject", self.GroupOp)
10984                 pass
10985             pass
10986
10987         ## Removes a sub-object with ID \a theSubShapeId from the group
10988         #  @param theGroup is a GEOM group from which the new sub-shape is removed
10989         #  @param theSubShapeID is a sub-shape ID in the main object.
10990         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
10991         #
10992         #  @ref tui_working_with_groups_page "Example"
10993         def RemoveObject(self,theGroup, theSubShapeID):
10994             """
10995             Removes a sub-object with ID theSubShapeId from the group
10996
10997             Parameters:
10998                 theGroup is a GEOM group from which the new sub-shape is removed
10999                 theSubShapeID is a sub-shape ID in the main object.
11000
11001             Note:
11002                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11003             """
11004             # Example: see GEOM_TestOthers.py
11005             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11006             RaiseIfFailed("RemoveObject", self.GroupOp)
11007             pass
11008
11009         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11010         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11011         #  @param theSubShapes is a list of sub-shapes to be added.
11012         #
11013         #  @ref tui_working_with_groups_page "Example"
11014         def UnionList (self,theGroup, theSubShapes):
11015             """
11016             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11017
11018             Parameters:
11019                 theGroup is a GEOM group to which the new sub-shapes are added.
11020                 theSubShapes is a list of sub-shapes to be added.
11021             """
11022             # Example: see GEOM_TestOthers.py
11023             self.GroupOp.UnionList(theGroup, theSubShapes)
11024             RaiseIfFailed("UnionList", self.GroupOp)
11025             pass
11026
11027         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11028         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11029         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11030         #
11031         #  @ref swig_UnionIDs "Example"
11032         def UnionIDs(self,theGroup, theSubShapes):
11033             """
11034             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11035
11036             Parameters:
11037                 theGroup is a GEOM group to which the new sub-shapes are added.
11038                 theSubShapes is a list of indices of sub-shapes to be added.
11039             """
11040             # Example: see GEOM_TestOthers.py
11041             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11042             RaiseIfFailed("UnionIDs", self.GroupOp)
11043             pass
11044
11045         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11046         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11047         #  @param theSubShapes is a list of sub-shapes to be removed.
11048         #
11049         #  @ref tui_working_with_groups_page "Example"
11050         def DifferenceList (self,theGroup, theSubShapes):
11051             """
11052             Removes from the group all the given shapes. No errors, if some shapes are not included.
11053
11054             Parameters:
11055                 theGroup is a GEOM group from which the sub-shapes are removed.
11056                 theSubShapes is a list of sub-shapes to be removed.
11057             """
11058             # Example: see GEOM_TestOthers.py
11059             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11060             RaiseIfFailed("DifferenceList", self.GroupOp)
11061             pass
11062
11063         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11064         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11065         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11066         #
11067         #  @ref swig_DifferenceIDs "Example"
11068         def DifferenceIDs(self,theGroup, theSubShapes):
11069             """
11070             Removes from the group all the given shapes. No errors, if some shapes are not included.
11071
11072             Parameters:
11073                 theGroup is a GEOM group from which the sub-shapes are removed.
11074                 theSubShapes is a list of indices of sub-shapes to be removed.
11075             """            
11076             # Example: see GEOM_TestOthers.py
11077             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11078             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11079             pass
11080
11081         ## Union of two groups.
11082         #  New group is created. It will contain all entities
11083         #  which are present in groups theGroup1 and theGroup2.
11084         #  @param theGroup1, theGroup2 are the initial GEOM groups
11085         #                              to create the united group from.
11086         #  @param theName Object name; when specified, this parameter is used
11087         #         for result publication in the study. Otherwise, if automatic
11088         #         publication is switched on, default value is used for result name.
11089         #
11090         #  @return a newly created GEOM group.
11091         #
11092         #  @ref tui_union_groups_anchor "Example"
11093         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11094             """
11095             Union of two groups.
11096             New group is created. It will contain all entities
11097             which are present in groups theGroup1 and theGroup2.
11098
11099             Parameters:
11100                 theGroup1, theGroup2 are the initial GEOM groups
11101                                      to create the united group from.
11102                 theName Object name; when specified, this parameter is used
11103                         for result publication in the study. Otherwise, if automatic
11104                         publication is switched on, default value is used for result name.
11105
11106             Returns:
11107                 a newly created GEOM group.
11108             """
11109             # Example: see GEOM_TestOthers.py
11110             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11111             RaiseIfFailed("UnionGroups", self.GroupOp)
11112             self._autoPublish(aGroup, theName, "group")
11113             return aGroup
11114
11115         ## Intersection of two groups.
11116         #  New group is created. It will contain only those entities
11117         #  which are present in both groups theGroup1 and theGroup2.
11118         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11119         #  @param theName Object name; when specified, this parameter is used
11120         #         for result publication in the study. Otherwise, if automatic
11121         #         publication is switched on, default value is used for result name.
11122         #
11123         #  @return a newly created GEOM group.
11124         #
11125         #  @ref tui_intersect_groups_anchor "Example"
11126         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11127             """
11128             Intersection of two groups.
11129             New group is created. It will contain only those entities
11130             which are present in both groups theGroup1 and theGroup2.
11131
11132             Parameters:
11133                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11134                 theName Object name; when specified, this parameter is used
11135                         for result publication in the study. Otherwise, if automatic
11136                         publication is switched on, default value is used for result name.
11137
11138             Returns:
11139                 a newly created GEOM group.
11140             """
11141             # Example: see GEOM_TestOthers.py
11142             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11143             RaiseIfFailed("IntersectGroups", self.GroupOp)
11144             self._autoPublish(aGroup, theName, "group")
11145             return aGroup
11146
11147         ## Cut of two groups.
11148         #  New group is created. It will contain entities which are
11149         #  present in group theGroup1 but are not present in group theGroup2.
11150         #  @param theGroup1 is a GEOM group to include elements of.
11151         #  @param theGroup2 is a GEOM group to exclude elements of.
11152         #  @param theName Object name; when specified, this parameter is used
11153         #         for result publication in the study. Otherwise, if automatic
11154         #         publication is switched on, default value is used for result name.
11155         #
11156         #  @return a newly created GEOM group.
11157         #
11158         #  @ref tui_cut_groups_anchor "Example"
11159         def CutGroups (self, theGroup1, theGroup2, theName=None):
11160             """
11161             Cut of two groups.
11162             New group is created. It will contain entities which are
11163             present in group theGroup1 but are not present in group theGroup2.
11164
11165             Parameters:
11166                 theGroup1 is a GEOM group to include elements of.
11167                 theGroup2 is a GEOM group to exclude elements of.
11168                 theName Object name; when specified, this parameter is used
11169                         for result publication in the study. Otherwise, if automatic
11170                         publication is switched on, default value is used for result name.
11171
11172             Returns:
11173                 a newly created GEOM group.
11174             """
11175             # Example: see GEOM_TestOthers.py
11176             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11177             RaiseIfFailed("CutGroups", self.GroupOp)
11178             self._autoPublish(aGroup, theName, "group")
11179             return aGroup
11180
11181         ## Union of list of groups.
11182         #  New group is created. It will contain all entities that are
11183         #  present in groups listed in theGList.
11184         #  @param theGList is a list of GEOM groups to create the united group from.
11185         #  @param theName Object name; when specified, this parameter is used
11186         #         for result publication in the study. Otherwise, if automatic
11187         #         publication is switched on, default value is used for result name.
11188         #
11189         #  @return a newly created GEOM group.
11190         #
11191         #  @ref tui_union_groups_anchor "Example"
11192         def UnionListOfGroups (self, theGList, theName=None):
11193             """
11194             Union of list of groups.
11195             New group is created. It will contain all entities that are
11196             present in groups listed in theGList.
11197
11198             Parameters:
11199                 theGList is a list of GEOM groups to create the united group from.
11200                 theName Object name; when specified, this parameter is used
11201                         for result publication in the study. Otherwise, if automatic
11202                         publication is switched on, default value is used for result name.
11203
11204             Returns:
11205                 a newly created GEOM group.
11206             """
11207             # Example: see GEOM_TestOthers.py
11208             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11209             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11210             self._autoPublish(aGroup, theName, "group")
11211             return aGroup
11212
11213         ## Cut of lists of groups.
11214         #  New group is created. It will contain only entities
11215         #  which are present in groups listed in theGList1 but 
11216         #  are not present in groups from theGList2.
11217         #  @param theGList1 is a list of GEOM groups to include elements of.
11218         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11219         #  @param theName Object name; when specified, this parameter is used
11220         #         for result publication in the study. Otherwise, if automatic
11221         #         publication is switched on, default value is used for result name.
11222         #
11223         #  @return a newly created GEOM group.
11224         #
11225         #  @ref tui_intersect_groups_anchor "Example"
11226         def IntersectListOfGroups (self, theGList, theName=None):
11227             """
11228             Cut of lists of groups.
11229             New group is created. It will contain only entities
11230             which are present in groups listed in theGList1 but 
11231             are not present in groups from theGList2.
11232
11233             Parameters:
11234                 theGList1 is a list of GEOM groups to include elements of.
11235                 theGList2 is a list of GEOM groups to exclude elements of.
11236                 theName Object name; when specified, this parameter is used
11237                         for result publication in the study. Otherwise, if automatic
11238                         publication is switched on, default value is used for result name.
11239
11240             Returns:
11241                 a newly created GEOM group.
11242             """
11243             # Example: see GEOM_TestOthers.py
11244             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11245             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11246             self._autoPublish(aGroup, theName, "group")
11247             return aGroup
11248
11249         ## Cut of lists of groups.
11250         #  New group is created. It will contain only entities
11251         #  which are present in groups listed in theGList1 but 
11252         #  are not present in groups from theGList2.
11253         #  @param theGList1 is a list of GEOM groups to include elements of.
11254         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11255         #  @param theName Object name; when specified, this parameter is used
11256         #         for result publication in the study. Otherwise, if automatic
11257         #         publication is switched on, default value is used for result name.
11258         #
11259         #  @return a newly created GEOM group.
11260         #
11261         #  @ref tui_cut_groups_anchor "Example"
11262         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11263             """
11264             Cut of lists of groups.
11265             New group is created. It will contain only entities
11266             which are present in groups listed in theGList1 but 
11267             are not present in groups from theGList2.
11268
11269             Parameters:
11270                 theGList1 is a list of GEOM groups to include elements of.
11271                 theGList2 is a list of GEOM groups to exclude elements of.
11272                 theName Object name; when specified, this parameter is used
11273                         for result publication in the study. Otherwise, if automatic
11274                         publication is switched on, default value is used for result name.
11275
11276             Returns:
11277                 a newly created GEOM group.
11278             """
11279             # Example: see GEOM_TestOthers.py
11280             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11281             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11282             self._autoPublish(aGroup, theName, "group")
11283             return aGroup
11284
11285         ## Returns a list of sub-objects ID stored in the group
11286         #  @param theGroup is a GEOM group for which a list of IDs is requested
11287         #
11288         #  @ref swig_GetObjectIDs "Example"
11289         def GetObjectIDs(self,theGroup):
11290             """
11291             Returns a list of sub-objects ID stored in the group
11292
11293             Parameters:
11294                 theGroup is a GEOM group for which a list of IDs is requested
11295             """
11296             # Example: see GEOM_TestOthers.py
11297             ListIDs = self.GroupOp.GetObjects(theGroup)
11298             RaiseIfFailed("GetObjects", self.GroupOp)
11299             return ListIDs
11300
11301         ## Returns a type of sub-objects stored in the group
11302         #  @param theGroup is a GEOM group which type is returned.
11303         #
11304         #  @ref swig_GetType "Example"
11305         def GetType(self,theGroup):
11306             """
11307             Returns a type of sub-objects stored in the group
11308
11309             Parameters:
11310                 theGroup is a GEOM group which type is returned.
11311             """
11312             # Example: see GEOM_TestOthers.py
11313             aType = self.GroupOp.GetType(theGroup)
11314             RaiseIfFailed("GetType", self.GroupOp)
11315             return aType
11316
11317         ## Convert a type of geom object from id to string value
11318         #  @param theId is a GEOM obect type id.
11319         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11320         #  @ref swig_GetType "Example"
11321         def ShapeIdToType(self, theId):
11322             """
11323             Convert a type of geom object from id to string value
11324
11325             Parameters:
11326                 theId is a GEOM obect type id.
11327                 
11328             Returns:
11329                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11330             """
11331             if theId == 0:
11332                 return "COPY"
11333             if theId == 1:
11334                 return "IMPORT"
11335             if theId == 2:
11336                 return "POINT"
11337             if theId == 3:
11338                 return "VECTOR"
11339             if theId == 4:
11340                 return "PLANE"
11341             if theId == 5:
11342                 return "LINE"
11343             if theId == 6:
11344                 return "TORUS"
11345             if theId == 7:
11346                 return "BOX"
11347             if theId == 8:
11348                 return "CYLINDER"
11349             if theId == 9:
11350                 return "CONE"
11351             if theId == 10:
11352                 return "SPHERE"
11353             if theId == 11:
11354                 return "PRISM"
11355             if theId == 12:
11356                 return "REVOLUTION"
11357             if theId == 13:
11358                 return "BOOLEAN"
11359             if theId == 14:
11360                 return "PARTITION"
11361             if theId == 15:
11362                 return "POLYLINE"
11363             if theId == 16:
11364                 return "CIRCLE"
11365             if theId == 17:
11366                 return "SPLINE"
11367             if theId == 18:
11368                 return "ELLIPSE"
11369             if theId == 19:
11370                 return "CIRC_ARC"
11371             if theId == 20:
11372                 return "FILLET"
11373             if theId == 21:
11374                 return "CHAMFER"
11375             if theId == 22:
11376                 return "EDGE"
11377             if theId == 23:
11378                 return "WIRE"
11379             if theId == 24:
11380                 return "FACE"
11381             if theId == 25:
11382                 return "SHELL"
11383             if theId == 26:
11384                 return "SOLID"
11385             if theId == 27:
11386                 return "COMPOUND"
11387             if theId == 28:
11388                 return "SUBSHAPE"
11389             if theId == 29:
11390                 return "PIPE"
11391             if theId == 30:
11392                 return "ARCHIMEDE"
11393             if theId == 31:
11394                 return "FILLING"
11395             if theId == 32:
11396                 return "EXPLODE"
11397             if theId == 33:
11398                 return "GLUED"
11399             if theId == 34:
11400                 return "SKETCHER"
11401             if theId == 35:
11402                 return "CDG"
11403             if theId == 36:
11404                 return "FREE_BOUNDS"
11405             if theId == 37:
11406                 return "GROUP"
11407             if theId == 38:
11408                 return "BLOCK"
11409             if theId == 39:
11410                 return "MARKER"
11411             if theId == 40:
11412                 return "THRUSECTIONS"
11413             if theId == 41:
11414                 return "COMPOUNDFILTER"
11415             if theId == 42:
11416                 return "SHAPES_ON_SHAPE"
11417             if theId == 43:
11418                 return "ELLIPSE_ARC"
11419             if theId == 44:
11420                 return "3DSKETCHER"
11421             if theId == 45:
11422                 return "FILLET_2D"
11423             if theId == 46:
11424                 return "FILLET_1D"
11425             if theId == 201:
11426                 return "PIPETSHAPE"
11427             return "Shape Id not exist."
11428
11429         ## Returns a main shape associated with the group
11430         #  @param theGroup is a GEOM group for which a main shape object is requested
11431         #  @return a GEOM object which is a main shape for theGroup
11432         #
11433         #  @ref swig_GetMainShape "Example"
11434         def GetMainShape(self,theGroup):
11435             """
11436             Returns a main shape associated with the group
11437
11438             Parameters:
11439                 theGroup is a GEOM group for which a main shape object is requested
11440
11441             Returns:
11442                 a GEOM object which is a main shape for theGroup
11443
11444             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11445             """
11446             # Example: see GEOM_TestOthers.py
11447             anObj = self.GroupOp.GetMainShape(theGroup)
11448             RaiseIfFailed("GetMainShape", self.GroupOp)
11449             return anObj
11450
11451         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11452         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11453         #  @param theShape given shape (see GEOM.GEOM_Object)
11454         #  @param min_length minimum length of edges of theShape
11455         #  @param max_length maximum length of edges of theShape
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         #  @param theName Object name; when specified, this parameter is used
11459         #         for result publication in the study. Otherwise, if automatic
11460         #         publication is switched on, default value is used for result name.
11461         #
11462         #  @return a newly created GEOM group of edges
11463         #
11464         #  @@ref swig_todo "Example"
11465         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11466             """
11467             Create group of edges of theShape, whose length is in range [min_length, max_length].
11468             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11469
11470             Parameters:
11471                 theShape given shape
11472                 min_length minimum length of edges of theShape
11473                 max_length maximum length of edges of theShape
11474                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11475                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11476                 theName Object name; when specified, this parameter is used
11477                         for result publication in the study. Otherwise, if automatic
11478                         publication is switched on, default value is used for result name.
11479
11480              Returns:
11481                 a newly created GEOM group of edges.
11482             """
11483             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11484             edges_in_range = []
11485             for edge in edges:
11486                 Props = self.BasicProperties(edge)
11487                 if min_length <= Props[0] and Props[0] <= max_length:
11488                     if (not include_min) and (min_length == Props[0]):
11489                         skip = 1
11490                     else:
11491                         if (not include_max) and (Props[0] == max_length):
11492                             skip = 1
11493                         else:
11494                             edges_in_range.append(edge)
11495
11496             if len(edges_in_range) <= 0:
11497                 print "No edges found by given criteria"
11498                 return None
11499
11500             # note: auto-publishing is done in self.CreateGroup()
11501             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11502             self.UnionList(group_edges, edges_in_range)
11503
11504             return group_edges
11505
11506         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11507         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11508         #  @param min_length minimum length of edges of selected shape
11509         #  @param max_length maximum length of edges of selected shape
11510         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11511         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11512         #  @return a newly created GEOM group of edges
11513         #  @ref swig_todo "Example"
11514         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11515             """
11516             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11517             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11518
11519             Parameters:
11520                 min_length minimum length of edges of selected shape
11521                 max_length maximum length of edges of selected shape
11522                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11523                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11524
11525              Returns:
11526                 a newly created GEOM group of edges.
11527             """
11528             nb_selected = sg.SelectedCount()
11529             if nb_selected < 1:
11530                 print "Select a shape before calling this function, please."
11531                 return 0
11532             if nb_selected > 1:
11533                 print "Only one shape must be selected"
11534                 return 0
11535
11536             id_shape = sg.getSelected(0)
11537             shape = IDToObject( id_shape )
11538
11539             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11540
11541             left_str  = " < "
11542             right_str = " < "
11543             if include_min: left_str  = " <= "
11544             if include_max: right_str  = " <= "
11545
11546             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11547                                     + left_str + "length" + right_str + `max_length`)
11548
11549             sg.updateObjBrowser(1)
11550
11551             return group_edges
11552
11553         # end of l3_groups
11554         ## @}
11555
11556         ## @addtogroup l4_advanced
11557         ## @{
11558
11559         ## Create a T-shape object with specified caracteristics for the main
11560         #  and the incident pipes (radius, width, half-length).
11561         #  The extremities of the main pipe are located on junctions points P1 and P2.
11562         #  The extremity of the incident pipe is located on junction point P3.
11563         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11564         #  the main plane of the T-shape is XOY.
11565         #
11566         #  @param theR1 Internal radius of main pipe
11567         #  @param theW1 Width of main pipe
11568         #  @param theL1 Half-length of main pipe
11569         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11570         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11571         #  @param theL2 Half-length of incident pipe
11572         #
11573         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11574         #  @param theP1 1st junction point of main pipe
11575         #  @param theP2 2nd junction point of main pipe
11576         #  @param theP3 Junction point of incident pipe
11577         #
11578         #  @param theRL Internal radius of left thickness reduction
11579         #  @param theWL Width of left thickness reduction
11580         #  @param theLtransL Length of left transition part
11581         #  @param theLthinL Length of left thin part
11582         #
11583         #  @param theRR Internal radius of right thickness reduction
11584         #  @param theWR Width of right thickness reduction
11585         #  @param theLtransR Length of right transition part
11586         #  @param theLthinR Length of right thin part
11587         #
11588         #  @param theRI Internal radius of incident thickness reduction
11589         #  @param theWI Width of incident thickness reduction
11590         #  @param theLtransI Length of incident transition part
11591         #  @param theLthinI Length of incident thin part
11592         #
11593         #  @param theName Object name; when specified, this parameter is used
11594         #         for result publication in the study. Otherwise, if automatic
11595         #         publication is switched on, default value is used for result name.
11596         #
11597         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11598         #
11599         #  @ref tui_creation_pipetshape "Example"
11600         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11601                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11602                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11603                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11604                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11605                             theName=None):
11606             """
11607             Create a T-shape object with specified caracteristics for the main
11608             and the incident pipes (radius, width, half-length).
11609             The extremities of the main pipe are located on junctions points P1 and P2.
11610             The extremity of the incident pipe is located on junction point P3.
11611             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11612             the main plane of the T-shape is XOY.
11613
11614             Parameters:
11615                 theR1 Internal radius of main pipe
11616                 theW1 Width of main pipe
11617                 theL1 Half-length of main pipe
11618                 theR2 Internal radius of incident pipe (R2 < R1)
11619                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11620                 theL2 Half-length of incident pipe
11621                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11622                 theP1 1st junction point of main pipe
11623                 theP2 2nd junction point of main pipe
11624                 theP3 Junction point of incident pipe
11625
11626                 theRL Internal radius of left thickness reduction
11627                 theWL Width of left thickness reduction
11628                 theLtransL Length of left transition part
11629                 theLthinL Length of left thin part
11630
11631                 theRR Internal radius of right thickness reduction
11632                 theWR Width of right thickness reduction
11633                 theLtransR Length of right transition part
11634                 theLthinR Length of right thin part
11635
11636                 theRI Internal radius of incident thickness reduction
11637                 theWI Width of incident thickness reduction
11638                 theLtransI Length of incident transition part
11639                 theLthinI Length of incident thin part
11640
11641                 theName Object name; when specified, this parameter is used
11642                         for result publication in the study. Otherwise, if automatic
11643                         publication is switched on, default value is used for result name.
11644
11645             Returns:
11646                 List of GEOM_Object, containing the created shape and propagation groups.
11647
11648             Example of usage:
11649                 # create PipeTShape object
11650                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11651                 # create PipeTShape object with position
11652                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11653                 # create PipeTShape object with left thickness reduction
11654                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11655             """
11656             theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11657             if (theP1 and theP2 and theP3):
11658                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11659                                                                 theRL, theWL, theLtransL, theLthinL,
11660                                                                 theRR, theWR, theLtransR, theLthinR,
11661                                                                 theRI, theWI, theLtransI, theLthinI,
11662                                                                 theHexMesh, theP1, theP2, theP3)
11663             else:
11664                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11665                                                     theRL, theWL, theLtransL, theLthinL,
11666                                                     theRR, theWR, theLtransR, theLthinR,
11667                                                     theRI, theWI, theLtransI, theLthinI,
11668                                                     theHexMesh)
11669             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11670             if Parameters: anObj[0].SetParameters(Parameters)
11671             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11672             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11673             return anObj
11674
11675         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11676         #  and the incident pipes (radius, width, half-length). The chamfer is
11677         #  created on the junction of the pipes.
11678         #  The extremities of the main pipe are located on junctions points P1 and P2.
11679         #  The extremity of the incident pipe is located on junction point P3.
11680         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11681         #  the main plane of the T-shape is XOY.
11682         #  @param theR1 Internal radius of main pipe
11683         #  @param theW1 Width of main pipe
11684         #  @param theL1 Half-length of main pipe
11685         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11686         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11687         #  @param theL2 Half-length of incident pipe
11688         #  @param theH Height of the chamfer.
11689         #  @param theW Width of the chamfer.
11690         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11691         #  @param theP1 1st junction point of main pipe
11692         #  @param theP2 2nd junction point of main pipe
11693         #  @param theP3 Junction point of incident pipe
11694         #
11695         #  @param theRL Internal radius of left thickness reduction
11696         #  @param theWL Width of left thickness reduction
11697         #  @param theLtransL Length of left transition part
11698         #  @param theLthinL Length of left thin part
11699         #
11700         #  @param theRR Internal radius of right thickness reduction
11701         #  @param theWR Width of right thickness reduction
11702         #  @param theLtransR Length of right transition part
11703         #  @param theLthinR Length of right thin part
11704         #
11705         #  @param theRI Internal radius of incident thickness reduction
11706         #  @param theWI Width of incident thickness reduction
11707         #  @param theLtransI Length of incident transition part
11708         #  @param theLthinI Length of incident thin part
11709         #
11710         #  @param theName Object name; when specified, this parameter is used
11711         #         for result publication in the study. Otherwise, if automatic
11712         #         publication is switched on, default value is used for result name.
11713         #
11714         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11715         #
11716         #  @ref tui_creation_pipetshape "Example"
11717         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11718                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11719                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11720                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11721                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11722                                    theName=None):
11723             """
11724             Create a T-shape object with chamfer and with specified caracteristics for the main
11725             and the incident pipes (radius, width, half-length). The chamfer is
11726             created on the junction of the pipes.
11727             The extremities of the main pipe are located on junctions points P1 and P2.
11728             The extremity of the incident pipe is located on junction point P3.
11729             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11730             the main plane of the T-shape is XOY.
11731
11732             Parameters:
11733                 theR1 Internal radius of main pipe
11734                 theW1 Width of main pipe
11735                 theL1 Half-length of main pipe
11736                 theR2 Internal radius of incident pipe (R2 < R1)
11737                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11738                 theL2 Half-length of incident pipe
11739                 theH Height of the chamfer.
11740                 theW Width of the chamfer.
11741                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11742                 theP1 1st junction point of main pipe
11743                 theP2 2nd junction point of main pipe
11744                 theP3 Junction point of incident pipe
11745
11746                 theRL Internal radius of left thickness reduction
11747                 theWL Width of left thickness reduction
11748                 theLtransL Length of left transition part
11749                 theLthinL Length of left thin part
11750
11751                 theRR Internal radius of right thickness reduction
11752                 theWR Width of right thickness reduction
11753                 theLtransR Length of right transition part
11754                 theLthinR Length of right thin part
11755
11756                 theRI Internal radius of incident thickness reduction
11757                 theWI Width of incident thickness reduction
11758                 theLtransI Length of incident transition part
11759                 theLthinI Length of incident thin part
11760
11761                 theName Object name; when specified, this parameter is used
11762                         for result publication in the study. Otherwise, if automatic
11763                         publication is switched on, default value is used for result name.
11764
11765             Returns:
11766                 List of GEOM_Object, containing the created shape and propagation groups.
11767
11768             Example of usage:
11769                 # create PipeTShape with chamfer object
11770                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
11771                 # create PipeTShape with chamfer object with position
11772                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
11773                 # create PipeTShape with chamfer object with left thickness reduction
11774                 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11775             """
11776             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11777             if (theP1 and theP2 and theP3):
11778               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11779                                                                      theRL, theWL, theLtransL, theLthinL,
11780                                                                      theRR, theWR, theLtransR, theLthinR,
11781                                                                      theRI, theWI, theLtransI, theLthinI,
11782                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
11783             else:
11784               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
11785                                                          theRL, theWL, theLtransL, theLthinL,
11786                                                          theRR, theWR, theLtransR, theLthinR,
11787                                                          theRI, theWI, theLtransI, theLthinI,
11788                                                          theH, theW, theHexMesh)
11789             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
11790             if Parameters: anObj[0].SetParameters(Parameters)
11791             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11792             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11793             return anObj
11794
11795         ## Create a T-shape object with fillet and with specified caracteristics for the main
11796         #  and the incident pipes (radius, width, half-length). The fillet is
11797         #  created on the junction of the pipes.
11798         #  The extremities of the main pipe are located on junctions points P1 and P2.
11799         #  The extremity of the incident pipe is located on junction point P3.
11800         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11801         #  the main plane of the T-shape is XOY.
11802         #  @param theR1 Internal radius of main pipe
11803         #  @param theW1 Width of main pipe
11804         #  @param theL1 Half-length of main pipe
11805         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11806         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11807         #  @param theL2 Half-length of incident pipe
11808         #  @param theRF Radius of curvature of fillet.
11809         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11810         #  @param theP1 1st junction point of main pipe
11811         #  @param theP2 2nd junction point of main pipe
11812         #  @param theP3 Junction point of incident pipe
11813         #
11814         #  @param theRL Internal radius of left thickness reduction
11815         #  @param theWL Width of left thickness reduction
11816         #  @param theLtransL Length of left transition part
11817         #  @param theLthinL Length of left thin part
11818         #
11819         #  @param theRR Internal radius of right thickness reduction
11820         #  @param theWR Width of right thickness reduction
11821         #  @param theLtransR Length of right transition part
11822         #  @param theLthinR Length of right thin part
11823         #
11824         #  @param theRI Internal radius of incident thickness reduction
11825         #  @param theWI Width of incident thickness reduction
11826         #  @param theLtransI Length of incident transition part
11827         #  @param theLthinI Length of incident thin part
11828         #
11829         #  @param theName Object name; when specified, this parameter is used
11830         #         for result publication in the study. Otherwise, if automatic
11831         #         publication is switched on, default value is used for result name.
11832         #
11833         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11834         #
11835         #  @ref tui_creation_pipetshape "Example"
11836         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
11837                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11838                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11839                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11840                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11841                                   theName=None):
11842             """
11843             Create a T-shape object with fillet and with specified caracteristics for the main
11844             and the incident pipes (radius, width, half-length). The fillet is
11845             created on the junction of the pipes.
11846             The extremities of the main pipe are located on junctions points P1 and P2.
11847             The extremity of the incident pipe is located on junction point P3.
11848
11849             Parameters:
11850                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11851                 the main plane of the T-shape is XOY.
11852                 theR1 Internal radius of main pipe
11853                 theW1 Width of main pipe
11854                 heL1 Half-length of main pipe
11855                 theR2 Internal radius of incident pipe (R2 < R1)
11856                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11857                 theL2 Half-length of incident pipe
11858                 theRF Radius of curvature of fillet.
11859                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11860                 theP1 1st junction point of main pipe
11861                 theP2 2nd junction point of main pipe
11862                 theP3 Junction point of incident pipe
11863
11864                 theRL Internal radius of left thickness reduction
11865                 theWL Width of left thickness reduction
11866                 theLtransL Length of left transition part
11867                 theLthinL Length of left thin part
11868
11869                 theRR Internal radius of right thickness reduction
11870                 theWR Width of right thickness reduction
11871                 theLtransR Length of right transition part
11872                 theLthinR Length of right thin part
11873
11874                 theRI Internal radius of incident thickness reduction
11875                 theWI Width of incident thickness reduction
11876                 theLtransI Length of incident transition part
11877                 theLthinI Length of incident thin part
11878
11879                 theName Object name; when specified, this parameter is used
11880                         for result publication in the study. Otherwise, if automatic
11881                         publication is switched on, default value is used for result name.
11882                 
11883             Returns:
11884                 List of GEOM_Object, containing the created shape and propagation groups.
11885                 
11886             Example of usage:
11887                 # create PipeTShape with fillet object
11888                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
11889                 # create PipeTShape with fillet object with position
11890                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
11891                 # create PipeTShape with fillet object with left thickness reduction
11892                 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11893             """
11894             theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11895             if (theP1 and theP2 and theP3):
11896               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11897                                                                     theRL, theWL, theLtransL, theLthinL,
11898                                                                     theRR, theWR, theLtransR, theLthinR,
11899                                                                     theRI, theWI, theLtransI, theLthinI,
11900                                                                     theRF, theHexMesh, theP1, theP2, theP3)
11901             else:
11902               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
11903                                                         theRL, theWL, theLtransL, theLthinL,
11904                                                         theRR, theWR, theLtransR, theLthinR,
11905                                                         theRI, theWI, theLtransI, theLthinI,
11906                                                         theRF, theHexMesh)
11907             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
11908             if Parameters: anObj[0].SetParameters(Parameters)
11909             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11910             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11911             return anObj
11912
11913         ## This function allows creating a disk already divided into blocks. It
11914         #  can be used to create divided pipes for later meshing in hexaedra.
11915         #  @param theR Radius of the disk
11916         #  @param theOrientation Orientation of the plane on which the disk will be built
11917         #         1 = XOY, 2 = OYZ, 3 = OZX
11918         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11919         #  @param theName Object name; when specified, this parameter is used
11920         #         for result publication in the study. Otherwise, if automatic
11921         #         publication is switched on, default value is used for result name.
11922         #
11923         #  @return New GEOM_Object, containing the created shape.
11924         #
11925         #  @ref tui_creation_divideddisk "Example"
11926         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
11927             """
11928             Creates a disk, divided into blocks. It can be used to create divided pipes
11929             for later meshing in hexaedra.
11930
11931             Parameters:
11932                 theR Radius of the disk
11933                 theOrientation Orientation of the plane on which the disk will be built:
11934                                1 = XOY, 2 = OYZ, 3 = OZX
11935                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11936                 theName Object name; when specified, this parameter is used
11937                         for result publication in the study. Otherwise, if automatic
11938                         publication is switched on, default value is used for result name.
11939
11940             Returns:
11941                 New GEOM_Object, containing the created shape.
11942             """
11943             theR, Parameters = ParseParameters(theR)
11944             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
11945             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
11946             if Parameters: anObj.SetParameters(Parameters)
11947             self._autoPublish(anObj, theName, "dividedDisk")
11948             return anObj
11949             
11950         ## This function allows creating a disk already divided into blocks. It
11951         #  can be used to create divided pipes for later meshing in hexaedra.
11952         #  @param theCenter Center of the disk
11953         #  @param theVector Normal vector to the plane of the created disk
11954         #  @param theRadius Radius of the disk
11955         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11956         #  @param theName Object name; when specified, this parameter is used
11957         #         for result publication in the study. Otherwise, if automatic
11958         #         publication is switched on, default value is used for result name.
11959         #
11960         #  @return New GEOM_Object, containing the created shape.
11961         #
11962         #  @ref tui_creation_divideddisk "Example"
11963         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
11964             """
11965             Creates a disk already divided into blocks. It can be used to create divided pipes
11966             for later meshing in hexaedra.
11967
11968             Parameters:
11969                 theCenter Center of the disk
11970                 theVector Normal vector to the plane of the created disk
11971                 theRadius Radius of the disk
11972                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11973                 theName Object name; when specified, this parameter is used
11974                         for result publication in the study. Otherwise, if automatic
11975                         publication is switched on, default value is used for result name.
11976
11977             Returns:
11978                 New GEOM_Object, containing the created shape.
11979             """
11980             theRadius, Parameters = ParseParameters(theRadius)
11981             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
11982             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
11983             if Parameters: anObj.SetParameters(Parameters)
11984             self._autoPublish(anObj, theName, "dividedDisk")
11985             return anObj
11986
11987         ## Builds a cylinder prepared for hexa meshes
11988         #  @param theR Radius of the cylinder
11989         #  @param theH Height of the cylinder
11990         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11991         #  @param theName Object name; when specified, this parameter is used
11992         #         for result publication in the study. Otherwise, if automatic
11993         #         publication is switched on, default value is used for result name.
11994         #
11995         #  @return New GEOM_Object, containing the created shape.
11996         #
11997         #  @ref tui_creation_dividedcylinder "Example"
11998         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
11999             """
12000             Builds a cylinder prepared for hexa meshes
12001
12002             Parameters:
12003                 theR Radius of the cylinder
12004                 theH Height of the cylinder
12005                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12006                 theName Object name; when specified, this parameter is used
12007                         for result publication in the study. Otherwise, if automatic
12008                         publication is switched on, default value is used for result name.
12009
12010             Returns:
12011                 New GEOM_Object, containing the created shape.
12012             """
12013             theR, theH, Parameters = ParseParameters(theR, theH)
12014             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12015             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12016             if Parameters: anObj.SetParameters(Parameters)
12017             self._autoPublish(anObj, theName, "dividedCylinder")
12018             return anObj
12019
12020         #@@ insert new functions before this line @@ do not remove this line @@#
12021
12022         # end of l4_advanced
12023         ## @}
12024
12025         ## Create a copy of the given object
12026         #
12027         #  @param theOriginal geometry object for copy
12028         #  @param theName Object name; when specified, this parameter is used
12029         #         for result publication in the study. Otherwise, if automatic
12030         #         publication is switched on, default value is used for result name.
12031         #
12032         #  @return New GEOM_Object, containing the copied shape.
12033         #
12034         #  @ingroup l1_geompy_auxiliary
12035         #  @ref swig_MakeCopy "Example"
12036         def MakeCopy(self, theOriginal, theName=None):
12037             """
12038             Create a copy of the given object
12039
12040             Parameters:
12041                 theOriginal geometry object for copy
12042                 theName Object name; when specified, this parameter is used
12043                         for result publication in the study. Otherwise, if automatic
12044                         publication is switched on, default value is used for result name.
12045
12046             Returns:
12047                 New GEOM_Object, containing the copied shape.
12048
12049             Example of usage: Copy = geompy.MakeCopy(Box)
12050             """
12051             # Example: see GEOM_TestAll.py
12052             anObj = self.InsertOp.MakeCopy(theOriginal)
12053             RaiseIfFailed("MakeCopy", self.InsertOp)
12054             self._autoPublish(anObj, theName, "copy")
12055             return anObj
12056
12057         ## Add Path to load python scripts from
12058         #  @param Path a path to load python scripts from
12059         #  @ingroup l1_geomBuilder_auxiliary
12060         def addPath(self,Path):
12061             """
12062             Add Path to load python scripts from
12063
12064             Parameters:
12065                 Path a path to load python scripts from
12066             """
12067             if (sys.path.count(Path) < 1):
12068                 sys.path.append(Path)
12069                 pass
12070             pass
12071
12072         ## Load marker texture from the file
12073         #  @param Path a path to the texture file
12074         #  @return unique texture identifier
12075         #  @ingroup l1_geomBuilder_auxiliary
12076         def LoadTexture(self, Path):
12077             """
12078             Load marker texture from the file
12079             
12080             Parameters:
12081                 Path a path to the texture file
12082                 
12083             Returns:
12084                 unique texture identifier
12085             """
12086             # Example: see GEOM_TestAll.py
12087             ID = self.InsertOp.LoadTexture(Path)
12088             RaiseIfFailed("LoadTexture", self.InsertOp)
12089             return ID
12090
12091         ## Get internal name of the object based on its study entry
12092         #  @note This method does not provide an unique identifier of the geometry object.
12093         #  @note This is internal function of GEOM component, though it can be used outside it for 
12094         #  appropriate reason (e.g. for identification of geometry object).
12095         #  @param obj geometry object
12096         #  @return unique object identifier
12097         #  @ingroup l1_geomBuilder_auxiliary
12098         def getObjectID(self, obj):
12099             """
12100             Get internal name of the object based on its study entry.
12101             Note: this method does not provide an unique identifier of the geometry object.
12102             It is an internal function of GEOM component, though it can be used outside GEOM for 
12103             appropriate reason (e.g. for identification of geometry object).
12104
12105             Parameters:
12106                 obj geometry object
12107
12108             Returns:
12109                 unique object identifier
12110             """
12111             ID = ""
12112             entry = salome.ObjectToID(obj)
12113             if entry is not None:
12114                 lst = entry.split(":")
12115                 if len(lst) > 0:
12116                     ID = lst[-1] # -1 means last item in the list            
12117                     return "GEOM_" + ID
12118             return ID
12119                 
12120             
12121
12122         ## Add marker texture. @a Width and @a Height parameters
12123         #  specify width and height of the texture in pixels.
12124         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12125         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12126         #  parameter should be unpacked string, in which '1' symbols represent opaque
12127         #  pixels and '0' represent transparent pixels of the texture bitmap.
12128         #
12129         #  @param Width texture width in pixels
12130         #  @param Height texture height in pixels
12131         #  @param Texture texture data
12132         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12133         #  @return unique texture identifier
12134         #  @ingroup l1_geomBuilder_auxiliary
12135         def AddTexture(self, Width, Height, Texture, RowData=False):
12136             """
12137             Add marker texture. Width and Height parameters
12138             specify width and height of the texture in pixels.
12139             If RowData is True, Texture parameter should represent texture data
12140             packed into the byte array. If RowData is False (default), Texture
12141             parameter should be unpacked string, in which '1' symbols represent opaque
12142             pixels and '0' represent transparent pixels of the texture bitmap.
12143
12144             Parameters:
12145                 Width texture width in pixels
12146                 Height texture height in pixels
12147                 Texture texture data
12148                 RowData if True, Texture data are packed in the byte stream
12149
12150             Returns:
12151                 return unique texture identifier
12152             """
12153             if not RowData: Texture = PackData(Texture)
12154             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12155             RaiseIfFailed("AddTexture", self.InsertOp)
12156             return ID
12157
12158 import omniORB
12159 # Register the new proxy for GEOM_Gen
12160 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12161
12162 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12163 #  interface to GEOM operations.
12164 #
12165 #  Typical use is:
12166 #  \code
12167 #    import salome
12168 #    salome.salome_init()
12169 #    from salome.geom import geomBuilder
12170 #    geompy = geomBuilder.New(salome.myStudy)
12171 #  \endcode
12172 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12173 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12174 #  @return geomBuilder instance
12175 def New( study, instance=None):
12176     """
12177     Create a new geomBuilder instance.The geomBuilder class provides the Python
12178     interface to GEOM operations.
12179
12180     Typical use is:
12181         import salome
12182         salome.salome_init()
12183         from salome.geom import geomBuilder
12184         geompy = geomBuilder.New(salome.myStudy)
12185
12186     Parameters:
12187         study     SALOME study, generally obtained by salome.myStudy.
12188         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12189     Returns:
12190         geomBuilder instance
12191     """
12192     #print "New geomBuilder ", study, instance
12193     global engine
12194     global geom
12195     global doLcc
12196     engine = instance
12197     if engine is None:
12198       doLcc = True
12199     geom = geomBuilder()
12200     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12201     geom.init_geom(study)
12202     return geom