]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
GEOM Plugins: fix problem with overwriting of some geomBuilder methods by GEOM_Gen...
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup l1_publish_data Publishing results in SALOME study
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ## 
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ## 
50 ## For example, consider the following Python script:
51 ## 
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ## 
60 ## Last two lines can be replaced by one-line instruction:
61 ## 
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ## 
66 ## ... or simply
67 ## 
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ## 
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Not that some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## @}
148
149
150 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
151
152 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
153 ## @{
154 ##   @defgroup l2_import_export Importing/exporting geometrical objects
155 ##   @defgroup l2_creating      Creating geometrical objects
156 ##   @{
157 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
158 ##     @{
159 ##       @defgroup l4_curves        Creating Curves
160
161 ##     @}
162 ##     @defgroup l3_3d_primitives Creating 3D Primitives
163 ##     @defgroup l3_complex       Creating Complex Objects
164 ##     @defgroup l3_groups        Working with groups
165 ##     @defgroup l3_blocks        Building by blocks
166 ##     @{
167 ##       @defgroup l4_blocks_measure Check and Improve
168
169 ##     @}
170 ##     @defgroup l3_sketcher      Sketcher
171 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
172 ##     @{
173 ##       @defgroup l4_decompose     Decompose objects
174 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
175 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
176 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
177 ##       @defgroup l4_advanced      Advanced objects creation functions
178
179 ##     @}
180
181 ##   @}
182 ##   @defgroup l2_transforming  Transforming geometrical objects
183 ##   @{
184 ##     @defgroup l3_basic_op      Basic Operations
185 ##     @defgroup l3_boolean       Boolean Operations
186 ##     @defgroup l3_transform     Transformation Operations
187 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
188 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
189 ##     @defgroup l3_blocks_op     Blocks Operations
190 ##     @defgroup l3_healing       Repairing Operations
191 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
192
193 ##   @}
194 ##   @defgroup l2_measure       Using measurement tools
195
196 ## @}
197
198 # initialize SALOME session in try/except block
199 # to avoid problems in some cases, e.g. when generating documentation
200 try:
201     import salome
202     salome.salome_init()
203     from salome import *
204 except:
205     pass
206
207 from salome_notebook import *
208
209 import GEOM
210 import math
211 import os
212
213 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
214
215 # service function
216 def _toListOfNames(_names, _size=-1):
217     l = []
218     import types
219     if type(_names) in [types.ListType, types.TupleType]:
220         for i in _names: l.append(i)
221     elif _names:
222         l.append(_names)
223     if l and len(l) < _size:
224         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
225     return l
226
227 ## Raise an Error, containing the Method_name, if Operation is Failed
228 ## @ingroup l1_geomBuilder_auxiliary
229 def RaiseIfFailed (Method_name, Operation):
230     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
231         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
232
233 ## Return list of variables value from salome notebook
234 ## @ingroup l1_geomBuilder_auxiliary
235 def ParseParameters(*parameters):
236     Result = []
237     StringResult = []
238     for parameter in parameters:
239         if isinstance(parameter, list):
240             lResults = ParseParameters(*parameter)
241             if len(lResults) > 0:
242                 Result.append(lResults[:-1])
243                 StringResult += lResults[-1].split(":")
244                 pass
245             pass
246         else:
247             if isinstance(parameter,str):
248                 if notebook.isVariable(parameter):
249                     Result.append(notebook.get(parameter))
250                 else:
251                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
252                 pass
253             else:
254                 Result.append(parameter)
255                 pass
256             StringResult.append(str(parameter))
257             pass
258         pass
259     if Result:
260         Result.append(":".join(StringResult))
261     else:
262         Result = ":".join(StringResult)
263     return Result
264
265 ## Return list of variables value from salome notebook
266 ## @ingroup l1_geomBuilder_auxiliary
267 def ParseList(list):
268     Result = []
269     StringResult = ""
270     for parameter in list:
271         if isinstance(parameter,str) and notebook.isVariable(parameter):
272             Result.append(str(notebook.get(parameter)))
273             pass
274         else:
275             Result.append(str(parameter))
276             pass
277
278         StringResult = StringResult + str(parameter)
279         StringResult = StringResult + ":"
280         pass
281     StringResult = StringResult[:len(StringResult)-1]
282     return Result, StringResult
283
284 ## Return list of variables value from salome notebook
285 ## @ingroup l1_geomBuilder_auxiliary
286 def ParseSketcherCommand(command):
287     Result = ""
288     StringResult = ""
289     sections = command.split(":")
290     for section in sections:
291         parameters = section.split(" ")
292         paramIndex = 1
293         for parameter in parameters:
294             if paramIndex > 1 and parameter.find("'") != -1:
295                 parameter = parameter.replace("'","")
296                 if notebook.isVariable(parameter):
297                     Result = Result + str(notebook.get(parameter)) + " "
298                     pass
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                     pass
302                 pass
303             else:
304                 Result = Result + str(parameter) + " "
305                 pass
306             if paramIndex > 1:
307                 StringResult = StringResult + parameter
308                 StringResult = StringResult + ":"
309                 pass
310             paramIndex = paramIndex + 1
311             pass
312         Result = Result[:len(Result)-1] + ":"
313         pass
314     Result = Result[:len(Result)-1]
315     return Result, StringResult
316
317 ## Helper function which can be used to pack the passed string to the byte data.
318 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
319 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
320 ## For example,
321 ## \code
322 ## val = PackData("10001110") # val = 0xAE
323 ## val = PackData("1")        # val = 0x80
324 ## \endcode
325 ## @param data unpacked data - a string containing '1' and '0' symbols
326 ## @return data packed to the byte stream
327 ## @ingroup l1_geomBuilder_auxiliary
328 def PackData(data):
329     """
330     Helper function which can be used to pack the passed string to the byte data.
331     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
332     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
333
334     Parameters:
335         data unpacked data - a string containing '1' and '0' symbols
336
337     Returns:
338         data packed to the byte stream
339         
340     Example of usage:
341         val = PackData("10001110") # val = 0xAE
342         val = PackData("1")        # val = 0x80
343     """
344     bytes = len(data)/8
345     if len(data)%8: bytes += 1
346     res = ""
347     for b in range(bytes):
348         d = data[b*8:(b+1)*8]
349         val = 0
350         for i in range(8):
351             val *= 2
352             if i < len(d):
353                 if d[i] == "1": val += 1
354                 elif d[i] != "0":
355                     raise "Invalid symbol %s" % d[i]
356                 pass
357             pass
358         res += chr(val)
359         pass
360     return res
361
362 ## Read bitmap texture from the text file.
363 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
364 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
365 ## The function returns width and height of the pixmap in pixels and byte stream representing
366 ## texture bitmap itself.
367 ##
368 ## This function can be used to read the texture to the byte stream in order to pass it to
369 ## the AddTexture() function of geomBuilder class.
370 ## For example,
371 ## \code
372 ## from salome.geom import geomBuilder
373 ## geompy = geomBuilder.New(salome.myStudy)
374 ## texture = geompy.readtexture('mytexture.dat')
375 ## texture = geompy.AddTexture(*texture)
376 ## obj.SetMarkerTexture(texture)
377 ## \endcode
378 ## @param fname texture file name
379 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
380 ## @ingroup l1_geomBuilder_auxiliary
381 def ReadTexture(fname):
382     """
383     Read bitmap texture from the text file.
384     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
385     A zero symbol ('0') represents transparent pixel of the texture bitmap.
386     The function returns width and height of the pixmap in pixels and byte stream representing
387     texture bitmap itself.
388     This function can be used to read the texture to the byte stream in order to pass it to
389     the AddTexture() function of geomBuilder class.
390     
391     Parameters:
392         fname texture file name
393
394     Returns:
395         sequence of tree values: texture's width, height in pixels and its byte stream
396     
397     Example of usage:
398         from salome.geom import geomBuilder
399         geompy = geomBuilder.New(salome.myStudy)
400         texture = geompy.readtexture('mytexture.dat')
401         texture = geompy.AddTexture(*texture)
402         obj.SetMarkerTexture(texture)
403     """
404     try:
405         f = open(fname)
406         lines = [ l.strip() for l in f.readlines()]
407         f.close()
408         maxlen = 0
409         if lines: maxlen = max([len(x) for x in lines])
410         lenbytes = maxlen/8
411         if maxlen%8: lenbytes += 1
412         bytedata=""
413         for line in lines:
414             if len(line)%8:
415                 lenline = (len(line)/8+1)*8
416                 pass
417             else:
418                 lenline = (len(line)/8)*8
419                 pass
420             for i in range(lenline/8):
421                 byte=""
422                 for j in range(8):
423                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
424                     else: byte += "0"
425                     pass
426                 bytedata += PackData(byte)
427                 pass
428             for i in range(lenline/8, lenbytes):
429                 bytedata += PackData("0")
430             pass
431         return lenbytes*8, len(lines), bytedata
432     except:
433         pass
434     return 0, 0, ""
435
436 ## Returns a long value from enumeration type
437 #  Can be used for CORBA enumerator types like GEOM.shape_type
438 #  @param theItem enumeration type
439 #  @ingroup l1_geomBuilder_auxiliary
440 def EnumToLong(theItem):
441     """
442     Returns a long value from enumeration type
443     Can be used for CORBA enumerator types like geomBuilder.ShapeType
444
445     Parameters:
446         theItem enumeration type
447     """
448     ret = theItem
449     if hasattr(theItem, "_v"): ret = theItem._v
450     return ret
451
452 ## Information about closed/unclosed state of shell or wire
453 #  @ingroup l1_geomBuilder_auxiliary
454 class info:
455     """
456     Information about closed/unclosed state of shell or wire
457     """
458     UNKNOWN  = 0
459     CLOSED   = 1
460     UNCLOSED = 2
461
462 ##! Private class used to bind calls of plugin operations to geomBuilder
463 class PluginOperation:
464   def __init__(self, operation, function):
465     self.operation = operation
466     self.function = function
467     pass
468
469   def __call__(self, *args):
470     res = self.function(self.operation, *args)
471     RaiseIfFailed(self.function.__name__, self.operation)
472     return res
473
474 # Warning: geom is a singleton
475 geom = None
476 engine = None
477 doLcc = False
478 created = False
479
480 class geomBuilder(object, GEOM._objref_GEOM_Gen):
481
482         ## Enumeration ShapeType as a dictionary. \n
483         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
484         #  @ingroup l1_geomBuilder_auxiliary
485         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
486
487         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
488         #  and a list of parameters, describing the shape.
489         #  List of parameters, describing the shape:
490         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
491         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
492         #
493         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
494         #
495         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
496         #
497         #  - SPHERE:       [xc yc zc            R]
498         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
499         #  - BOX:          [xc yc zc                      ax ay az]
500         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
501         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
502         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
503         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
504         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
505         #
506         #  - SPHERE2D:     [xc yc zc            R]
507         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
508         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
509         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
510         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
511         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
512         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
513         #  - PLANE:        [xo yo zo  dx dy dz]
514         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
515         #  - FACE:                                       [nb_edges  nb_vertices]
516         #
517         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
518         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
519         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
520         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
521         #  - LINE:         [xo yo zo  dx dy dz]
522         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
523         #  - EDGE:                                                 [nb_vertices]
524         #
525         #  - VERTEX:       [x  y  z]
526         #  @ingroup l1_geomBuilder_auxiliary
527         kind = GEOM.GEOM_IKindOfShape
528
529         def __new__(cls):
530             global engine
531             global geom
532             global doLcc
533             global created
534             #print "==== __new__ ", engine, geom, doLcc, created
535             if geom is None:
536                 # geom engine is either retrieved from engine, or created
537                 geom = engine
538                 # Following test avoids a recursive loop
539                 if doLcc:
540                     if geom is not None:
541                         # geom engine not created: existing engine found
542                         doLcc = False
543                     if doLcc and not created:
544                         doLcc = False
545                         # FindOrLoadComponent called:
546                         # 1. CORBA resolution of server
547                         # 2. the __new__ method is called again
548                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
549                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
550                         #print "====1 ",geom
551                 else:
552                     # FindOrLoadComponent not called
553                     if geom is None:
554                         # geomBuilder instance is created from lcc.FindOrLoadComponent
555                         #print "==== super ", engine, geom, doLcc, created
556                         geom = super(geomBuilder,cls).__new__(cls)
557                         #print "====2 ",geom
558                     else:
559                         # geom engine not created: existing engine found
560                         #print "==== existing ", engine, geom, doLcc, created
561                         pass
562                 #print "return geom 1 ", geom
563                 return geom
564
565             #print "return geom 2 ", geom
566             return geom
567
568         def __init__(self):
569             global created
570             #print "-------- geomBuilder __init__ --- ", created, self
571             if not created:
572               created = True
573               GEOM._objref_GEOM_Gen.__init__(self)
574               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
575               self.myBuilder = None
576               self.myStudyId = 0
577               self.father    = None
578
579               self.BasicOp  = None
580               self.CurvesOp = None
581               self.PrimOp   = None
582               self.ShapesOp = None
583               self.HealOp   = None
584               self.InsertOp = None
585               self.BoolOp   = None
586               self.TrsfOp   = None
587               self.LocalOp  = None
588               self.MeasuOp  = None
589               self.BlocksOp = None
590               self.GroupOp  = None
591               self.AdvOp    = None
592             pass
593
594         ## Process object publication in the study, as follows:
595         #  - if @a theName is specified (not None), the object is published in the study
596         #    with this name, not taking into account "auto-publishing" option;
597         #  - if @a theName is NOT specified, the object is published in the study
598         #    (using default name, which can be customized using @a theDefaultName parameter)
599         #    only if auto-publishing is switched on.
600         #
601         #  @param theObj  object, a subject for publishing
602         #  @param theName object name for study
603         #  @param theDefaultName default name for the auto-publishing
604         #
605         #  @sa addToStudyAuto()
606         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
607             # ---
608             def _item_name(_names, _defname, _idx=-1):
609                 if not _names: _names = _defname
610                 if type(_names) in [types.ListType, types.TupleType]:
611                     if _idx >= 0:
612                         if _idx >= len(_names) or not _names[_idx]:
613                             if type(_defname) not in [types.ListType, types.TupleType]:
614                                 _name = "%s_%d"%(_defname, _idx+1)
615                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
616                                 _name = _defname[_idx]
617                             else:
618                                 _name = "%noname_%d"%(dn, _idx+1)
619                             pass
620                         else:
621                             _name = _names[_idx]
622                         pass
623                     else:
624                         # must be wrong  usage
625                         _name = _names[0]
626                     pass
627                 else:
628                     if _idx >= 0:
629                         _name = "%s_%d"%(_names, _idx+1)
630                     else:
631                         _name = _names
632                     pass
633                 return _name
634             # ---
635             if not theObj:
636                 return # null object
637             if not theName and not self.myMaxNbSubShapesAllowed:
638                 return # nothing to do: auto-publishing is disabled
639             if not theName and not theDefaultName:
640                 return # neither theName nor theDefaultName is given
641             import types
642             if type(theObj) in [types.ListType, types.TupleType]:
643                 # list of objects is being published
644                 idx = 0
645                 for obj in theObj:
646                     if not obj: continue # bad object
647                     ###if obj.GetStudyEntry(): continue # already published
648                     name = _item_name(theName, theDefaultName, idx)
649                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
650                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
651                     else:
652                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
653                         pass
654                     idx = idx+1
655                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
656                     pass
657                 pass
658             else:
659                 # single object is published
660                 ###if theObj.GetStudyEntry(): return # already published
661                 name = _item_name(theName, theDefaultName)
662                 if theObj.IsMainShape():
663                     self.addToStudy(theObj, name)
664                 else:
665                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
666                     pass
667                 pass
668             pass
669
670         ## @addtogroup l1_geomBuilder_auxiliary
671         ## @{
672         def init_geom(self,theStudy):
673             self.myStudy = theStudy
674             self.myStudyId = self.myStudy._get_StudyId()
675             self.myBuilder = self.myStudy.NewBuilder()
676             self.father = self.myStudy.FindComponent("GEOM")
677             if self.father is None:
678                 self.father = self.myBuilder.NewComponent("GEOM")
679                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
680                 FName = A1._narrow(SALOMEDS.AttributeName)
681                 FName.SetValue("Geometry")
682                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
683                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
684                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
685                 self.myBuilder.DefineComponentInstance(self.father,self)
686                 pass
687             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
688             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
689             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
690             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
691             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
692             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
693             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
694             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
695             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
696             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
697             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
698             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
699
700             # The below line is a right way to map all plugin functions to geomBuilder,
701             # but AdvancedOperations are already mapped, that is why this line is commented
702             # and presents here only as an axample
703             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
704
705             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
706             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
707
708             # set GEOM as root in the use case tree
709             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
710             self.myUseCaseBuilder.SetRootCurrent()
711             self.myUseCaseBuilder.Append(self.father)
712             pass
713
714         def GetPluginOperations(self, studyID, libraryName):
715             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
716             if op:
717                 # bind methods of operations to self
718                 methods = op.__class__.__dict__['__methods__']
719                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
720                 for meth_name in methods:
721                     if not meth_name in avoid_methods: # avoid basic methods
722                         function = getattr(op.__class__, meth_name)
723                         if callable(function):
724                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
725                             self.__dict__[meth_name] = PluginOperation(op, function)
726             return op
727
728         ## Enable / disable results auto-publishing
729         # 
730         #  The automatic publishing is managed in the following way:
731         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
732         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
733         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
734         #  value passed as parameter has the same effect.
735         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
736         #  maximum number of sub-shapes allowed for publishing is set to specified value.
737         #
738         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
739         #  @ingroup l1_publish_data
740         def addToStudyAuto(self, maxNbSubShapes=-1):
741             """
742             Enable / disable results auto-publishing
743
744             The automatic publishing is managed in the following way:
745             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
746             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
747             maximum number of sub-shapes allowed for publishing is unlimited; any negative
748             value passed as parameter has the same effect.
749             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
750             maximum number of sub-shapes allowed for publishing is set to this value.
751
752             Parameters:
753                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
754
755             Example of usage:
756                 geompy.addToStudyAuto()   # enable auto-publishing
757                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
758                 geompy.addToStudyAuto(0)  # disable auto-publishing
759             """
760             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
761             pass
762
763         ## Dump component to the Python script
764         #  This method overrides IDL function to allow default values for the parameters.
765         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
766             """
767             Dump component to the Python script
768             This method overrides IDL function to allow default values for the parameters.
769             """
770             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
771
772         ## Get name for sub-shape aSubObj of shape aMainObj
773         #
774         # @ref swig_SubShapeName "Example"
775         def SubShapeName(self,aSubObj, aMainObj):
776             """
777             Get name for sub-shape aSubObj of shape aMainObj
778             """
779             # Example: see GEOM_TestAll.py
780
781             #aSubId  = orb.object_to_string(aSubObj)
782             #aMainId = orb.object_to_string(aMainObj)
783             #index = gg.getIndexTopology(aSubId, aMainId)
784             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
785             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
786             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
787             return name
788
789         ## Publish in study aShape with name aName
790         #
791         #  \param aShape the shape to be published
792         #  \param aName  the name for the shape
793         #  \param doRestoreSubShapes if True, finds and publishes also
794         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
795         #         and published sub-shapes of arguments
796         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
797         #                                                  these arguments description
798         #  \return study entry of the published shape in form of string
799         #
800         #  @ingroup l1_publish_data
801         #  @ref swig_all_addtostudy "Example"
802         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
803                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
804             """
805             Publish in study aShape with name aName
806
807             Parameters:
808                 aShape the shape to be published
809                 aName  the name for the shape
810                 doRestoreSubShapes if True, finds and publishes also
811                                    sub-shapes of aShape, corresponding to its arguments
812                                    and published sub-shapes of arguments
813                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
814                                                          these arguments description
815
816             Returns:
817                 study entry of the published shape in form of string
818
819             Example of usage:
820                 id_block1 = geompy.addToStudy(Block1, "Block 1")
821             """
822             # Example: see GEOM_TestAll.py
823             try:
824                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
825                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
826                 if doRestoreSubShapes:
827                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
828                                             theFindMethod, theInheritFirstArg, True )
829             except:
830                 print "addToStudy() failed"
831                 return ""
832             return aShape.GetStudyEntry()
833
834         ## Publish in study aShape with name aName as sub-object of previously published aFather
835         #  \param aFather previously published object
836         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
837         #  \param aName  the name for the shape
838         #
839         #  \return study entry of the published shape in form of string
840         #
841         #  @ingroup l1_publish_data
842         #  @ref swig_all_addtostudyInFather "Example"
843         def addToStudyInFather(self, aFather, aShape, aName):
844             """
845             Publish in study aShape with name aName as sub-object of previously published aFather
846
847             Parameters:
848                 aFather previously published object
849                 aShape the shape to be published as sub-object of aFather
850                 aName  the name for the shape
851
852             Returns:
853                 study entry of the published shape in form of string
854             """
855             # Example: see GEOM_TestAll.py
856             try:
857                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
858                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
859             except:
860                 print "addToStudyInFather() failed"
861                 return ""
862             return aShape.GetStudyEntry()
863
864         ## Unpublish object in study
865         #
866         #  \param obj the object to be unpublished
867         def hideInStudy(self, obj):
868             """
869             Unpublish object in study
870
871             Parameters:
872                 obj the object to be unpublished
873             """
874             ior = salome.orb.object_to_string(obj)
875             aSObject = self.myStudy.FindObjectIOR(ior)
876             if aSObject is not None:
877                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
878                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
879                 drwAttribute.SetDrawable(False)
880                 pass
881
882         # end of l1_geomBuilder_auxiliary
883         ## @}
884
885         ## @addtogroup l3_restore_ss
886         ## @{
887
888         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
889         #  To be used from python scripts out of addToStudy() (non-default usage)
890         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
891         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
892         #                   If this list is empty, all operation arguments will be published
893         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
894         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
895         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
896         #                            Do not publish sub-shapes in place of arguments, but only
897         #                            in place of sub-shapes of the first argument,
898         #                            because the whole shape corresponds to the first argument.
899         #                            Mainly to be used after transformations, but it also can be
900         #                            usefull after partition with one object shape, and some other
901         #                            operations, where only the first argument has to be considered.
902         #                            If theObject has only one argument shape, this flag is automatically
903         #                            considered as True, not regarding really passed value.
904         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
905         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
906         #  \return list of published sub-shapes
907         #
908         #  @ref tui_restore_prs_params "Example"
909         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
910                               theInheritFirstArg=False, theAddPrefix=True):
911             """
912             Publish sub-shapes, standing for arguments and sub-shapes of arguments
913             To be used from python scripts out of geompy.addToStudy (non-default usage)
914
915             Parameters:
916                 theObject published GEOM.GEOM_Object, arguments of which will be published
917                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
918                           If this list is empty, all operation arguments will be published
919                 theFindMethod method to search sub-shapes, corresponding to arguments and
920                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
921                 theInheritFirstArg set properties of the first argument for theObject.
922                                    Do not publish sub-shapes in place of arguments, but only
923                                    in place of sub-shapes of the first argument,
924                                    because the whole shape corresponds to the first argument.
925                                    Mainly to be used after transformations, but it also can be
926                                    usefull after partition with one object shape, and some other
927                                    operations, where only the first argument has to be considered.
928                                    If theObject has only one argument shape, this flag is automatically
929                                    considered as True, not regarding really passed value.
930                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
931                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
932             Returns:
933                 list of published sub-shapes
934             """
935             # Example: see GEOM_TestAll.py
936             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
937                                           theFindMethod, theInheritFirstArg, theAddPrefix)
938
939         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
940         #  To be used from python scripts out of addToStudy() (non-default usage)
941         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
942         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
943         #                   If this list is empty, all operation arguments will be published
944         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
945         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
946         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
947         #                            Do not publish sub-shapes in place of arguments, but only
948         #                            in place of sub-shapes of the first argument,
949         #                            because the whole shape corresponds to the first argument.
950         #                            Mainly to be used after transformations, but it also can be
951         #                            usefull after partition with one object shape, and some other
952         #                            operations, where only the first argument has to be considered.
953         #                            If theObject has only one argument shape, this flag is automatically
954         #                            considered as True, not regarding really passed value.
955         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
956         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
957         #  \return list of published sub-shapes
958         #
959         #  @ref tui_restore_prs_params "Example"
960         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
961                                    theInheritFirstArg=False, theAddPrefix=True):
962             """
963             Publish sub-shapes, standing for arguments and sub-shapes of arguments
964             To be used from python scripts out of geompy.addToStudy() (non-default usage)
965
966             Parameters:
967                 theObject published GEOM.GEOM_Object, arguments of which will be published
968                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
969                           If this list is empty, all operation arguments will be published
970                 theFindMethod method to search sub-shapes, corresponding to arguments and
971                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
972                 theInheritFirstArg set properties of the first argument for theObject.
973                                    Do not publish sub-shapes in place of arguments, but only
974                                    in place of sub-shapes of the first argument,
975                                    because the whole shape corresponds to the first argument.
976                                    Mainly to be used after transformations, but it also can be
977                                    usefull after partition with one object shape, and some other
978                                    operations, where only the first argument has to be considered.
979                                    If theObject has only one argument shape, this flag is automatically
980                                    considered as True, not regarding really passed value.
981                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
982                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
983
984             Returns: 
985                 list of published sub-shapes
986             """
987             # Example: see GEOM_TestAll.py
988             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
989                                                theFindMethod, theInheritFirstArg, theAddPrefix)
990
991         # end of l3_restore_ss
992         ## @}
993
994         ## @addtogroup l3_basic_go
995         ## @{
996
997         ## Create point by three coordinates.
998         #  @param theX The X coordinate of the point.
999         #  @param theY The Y coordinate of the point.
1000         #  @param theZ The Z coordinate of the point.
1001         #  @param theName Object name; when specified, this parameter is used
1002         #         for result publication in the study. Otherwise, if automatic
1003         #         publication is switched on, default value is used for result name.
1004         #
1005         #  @return New GEOM.GEOM_Object, containing the created point.
1006         #
1007         #  @ref tui_creation_point "Example"
1008         def MakeVertex(self, theX, theY, theZ, theName=None):
1009             """
1010             Create point by three coordinates.
1011
1012             Parameters:
1013                 theX The X coordinate of the point.
1014                 theY The Y coordinate of the point.
1015                 theZ The Z coordinate of the point.
1016                 theName Object name; when specified, this parameter is used
1017                         for result publication in the study. Otherwise, if automatic
1018                         publication is switched on, default value is used for result name.
1019                 
1020             Returns: 
1021                 New GEOM.GEOM_Object, containing the created point.
1022             """
1023             # Example: see GEOM_TestAll.py
1024             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1025             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1026             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1027             anObj.SetParameters(Parameters)
1028             self._autoPublish(anObj, theName, "vertex")
1029             return anObj
1030
1031         ## Create a point, distant from the referenced point
1032         #  on the given distances along the coordinate axes.
1033         #  @param theReference The referenced point.
1034         #  @param theX Displacement from the referenced point along OX axis.
1035         #  @param theY Displacement from the referenced point along OY axis.
1036         #  @param theZ Displacement from the referenced point along OZ axis.
1037         #  @param theName Object name; when specified, this parameter is used
1038         #         for result publication in the study. Otherwise, if automatic
1039         #         publication is switched on, default value is used for result name.
1040         #
1041         #  @return New GEOM.GEOM_Object, containing the created point.
1042         #
1043         #  @ref tui_creation_point "Example"
1044         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1045             """
1046             Create a point, distant from the referenced point
1047             on the given distances along the coordinate axes.
1048
1049             Parameters:
1050                 theReference The referenced point.
1051                 theX Displacement from the referenced point along OX axis.
1052                 theY Displacement from the referenced point along OY axis.
1053                 theZ Displacement from the referenced point along OZ axis.
1054                 theName Object name; when specified, this parameter is used
1055                         for result publication in the study. Otherwise, if automatic
1056                         publication is switched on, default value is used for result name.
1057
1058             Returns:
1059                 New GEOM.GEOM_Object, containing the created point.
1060             """
1061             # Example: see GEOM_TestAll.py
1062             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1063             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1064             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1065             anObj.SetParameters(Parameters)
1066             self._autoPublish(anObj, theName, "vertex")
1067             return anObj
1068
1069         ## Create a point, corresponding to the given parameter on the given curve.
1070         #  @param theRefCurve The referenced curve.
1071         #  @param theParameter Value of parameter on the referenced curve.
1072         #  @param theName Object name; when specified, this parameter is used
1073         #         for result publication in the study. Otherwise, if automatic
1074         #         publication is switched on, default value is used for result name.
1075         #
1076         #  @return New GEOM.GEOM_Object, containing the created point.
1077         #
1078         #  @ref tui_creation_point "Example"
1079         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1080             """
1081             Create a point, corresponding to the given parameter on the given curve.
1082
1083             Parameters:
1084                 theRefCurve The referenced curve.
1085                 theParameter Value of parameter on the referenced curve.
1086                 theName Object name; when specified, this parameter is used
1087                         for result publication in the study. Otherwise, if automatic
1088                         publication is switched on, default value is used for result name.
1089
1090             Returns:
1091                 New GEOM.GEOM_Object, containing the created point.
1092
1093             Example of usage:
1094                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1095             """
1096             # Example: see GEOM_TestAll.py
1097             theParameter, Parameters = ParseParameters(theParameter)
1098             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1099             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1100             anObj.SetParameters(Parameters)
1101             self._autoPublish(anObj, theName, "vertex")
1102             return anObj
1103
1104         ## Create a point by projection give coordinates on the given curve
1105         #  @param theRefCurve The referenced curve.
1106         #  @param theX X-coordinate in 3D space
1107         #  @param theY Y-coordinate in 3D space
1108         #  @param theZ Z-coordinate in 3D space
1109         #  @param theName Object name; when specified, this parameter is used
1110         #         for result publication in the study. Otherwise, if automatic
1111         #         publication is switched on, default value is used for result name.
1112         #
1113         #  @return New GEOM.GEOM_Object, containing the created point.
1114         #
1115         #  @ref tui_creation_point "Example"
1116         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1117             """
1118             Create a point by projection give coordinates on the given curve
1119             
1120             Parameters:
1121                 theRefCurve The referenced curve.
1122                 theX X-coordinate in 3D space
1123                 theY Y-coordinate in 3D space
1124                 theZ Z-coordinate in 3D space
1125                 theName Object name; when specified, this parameter is used
1126                         for result publication in the study. Otherwise, if automatic
1127                         publication is switched on, default value is used for result name.
1128
1129             Returns:
1130                 New GEOM.GEOM_Object, containing the created point.
1131
1132             Example of usage:
1133                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1134             """
1135             # Example: see GEOM_TestAll.py
1136             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1137             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1138             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1139             anObj.SetParameters(Parameters)
1140             self._autoPublish(anObj, theName, "vertex")
1141             return anObj
1142
1143         ## Create a point, corresponding to the given length on the given curve.
1144         #  @param theRefCurve The referenced curve.
1145         #  @param theLength Length on the referenced curve. It can be negative.
1146         #  @param theStartPoint Point allowing to choose the direction for the calculation
1147         #                       of the length. If None, start from the first point of theRefCurve.
1148         #  @param theName Object name; when specified, this parameter is used
1149         #         for result publication in the study. Otherwise, if automatic
1150         #         publication is switched on, default value is used for result name.
1151         #
1152         #  @return New GEOM.GEOM_Object, containing the created point.
1153         #
1154         #  @ref tui_creation_point "Example"
1155         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1156             """
1157             Create a point, corresponding to the given length on the given curve.
1158
1159             Parameters:
1160                 theRefCurve The referenced curve.
1161                 theLength Length on the referenced curve. It can be negative.
1162                 theStartPoint Point allowing to choose the direction for the calculation
1163                               of the length. If None, start from the first point of theRefCurve.
1164                 theName Object name; when specified, this parameter is used
1165                         for result publication in the study. Otherwise, if automatic
1166                         publication is switched on, default value is used for result name.
1167
1168             Returns:
1169                 New GEOM.GEOM_Object, containing the created point.
1170             """
1171             # Example: see GEOM_TestAll.py
1172             theLength, Parameters = ParseParameters(theLength)
1173             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1174             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1175             anObj.SetParameters(Parameters)
1176             self._autoPublish(anObj, theName, "vertex")
1177             return anObj
1178
1179         ## Create a point, corresponding to the given parameters on the
1180         #    given surface.
1181         #  @param theRefSurf The referenced surface.
1182         #  @param theUParameter Value of U-parameter on the referenced surface.
1183         #  @param theVParameter Value of V-parameter on the referenced surface.
1184         #  @param theName Object name; when specified, this parameter is used
1185         #         for result publication in the study. Otherwise, if automatic
1186         #         publication is switched on, default value is used for result name.
1187         #
1188         #  @return New GEOM.GEOM_Object, containing the created point.
1189         #
1190         #  @ref swig_MakeVertexOnSurface "Example"
1191         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1192             """
1193             Create a point, corresponding to the given parameters on the
1194             given surface.
1195
1196             Parameters:
1197                 theRefSurf The referenced surface.
1198                 theUParameter Value of U-parameter on the referenced surface.
1199                 theVParameter Value of V-parameter on the referenced surface.
1200                 theName Object name; when specified, this parameter is used
1201                         for result publication in the study. Otherwise, if automatic
1202                         publication is switched on, default value is used for result name.
1203
1204             Returns:
1205                 New GEOM.GEOM_Object, containing the created point.
1206
1207             Example of usage:
1208                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1209             """
1210             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1211             # Example: see GEOM_TestAll.py
1212             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1213             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1214             anObj.SetParameters(Parameters);
1215             self._autoPublish(anObj, theName, "vertex")
1216             return anObj
1217
1218         ## Create a point by projection give coordinates on the given surface
1219         #  @param theRefSurf The referenced surface.
1220         #  @param theX X-coordinate in 3D space
1221         #  @param theY Y-coordinate in 3D space
1222         #  @param theZ Z-coordinate in 3D space
1223         #  @param theName Object name; when specified, this parameter is used
1224         #         for result publication in the study. Otherwise, if automatic
1225         #         publication is switched on, default value is used for result name.
1226         #
1227         #  @return New GEOM.GEOM_Object, containing the created point.
1228         #
1229         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1230         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1231             """
1232             Create a point by projection give coordinates on the given surface
1233
1234             Parameters:
1235                 theRefSurf The referenced surface.
1236                 theX X-coordinate in 3D space
1237                 theY Y-coordinate in 3D space
1238                 theZ Z-coordinate in 3D space
1239                 theName Object name; when specified, this parameter is used
1240                         for result publication in the study. Otherwise, if automatic
1241                         publication is switched on, default value is used for result name.
1242
1243             Returns:
1244                 New GEOM.GEOM_Object, containing the created point.
1245
1246             Example of usage:
1247                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1248             """
1249             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1250             # Example: see GEOM_TestAll.py
1251             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1252             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1253             anObj.SetParameters(Parameters);
1254             self._autoPublish(anObj, theName, "vertex")
1255             return anObj
1256
1257         ## Create a point, which lays on the given face.
1258         #  The point will lay in arbitrary place of the face.
1259         #  The only condition on it is a non-zero distance to the face boundary.
1260         #  Such point can be used to uniquely identify the face inside any
1261         #  shape in case, when the shape does not contain overlapped faces.
1262         #  @param theFace The referenced face.
1263         #  @param theName Object name; when specified, this parameter is used
1264         #         for result publication in the study. Otherwise, if automatic
1265         #         publication is switched on, default value is used for result name.
1266         #
1267         #  @return New GEOM.GEOM_Object, containing the created point.
1268         #
1269         #  @ref swig_MakeVertexInsideFace "Example"
1270         def MakeVertexInsideFace (self, theFace, theName=None):
1271             """
1272             Create a point, which lays on the given face.
1273             The point will lay in arbitrary place of the face.
1274             The only condition on it is a non-zero distance to the face boundary.
1275             Such point can be used to uniquely identify the face inside any
1276             shape in case, when the shape does not contain overlapped faces.
1277
1278             Parameters:
1279                 theFace The referenced face.
1280                 theName Object name; when specified, this parameter is used
1281                         for result publication in the study. Otherwise, if automatic
1282                         publication is switched on, default value is used for result name.
1283
1284             Returns:
1285                 New GEOM.GEOM_Object, containing the created point.
1286
1287             Example of usage:
1288                 p_on_face = geompy.MakeVertexInsideFace(Face)
1289             """
1290             # Example: see GEOM_TestAll.py
1291             anObj = self.BasicOp.MakePointOnFace(theFace)
1292             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1293             self._autoPublish(anObj, theName, "vertex")
1294             return anObj
1295
1296         ## Create a point on intersection of two lines.
1297         #  @param theRefLine1, theRefLine2 The referenced lines.
1298         #  @param theName Object name; when specified, this parameter is used
1299         #         for result publication in the study. Otherwise, if automatic
1300         #         publication is switched on, default value is used for result name.
1301         #
1302         #  @return New GEOM.GEOM_Object, containing the created point.
1303         #
1304         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1305         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1306             """
1307             Create a point on intersection of two lines.
1308
1309             Parameters:
1310                 theRefLine1, theRefLine2 The referenced lines.
1311                 theName Object name; when specified, this parameter is used
1312                         for result publication in the study. Otherwise, if automatic
1313                         publication is switched on, default value is used for result name.
1314
1315             Returns:
1316                 New GEOM.GEOM_Object, containing the created point.
1317             """
1318             # Example: see GEOM_TestAll.py
1319             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1320             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1321             self._autoPublish(anObj, theName, "vertex")
1322             return anObj
1323
1324         ## Create a tangent, corresponding to the given parameter on the given curve.
1325         #  @param theRefCurve The referenced curve.
1326         #  @param theParameter Value of parameter on the referenced curve.
1327         #  @param theName Object name; when specified, this parameter is used
1328         #         for result publication in the study. Otherwise, if automatic
1329         #         publication is switched on, default value is used for result name.
1330         #
1331         #  @return New GEOM.GEOM_Object, containing the created tangent.
1332         #
1333         #  @ref swig_MakeTangentOnCurve "Example"
1334         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1335             """
1336             Create a tangent, corresponding to the given parameter on the given curve.
1337
1338             Parameters:
1339                 theRefCurve The referenced curve.
1340                 theParameter Value of parameter on the referenced curve.
1341                 theName Object name; when specified, this parameter is used
1342                         for result publication in the study. Otherwise, if automatic
1343                         publication is switched on, default value is used for result name.
1344
1345             Returns:
1346                 New GEOM.GEOM_Object, containing the created tangent.
1347
1348             Example of usage:
1349                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1350             """
1351             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1352             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1353             self._autoPublish(anObj, theName, "tangent")
1354             return anObj
1355
1356         ## Create a tangent plane, corresponding to the given parameter on the given face.
1357         #  @param theFace The face for which tangent plane should be built.
1358         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1359         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1360         #  @param theTrimSize the size of plane.
1361         #  @param theName Object name; when specified, this parameter is used
1362         #         for result publication in the study. Otherwise, if automatic
1363         #         publication is switched on, default value is used for result name.
1364         #
1365         #  @return New GEOM.GEOM_Object, containing the created tangent.
1366         #
1367         #  @ref swig_MakeTangentPlaneOnFace "Example"
1368         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1369             """
1370             Create a tangent plane, corresponding to the given parameter on the given face.
1371
1372             Parameters:
1373                 theFace The face for which tangent plane should be built.
1374                 theParameterV vertical value of the center point (0.0 - 1.0).
1375                 theParameterU horisontal value of the center point (0.0 - 1.0).
1376                 theTrimSize the size of plane.
1377                 theName Object name; when specified, this parameter is used
1378                         for result publication in the study. Otherwise, if automatic
1379                         publication is switched on, default value is used for result name.
1380
1381            Returns: 
1382                 New GEOM.GEOM_Object, containing the created tangent.
1383
1384            Example of usage:
1385                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1386             """
1387             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1388             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1389             self._autoPublish(anObj, theName, "tangent")
1390             return anObj
1391
1392         ## Create a vector with the given components.
1393         #  @param theDX X component of the vector.
1394         #  @param theDY Y component of the vector.
1395         #  @param theDZ Z component of the vector.
1396         #  @param theName Object name; when specified, this parameter is used
1397         #         for result publication in the study. Otherwise, if automatic
1398         #         publication is switched on, default value is used for result name.
1399         #
1400         #  @return New GEOM.GEOM_Object, containing the created vector.
1401         #
1402         #  @ref tui_creation_vector "Example"
1403         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1404             """
1405             Create a vector with the given components.
1406
1407             Parameters:
1408                 theDX X component of the vector.
1409                 theDY Y component of the vector.
1410                 theDZ Z component of the vector.
1411                 theName Object name; when specified, this parameter is used
1412                         for result publication in the study. Otherwise, if automatic
1413                         publication is switched on, default value is used for result name.
1414
1415             Returns:     
1416                 New GEOM.GEOM_Object, containing the created vector.
1417             """
1418             # Example: see GEOM_TestAll.py
1419             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1420             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1421             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1422             anObj.SetParameters(Parameters)
1423             self._autoPublish(anObj, theName, "vector")
1424             return anObj
1425
1426         ## Create a vector between two points.
1427         #  @param thePnt1 Start point for the vector.
1428         #  @param thePnt2 End point for the vector.
1429         #  @param theName Object name; when specified, this parameter is used
1430         #         for result publication in the study. Otherwise, if automatic
1431         #         publication is switched on, default value is used for result name.
1432         #
1433         #  @return New GEOM.GEOM_Object, containing the created vector.
1434         #
1435         #  @ref tui_creation_vector "Example"
1436         def MakeVector(self, thePnt1, thePnt2, theName=None):
1437             """
1438             Create a vector between two points.
1439
1440             Parameters:
1441                 thePnt1 Start point for the vector.
1442                 thePnt2 End point for the vector.
1443                 theName Object name; when specified, this parameter is used
1444                         for result publication in the study. Otherwise, if automatic
1445                         publication is switched on, default value is used for result name.
1446
1447             Returns:        
1448                 New GEOM.GEOM_Object, containing the created vector.
1449             """
1450             # Example: see GEOM_TestAll.py
1451             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1452             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1453             self._autoPublish(anObj, theName, "vector")
1454             return anObj
1455
1456         ## Create a line, passing through the given point
1457         #  and parrallel to the given direction
1458         #  @param thePnt Point. The resulting line will pass through it.
1459         #  @param theDir Direction. The resulting line will be parallel to it.
1460         #  @param theName Object name; when specified, this parameter is used
1461         #         for result publication in the study. Otherwise, if automatic
1462         #         publication is switched on, default value is used for result name.
1463         #
1464         #  @return New GEOM.GEOM_Object, containing the created line.
1465         #
1466         #  @ref tui_creation_line "Example"
1467         def MakeLine(self, thePnt, theDir, theName=None):
1468             """
1469             Create a line, passing through the given point
1470             and parrallel to the given direction
1471
1472             Parameters:
1473                 thePnt Point. The resulting line will pass through it.
1474                 theDir Direction. The resulting line will be parallel to it.
1475                 theName Object name; when specified, this parameter is used
1476                         for result publication in the study. Otherwise, if automatic
1477                         publication is switched on, default value is used for result name.
1478
1479             Returns:
1480                 New GEOM.GEOM_Object, containing the created line.
1481             """
1482             # Example: see GEOM_TestAll.py
1483             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1484             RaiseIfFailed("MakeLine", self.BasicOp)
1485             self._autoPublish(anObj, theName, "line")
1486             return anObj
1487
1488         ## Create a line, passing through the given points
1489         #  @param thePnt1 First of two points, defining the line.
1490         #  @param thePnt2 Second of two points, defining the line.
1491         #  @param theName Object name; when specified, this parameter is used
1492         #         for result publication in the study. Otherwise, if automatic
1493         #         publication is switched on, default value is used for result name.
1494         #
1495         #  @return New GEOM.GEOM_Object, containing the created line.
1496         #
1497         #  @ref tui_creation_line "Example"
1498         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1499             """
1500             Create a line, passing through the given points
1501
1502             Parameters:
1503                 thePnt1 First of two points, defining the line.
1504                 thePnt2 Second of two points, defining the line.
1505                 theName Object name; when specified, this parameter is used
1506                         for result publication in the study. Otherwise, if automatic
1507                         publication is switched on, default value is used for result name.
1508
1509             Returns:
1510                 New GEOM.GEOM_Object, containing the created line.
1511             """
1512             # Example: see GEOM_TestAll.py
1513             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1514             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1515             self._autoPublish(anObj, theName, "line")
1516             return anObj
1517
1518         ## Create a line on two faces intersection.
1519         #  @param theFace1 First of two faces, defining the line.
1520         #  @param theFace2 Second of two faces, defining the line.
1521         #  @param theName Object name; when specified, this parameter is used
1522         #         for result publication in the study. Otherwise, if automatic
1523         #         publication is switched on, default value is used for result name.
1524         #
1525         #  @return New GEOM.GEOM_Object, containing the created line.
1526         #
1527         #  @ref swig_MakeLineTwoFaces "Example"
1528         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1529             """
1530             Create a line on two faces intersection.
1531
1532             Parameters:
1533                 theFace1 First of two faces, defining the line.
1534                 theFace2 Second of two faces, defining the line.
1535                 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             Returns:
1540                 New GEOM.GEOM_Object, containing the created line.
1541             """
1542             # Example: see GEOM_TestAll.py
1543             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1544             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1545             self._autoPublish(anObj, theName, "line")
1546             return anObj
1547
1548         ## Create a plane, passing through the given point
1549         #  and normal to the given vector.
1550         #  @param thePnt Point, the plane has to pass through.
1551         #  @param theVec Vector, defining the plane normal direction.
1552         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1553         #  @param theName Object name; when specified, this parameter is used
1554         #         for result publication in the study. Otherwise, if automatic
1555         #         publication is switched on, default value is used for result name.
1556         #
1557         #  @return New GEOM.GEOM_Object, containing the created plane.
1558         #
1559         #  @ref tui_creation_plane "Example"
1560         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1561             """
1562             Create a plane, passing through the given point
1563             and normal to the given vector.
1564
1565             Parameters:
1566                 thePnt Point, the plane has to pass through.
1567                 theVec Vector, defining the plane normal direction.
1568                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1569                 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             Returns:    
1574                 New GEOM.GEOM_Object, containing the created plane.
1575             """
1576             # Example: see GEOM_TestAll.py
1577             theTrimSize, Parameters = ParseParameters(theTrimSize);
1578             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1579             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1580             anObj.SetParameters(Parameters)
1581             self._autoPublish(anObj, theName, "plane")
1582             return anObj
1583
1584         ## Create a plane, passing through the three given points
1585         #  @param thePnt1 First of three points, defining the plane.
1586         #  @param thePnt2 Second of three points, defining the plane.
1587         #  @param thePnt3 Fird of three points, defining the plane.
1588         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1589         #  @param theName Object name; when specified, this parameter is used
1590         #         for result publication in the study. Otherwise, if automatic
1591         #         publication is switched on, default value is used for result name.
1592         #
1593         #  @return New GEOM.GEOM_Object, containing the created plane.
1594         #
1595         #  @ref tui_creation_plane "Example"
1596         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1597             """
1598             Create a plane, passing through the three given points
1599
1600             Parameters:
1601                 thePnt1 First of three points, defining the plane.
1602                 thePnt2 Second of three points, defining the plane.
1603                 thePnt3 Fird of three points, defining the plane.
1604                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1605                 theName Object name; when specified, this parameter is used
1606                         for result publication in the study. Otherwise, if automatic
1607                         publication is switched on, default value is used for result name.
1608
1609             Returns:
1610                 New GEOM.GEOM_Object, containing the created plane.
1611             """
1612             # Example: see GEOM_TestAll.py
1613             theTrimSize, Parameters = ParseParameters(theTrimSize);
1614             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1615             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1616             anObj.SetParameters(Parameters)
1617             self._autoPublish(anObj, theName, "plane")
1618             return anObj
1619
1620         ## Create a plane, similar to the existing one, but with another size of representing face.
1621         #  @param theFace Referenced plane or LCS(Marker).
1622         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1623         #  @param theName Object name; when specified, this parameter is used
1624         #         for result publication in the study. Otherwise, if automatic
1625         #         publication is switched on, default value is used for result name.
1626         #
1627         #  @return New GEOM.GEOM_Object, containing the created plane.
1628         #
1629         #  @ref tui_creation_plane "Example"
1630         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1631             """
1632             Create a plane, similar to the existing one, but with another size of representing face.
1633
1634             Parameters:
1635                 theFace Referenced plane or LCS(Marker).
1636                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1637                 theName Object name; when specified, this parameter is used
1638                         for result publication in the study. Otherwise, if automatic
1639                         publication is switched on, default value is used for result name.
1640
1641             Returns:
1642                 New GEOM.GEOM_Object, containing the created plane.
1643             """
1644             # Example: see GEOM_TestAll.py
1645             theTrimSize, Parameters = ParseParameters(theTrimSize);
1646             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1647             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1648             anObj.SetParameters(Parameters)
1649             self._autoPublish(anObj, theName, "plane")
1650             return anObj
1651
1652         ## Create a plane, passing through the 2 vectors
1653         #  with center in a start point of the first vector.
1654         #  @param theVec1 Vector, defining center point and plane direction.
1655         #  @param theVec2 Vector, defining the plane normal direction.
1656         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1657         #  @param theName Object name; when specified, this parameter is used
1658         #         for result publication in the study. Otherwise, if automatic
1659         #         publication is switched on, default value is used for result name.
1660         #
1661         #  @return New GEOM.GEOM_Object, containing the created plane.
1662         #
1663         #  @ref tui_creation_plane "Example"
1664         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1665             """
1666             Create a plane, passing through the 2 vectors
1667             with center in a start point of the first vector.
1668
1669             Parameters:
1670                 theVec1 Vector, defining center point and plane direction.
1671                 theVec2 Vector, defining the plane normal direction.
1672                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1673                 theName Object name; when specified, this parameter is used
1674                         for result publication in the study. Otherwise, if automatic
1675                         publication is switched on, default value is used for result name.
1676
1677             Returns: 
1678                 New GEOM.GEOM_Object, containing the created plane.
1679             """
1680             # Example: see GEOM_TestAll.py
1681             theTrimSize, Parameters = ParseParameters(theTrimSize);
1682             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1683             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1684             anObj.SetParameters(Parameters)
1685             self._autoPublish(anObj, theName, "plane")
1686             return anObj
1687
1688         ## Create a plane, based on a Local coordinate system.
1689         #  @param theLCS  coordinate system, defining plane.
1690         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1691         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1692         #  @param theName Object name; when specified, this parameter is used
1693         #         for result publication in the study. Otherwise, if automatic
1694         #         publication is switched on, default value is used for result name.
1695         #
1696         #  @return New GEOM.GEOM_Object, containing the created plane.
1697         #
1698         #  @ref tui_creation_plane "Example"
1699         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1700             """
1701             Create a plane, based on a Local coordinate system.
1702
1703            Parameters: 
1704                 theLCS  coordinate system, defining plane.
1705                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1706                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1707                 theName Object name; when specified, this parameter is used
1708                         for result publication in the study. Otherwise, if automatic
1709                         publication is switched on, default value is used for result name.
1710
1711             Returns: 
1712                 New GEOM.GEOM_Object, containing the created plane.
1713             """
1714             # Example: see GEOM_TestAll.py
1715             theTrimSize, Parameters = ParseParameters(theTrimSize);
1716             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1717             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1718             anObj.SetParameters(Parameters)
1719             self._autoPublish(anObj, theName, "plane")
1720             return anObj
1721
1722         ## Create a local coordinate system.
1723         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1724         #  @param XDX,XDY,XDZ Three components of OX direction
1725         #  @param YDX,YDY,YDZ Three components of OY direction
1726         #  @param theName Object name; when specified, this parameter is used
1727         #         for result publication in the study. Otherwise, if automatic
1728         #         publication is switched on, default value is used for result name.
1729         #
1730         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1731         #
1732         #  @ref swig_MakeMarker "Example"
1733         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1734             """
1735             Create a local coordinate system.
1736
1737             Parameters: 
1738                 OX,OY,OZ Three coordinates of coordinate system origin.
1739                 XDX,XDY,XDZ Three components of OX direction
1740                 YDX,YDY,YDZ Three components of OY direction
1741                 theName Object name; when specified, this parameter is used
1742                         for result publication in the study. Otherwise, if automatic
1743                         publication is switched on, default value is used for result name.
1744
1745             Returns: 
1746                 New GEOM.GEOM_Object, containing the created coordinate system.
1747             """
1748             # Example: see GEOM_TestAll.py
1749             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1750             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1751             RaiseIfFailed("MakeMarker", self.BasicOp)
1752             anObj.SetParameters(Parameters)
1753             self._autoPublish(anObj, theName, "lcs")
1754             return anObj
1755
1756         ## Create a local coordinate system from shape.
1757         #  @param theShape The initial shape to detect the coordinate system.
1758         #  @param theName Object name; when specified, this parameter is used
1759         #         for result publication in the study. Otherwise, if automatic
1760         #         publication is switched on, default value is used for result name.
1761         #
1762         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1763         #
1764         #  @ref tui_creation_lcs "Example"
1765         def MakeMarkerFromShape(self, theShape, theName=None):
1766             """
1767             Create a local coordinate system from shape.
1768
1769             Parameters:
1770                 theShape The initial shape to detect the coordinate system.
1771                 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             Returns: 
1776                 New GEOM.GEOM_Object, containing the created coordinate system.
1777             """
1778             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1779             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1780             self._autoPublish(anObj, theName, "lcs")
1781             return anObj
1782
1783         ## Create a local coordinate system from point and two vectors.
1784         #  @param theOrigin Point of coordinate system origin.
1785         #  @param theXVec Vector of X direction
1786         #  @param theYVec Vector of Y direction
1787         #  @param theName Object name; when specified, this parameter is used
1788         #         for result publication in the study. Otherwise, if automatic
1789         #         publication is switched on, default value is used for result name.
1790         #
1791         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1792         #
1793         #  @ref tui_creation_lcs "Example"
1794         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1795             """
1796             Create a local coordinate system from point and two vectors.
1797
1798             Parameters:
1799                 theOrigin Point of coordinate system origin.
1800                 theXVec Vector of X direction
1801                 theYVec Vector of Y direction
1802                 theName Object name; when specified, this parameter is used
1803                         for result publication in the study. Otherwise, if automatic
1804                         publication is switched on, default value is used for result name.
1805
1806             Returns: 
1807                 New GEOM.GEOM_Object, containing the created coordinate system.
1808
1809             """
1810             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1811             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1812             self._autoPublish(anObj, theName, "lcs")
1813             return anObj
1814
1815         # end of l3_basic_go
1816         ## @}
1817
1818         ## @addtogroup l4_curves
1819         ## @{
1820
1821         ##  Create an arc of circle, passing through three given points.
1822         #  @param thePnt1 Start point of the arc.
1823         #  @param thePnt2 Middle point of the arc.
1824         #  @param thePnt3 End point of the arc.
1825         #  @param theName Object name; when specified, this parameter is used
1826         #         for result publication in the study. Otherwise, if automatic
1827         #         publication is switched on, default value is used for result name.
1828         #
1829         #  @return New GEOM.GEOM_Object, containing the created arc.
1830         #
1831         #  @ref swig_MakeArc "Example"
1832         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1833             """
1834             Create an arc of circle, passing through three given points.
1835
1836             Parameters:
1837                 thePnt1 Start point of the arc.
1838                 thePnt2 Middle point of the arc.
1839                 thePnt3 End point of the arc.
1840                 theName Object name; when specified, this parameter is used
1841                         for result publication in the study. Otherwise, if automatic
1842                         publication is switched on, default value is used for result name.
1843
1844             Returns: 
1845                 New GEOM.GEOM_Object, containing the created arc.
1846             """
1847             # Example: see GEOM_TestAll.py
1848             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1849             RaiseIfFailed("MakeArc", self.CurvesOp)
1850             self._autoPublish(anObj, theName, "arc")
1851             return anObj
1852
1853         ##  Create an arc of circle from a center and 2 points.
1854         #  @param thePnt1 Center of the arc
1855         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1856         #  @param thePnt3 End point of the arc (Gives also a direction)
1857         #  @param theSense Orientation of the arc
1858         #  @param theName Object name; when specified, this parameter is used
1859         #         for result publication in the study. Otherwise, if automatic
1860         #         publication is switched on, default value is used for result name.
1861         #
1862         #  @return New GEOM.GEOM_Object, containing the created arc.
1863         #
1864         #  @ref swig_MakeArc "Example"
1865         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1866             """
1867             Create an arc of circle from a center and 2 points.
1868
1869             Parameters:
1870                 thePnt1 Center of the arc
1871                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1872                 thePnt3 End point of the arc (Gives also a direction)
1873                 theSense Orientation of the arc
1874                 theName Object name; when specified, this parameter is used
1875                         for result publication in the study. Otherwise, if automatic
1876                         publication is switched on, default value is used for result name.
1877
1878             Returns:
1879                 New GEOM.GEOM_Object, containing the created arc.
1880             """
1881             # Example: see GEOM_TestAll.py
1882             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1883             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1884             self._autoPublish(anObj, theName, "arc")
1885             return anObj
1886
1887         ##  Create an arc of ellipse, of center and two points.
1888         #  @param theCenter Center of the arc.
1889         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1890         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1891         #  @param theName Object name; when specified, this parameter is used
1892         #         for result publication in the study. Otherwise, if automatic
1893         #         publication is switched on, default value is used for result name.
1894         #
1895         #  @return New GEOM.GEOM_Object, containing the created arc.
1896         #
1897         #  @ref swig_MakeArc "Example"
1898         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1899             """
1900             Create an arc of ellipse, of center and two points.
1901
1902             Parameters:
1903                 theCenter Center of the arc.
1904                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1905                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1906                 theName Object name; when specified, this parameter is used
1907                         for result publication in the study. Otherwise, if automatic
1908                         publication is switched on, default value is used for result name.
1909
1910             Returns:
1911                 New GEOM.GEOM_Object, containing the created arc.
1912             """
1913             # Example: see GEOM_TestAll.py
1914             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1915             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1916             self._autoPublish(anObj, theName, "arc")
1917             return anObj
1918
1919         ## Create a circle with given center, normal vector and radius.
1920         #  @param thePnt Circle center.
1921         #  @param theVec Vector, normal to the plane of the circle.
1922         #  @param theR Circle radius.
1923         #  @param theName Object name; when specified, this parameter is used
1924         #         for result publication in the study. Otherwise, if automatic
1925         #         publication is switched on, default value is used for result name.
1926         #
1927         #  @return New GEOM.GEOM_Object, containing the created circle.
1928         #
1929         #  @ref tui_creation_circle "Example"
1930         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1931             """
1932             Create a circle with given center, normal vector and radius.
1933
1934             Parameters:
1935                 thePnt Circle center.
1936                 theVec Vector, normal to the plane of the circle.
1937                 theR Circle radius.
1938                 theName Object name; when specified, this parameter is used
1939                         for result publication in the study. Otherwise, if automatic
1940                         publication is switched on, default value is used for result name.
1941
1942             Returns:
1943                 New GEOM.GEOM_Object, containing the created circle.
1944             """
1945             # Example: see GEOM_TestAll.py
1946             theR, Parameters = ParseParameters(theR)
1947             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1948             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1949             anObj.SetParameters(Parameters)
1950             self._autoPublish(anObj, theName, "circle")
1951             return anObj
1952
1953         ## Create a circle with given radius.
1954         #  Center of the circle will be in the origin of global
1955         #  coordinate system and normal vector will be codirected with Z axis
1956         #  @param theR Circle radius.
1957         #  @param theName Object name; when specified, this parameter is used
1958         #         for result publication in the study. Otherwise, if automatic
1959         #         publication is switched on, default value is used for result name.
1960         #
1961         #  @return New GEOM.GEOM_Object, containing the created circle.
1962         def MakeCircleR(self, theR, theName=None):
1963             """
1964             Create a circle with given radius.
1965             Center of the circle will be in the origin of global
1966             coordinate system and normal vector will be codirected with Z axis
1967
1968             Parameters:
1969                 theR Circle radius.
1970                 theName Object name; when specified, this parameter is used
1971                         for result publication in the study. Otherwise, if automatic
1972                         publication is switched on, default value is used for result name.
1973
1974             Returns:
1975                 New GEOM.GEOM_Object, containing the created circle.
1976             """
1977             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1978             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1979             self._autoPublish(anObj, theName, "circle")
1980             return anObj
1981
1982         ## Create a circle, passing through three given points
1983         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1984         #  @param theName Object name; when specified, this parameter is used
1985         #         for result publication in the study. Otherwise, if automatic
1986         #         publication is switched on, default value is used for result name.
1987         #
1988         #  @return New GEOM.GEOM_Object, containing the created circle.
1989         #
1990         #  @ref tui_creation_circle "Example"
1991         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1992             """
1993             Create a circle, passing through three given points
1994
1995             Parameters:
1996                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1997                 theName Object name; when specified, this parameter is used
1998                         for result publication in the study. Otherwise, if automatic
1999                         publication is switched on, default value is used for result name.
2000
2001             Returns:
2002                 New GEOM.GEOM_Object, containing the created circle.
2003             """
2004             # Example: see GEOM_TestAll.py
2005             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2006             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2007             self._autoPublish(anObj, theName, "circle")
2008             return anObj
2009
2010         ## Create a circle, with given point1 as center,
2011         #  passing through the point2 as radius and laying in the plane,
2012         #  defined by all three given points.
2013         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2014         #  @param theName Object name; when specified, this parameter is used
2015         #         for result publication in the study. Otherwise, if automatic
2016         #         publication is switched on, default value is used for result name.
2017         #
2018         #  @return New GEOM.GEOM_Object, containing the created circle.
2019         #
2020         #  @ref swig_MakeCircle "Example"
2021         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2022             """
2023             Create a circle, with given point1 as center,
2024             passing through the point2 as radius and laying in the plane,
2025             defined by all three given points.
2026
2027             Parameters:
2028                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2029                 theName Object name; when specified, this parameter is used
2030                         for result publication in the study. Otherwise, if automatic
2031                         publication is switched on, default value is used for result name.
2032
2033             Returns:
2034                 New GEOM.GEOM_Object, containing the created circle.
2035             """
2036             # Example: see GEOM_example6.py
2037             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2038             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2039             self._autoPublish(anObj, theName, "circle")
2040             return anObj
2041
2042         ## Create an ellipse with given center, normal vector and radiuses.
2043         #  @param thePnt Ellipse center.
2044         #  @param theVec Vector, normal to the plane of the ellipse.
2045         #  @param theRMajor Major ellipse radius.
2046         #  @param theRMinor Minor ellipse radius.
2047         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2048         #  @param theName Object name; when specified, this parameter is used
2049         #         for result publication in the study. Otherwise, if automatic
2050         #         publication is switched on, default value is used for result name.
2051         #
2052         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2053         #
2054         #  @ref tui_creation_ellipse "Example"
2055         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2056             """
2057             Create an ellipse with given center, normal vector and radiuses.
2058
2059             Parameters:
2060                 thePnt Ellipse center.
2061                 theVec Vector, normal to the plane of the ellipse.
2062                 theRMajor Major ellipse radius.
2063                 theRMinor Minor ellipse radius.
2064                 theVecMaj Vector, direction of the ellipse's main axis.
2065                 theName Object name; when specified, this parameter is used
2066                         for result publication in the study. Otherwise, if automatic
2067                         publication is switched on, default value is used for result name.
2068
2069             Returns:    
2070                 New GEOM.GEOM_Object, containing the created ellipse.
2071             """
2072             # Example: see GEOM_TestAll.py
2073             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2074             if theVecMaj is not None:
2075                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2076             else:
2077                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2078                 pass
2079             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2080             anObj.SetParameters(Parameters)
2081             self._autoPublish(anObj, theName, "ellipse")
2082             return anObj
2083
2084         ## Create an ellipse with given radiuses.
2085         #  Center of the ellipse will be in the origin of global
2086         #  coordinate system and normal vector will be codirected with Z axis
2087         #  @param theRMajor Major ellipse radius.
2088         #  @param theRMinor Minor ellipse radius.
2089         #  @param theName Object name; when specified, this parameter is used
2090         #         for result publication in the study. Otherwise, if automatic
2091         #         publication is switched on, default value is used for result name.
2092         #
2093         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2094         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2095             """
2096             Create an ellipse with given radiuses.
2097             Center of the ellipse will be in the origin of global
2098             coordinate system and normal vector will be codirected with Z axis
2099
2100             Parameters:
2101                 theRMajor Major ellipse radius.
2102                 theRMinor Minor ellipse radius.
2103                 theName Object name; when specified, this parameter is used
2104                         for result publication in the study. Otherwise, if automatic
2105                         publication is switched on, default value is used for result name.
2106
2107             Returns:
2108             New GEOM.GEOM_Object, containing the created ellipse.
2109             """
2110             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2111             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2112             self._autoPublish(anObj, theName, "ellipse")
2113             return anObj
2114
2115         ## Create a polyline on the set of points.
2116         #  @param thePoints Sequence of points for the polyline.
2117         #  @param theIsClosed If True, build a closed wire.
2118         #  @param theName Object name; when specified, this parameter is used
2119         #         for result publication in the study. Otherwise, if automatic
2120         #         publication is switched on, default value is used for result name.
2121         #
2122         #  @return New GEOM.GEOM_Object, containing the created polyline.
2123         #
2124         #  @ref tui_creation_curve "Example"
2125         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2126             """
2127             Create a polyline on the set of points.
2128
2129             Parameters:
2130                 thePoints Sequence of points for the polyline.
2131                 theIsClosed If True, build a closed wire.
2132                 theName Object name; when specified, this parameter is used
2133                         for result publication in the study. Otherwise, if automatic
2134                         publication is switched on, default value is used for result name.
2135
2136             Returns:
2137                 New GEOM.GEOM_Object, containing the created polyline.
2138             """
2139             # Example: see GEOM_TestAll.py
2140             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2141             RaiseIfFailed("MakePolyline", self.CurvesOp)
2142             self._autoPublish(anObj, theName, "polyline")
2143             return anObj
2144
2145         ## Create bezier curve on the set of points.
2146         #  @param thePoints Sequence of points for the bezier curve.
2147         #  @param theIsClosed If True, build a closed curve.
2148         #  @param theName Object name; when specified, this parameter is used
2149         #         for result publication in the study. Otherwise, if automatic
2150         #         publication is switched on, default value is used for result name.
2151         #
2152         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2153         #
2154         #  @ref tui_creation_curve "Example"
2155         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2156             """
2157             Create bezier curve on the set of points.
2158
2159             Parameters:
2160                 thePoints Sequence of points for the bezier curve.
2161                 theIsClosed If True, build a closed curve.
2162                 theName Object name; when specified, this parameter is used
2163                         for result publication in the study. Otherwise, if automatic
2164                         publication is switched on, default value is used for result name.
2165
2166             Returns:
2167                 New GEOM.GEOM_Object, containing the created bezier curve.
2168             """
2169             # Example: see GEOM_TestAll.py
2170             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2171             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2172             self._autoPublish(anObj, theName, "bezier")
2173             return anObj
2174
2175         ## Create B-Spline curve on the set of points.
2176         #  @param thePoints Sequence of points for the B-Spline curve.
2177         #  @param theIsClosed If True, build a closed curve.
2178         #  @param theDoReordering If TRUE, the algo does not follow the order of
2179         #                         \a thePoints but searches for the closest vertex.
2180         #  @param theName Object name; when specified, this parameter is used
2181         #         for result publication in the study. Otherwise, if automatic
2182         #         publication is switched on, default value is used for result name.
2183         #
2184         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2185         #
2186         #  @ref tui_creation_curve "Example"
2187         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2188             """
2189             Create B-Spline curve on the set of points.
2190
2191             Parameters:
2192                 thePoints Sequence of points for the B-Spline curve.
2193                 theIsClosed If True, build a closed curve.
2194                 theDoReordering If True, the algo does not follow the order of
2195                                 thePoints but searches for the closest vertex.
2196                 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             Returns:                     
2201                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2202             """
2203             # Example: see GEOM_TestAll.py
2204             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2205             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2206             self._autoPublish(anObj, theName, "bspline")
2207             return anObj
2208
2209         ## Create B-Spline curve on the set of points.
2210         #  @param thePoints Sequence of points for the B-Spline curve.
2211         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2212         #  @param theLastVec Vector object, defining the curve direction at its last point.
2213         #  @param theName Object name; when specified, this parameter is used
2214         #         for result publication in the study. Otherwise, if automatic
2215         #         publication is switched on, default value is used for result name.
2216         #
2217         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2218         #
2219         #  @ref tui_creation_curve "Example"
2220         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2221             """
2222             Create B-Spline curve on the set of points.
2223
2224             Parameters:
2225                 thePoints Sequence of points for the B-Spline curve.
2226                 theFirstVec Vector object, defining the curve direction at its first point.
2227                 theLastVec Vector object, defining the curve direction at its last point.
2228                 theName Object name; when specified, this parameter is used
2229                         for result publication in the study. Otherwise, if automatic
2230                         publication is switched on, default value is used for result name.
2231
2232             Returns:                     
2233                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2234             """
2235             # Example: see GEOM_TestAll.py
2236             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2237             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2238             self._autoPublish(anObj, theName, "bspline")
2239             return anObj
2240
2241         ## Creates a curve using the parametric definition of the basic points.
2242         #  @param thexExpr parametric equation of the coordinates X.
2243         #  @param theyExpr parametric equation of the coordinates Y.
2244         #  @param thezExpr parametric equation of the coordinates Z.
2245         #  @param theParamMin the minimal value of the parameter.
2246         #  @param theParamMax the maximum value of the parameter.
2247         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2248         #  @param theCurveType the type of the curve.
2249         #  @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.
2250         #  @param theName Object name; when specified, this parameter is used
2251         #         for result publication in the study. Otherwise, if automatic
2252         #         publication is switched on, default value is used for result name.
2253         #
2254         #  @return New GEOM.GEOM_Object, containing the created curve.
2255         #
2256         #  @ref tui_creation_curve "Example"
2257         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2258                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2259             """
2260             Creates a curve using the parametric definition of the basic points.
2261
2262             Parameters:
2263                 thexExpr parametric equation of the coordinates X.
2264                 theyExpr parametric equation of the coordinates Y.
2265                 thezExpr parametric equation of the coordinates Z.
2266                 theParamMin the minimal value of the parameter.
2267                 theParamMax the maximum value of the parameter.
2268                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2269                 theCurveType the type of the curve.
2270                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2271                              method is used which can lead to a bug.
2272                 theName Object name; when specified, this parameter is used
2273                         for result publication in the study. Otherwise, if automatic
2274                         publication is switched on, default value is used for result name.
2275
2276             Returns:
2277                 New GEOM.GEOM_Object, containing the created curve.
2278             """
2279             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2280             if theNewMethod:
2281               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2282             else:
2283               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2284             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2285             anObj.SetParameters(Parameters)
2286             self._autoPublish(anObj, theName, "curve")
2287             return anObj
2288
2289         # end of l4_curves
2290         ## @}
2291
2292         ## @addtogroup l3_sketcher
2293         ## @{
2294
2295         ## Create a sketcher (wire or face), following the textual description,
2296         #  passed through <VAR>theCommand</VAR> argument. \n
2297         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2298         #  Format of the description string have to be the following:
2299         #
2300         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2301         #
2302         #  Where:
2303         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2304         #  - CMD is one of
2305         #     - "R angle" : Set the direction by angle
2306         #     - "D dx dy" : Set the direction by DX & DY
2307         #     .
2308         #       \n
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         #       \n
2316         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2317         #     - "AA x y": Create arc by point at X & Y
2318         #     - "A dx dy" : Create arc by point with DX & DY
2319         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2320         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2321         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2322         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2323         #     .
2324         #       \n
2325         #     - "WW" : Close Wire (to finish)
2326         #     - "WF" : Close Wire and build face (to finish)
2327         #     .
2328         #        \n
2329         #  - Flag1 (= reverse) is 0 or 2 ...
2330         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2331         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2332         #     .
2333         #        \n
2334         #  - Flag2 (= control tolerance) is 0 or 1 ...
2335         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2336         #     - if 1 the wire is built only if the end point is on the arc
2337         #       with a tolerance of 10^-7 on the distance else the creation fails
2338         #
2339         #  @param theCommand String, defining the sketcher in local
2340         #                    coordinates of the working plane.
2341         #  @param theWorkingPlane Nine double values, defining origin,
2342         #                         OZ and OX directions of the working plane.
2343         #  @param theName Object name; when specified, this parameter is used
2344         #         for result publication in the study. Otherwise, if automatic
2345         #         publication is switched on, default value is used for result name.
2346         #
2347         #  @return New GEOM.GEOM_Object, containing the created wire.
2348         #
2349         #  @ref tui_sketcher_page "Example"
2350         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2351             """
2352             Create a sketcher (wire or face), following the textual description, passed
2353             through theCommand argument.
2354             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2355             Format of the description string have to be the following:
2356                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2357             Where:
2358             - x1, y1 are coordinates of the first sketcher point (zero by default),
2359             - CMD is one of
2360                - "R angle" : Set the direction by angle
2361                - "D dx dy" : Set the direction by DX & DY
2362                
2363                - "TT x y" : Create segment by point at X & Y
2364                - "T dx dy" : Create segment by point with DX & DY
2365                - "L length" : Create segment by direction & Length
2366                - "IX x" : Create segment by direction & Intersect. X
2367                - "IY y" : Create segment by direction & Intersect. Y
2368
2369                - "C radius length" : Create arc by direction, radius and length(in degree)
2370                - "AA x y": Create arc by point at X & Y
2371                - "A dx dy" : Create arc by point with DX & DY
2372                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2373                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2374                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2375                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2376
2377                - "WW" : Close Wire (to finish)
2378                - "WF" : Close Wire and build face (to finish)
2379             
2380             - Flag1 (= reverse) is 0 or 2 ...
2381                - if 0 the drawn arc is the one of lower angle (< Pi)
2382                - if 2 the drawn arc ius the one of greater angle (> Pi)
2383         
2384             - Flag2 (= control tolerance) is 0 or 1 ...
2385                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2386                - if 1 the wire is built only if the end point is on the arc
2387                  with a tolerance of 10^-7 on the distance else the creation fails
2388
2389             Parameters:
2390                 theCommand String, defining the sketcher in local
2391                            coordinates of the working plane.
2392                 theWorkingPlane Nine double values, defining origin,
2393                                 OZ and OX directions of the working plane.
2394                 theName Object name; when specified, this parameter is used
2395                         for result publication in the study. Otherwise, if automatic
2396                         publication is switched on, default value is used for result name.
2397
2398             Returns:
2399                 New GEOM.GEOM_Object, containing the created wire.
2400             """
2401             # Example: see GEOM_TestAll.py
2402             theCommand,Parameters = ParseSketcherCommand(theCommand)
2403             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2404             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2405             anObj.SetParameters(Parameters)
2406             self._autoPublish(anObj, theName, "wire")
2407             return anObj
2408
2409         ## Create a sketcher (wire or face), following the textual description,
2410         #  passed through <VAR>theCommand</VAR> argument. \n
2411         #  For format of the description string see MakeSketcher() method.\n
2412         #  @param theCommand String, defining the sketcher in local
2413         #                    coordinates of the working plane.
2414         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2415         #  @param theName Object name; when specified, this parameter is used
2416         #         for result publication in the study. Otherwise, if automatic
2417         #         publication is switched on, default value is used for result name.
2418         #
2419         #  @return New GEOM.GEOM_Object, containing the created wire.
2420         #
2421         #  @ref tui_sketcher_page "Example"
2422         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2423             """
2424             Create a sketcher (wire or face), following the textual description,
2425             passed through theCommand argument.
2426             For format of the description string see geompy.MakeSketcher() method.
2427
2428             Parameters:
2429                 theCommand String, defining the sketcher in local
2430                            coordinates of the working plane.
2431                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2432                 theName Object name; when specified, this parameter is used
2433                         for result publication in the study. Otherwise, if automatic
2434                         publication is switched on, default value is used for result name.
2435
2436             Returns:
2437                 New GEOM.GEOM_Object, containing the created wire.
2438             """
2439             theCommand,Parameters = ParseSketcherCommand(theCommand)
2440             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2441             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2442             anObj.SetParameters(Parameters)
2443             self._autoPublish(anObj, theName, "wire")
2444             return anObj
2445
2446         ## Obtain a 2D sketcher interface
2447         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2448         def Sketcher2D (self):
2449             """
2450             Obtain a 2D sketcher interface.
2451
2452             Example of usage:
2453                sk = geompy.Sketcher2D()
2454                sk.addPoint(20, 20)
2455                sk.addSegmentRelative(15, 70)
2456                sk.addSegmentPerpY(50)
2457                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2458                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2459                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2460                sk.close()
2461                Sketch_1 = sk.wire(geomObj_1)
2462             """
2463             sk = Sketcher2D (self)
2464             return sk
2465         
2466         ## Create a sketcher wire, following the numerical description,
2467         #  passed through <VAR>theCoordinates</VAR> argument. \n
2468         #  @param theCoordinates double values, defining points to create a wire,
2469         #                                                      passing from it.
2470         #  @param theName Object name; when specified, this parameter is used
2471         #         for result publication in the study. Otherwise, if automatic
2472         #         publication is switched on, default value is used for result name.
2473         #
2474         #  @return New GEOM.GEOM_Object, containing the created wire.
2475         #
2476         #  @ref tui_3dsketcher_page "Example"
2477         def Make3DSketcher(self, theCoordinates, theName=None):
2478             """
2479             Create a sketcher wire, following the numerical description,
2480             passed through theCoordinates argument.
2481
2482             Parameters:
2483                 theCoordinates double values, defining points to create a wire,
2484                                passing from it.
2485                 theName Object name; when specified, this parameter is used
2486                         for result publication in the study. Otherwise, if automatic
2487                         publication is switched on, default value is used for result name.
2488
2489             Returns:
2490                 New GEOM_Object, containing the created wire.
2491             """
2492             theCoordinates,Parameters = ParseParameters(theCoordinates)
2493             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2494             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2495             anObj.SetParameters(Parameters)
2496             self._autoPublish(anObj, theName, "wire")
2497             return anObj
2498
2499         ## Obtain a 3D sketcher interface
2500         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2501         #
2502         #  @ref tui_3dsketcher_page "Example"
2503         def Sketcher3D (self):
2504             """
2505             Obtain a 3D sketcher interface.
2506
2507             Example of usage:
2508                 sk = geompy.Sketcher3D()
2509                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2510                 sk.addPointsRelative(0, 0, 130)
2511                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2512                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2513                 sk.close()
2514                 a3D_Sketcher_1 = sk.wire()
2515             """
2516             sk = Sketcher3D (self)
2517             return sk
2518
2519         # end of l3_sketcher
2520         ## @}
2521
2522         ## @addtogroup l3_3d_primitives
2523         ## @{
2524
2525         ## Create a box by coordinates of two opposite vertices.
2526         #
2527         #  @param x1,y1,z1 double values, defining first point it.
2528         #  @param x2,y2,z2 double values, defining first point it.
2529         #  @param theName Object name; when specified, this parameter is used
2530         #         for result publication in the study. Otherwise, if automatic
2531         #         publication is switched on, default value is used for result name.
2532         #
2533         #  @return New GEOM.GEOM_Object, containing the created box.
2534         #
2535         #  @ref tui_creation_box "Example"
2536         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2537             """
2538             Create a box by coordinates of two opposite vertices.
2539             
2540             Parameters:
2541                 x1,y1,z1 double values, defining first point.
2542                 x2,y2,z2 double values, defining second point.
2543                 theName Object name; when specified, this parameter is used
2544                         for result publication in the study. Otherwise, if automatic
2545                         publication is switched on, default value is used for result name.
2546                 
2547             Returns:
2548                 New GEOM.GEOM_Object, containing the created box.
2549             """
2550             # Example: see GEOM_TestAll.py
2551             pnt1 = self.MakeVertex(x1,y1,z1)
2552             pnt2 = self.MakeVertex(x2,y2,z2)
2553             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2554             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2555
2556         ## Create a box with specified dimensions along the coordinate axes
2557         #  and with edges, parallel to the coordinate axes.
2558         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2559         #  @param theDX Length of Box edges, parallel to OX axis.
2560         #  @param theDY Length of Box edges, parallel to OY axis.
2561         #  @param theDZ Length of Box edges, parallel to OZ axis.
2562         #  @param theName Object name; when specified, this parameter is used
2563         #         for result publication in the study. Otherwise, if automatic
2564         #         publication is switched on, default value is used for result name.
2565         #
2566         #  @return New GEOM.GEOM_Object, containing the created box.
2567         #
2568         #  @ref tui_creation_box "Example"
2569         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2570             """
2571             Create a box with specified dimensions along the coordinate axes
2572             and with edges, parallel to the coordinate axes.
2573             Center of the box will be at point (DX/2, DY/2, DZ/2).
2574
2575             Parameters:
2576                 theDX Length of Box edges, parallel to OX axis.
2577                 theDY Length of Box edges, parallel to OY axis.
2578                 theDZ Length of Box edges, parallel to OZ axis.
2579                 theName Object name; when specified, this parameter is used
2580                         for result publication in the study. Otherwise, if automatic
2581                         publication is switched on, default value is used for result name.
2582
2583             Returns:   
2584                 New GEOM.GEOM_Object, containing the created box.
2585             """
2586             # Example: see GEOM_TestAll.py
2587             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2588             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2589             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2590             anObj.SetParameters(Parameters)
2591             self._autoPublish(anObj, theName, "box")
2592             return anObj
2593
2594         ## Create a box with two specified opposite vertices,
2595         #  and with edges, parallel to the coordinate axes
2596         #  @param thePnt1 First of two opposite vertices.
2597         #  @param thePnt2 Second of two opposite vertices.
2598         #  @param theName Object name; when specified, this parameter is used
2599         #         for result publication in the study. Otherwise, if automatic
2600         #         publication is switched on, default value is used for result name.
2601         #
2602         #  @return New GEOM.GEOM_Object, containing the created box.
2603         #
2604         #  @ref tui_creation_box "Example"
2605         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2606             """
2607             Create a box with two specified opposite vertices,
2608             and with edges, parallel to the coordinate axes
2609
2610             Parameters:
2611                 thePnt1 First of two opposite vertices.
2612                 thePnt2 Second of two opposite vertices.
2613                 theName Object name; when specified, this parameter is used
2614                         for result publication in the study. Otherwise, if automatic
2615                         publication is switched on, default value is used for result name.
2616
2617             Returns:
2618                 New GEOM.GEOM_Object, containing the created box.
2619             """
2620             # Example: see GEOM_TestAll.py
2621             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2622             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2623             self._autoPublish(anObj, theName, "box")
2624             return anObj
2625
2626         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2627         #  @param theH height of Face.
2628         #  @param theW width of Face.
2629         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2630         #  @param theName Object name; when specified, this parameter is used
2631         #         for result publication in the study. Otherwise, if automatic
2632         #         publication is switched on, default value is used for result name.
2633         #
2634         #  @return New GEOM.GEOM_Object, containing the created face.
2635         #
2636         #  @ref tui_creation_face "Example"
2637         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2638             """
2639             Create a face with specified dimensions with edges parallel to coordinate axes.
2640
2641             Parameters:
2642                 theH height of Face.
2643                 theW width of Face.
2644                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2645                 theName Object name; when specified, this parameter is used
2646                         for result publication in the study. Otherwise, if automatic
2647                         publication is switched on, default value is used for result name.
2648
2649             Returns:
2650                 New GEOM.GEOM_Object, containing the created face.
2651             """
2652             # Example: see GEOM_TestAll.py
2653             theH,theW,Parameters = ParseParameters(theH, theW)
2654             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2655             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2656             anObj.SetParameters(Parameters)
2657             self._autoPublish(anObj, theName, "rectangle")
2658             return anObj
2659
2660         ## Create a face from another plane and two sizes,
2661         #  vertical size and horisontal size.
2662         #  @param theObj   Normale vector to the creating face or
2663         #  the face object.
2664         #  @param theH     Height (vertical size).
2665         #  @param theW     Width (horisontal size).
2666         #  @param theName Object name; when specified, this parameter is used
2667         #         for result publication in the study. Otherwise, if automatic
2668         #         publication is switched on, default value is used for result name.
2669         #
2670         #  @return New GEOM.GEOM_Object, containing the created face.
2671         #
2672         #  @ref tui_creation_face "Example"
2673         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2674             """
2675             Create a face from another plane and two sizes,
2676             vertical size and horisontal size.
2677
2678             Parameters:
2679                 theObj   Normale vector to the creating face or
2680                          the face object.
2681                 theH     Height (vertical size).
2682                 theW     Width (horisontal size).
2683                 theName Object name; when specified, this parameter is used
2684                         for result publication in the study. Otherwise, if automatic
2685                         publication is switched on, default value is used for result name.
2686
2687             Returns:
2688                 New GEOM_Object, containing the created face.
2689             """
2690             # Example: see GEOM_TestAll.py
2691             theH,theW,Parameters = ParseParameters(theH, theW)
2692             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2693             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2694             anObj.SetParameters(Parameters)
2695             self._autoPublish(anObj, theName, "rectangle")
2696             return anObj
2697
2698         ## Create a disk with given center, normal vector and radius.
2699         #  @param thePnt Disk center.
2700         #  @param theVec Vector, normal to the plane of the disk.
2701         #  @param theR Disk radius.
2702         #  @param theName Object name; when specified, this parameter is used
2703         #         for result publication in the study. Otherwise, if automatic
2704         #         publication is switched on, default value is used for result name.
2705         #
2706         #  @return New GEOM.GEOM_Object, containing the created disk.
2707         #
2708         #  @ref tui_creation_disk "Example"
2709         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2710             """
2711             Create a disk with given center, normal vector and radius.
2712
2713             Parameters:
2714                 thePnt Disk center.
2715                 theVec Vector, normal to the plane of the disk.
2716                 theR Disk radius.
2717                 theName Object name; when specified, this parameter is used
2718                         for result publication in the study. Otherwise, if automatic
2719                         publication is switched on, default value is used for result name.
2720
2721             Returns:    
2722                 New GEOM.GEOM_Object, containing the created disk.
2723             """
2724             # Example: see GEOM_TestAll.py
2725             theR,Parameters = ParseParameters(theR)
2726             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2727             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2728             anObj.SetParameters(Parameters)
2729             self._autoPublish(anObj, theName, "disk")
2730             return anObj
2731
2732         ## Create a disk, passing through three given points
2733         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2734         #  @param theName Object name; when specified, this parameter is used
2735         #         for result publication in the study. Otherwise, if automatic
2736         #         publication is switched on, default value is used for result name.
2737         #
2738         #  @return New GEOM.GEOM_Object, containing the created disk.
2739         #
2740         #  @ref tui_creation_disk "Example"
2741         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2742             """
2743             Create a disk, passing through three given points
2744
2745             Parameters:
2746                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2747                 theName Object name; when specified, this parameter is used
2748                         for result publication in the study. Otherwise, if automatic
2749                         publication is switched on, default value is used for result name.
2750
2751             Returns:    
2752                 New GEOM.GEOM_Object, containing the created disk.
2753             """
2754             # Example: see GEOM_TestAll.py
2755             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2756             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2757             self._autoPublish(anObj, theName, "disk")
2758             return anObj
2759
2760         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2761         #  @param theR Radius of Face.
2762         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2763         #  @param theName Object name; when specified, this parameter is used
2764         #         for result publication in the study. Otherwise, if automatic
2765         #         publication is switched on, default value is used for result name.
2766         #
2767         #  @return New GEOM.GEOM_Object, containing the created disk.
2768         #
2769         #  @ref tui_creation_face "Example"
2770         def MakeDiskR(self, theR, theOrientation, theName=None):
2771             """
2772             Create a disk with specified dimensions along OX-OY coordinate axes.
2773
2774             Parameters:
2775                 theR Radius of Face.
2776                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2777                 theName Object name; when specified, this parameter is used
2778                         for result publication in the study. Otherwise, if automatic
2779                         publication is switched on, default value is used for result name.
2780
2781             Returns: 
2782                 New GEOM.GEOM_Object, containing the created disk.
2783
2784             Example of usage:
2785                 Disk3 = geompy.MakeDiskR(100., 1)
2786             """
2787             # Example: see GEOM_TestAll.py
2788             theR,Parameters = ParseParameters(theR)
2789             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2790             RaiseIfFailed("MakeDiskR", self.PrimOp)
2791             anObj.SetParameters(Parameters)
2792             self._autoPublish(anObj, theName, "disk")
2793             return anObj
2794
2795         ## Create a cylinder with given base point, axis, radius and height.
2796         #  @param thePnt Central point of cylinder base.
2797         #  @param theAxis Cylinder axis.
2798         #  @param theR Cylinder radius.
2799         #  @param theH Cylinder height.
2800         #  @param theName Object name; when specified, this parameter is used
2801         #         for result publication in the study. Otherwise, if automatic
2802         #         publication is switched on, default value is used for result name.
2803         #
2804         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2805         #
2806         #  @ref tui_creation_cylinder "Example"
2807         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2808             """
2809             Create a cylinder with given base point, axis, radius and height.
2810
2811             Parameters:
2812                 thePnt Central point of cylinder base.
2813                 theAxis Cylinder axis.
2814                 theR Cylinder radius.
2815                 theH Cylinder height.
2816                 theName Object name; when specified, this parameter is used
2817                         for result publication in the study. Otherwise, if automatic
2818                         publication is switched on, default value is used for result name.
2819
2820             Returns: 
2821                 New GEOM.GEOM_Object, containing the created cylinder.
2822             """
2823             # Example: see GEOM_TestAll.py
2824             theR,theH,Parameters = ParseParameters(theR, theH)
2825             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2826             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2827             anObj.SetParameters(Parameters)
2828             self._autoPublish(anObj, theName, "cylinder")
2829             return anObj
2830
2831         ## Create a cylinder with given radius and height at
2832         #  the origin of coordinate system. Axis of the cylinder
2833         #  will be collinear to the OZ axis of the coordinate system.
2834         #  @param theR Cylinder radius.
2835         #  @param theH Cylinder height.
2836         #  @param theName Object name; when specified, this parameter is used
2837         #         for result publication in the study. Otherwise, if automatic
2838         #         publication is switched on, default value is used for result name.
2839         #
2840         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2841         #
2842         #  @ref tui_creation_cylinder "Example"
2843         def MakeCylinderRH(self, theR, theH, theName=None):
2844             """
2845             Create a cylinder with given radius and height at
2846             the origin of coordinate system. Axis of the cylinder
2847             will be collinear to the OZ axis of the coordinate system.
2848
2849             Parameters:
2850                 theR Cylinder radius.
2851                 theH Cylinder height.
2852                 theName Object name; when specified, this parameter is used
2853                         for result publication in the study. Otherwise, if automatic
2854                         publication is switched on, default value is used for result name.
2855
2856             Returns:    
2857                 New GEOM.GEOM_Object, containing the created cylinder.
2858             """
2859             # Example: see GEOM_TestAll.py
2860             theR,theH,Parameters = ParseParameters(theR, theH)
2861             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2862             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2863             anObj.SetParameters(Parameters)
2864             self._autoPublish(anObj, theName, "cylinder")
2865             return anObj
2866
2867         ## Create a sphere with given center and radius.
2868         #  @param thePnt Sphere center.
2869         #  @param theR Sphere radius.
2870         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created sphere.
2875         #
2876         #  @ref tui_creation_sphere "Example"
2877         def MakeSpherePntR(self, thePnt, theR, theName=None):
2878             """
2879             Create a sphere with given center and radius.
2880
2881             Parameters:
2882                 thePnt Sphere center.
2883                 theR Sphere radius.
2884                 theName Object name; when specified, this parameter is used
2885                         for result publication in the study. Otherwise, if automatic
2886                         publication is switched on, default value is used for result name.
2887
2888             Returns:    
2889                 New GEOM.GEOM_Object, containing the created sphere.            
2890             """
2891             # Example: see GEOM_TestAll.py
2892             theR,Parameters = ParseParameters(theR)
2893             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2894             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2895             anObj.SetParameters(Parameters)
2896             self._autoPublish(anObj, theName, "sphere")
2897             return anObj
2898
2899         ## Create a sphere with given center and radius.
2900         #  @param x,y,z Coordinates of sphere center.
2901         #  @param theR Sphere radius.
2902         #  @param theName Object name; when specified, this parameter is used
2903         #         for result publication in the study. Otherwise, if automatic
2904         #         publication is switched on, default value is used for result name.
2905         #
2906         #  @return New GEOM.GEOM_Object, containing the created sphere.
2907         #
2908         #  @ref tui_creation_sphere "Example"
2909         def MakeSphere(self, x, y, z, theR, theName=None):
2910             """
2911             Create a sphere with given center and radius.
2912
2913             Parameters: 
2914                 x,y,z Coordinates of sphere center.
2915                 theR Sphere radius.
2916                 theName Object name; when specified, this parameter is used
2917                         for result publication in the study. Otherwise, if automatic
2918                         publication is switched on, default value is used for result name.
2919
2920             Returns:
2921                 New GEOM.GEOM_Object, containing the created sphere.
2922             """
2923             # Example: see GEOM_TestAll.py
2924             point = self.MakeVertex(x, y, z)
2925             # note: auto-publishing is done in self.MakeSpherePntR()
2926             anObj = self.MakeSpherePntR(point, theR, theName)
2927             return anObj
2928
2929         ## Create a sphere with given radius at the origin of coordinate system.
2930         #  @param theR Sphere radius.
2931         #  @param theName Object name; when specified, this parameter is used
2932         #         for result publication in the study. Otherwise, if automatic
2933         #         publication is switched on, default value is used for result name.
2934         #
2935         #  @return New GEOM.GEOM_Object, containing the created sphere.
2936         #
2937         #  @ref tui_creation_sphere "Example"
2938         def MakeSphereR(self, theR, theName=None):
2939             """
2940             Create a sphere with given radius at the origin of coordinate system.
2941
2942             Parameters: 
2943                 theR Sphere radius.
2944                 theName Object name; when specified, this parameter is used
2945                         for result publication in the study. Otherwise, if automatic
2946                         publication is switched on, default value is used for result name.
2947
2948             Returns:
2949                 New GEOM.GEOM_Object, containing the created sphere.            
2950             """
2951             # Example: see GEOM_TestAll.py
2952             theR,Parameters = ParseParameters(theR)
2953             anObj = self.PrimOp.MakeSphereR(theR)
2954             RaiseIfFailed("MakeSphereR", self.PrimOp)
2955             anObj.SetParameters(Parameters)
2956             self._autoPublish(anObj, theName, "sphere")
2957             return anObj
2958
2959         ## Create a cone with given base point, axis, height and radiuses.
2960         #  @param thePnt Central point of the first cone base.
2961         #  @param theAxis Cone axis.
2962         #  @param theR1 Radius of the first cone base.
2963         #  @param theR2 Radius of the second cone base.
2964         #    \note If both radiuses are non-zero, the cone will be truncated.
2965         #    \note If the radiuses are equal, a cylinder will be created instead.
2966         #  @param theH Cone height.
2967         #  @param theName Object name; when specified, this parameter is used
2968         #         for result publication in the study. Otherwise, if automatic
2969         #         publication is switched on, default value is used for result name.
2970         #
2971         #  @return New GEOM.GEOM_Object, containing the created cone.
2972         #
2973         #  @ref tui_creation_cone "Example"
2974         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2975             """
2976             Create a cone with given base point, axis, height and radiuses.
2977
2978             Parameters: 
2979                 thePnt Central point of the first cone base.
2980                 theAxis Cone axis.
2981                 theR1 Radius of the first cone base.
2982                 theR2 Radius of the second cone base.
2983                 theH Cone height.
2984                 theName Object name; when specified, this parameter is used
2985                         for result publication in the study. Otherwise, if automatic
2986                         publication is switched on, default value is used for result name.
2987
2988             Note:
2989                 If both radiuses are non-zero, the cone will be truncated.
2990                 If the radiuses are equal, a cylinder will be created instead.
2991
2992             Returns:
2993                 New GEOM.GEOM_Object, containing the created cone.
2994             """
2995             # Example: see GEOM_TestAll.py
2996             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2997             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2998             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2999             anObj.SetParameters(Parameters)
3000             self._autoPublish(anObj, theName, "cone")
3001             return anObj
3002
3003         ## Create a cone with given height and radiuses at
3004         #  the origin of coordinate system. Axis of the cone will
3005         #  be collinear to the OZ axis of the coordinate system.
3006         #  @param theR1 Radius of the first cone base.
3007         #  @param theR2 Radius of the second cone base.
3008         #    \note If both radiuses are non-zero, the cone will be truncated.
3009         #    \note If the radiuses are equal, a cylinder will be created instead.
3010         #  @param theH Cone height.
3011         #  @param theName Object name; when specified, this parameter is used
3012         #         for result publication in the study. Otherwise, if automatic
3013         #         publication is switched on, default value is used for result name.
3014         #
3015         #  @return New GEOM.GEOM_Object, containing the created cone.
3016         #
3017         #  @ref tui_creation_cone "Example"
3018         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3019             """
3020             Create a cone with given height and radiuses at
3021             the origin of coordinate system. Axis of the cone will
3022             be collinear to the OZ axis of the coordinate system.
3023
3024             Parameters: 
3025                 theR1 Radius of the first cone base.
3026                 theR2 Radius of the second cone base.
3027                 theH Cone height.
3028                 theName Object name; when specified, this parameter is used
3029                         for result publication in the study. Otherwise, if automatic
3030                         publication is switched on, default value is used for result name.
3031
3032             Note:
3033                 If both radiuses are non-zero, the cone will be truncated.
3034                 If the radiuses are equal, a cylinder will be created instead.
3035
3036             Returns:
3037                 New GEOM.GEOM_Object, containing the created cone.
3038             """
3039             # Example: see GEOM_TestAll.py
3040             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3041             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3042             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3043             anObj.SetParameters(Parameters)
3044             self._autoPublish(anObj, theName, "cone")
3045             return anObj
3046
3047         ## Create a torus with given center, normal vector and radiuses.
3048         #  @param thePnt Torus central point.
3049         #  @param theVec Torus axis of symmetry.
3050         #  @param theRMajor Torus major radius.
3051         #  @param theRMinor Torus minor radius.
3052         #  @param theName Object name; when specified, this parameter is used
3053         #         for result publication in the study. Otherwise, if automatic
3054         #         publication is switched on, default value is used for result name.
3055         #
3056         #  @return New GEOM.GEOM_Object, containing the created torus.
3057         #
3058         #  @ref tui_creation_torus "Example"
3059         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3060             """
3061             Create a torus with given center, normal vector and radiuses.
3062
3063             Parameters: 
3064                 thePnt Torus central point.
3065                 theVec Torus axis of symmetry.
3066                 theRMajor Torus major radius.
3067                 theRMinor Torus minor radius.
3068                 theName Object name; when specified, this parameter is used
3069                         for result publication in the study. Otherwise, if automatic
3070                         publication is switched on, default value is used for result name.
3071
3072            Returns:
3073                 New GEOM.GEOM_Object, containing the created torus.
3074             """
3075             # Example: see GEOM_TestAll.py
3076             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3077             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3078             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3079             anObj.SetParameters(Parameters)
3080             self._autoPublish(anObj, theName, "torus")
3081             return anObj
3082
3083         ## Create a torus with given radiuses at the origin of coordinate system.
3084         #  @param theRMajor Torus major radius.
3085         #  @param theRMinor Torus minor radius.
3086         #  @param theName Object name; when specified, this parameter is used
3087         #         for result publication in the study. Otherwise, if automatic
3088         #         publication is switched on, default value is used for result name.
3089         #
3090         #  @return New GEOM.GEOM_Object, containing the created torus.
3091         #
3092         #  @ref tui_creation_torus "Example"
3093         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3094             """
3095            Create a torus with given radiuses at the origin of coordinate system.
3096
3097            Parameters: 
3098                 theRMajor Torus major radius.
3099                 theRMinor Torus minor radius.
3100                 theName Object name; when specified, this parameter is used
3101                         for result publication in the study. Otherwise, if automatic
3102                         publication is switched on, default value is used for result name.
3103
3104            Returns:
3105                 New GEOM.GEOM_Object, containing the created torus.            
3106             """
3107             # Example: see GEOM_TestAll.py
3108             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3109             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3110             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3111             anObj.SetParameters(Parameters)
3112             self._autoPublish(anObj, theName, "torus")
3113             return anObj
3114
3115         # end of l3_3d_primitives
3116         ## @}
3117
3118         ## @addtogroup l3_complex
3119         ## @{
3120
3121         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3122         #  @param theBase Base shape to be extruded.
3123         #  @param thePoint1 First end of extrusion vector.
3124         #  @param thePoint2 Second end of extrusion vector.
3125         #  @param theScaleFactor Use it to make prism with scaled second base.
3126         #                        Nagative value means not scaled second base.
3127         #  @param theName Object name; when specified, this parameter is used
3128         #         for result publication in the study. Otherwise, if automatic
3129         #         publication is switched on, default value is used for result name.
3130         #
3131         #  @return New GEOM.GEOM_Object, containing the created prism.
3132         #
3133         #  @ref tui_creation_prism "Example"
3134         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3135             """
3136             Create a shape by extrusion of the base shape along a vector, defined by two points.
3137
3138             Parameters: 
3139                 theBase Base shape to be extruded.
3140                 thePoint1 First end of extrusion vector.
3141                 thePoint2 Second end of extrusion vector.
3142                 theScaleFactor Use it to make prism with scaled second base.
3143                                Nagative value means not scaled second base.
3144                 theName Object name; when specified, this parameter is used
3145                         for result publication in the study. Otherwise, if automatic
3146                         publication is switched on, default value is used for result name.
3147
3148             Returns:
3149                 New GEOM.GEOM_Object, containing the created prism.
3150             """
3151             # Example: see GEOM_TestAll.py
3152             anObj = None
3153             Parameters = ""
3154             if theScaleFactor > 0:
3155                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3156                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3157             else:
3158                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3159             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3160             anObj.SetParameters(Parameters)
3161             self._autoPublish(anObj, theName, "prism")
3162             return anObj
3163
3164         ## Create a shape by extrusion of the base shape along a
3165         #  vector, defined by two points, in 2 Ways (forward/backward).
3166         #  @param theBase Base shape to be extruded.
3167         #  @param thePoint1 First end of extrusion vector.
3168         #  @param thePoint2 Second end of extrusion vector.
3169         #  @param theName Object name; when specified, this parameter is used
3170         #         for result publication in the study. Otherwise, if automatic
3171         #         publication is switched on, default value is used for result name.
3172         #
3173         #  @return New GEOM.GEOM_Object, containing the created prism.
3174         #
3175         #  @ref tui_creation_prism "Example"
3176         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3177             """
3178             Create a shape by extrusion of the base shape along a
3179             vector, defined by two points, in 2 Ways (forward/backward).
3180
3181             Parameters: 
3182                 theBase Base shape to be extruded.
3183                 thePoint1 First end of extrusion vector.
3184                 thePoint2 Second end of extrusion vector.
3185                 theName Object name; when specified, this parameter is used
3186                         for result publication in the study. Otherwise, if automatic
3187                         publication is switched on, default value is used for result name.
3188
3189             Returns:
3190                 New GEOM.GEOM_Object, containing the created prism.
3191             """
3192             # Example: see GEOM_TestAll.py
3193             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3194             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3195             self._autoPublish(anObj, theName, "prism")
3196             return anObj
3197
3198         ## Create a shape by extrusion of the base shape along the vector,
3199         #  i.e. all the space, transfixed by the base shape during its translation
3200         #  along the vector on the given distance.
3201         #  @param theBase Base shape to be extruded.
3202         #  @param theVec Direction of extrusion.
3203         #  @param theH Prism dimension along theVec.
3204         #  @param theScaleFactor Use it to make prism with scaled second base.
3205         #                        Negative value means not scaled second base.
3206         #  @param theName Object name; when specified, this parameter is used
3207         #         for result publication in the study. Otherwise, if automatic
3208         #         publication is switched on, default value is used for result name.
3209         #
3210         #  @return New GEOM.GEOM_Object, containing the created prism.
3211         #
3212         #  @ref tui_creation_prism "Example"
3213         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3214             """
3215             Create a shape by extrusion of the base shape along the vector,
3216             i.e. all the space, transfixed by the base shape during its translation
3217             along the vector on the given distance.
3218
3219             Parameters: 
3220                 theBase Base shape to be extruded.
3221                 theVec Direction of extrusion.
3222                 theH Prism dimension along theVec.
3223                 theScaleFactor Use it to make prism with scaled second base.
3224                                Negative value means not scaled second base.
3225                 theName Object name; when specified, this parameter is used
3226                         for result publication in the study. Otherwise, if automatic
3227                         publication is switched on, default value is used for result name.
3228
3229             Returns:
3230                 New GEOM.GEOM_Object, containing the created prism.
3231             """
3232             # Example: see GEOM_TestAll.py
3233             anObj = None
3234             Parameters = ""
3235             if theScaleFactor > 0:
3236                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3237                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3238             else:
3239                 theH,Parameters = ParseParameters(theH)
3240                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3241             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3242             anObj.SetParameters(Parameters)
3243             self._autoPublish(anObj, theName, "prism")
3244             return anObj
3245
3246         ## Create a shape by extrusion of the base shape along the vector,
3247         #  i.e. all the space, transfixed by the base shape during its translation
3248         #  along the vector on the given distance in 2 Ways (forward/backward).
3249         #  @param theBase Base shape to be extruded.
3250         #  @param theVec Direction of extrusion.
3251         #  @param theH Prism dimension along theVec in forward direction.
3252         #  @param theName Object name; when specified, this parameter is used
3253         #         for result publication in the study. Otherwise, if automatic
3254         #         publication is switched on, default value is used for result name.
3255         #
3256         #  @return New GEOM.GEOM_Object, containing the created prism.
3257         #
3258         #  @ref tui_creation_prism "Example"
3259         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3260             """
3261             Create a shape by extrusion of the base shape along the vector,
3262             i.e. all the space, transfixed by the base shape during its translation
3263             along the vector on the given distance in 2 Ways (forward/backward).
3264
3265             Parameters:
3266                 theBase Base shape to be extruded.
3267                 theVec Direction of extrusion.
3268                 theH Prism dimension along theVec in forward direction.
3269                 theName Object name; when specified, this parameter is used
3270                         for result publication in the study. Otherwise, if automatic
3271                         publication is switched on, default value is used for result name.
3272
3273             Returns:
3274                 New GEOM.GEOM_Object, containing the created prism.
3275             """
3276             # Example: see GEOM_TestAll.py
3277             theH,Parameters = ParseParameters(theH)
3278             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3279             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3280             anObj.SetParameters(Parameters)
3281             self._autoPublish(anObj, theName, "prism")
3282             return anObj
3283
3284         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3285         #  @param theBase Base shape to be extruded.
3286         #  @param theDX, theDY, theDZ Directions of extrusion.
3287         #  @param theScaleFactor Use it to make prism with scaled second base.
3288         #                        Nagative value means not scaled second base.
3289         #  @param theName Object name; when specified, this parameter is used
3290         #         for result publication in the study. Otherwise, if automatic
3291         #         publication is switched on, default value is used for result name.
3292         #
3293         #  @return New GEOM.GEOM_Object, containing the created prism.
3294         #
3295         #  @ref tui_creation_prism "Example"
3296         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3297             """
3298             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3299
3300             Parameters:
3301                 theBase Base shape to be extruded.
3302                 theDX, theDY, theDZ Directions of extrusion.
3303                 theScaleFactor Use it to make prism with scaled second base.
3304                                Nagative value means not scaled second base.
3305                 theName Object name; when specified, this parameter is used
3306                         for result publication in the study. Otherwise, if automatic
3307                         publication is switched on, default value is used for result name.
3308
3309             Returns: 
3310                 New GEOM.GEOM_Object, containing the created prism.
3311             """
3312             # Example: see GEOM_TestAll.py
3313             anObj = None
3314             Parameters = ""
3315             if theScaleFactor > 0:
3316                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3317                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3318             else:
3319                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3320                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3321             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3322             anObj.SetParameters(Parameters)
3323             self._autoPublish(anObj, theName, "prism")
3324             return anObj
3325
3326         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3327         #  i.e. all the space, transfixed by the base shape during its translation
3328         #  along the vector on the given distance in 2 Ways (forward/backward).
3329         #  @param theBase Base shape to be extruded.
3330         #  @param theDX, theDY, theDZ Directions of extrusion.
3331         #  @param theName Object name; when specified, this parameter is used
3332         #         for result publication in the study. Otherwise, if automatic
3333         #         publication is switched on, default value is used for result name.
3334         #
3335         #  @return New GEOM.GEOM_Object, containing the created prism.
3336         #
3337         #  @ref tui_creation_prism "Example"
3338         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3339             """
3340             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3341             i.e. all the space, transfixed by the base shape during its translation
3342             along the vector on the given distance in 2 Ways (forward/backward).
3343
3344             Parameters:
3345                 theBase Base shape to be extruded.
3346                 theDX, theDY, theDZ Directions of extrusion.
3347                 theName Object name; when specified, this parameter is used
3348                         for result publication in the study. Otherwise, if automatic
3349                         publication is switched on, default value is used for result name.
3350
3351             Returns:
3352                 New GEOM.GEOM_Object, containing the created prism.
3353             """
3354             # Example: see GEOM_TestAll.py
3355             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3356             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3357             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3358             anObj.SetParameters(Parameters)
3359             self._autoPublish(anObj, theName, "prism")
3360             return anObj
3361
3362         ## Create a shape by revolution of the base shape around the axis
3363         #  on the given angle, i.e. all the space, transfixed by the base
3364         #  shape during its rotation around the axis on the given angle.
3365         #  @param theBase Base shape to be rotated.
3366         #  @param theAxis Rotation axis.
3367         #  @param theAngle Rotation angle in radians.
3368         #  @param theName Object name; when specified, this parameter is used
3369         #         for result publication in the study. Otherwise, if automatic
3370         #         publication is switched on, default value is used for result name.
3371         #
3372         #  @return New GEOM.GEOM_Object, containing the created revolution.
3373         #
3374         #  @ref tui_creation_revolution "Example"
3375         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3376             """
3377             Create a shape by revolution of the base shape around the axis
3378             on the given angle, i.e. all the space, transfixed by the base
3379             shape during its rotation around the axis on the given angle.
3380
3381             Parameters:
3382                 theBase Base shape to be rotated.
3383                 theAxis Rotation axis.
3384                 theAngle Rotation angle in radians.
3385                 theName Object name; when specified, this parameter is used
3386                         for result publication in the study. Otherwise, if automatic
3387                         publication is switched on, default value is used for result name.
3388
3389             Returns: 
3390                 New GEOM.GEOM_Object, containing the created revolution.
3391             """
3392             # Example: see GEOM_TestAll.py
3393             theAngle,Parameters = ParseParameters(theAngle)
3394             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3395             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3396             anObj.SetParameters(Parameters)
3397             self._autoPublish(anObj, theName, "revolution")
3398             return anObj
3399
3400         ## Create a shape by revolution of the base shape around the axis
3401         #  on the given angle, i.e. all the space, transfixed by the base
3402         #  shape during its rotation around the axis on the given angle in
3403         #  both directions (forward/backward)
3404         #  @param theBase Base shape to be rotated.
3405         #  @param theAxis Rotation axis.
3406         #  @param theAngle Rotation angle in radians.
3407         #  @param theName Object name; when specified, this parameter is used
3408         #         for result publication in the study. Otherwise, if automatic
3409         #         publication is switched on, default value is used for result name.
3410         #
3411         #  @return New GEOM.GEOM_Object, containing the created revolution.
3412         #
3413         #  @ref tui_creation_revolution "Example"
3414         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3415             """
3416             Create a shape by revolution of the base shape around the axis
3417             on the given angle, i.e. all the space, transfixed by the base
3418             shape during its rotation around the axis on the given angle in
3419             both directions (forward/backward).
3420
3421             Parameters:
3422                 theBase Base shape to be rotated.
3423                 theAxis Rotation axis.
3424                 theAngle Rotation angle in radians.
3425                 theName Object name; when specified, this parameter is used
3426                         for result publication in the study. Otherwise, if automatic
3427                         publication is switched on, default value is used for result name.
3428
3429             Returns: 
3430                 New GEOM.GEOM_Object, containing the created revolution.
3431             """
3432             theAngle,Parameters = ParseParameters(theAngle)
3433             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3434             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3435             anObj.SetParameters(Parameters)
3436             self._autoPublish(anObj, theName, "revolution")
3437             return anObj
3438
3439         ## Create a filling from the given compound of contours.
3440         #  @param theShape the compound of contours
3441         #  @param theMinDeg a minimal degree of BSpline surface to create
3442         #  @param theMaxDeg a maximal degree of BSpline surface to create
3443         #  @param theTol2D a 2d tolerance to be reached
3444         #  @param theTol3D a 3d tolerance to be reached
3445         #  @param theNbIter a number of iteration of approximation algorithm
3446         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3447         #  @param isApprox if True, BSpline curves are generated in the process
3448         #                  of surface construction. By default it is False, that means
3449         #                  the surface is created using given curves. The usage of
3450         #                  Approximation makes the algorithm work slower, but allows
3451         #                  building the surface for rather complex cases.
3452         #  @param theName Object name; when specified, this parameter is used
3453         #         for result publication in the study. Otherwise, if automatic
3454         #         publication is switched on, default value is used for result name.
3455         #
3456         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3457         #
3458         #  @ref tui_creation_filling "Example"
3459         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3460                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3461             """
3462             Create a filling from the given compound of contours.
3463
3464             Parameters:
3465                 theShape the compound of contours
3466                 theMinDeg a minimal degree of BSpline surface to create
3467                 theMaxDeg a maximal degree of BSpline surface to create
3468                 theTol2D a 2d tolerance to be reached
3469                 theTol3D a 3d tolerance to be reached
3470                 theNbIter a number of iteration of approximation algorithm
3471                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3472                 isApprox if True, BSpline curves are generated in the process
3473                          of surface construction. By default it is False, that means
3474                          the surface is created using given curves. The usage of
3475                          Approximation makes the algorithm work slower, but allows
3476                          building the surface for rather complex cases
3477                 theName Object name; when specified, this parameter is used
3478                         for result publication in the study. Otherwise, if automatic
3479                         publication is switched on, default value is used for result name.
3480
3481             Returns: 
3482                 New GEOM.GEOM_Object, containing the created filling surface.
3483
3484             Example of usage:
3485                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3486             """
3487             # Example: see GEOM_TestAll.py
3488             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3489             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3490                                             theTol2D, theTol3D, theNbIter,
3491                                             theMethod, isApprox)
3492             RaiseIfFailed("MakeFilling", self.PrimOp)
3493             anObj.SetParameters(Parameters)
3494             self._autoPublish(anObj, theName, "filling")
3495             return anObj
3496
3497
3498         ## Create a filling from the given compound of contours.
3499         #  This method corresponds to MakeFilling with isApprox=True
3500         #  @param theShape the compound of contours
3501         #  @param theMinDeg a minimal degree of BSpline surface to create
3502         #  @param theMaxDeg a maximal degree of BSpline surface to create
3503         #  @param theTol3D a 3d tolerance to be reached
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 filling surface.
3509         #
3510         #  @ref tui_creation_filling "Example"
3511         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3512             """
3513             Create a filling from the given compound of contours.
3514             This method corresponds to MakeFilling with isApprox=True
3515
3516             Parameters:
3517                 theShape the compound of contours
3518                 theMinDeg a minimal degree of BSpline surface to create
3519                 theMaxDeg a maximal degree of BSpline surface to create
3520                 theTol3D a 3d tolerance to be reached
3521                 theName Object name; when specified, this parameter is used
3522                         for result publication in the study. Otherwise, if automatic
3523                         publication is switched on, default value is used for result name.
3524
3525             Returns: 
3526                 New GEOM.GEOM_Object, containing the created filling surface.
3527
3528             Example of usage:
3529                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3530             """
3531             # Example: see GEOM_TestAll.py
3532             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3533             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3534                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3535             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3536             anObj.SetParameters(Parameters)
3537             self._autoPublish(anObj, theName, "filling")
3538             return anObj
3539
3540         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3541         #  @param theSeqSections - set of specified sections.
3542         #  @param theModeSolid - mode defining building solid or shell
3543         #  @param thePreci - precision 3D used for smoothing
3544         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3545         #  @param theName Object name; when specified, this parameter is used
3546         #         for result publication in the study. Otherwise, if automatic
3547         #         publication is switched on, default value is used for result name.
3548         #
3549         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3550         #
3551         #  @ref swig_todo "Example"
3552         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3553             """
3554             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3555
3556             Parameters:
3557                 theSeqSections - set of specified sections.
3558                 theModeSolid - mode defining building solid or shell
3559                 thePreci - precision 3D used for smoothing
3560                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3561                 theName Object name; when specified, this parameter is used
3562                         for result publication in the study. Otherwise, if automatic
3563                         publication is switched on, default value is used for result name.
3564
3565             Returns:
3566                 New GEOM.GEOM_Object, containing the created shell or solid.
3567             """
3568             # Example: see GEOM_TestAll.py
3569             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3570             RaiseIfFailed("MakeThruSections", self.PrimOp)
3571             self._autoPublish(anObj, theName, "filling")
3572             return anObj
3573
3574         ## Create a shape by extrusion of the base shape along
3575         #  the path shape. The path shape can be a wire or an edge.
3576         #  @param theBase Base shape to be extruded.
3577         #  @param thePath Path shape to extrude the base shape along it.
3578         #  @param theName Object name; when specified, this parameter is used
3579         #         for result publication in the study. Otherwise, if automatic
3580         #         publication is switched on, default value is used for result name.
3581         #
3582         #  @return New GEOM.GEOM_Object, containing the created pipe.
3583         #
3584         #  @ref tui_creation_pipe "Example"
3585         def MakePipe(self, theBase, thePath, theName=None):
3586             """
3587             Create a shape by extrusion of the base shape along
3588             the path shape. The path shape can be a wire or an edge.
3589
3590             Parameters:
3591                 theBase Base shape to be extruded.
3592                 thePath Path shape to extrude the base shape along it.
3593                 theName Object name; when specified, this parameter is used
3594                         for result publication in the study. Otherwise, if automatic
3595                         publication is switched on, default value is used for result name.
3596
3597             Returns:
3598                 New GEOM.GEOM_Object, containing the created pipe.
3599             """
3600             # Example: see GEOM_TestAll.py
3601             anObj = self.PrimOp.MakePipe(theBase, thePath)
3602             RaiseIfFailed("MakePipe", self.PrimOp)
3603             self._autoPublish(anObj, theName, "pipe")
3604             return anObj
3605
3606         ## Create a shape by extrusion of the profile shape along
3607         #  the path shape. The path shape can be a wire or an edge.
3608         #  the several profiles can be specified in the several locations of path.
3609         #  @param theSeqBases - list of  Bases shape to be extruded.
3610         #  @param theLocations - list of locations on the path corresponding
3611         #                        specified list of the Bases shapes. Number of locations
3612         #                        should be equal to number of bases or list of locations can be empty.
3613         #  @param thePath - Path shape to extrude the base shape along it.
3614         #  @param theWithContact - the mode defining that the section is translated to be in
3615         #                          contact with the spine.
3616         #  @param theWithCorrection - defining that the section is rotated to be
3617         #                             orthogonal to the spine tangent in the correspondent point
3618         #  @param theName Object name; when specified, this parameter is used
3619         #         for result publication in the study. Otherwise, if automatic
3620         #         publication is switched on, default value is used for result name.
3621         #
3622         #  @return New GEOM.GEOM_Object, containing the created pipe.
3623         #
3624         #  @ref tui_creation_pipe_with_diff_sec "Example"
3625         def MakePipeWithDifferentSections(self, theSeqBases,
3626                                           theLocations, thePath,
3627                                           theWithContact, theWithCorrection, theName=None):
3628             """
3629             Create a shape by extrusion of the profile shape along
3630             the path shape. The path shape can be a wire or an edge.
3631             the several profiles can be specified in the several locations of path.
3632
3633             Parameters:
3634                 theSeqBases - list of  Bases shape to be extruded.
3635                 theLocations - list of locations on the path corresponding
3636                                specified list of the Bases shapes. Number of locations
3637                                should be equal to number of bases or list of locations can be empty.
3638                 thePath - Path shape to extrude the base shape along it.
3639                 theWithContact - the mode defining that the section is translated to be in
3640                                  contact with the spine(0/1)
3641                 theWithCorrection - defining that the section is rotated to be
3642                                     orthogonal to the spine tangent in the correspondent point (0/1)
3643                 theName Object name; when specified, this parameter is used
3644                         for result publication in the study. Otherwise, if automatic
3645                         publication is switched on, default value is used for result name.
3646
3647             Returns:
3648                 New GEOM.GEOM_Object, containing the created pipe.
3649             """
3650             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3651                                                               theLocations, thePath,
3652                                                               theWithContact, theWithCorrection)
3653             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3654             self._autoPublish(anObj, theName, "pipe")
3655             return anObj
3656
3657         ## Create a shape by extrusion of the profile shape along
3658         #  the path shape. The path shape can be a wire or a edge.
3659         #  the several profiles can be specified in the several locations of path.
3660         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3661         #                       shell or face. If number of faces in neighbour sections
3662         #                       aren't coincided result solid between such sections will
3663         #                       be created using external boundaries of this shells.
3664         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3665         #                          This list is used for searching correspondences between
3666         #                          faces in the sections. Size of this list must be equal
3667         #                          to size of list of base shapes.
3668         #  @param theLocations - list of locations on the path corresponding
3669         #                        specified list of the Bases shapes. Number of locations
3670         #                        should be equal to number of bases. First and last
3671         #                        locations must be coincided with first and last vertexes
3672         #                        of path correspondingly.
3673         #  @param thePath - Path shape to extrude the base shape along it.
3674         #  @param theWithContact - the mode defining that the section is translated to be in
3675         #                          contact with the spine.
3676         #  @param theWithCorrection - defining that the section is rotated to be
3677         #                             orthogonal to the spine tangent in the correspondent point
3678         #  @param theName Object name; when specified, this parameter is used
3679         #         for result publication in the study. Otherwise, if automatic
3680         #         publication is switched on, default value is used for result name.
3681         #
3682         #  @return New GEOM.GEOM_Object, containing the created solids.
3683         #
3684         #  @ref tui_creation_pipe_with_shell_sec "Example"
3685         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3686                                       theLocations, thePath,
3687                                       theWithContact, theWithCorrection, theName=None):
3688             """
3689             Create a shape by extrusion of the profile shape along
3690             the path shape. The path shape can be a wire or a edge.
3691             the several profiles can be specified in the several locations of path.
3692
3693             Parameters:
3694                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3695                               shell or face. If number of faces in neighbour sections
3696                               aren't coincided result solid between such sections will
3697                               be created using external boundaries of this shells.
3698                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3699                                  This list is used for searching correspondences between
3700                                  faces in the sections. Size of this list must be equal
3701                                  to size of list of base shapes.
3702                 theLocations - list of locations on the path corresponding
3703                                specified list of the Bases shapes. Number of locations
3704                                should be equal to number of bases. First and last
3705                                locations must be coincided with first and last vertexes
3706                                of path correspondingly.
3707                 thePath - Path shape to extrude the base shape along it.
3708                 theWithContact - the mode defining that the section is translated to be in
3709                                  contact with the spine (0/1)
3710                 theWithCorrection - defining that the section is rotated to be
3711                                     orthogonal to the spine tangent in the correspondent point (0/1)
3712                 theName Object name; when specified, this parameter is used
3713                         for result publication in the study. Otherwise, if automatic
3714                         publication is switched on, default value is used for result name.
3715
3716             Returns:                           
3717                 New GEOM.GEOM_Object, containing the created solids.
3718             """
3719             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3720                                                           theLocations, thePath,
3721                                                           theWithContact, theWithCorrection)
3722             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3723             self._autoPublish(anObj, theName, "pipe")
3724             return anObj
3725
3726         ## Create a shape by extrusion of the profile shape along
3727         #  the path shape. This function is used only for debug pipe
3728         #  functionality - it is a version of function MakePipeWithShellSections()
3729         #  which give a possibility to recieve information about
3730         #  creating pipe between each pair of sections step by step.
3731         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3732                                              theLocations, thePath,
3733                                              theWithContact, theWithCorrection, theName=None):
3734             """
3735             Create a shape by extrusion of the profile shape along
3736             the path shape. This function is used only for debug pipe
3737             functionality - it is a version of previous function
3738             geompy.MakePipeWithShellSections() which give a possibility to
3739             recieve information about creating pipe between each pair of
3740             sections step by step.
3741             """
3742             res = []
3743             nbsect = len(theSeqBases)
3744             nbsubsect = len(theSeqSubBases)
3745             #print "nbsect = ",nbsect
3746             for i in range(1,nbsect):
3747                 #print "  i = ",i
3748                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3749                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3750                 tmpSeqSubBases = []
3751                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3752                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3753                                                               tmpLocations, thePath,
3754                                                               theWithContact, theWithCorrection)
3755                 if self.PrimOp.IsDone() == 0:
3756                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3757                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3758                     break
3759                 else:
3760                     print "Pipe between ",i," and ",i+1," sections is OK"
3761                     res.append(anObj)
3762                     pass
3763                 pass
3764
3765             resc = self.MakeCompound(res)
3766             #resc = self.MakeSewing(res, 0.001)
3767             #print "resc: ",resc
3768             self._autoPublish(resc, theName, "pipe")
3769             return resc
3770
3771         ## Create solids between given sections
3772         #  @param theSeqBases - list of sections (shell or face).
3773         #  @param theLocations - list of corresponding vertexes
3774         #  @param theName Object name; when specified, this parameter is used
3775         #         for result publication in the study. Otherwise, if automatic
3776         #         publication is switched on, default value is used for result name.
3777         #
3778         #  @return New GEOM.GEOM_Object, containing the created solids.
3779         #
3780         #  @ref tui_creation_pipe_without_path "Example"
3781         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3782             """
3783             Create solids between given sections
3784
3785             Parameters:
3786                 theSeqBases - list of sections (shell or face).
3787                 theLocations - list of corresponding vertexes
3788                 theName Object name; when specified, this parameter is used
3789                         for result publication in the study. Otherwise, if automatic
3790                         publication is switched on, default value is used for result name.
3791
3792             Returns:
3793                 New GEOM.GEOM_Object, containing the created solids.
3794             """
3795             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3796             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3797             self._autoPublish(anObj, theName, "pipe")
3798             return anObj
3799
3800         ## Create a shape by extrusion of the base shape along
3801         #  the path shape with constant bi-normal direction along the given vector.
3802         #  The path shape can be a wire or an edge.
3803         #  @param theBase Base shape to be extruded.
3804         #  @param thePath Path shape to extrude the base shape along it.
3805         #  @param theVec Vector defines a constant binormal direction to keep the
3806         #                same angle beetween the direction and the sections
3807         #                along the sweep surface.
3808         #  @param theName Object name; when specified, this parameter is used
3809         #         for result publication in the study. Otherwise, if automatic
3810         #         publication is switched on, default value is used for result name.
3811         #
3812         #  @return New GEOM.GEOM_Object, containing the created pipe.
3813         #
3814         #  @ref tui_creation_pipe "Example"
3815         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3816             """
3817             Create a shape by extrusion of the base shape along
3818             the path shape with constant bi-normal direction along the given vector.
3819             The path shape can be a wire or an edge.
3820
3821             Parameters:
3822                 theBase Base shape to be extruded.
3823                 thePath Path shape to extrude the base shape along it.
3824                 theVec Vector defines a constant binormal direction to keep the
3825                        same angle beetween the direction and the sections
3826                        along the sweep surface.
3827                 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             Returns:              
3832                 New GEOM.GEOM_Object, containing the created pipe.
3833             """
3834             # Example: see GEOM_TestAll.py
3835             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3836             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3837             self._autoPublish(anObj, theName, "pipe")
3838             return anObj
3839               
3840         ## Makes a thick solid from a face or a shell
3841         #  @param theShape Face or Shell to be thicken
3842         #  @param theThickness Thickness of the resulting solid
3843         #  @param theName Object name; when specified, this parameter is used
3844         #         for result publication in the study. Otherwise, if automatic
3845         #         publication is switched on, default value is used for result name.
3846         #
3847         #  @return New GEOM.GEOM_Object, containing the created solid
3848         #
3849         def MakeThickSolid(self, theShape, theThickness, theName=None):
3850             """
3851             Make a thick solid from a face or a shell
3852
3853             Parameters:
3854                  theShape Face or Shell to be thicken
3855                  theThickness Thickness of the resulting solid
3856                  theName Object name; when specified, this parameter is used
3857                  for result publication in the study. Otherwise, if automatic
3858                  publication is switched on, default value is used for result name.
3859                  
3860             Returns:
3861                 New GEOM.GEOM_Object, containing the created solid
3862             """
3863             # Example: see GEOM_TestAll.py
3864             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3865             RaiseIfFailed("MakeThickening", self.PrimOp)
3866             self._autoPublish(anObj, theName, "pipe")
3867             return anObj
3868             
3869
3870         ## Modifies a face or a shell to make it a thick solid
3871         #  @param theShape Face or Shell to be thicken
3872         #  @param theThickness Thickness of the resulting solid
3873         #
3874         #  @return The modified shape
3875         #
3876         def Thicken(self, theShape, theThickness):
3877             """
3878             Modifies a face or a shell to make it a thick solid
3879
3880             Parameters:
3881                 theBase Base shape to be extruded.
3882                 thePath Path shape to extrude the base shape along it.
3883                 theName Object name; when specified, this parameter is used
3884                         for result publication in the study. Otherwise, if automatic
3885                         publication is switched on, default value is used for result name.
3886
3887             Returns:
3888                 The modified shape
3889             """
3890             # Example: see GEOM_TestAll.py
3891             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3892             RaiseIfFailed("MakeThickening", self.PrimOp)
3893             return anObj
3894
3895         ## Build a middle path of a pipe-like shape.
3896         #  The path shape can be a wire or an edge.
3897         #  @param theShape It can be closed or unclosed pipe-like shell
3898         #                  or a pipe-like solid.
3899         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3900         #                            should be wires or faces of theShape.
3901         #  @param theName Object name; when specified, this parameter is used
3902         #         for result publication in the study. Otherwise, if automatic
3903         #         publication is switched on, default value is used for result name.
3904         #
3905         #  @note It is not assumed that exact or approximate copy of theShape
3906         #        can be obtained by applying existing Pipe operation on the
3907         #        resulting "Path" wire taking theBase1 as the base - it is not
3908         #        always possible; though in some particular cases it might work
3909         #        it is not guaranteed. Thus, RestorePath function should not be
3910         #        considered as an exact reverse operation of the Pipe.
3911         #
3912         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3913         #                                source pipe's "path".
3914         #
3915         #  @ref tui_creation_pipe_path "Example"
3916         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3917             """
3918             Build a middle path of a pipe-like shape.
3919             The path shape can be a wire or an edge.
3920
3921             Parameters:
3922                 theShape It can be closed or unclosed pipe-like shell
3923                          or a pipe-like solid.
3924                 theBase1, theBase2 Two bases of the supposed pipe. This
3925                                    should be wires or faces of theShape.
3926                 theName Object name; when specified, this parameter is used
3927                         for result publication in the study. Otherwise, if automatic
3928                         publication is switched on, default value is used for result name.
3929
3930             Returns:
3931                 New GEOM_Object, containing an edge or wire that represent
3932                                  source pipe's path.
3933             """
3934             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3935             RaiseIfFailed("RestorePath", self.PrimOp)
3936             self._autoPublish(anObj, theName, "path")
3937             return anObj
3938
3939         ## Build a middle path of a pipe-like shape.
3940         #  The path shape can be a wire or an edge.
3941         #  @param theShape It can be closed or unclosed pipe-like shell
3942         #                  or a pipe-like solid.
3943         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3944         #                                should be lists of edges of theShape.
3945         #  @param theName Object name; when specified, this parameter is used
3946         #         for result publication in the study. Otherwise, if automatic
3947         #         publication is switched on, default value is used for result name.
3948         #
3949         #  @note It is not assumed that exact or approximate copy of theShape
3950         #        can be obtained by applying existing Pipe operation on the
3951         #        resulting "Path" wire taking theBase1 as the base - it is not
3952         #        always possible; though in some particular cases it might work
3953         #        it is not guaranteed. Thus, RestorePath function should not be
3954         #        considered as an exact reverse operation of the Pipe.
3955         #
3956         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3957         #                                source pipe's "path".
3958         #
3959         #  @ref tui_creation_pipe_path "Example"
3960         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3961             """
3962             Build a middle path of a pipe-like shape.
3963             The path shape can be a wire or an edge.
3964
3965             Parameters:
3966                 theShape It can be closed or unclosed pipe-like shell
3967                          or a pipe-like solid.
3968                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3969                                        should be lists of edges of theShape.
3970                 theName Object name; when specified, this parameter is used
3971                         for result publication in the study. Otherwise, if automatic
3972                         publication is switched on, default value is used for result name.
3973
3974             Returns:
3975                 New GEOM_Object, containing an edge or wire that represent
3976                                  source pipe's path.
3977             """
3978             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3979             RaiseIfFailed("RestorePath", self.PrimOp)
3980             self._autoPublish(anObj, theName, "path")
3981             return anObj
3982
3983         # end of l3_complex
3984         ## @}
3985
3986         ## @addtogroup l3_advanced
3987         ## @{
3988
3989         ## Create a linear edge with specified ends.
3990         #  @param thePnt1 Point for the first end of edge.
3991         #  @param thePnt2 Point for the second end of edge.
3992         #  @param theName Object name; when specified, this parameter is used
3993         #         for result publication in the study. Otherwise, if automatic
3994         #         publication is switched on, default value is used for result name.
3995         #
3996         #  @return New GEOM.GEOM_Object, containing the created edge.
3997         #
3998         #  @ref tui_creation_edge "Example"
3999         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4000             """
4001             Create a linear edge with specified ends.
4002
4003             Parameters:
4004                 thePnt1 Point for the first end of edge.
4005                 thePnt2 Point for the second end of edge.
4006                 theName Object name; when specified, this parameter is used
4007                         for result publication in the study. Otherwise, if automatic
4008                         publication is switched on, default value is used for result name.
4009
4010             Returns:           
4011                 New GEOM.GEOM_Object, containing the created edge.
4012             """
4013             # Example: see GEOM_TestAll.py
4014             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4015             RaiseIfFailed("MakeEdge", self.ShapesOp)
4016             self._autoPublish(anObj, theName, "edge")
4017             return anObj
4018
4019         ## Create a new edge, corresponding to the given length on the given curve.
4020         #  @param theRefCurve The referenced curve (edge).
4021         #  @param theLength Length on the referenced curve. It can be negative.
4022         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4023         #                       at the end of \a theRefCurve, close to the selected point.
4024         #                       If None, start from the first point of \a theRefCurve.
4025         #  @param theName Object name; when specified, this parameter is used
4026         #         for result publication in the study. Otherwise, if automatic
4027         #         publication is switched on, default value is used for result name.
4028         #
4029         #  @return New GEOM.GEOM_Object, containing the created edge.
4030         #
4031         #  @ref tui_creation_edge "Example"
4032         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4033             """
4034             Create a new edge, corresponding to the given length on the given curve.
4035
4036             Parameters:
4037                 theRefCurve The referenced curve (edge).
4038                 theLength Length on the referenced curve. It can be negative.
4039                 theStartPoint Any point can be selected for it, the new edge will begin
4040                               at the end of theRefCurve, close to the selected point.
4041                               If None, start from the first point of theRefCurve.
4042                 theName Object name; when specified, this parameter is used
4043                         for result publication in the study. Otherwise, if automatic
4044                         publication is switched on, default value is used for result name.
4045
4046             Returns:              
4047                 New GEOM.GEOM_Object, containing the created edge.
4048             """
4049             # Example: see GEOM_TestAll.py
4050             theLength, Parameters = ParseParameters(theLength)
4051             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4052             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4053             anObj.SetParameters(Parameters)
4054             self._autoPublish(anObj, theName, "edge")
4055             return anObj
4056
4057         ## Create an edge from specified wire.
4058         #  @param theWire source Wire
4059         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4060         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4061         #  @param theName Object name; when specified, this parameter is used
4062         #         for result publication in the study. Otherwise, if automatic
4063         #         publication is switched on, default value is used for result name.
4064         #
4065         #  @return New GEOM.GEOM_Object, containing the created edge.
4066         #
4067         #  @ref tui_creation_edge "Example"
4068         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4069             """
4070             Create an edge from specified wire.
4071
4072             Parameters:
4073                 theWire source Wire
4074                 theLinearTolerance linear tolerance value (default = 1e-07)
4075                 theAngularTolerance angular tolerance value (default = 1e-12)
4076                 theName Object name; when specified, this parameter is used
4077                         for result publication in the study. Otherwise, if automatic
4078                         publication is switched on, default value is used for result name.
4079
4080             Returns:
4081                 New GEOM.GEOM_Object, containing the created edge.
4082             """
4083             # Example: see GEOM_TestAll.py
4084             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4085             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4086             self._autoPublish(anObj, theName, "edge")
4087             return anObj
4088
4089         ## Create a wire from the set of edges and wires.
4090         #  @param theEdgesAndWires List of edges and/or wires.
4091         #  @param theTolerance Maximum distance between vertices, that will be merged.
4092         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4093         #  @param theName Object name; when specified, this parameter is used
4094         #         for result publication in the study. Otherwise, if automatic
4095         #         publication is switched on, default value is used for result name.
4096         #
4097         #  @return New GEOM.GEOM_Object, containing the created wire.
4098         #
4099         #  @ref tui_creation_wire "Example"
4100         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4101             """
4102             Create a wire from the set of edges and wires.
4103
4104             Parameters:
4105                 theEdgesAndWires List of edges and/or wires.
4106                 theTolerance Maximum distance between vertices, that will be merged.
4107                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4108                 theName Object name; when specified, this parameter is used
4109                         for result publication in the study. Otherwise, if automatic
4110                         publication is switched on, default value is used for result name.
4111
4112             Returns:                    
4113                 New GEOM.GEOM_Object, containing the created wire.
4114             """
4115             # Example: see GEOM_TestAll.py
4116             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4117             RaiseIfFailed("MakeWire", self.ShapesOp)
4118             self._autoPublish(anObj, theName, "wire")
4119             return anObj
4120
4121         ## Create a face on the given wire.
4122         #  @param theWire closed Wire or Edge to build the face on.
4123         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4124         #                        If the tolerance of the obtained planar face is less
4125         #                        than 1e-06, this face will be returned, otherwise the
4126         #                        algorithm tries to build any suitable face on the given
4127         #                        wire and prints a warning message.
4128         #  @param theName Object name; when specified, this parameter is used
4129         #         for result publication in the study. Otherwise, if automatic
4130         #         publication is switched on, default value is used for result name.
4131         #
4132         #  @return New GEOM.GEOM_Object, containing the created face.
4133         #
4134         #  @ref tui_creation_face "Example"
4135         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4136             """
4137             Create a face on the given wire.
4138
4139             Parameters:
4140                 theWire closed Wire or Edge to build the face on.
4141                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4142                                If the tolerance of the obtained planar face is less
4143                                than 1e-06, this face will be returned, otherwise the
4144                                algorithm tries to build any suitable face on the given
4145                                wire and prints a warning message.
4146                 theName Object name; when specified, this parameter is used
4147                         for result publication in the study. Otherwise, if automatic
4148                         publication is switched on, default value is used for result name.
4149
4150             Returns:
4151                 New GEOM.GEOM_Object, containing the created face.
4152             """
4153             # Example: see GEOM_TestAll.py
4154             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4155             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4156                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4157             else:
4158                 RaiseIfFailed("MakeFace", self.ShapesOp)
4159             self._autoPublish(anObj, theName, "face")
4160             return anObj
4161
4162         ## Create a face on the given wires set.
4163         #  @param theWires List of closed wires or edges to build the face on.
4164         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4165         #                        If the tolerance of the obtained planar face is less
4166         #                        than 1e-06, this face will be returned, otherwise the
4167         #                        algorithm tries to build any suitable face on the given
4168         #                        wire and prints a warning message.
4169         #  @param theName Object name; when specified, this parameter is used
4170         #         for result publication in the study. Otherwise, if automatic
4171         #         publication is switched on, default value is used for result name.
4172         #
4173         #  @return New GEOM.GEOM_Object, containing the created face.
4174         #
4175         #  @ref tui_creation_face "Example"
4176         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4177             """
4178             Create a face on the given wires set.
4179
4180             Parameters:
4181                 theWires List of closed wires or edges to build the face on.
4182                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4183                                If the tolerance of the obtained planar face is less
4184                                than 1e-06, this face will be returned, otherwise the
4185                                algorithm tries to build any suitable face on the given
4186                                wire and prints a warning message.
4187                 theName Object name; when specified, this parameter is used
4188                         for result publication in the study. Otherwise, if automatic
4189                         publication is switched on, default value is used for result name.
4190
4191             Returns: 
4192                 New GEOM.GEOM_Object, containing the created face.
4193             """
4194             # Example: see GEOM_TestAll.py
4195             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4196             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4197                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4198             else:
4199                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4200             self._autoPublish(anObj, theName, "face")
4201             return anObj
4202
4203         ## See MakeFaceWires() method for details.
4204         #
4205         #  @ref tui_creation_face "Example 1"
4206         #  \n @ref swig_MakeFaces  "Example 2"
4207         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4208             """
4209             See geompy.MakeFaceWires() method for details.
4210             """
4211             # Example: see GEOM_TestOthers.py
4212             # note: auto-publishing is done in self.MakeFaceWires()
4213             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4214             return anObj
4215
4216         ## Create a shell from the set of faces and shells.
4217         #  @param theFacesAndShells List of faces and/or shells.
4218         #  @param theName Object name; when specified, this parameter is used
4219         #         for result publication in the study. Otherwise, if automatic
4220         #         publication is switched on, default value is used for result name.
4221         #
4222         #  @return New GEOM.GEOM_Object, containing the created shell.
4223         #
4224         #  @ref tui_creation_shell "Example"
4225         def MakeShell(self, theFacesAndShells, theName=None):
4226             """
4227             Create a shell from the set of faces and shells.
4228
4229             Parameters:
4230                 theFacesAndShells List of faces and/or shells.
4231                 theName Object name; when specified, this parameter is used
4232                         for result publication in the study. Otherwise, if automatic
4233                         publication is switched on, default value is used for result name.
4234
4235             Returns:
4236                 New GEOM.GEOM_Object, containing the created shell.
4237             """
4238             # Example: see GEOM_TestAll.py
4239             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4240             RaiseIfFailed("MakeShell", self.ShapesOp)
4241             self._autoPublish(anObj, theName, "shell")
4242             return anObj
4243
4244         ## Create a solid, bounded by the given shells.
4245         #  @param theShells Sequence of bounding shells.
4246         #  @param theName Object name; when specified, this parameter is used
4247         #         for result publication in the study. Otherwise, if automatic
4248         #         publication is switched on, default value is used for result name.
4249         #
4250         #  @return New GEOM.GEOM_Object, containing the created solid.
4251         #
4252         #  @ref tui_creation_solid "Example"
4253         def MakeSolid(self, theShells, theName=None):
4254             """
4255             Create a solid, bounded by the given shells.
4256
4257             Parameters:
4258                 theShells Sequence of bounding shells.
4259                 theName Object name; when specified, this parameter is used
4260                         for result publication in the study. Otherwise, if automatic
4261                         publication is switched on, default value is used for result name.
4262
4263             Returns:
4264                 New GEOM.GEOM_Object, containing the created solid.
4265             """
4266             # Example: see GEOM_TestAll.py
4267             if len(theShells) == 1:
4268                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4269                 #if len(descr) > 0:
4270                 #    raise RuntimeError, "MakeSolidShells : " + descr
4271                 if descr == "WRN_SHAPE_UNCLOSED":
4272                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4273             anObj = self.ShapesOp.MakeSolidShells(theShells)
4274             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4275             self._autoPublish(anObj, theName, "solid")
4276             return anObj
4277
4278         ## Create a compound of the given shapes.
4279         #  @param theShapes List of shapes to put in compound.
4280         #  @param theName Object name; when specified, this parameter is used
4281         #         for result publication in the study. Otherwise, if automatic
4282         #         publication is switched on, default value is used for result name.
4283         #
4284         #  @return New GEOM.GEOM_Object, containing the created compound.
4285         #
4286         #  @ref tui_creation_compound "Example"
4287         def MakeCompound(self, theShapes, theName=None):
4288             """
4289             Create a compound of the given shapes.
4290
4291             Parameters:
4292                 theShapes List of shapes to put in compound.
4293                 theName Object name; when specified, this parameter is used
4294                         for result publication in the study. Otherwise, if automatic
4295                         publication is switched on, default value is used for result name.
4296
4297             Returns:
4298                 New GEOM.GEOM_Object, containing the created compound.
4299             """
4300             # Example: see GEOM_TestAll.py
4301             anObj = self.ShapesOp.MakeCompound(theShapes)
4302             RaiseIfFailed("MakeCompound", self.ShapesOp)
4303             self._autoPublish(anObj, theName, "compound")
4304             return anObj
4305
4306         # end of l3_advanced
4307         ## @}
4308
4309         ## @addtogroup l2_measure
4310         ## @{
4311
4312         ## Gives quantity of faces in the given shape.
4313         #  @param theShape Shape to count faces of.
4314         #  @return Quantity of faces.
4315         #
4316         #  @ref swig_NumberOf "Example"
4317         def NumberOfFaces(self, theShape):
4318             """
4319             Gives quantity of faces in the given shape.
4320
4321             Parameters:
4322                 theShape Shape to count faces of.
4323
4324             Returns:    
4325                 Quantity of faces.
4326             """
4327             # Example: see GEOM_TestOthers.py
4328             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4329             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4330             return nb_faces
4331
4332         ## Gives quantity of edges in the given shape.
4333         #  @param theShape Shape to count edges of.
4334         #  @return Quantity of edges.
4335         #
4336         #  @ref swig_NumberOf "Example"
4337         def NumberOfEdges(self, theShape):
4338             """
4339             Gives quantity of edges in the given shape.
4340
4341             Parameters:
4342                 theShape Shape to count edges of.
4343
4344             Returns:    
4345                 Quantity of edges.
4346             """
4347             # Example: see GEOM_TestOthers.py
4348             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4349             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4350             return nb_edges
4351
4352         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4353         #  @param theShape Shape to count sub-shapes of.
4354         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4355         #  @return Quantity of sub-shapes of given type.
4356         #
4357         #  @ref swig_NumberOf "Example"
4358         def NumberOfSubShapes(self, theShape, theShapeType):
4359             """
4360             Gives quantity of sub-shapes of type theShapeType in the given shape.
4361
4362             Parameters:
4363                 theShape Shape to count sub-shapes of.
4364                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4365
4366             Returns:
4367                 Quantity of sub-shapes of given type.
4368             """
4369             # Example: see GEOM_TestOthers.py
4370             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4371             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4372             return nb_ss
4373
4374         ## Gives quantity of solids in the given shape.
4375         #  @param theShape Shape to count solids in.
4376         #  @return Quantity of solids.
4377         #
4378         #  @ref swig_NumberOf "Example"
4379         def NumberOfSolids(self, theShape):
4380             """
4381             Gives quantity of solids in the given shape.
4382
4383             Parameters:
4384                 theShape Shape to count solids in.
4385
4386             Returns:
4387                 Quantity of solids.
4388             """
4389             # Example: see GEOM_TestOthers.py
4390             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4391             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4392             return nb_solids
4393
4394         # end of l2_measure
4395         ## @}
4396
4397         ## @addtogroup l3_healing
4398         ## @{
4399
4400         ## Reverses an orientation the given shape.
4401         #  @param theShape Shape to be reversed.
4402         #  @param theName Object name; when specified, this parameter is used
4403         #         for result publication in the study. Otherwise, if automatic
4404         #         publication is switched on, default value is used for result name.
4405         #
4406         #  @return The reversed copy of theShape.
4407         #
4408         #  @ref swig_ChangeOrientation "Example"
4409         def ChangeOrientation(self, theShape, theName=None):
4410             """
4411             Reverses an orientation the given shape.
4412
4413             Parameters:
4414                 theShape Shape to be reversed.
4415                 theName Object name; when specified, this parameter is used
4416                         for result publication in the study. Otherwise, if automatic
4417                         publication is switched on, default value is used for result name.
4418
4419             Returns:   
4420                 The reversed copy of theShape.
4421             """
4422             # Example: see GEOM_TestAll.py
4423             anObj = self.ShapesOp.ChangeOrientation(theShape)
4424             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4425             self._autoPublish(anObj, theName, "reversed")
4426             return anObj
4427
4428         ## See ChangeOrientation() method for details.
4429         #
4430         #  @ref swig_OrientationChange "Example"
4431         def OrientationChange(self, theShape, theName=None):
4432             """
4433             See geompy.ChangeOrientation method for details.
4434             """
4435             # Example: see GEOM_TestOthers.py
4436             # note: auto-publishing is done in self.ChangeOrientation()
4437             anObj = self.ChangeOrientation(theShape, theName)
4438             return anObj
4439
4440         # end of l3_healing
4441         ## @}
4442
4443         ## @addtogroup l4_obtain
4444         ## @{
4445
4446         ## Retrieve all free faces from the given shape.
4447         #  Free face is a face, which is not shared between two shells of the shape.
4448         #  @param theShape Shape to find free faces in.
4449         #  @return List of IDs of all free faces, contained in theShape.
4450         #
4451         #  @ref tui_measurement_tools_page "Example"
4452         def GetFreeFacesIDs(self,theShape):
4453             """
4454             Retrieve all free faces from the given shape.
4455             Free face is a face, which is not shared between two shells of the shape.
4456
4457             Parameters:
4458                 theShape Shape to find free faces in.
4459
4460             Returns:
4461                 List of IDs of all free faces, contained in theShape.
4462             """
4463             # Example: see GEOM_TestOthers.py
4464             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4465             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4466             return anIDs
4467
4468         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4469         #  @param theShape1 Shape to find sub-shapes in.
4470         #  @param theShape2 Shape to find shared sub-shapes with.
4471         #  @param theShapeType Type of sub-shapes to be retrieved.
4472         #  @param theName Object name; when specified, this parameter is used
4473         #         for result publication in the study. Otherwise, if automatic
4474         #         publication is switched on, default value is used for result name.
4475         #
4476         #  @return List of sub-shapes of theShape1, shared with theShape2.
4477         #
4478         #  @ref swig_GetSharedShapes "Example"
4479         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4480             """
4481             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4482
4483             Parameters:
4484                 theShape1 Shape to find sub-shapes in.
4485                 theShape2 Shape to find shared sub-shapes with.
4486                 theShapeType Type of sub-shapes to be retrieved.
4487                 theName Object name; when specified, this parameter is used
4488                         for result publication in the study. Otherwise, if automatic
4489                         publication is switched on, default value is used for result name.
4490
4491             Returns:
4492                 List of sub-shapes of theShape1, shared with theShape2.
4493             """
4494             # Example: see GEOM_TestOthers.py
4495             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4496             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4497             self._autoPublish(aList, theName, "shared")
4498             return aList
4499
4500         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4501         #  @param theShapes Shapes to find common sub-shapes of.
4502         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4503         #  @param theName Object name; when specified, this parameter is used
4504         #         for result publication in the study. Otherwise, if automatic
4505         #         publication is switched on, default value is used for result name.
4506         #
4507         #  @return List of objects, that are sub-shapes of all given shapes.
4508         #
4509         #  @ref swig_GetSharedShapes "Example"
4510         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4511             """
4512             Get all sub-shapes, shared by all shapes in the list theShapes.
4513
4514             Parameters:
4515                 theShapes Shapes to find common sub-shapes of.
4516                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4517                 theName Object name; when specified, this parameter is used
4518                         for result publication in the study. Otherwise, if automatic
4519                         publication is switched on, default value is used for result name.
4520
4521             Returns:    
4522                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4523             """
4524             # Example: see GEOM_TestOthers.py
4525             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4526             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4527             self._autoPublish(aList, theName, "shared")
4528             return aList
4529
4530         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4531         #  situated relatively the specified plane by the certain way,
4532         #  defined through <VAR>theState</VAR> parameter.
4533         #  @param theShape Shape to find sub-shapes of.
4534         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4535         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4536         #                direction and 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_GetShapesOnPlane "Example"
4545         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, 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                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4557                 theName Object name; when specified, this parameter is used
4558                         for result publication in the study. Otherwise, if automatic
4559                         publication is switched on, default value is used for result name.
4560
4561             Returns:
4562                 List of all found sub-shapes.
4563             """
4564             # Example: see GEOM_TestOthers.py
4565             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4566             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4567             self._autoPublish(aList, theName, "shapeOnPlane")
4568             return aList
4569
4570         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4571         #  situated relatively the specified plane by the certain way,
4572         #  defined through <VAR>theState</VAR> parameter.
4573         #  @param theShape Shape to find sub-shapes of.
4574         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4575         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4576         #                direction and location of the plane to find shapes on.
4577         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4578         #
4579         #  @return List of all found sub-shapes indices.
4580         #
4581         #  @ref swig_GetShapesOnPlaneIDs "Example"
4582         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4583             """
4584             Find in theShape all sub-shapes of type theShapeType,
4585             situated relatively the specified plane by the certain way,
4586             defined through theState parameter.
4587
4588             Parameters:
4589                 theShape Shape to find sub-shapes of.
4590                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4591                 theAx1 Vector (or line, or linear edge), specifying normal
4592                        direction and location of the plane to find shapes on.
4593                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4594
4595             Returns:
4596                 List of all found sub-shapes indices.
4597             """
4598             # Example: see GEOM_TestOthers.py
4599             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4600             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4601             return aList
4602
4603         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4604         #  situated relatively the specified plane by the certain way,
4605         #  defined through <VAR>theState</VAR> parameter.
4606         #  @param theShape Shape to find sub-shapes of.
4607         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4608         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4609         #                direction of the plane to find shapes on.
4610         #  @param thePnt Point specifying location of the plane to find shapes on.
4611         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4612         #  @param theName Object name; when specified, this parameter is used
4613         #         for result publication in the study. Otherwise, if automatic
4614         #         publication is switched on, default value is used for result name.
4615         #
4616         #  @return List of all found sub-shapes.
4617         #
4618         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4619         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4620             """
4621             Find in theShape all sub-shapes of type theShapeType,
4622             situated relatively the specified plane by the certain way,
4623             defined through theState parameter.
4624
4625             Parameters:
4626                 theShape Shape to find sub-shapes of.
4627                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4628                 theAx1 Vector (or line, or linear edge), specifying normal
4629                        direction and location of the plane to find shapes on.
4630                 thePnt Point specifying location of the plane to find shapes on.
4631                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4632                 theName Object name; when specified, this parameter is used
4633                         for result publication in the study. Otherwise, if automatic
4634                         publication is switched on, default value is used for result name.
4635
4636             Returns:
4637                 List of all found sub-shapes.
4638             """
4639             # Example: see GEOM_TestOthers.py
4640             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4641                                                                theAx1, thePnt, theState)
4642             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4643             self._autoPublish(aList, theName, "shapeOnPlane")
4644             return aList
4645
4646         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4647         #  situated relatively the specified plane by the certain way,
4648         #  defined through <VAR>theState</VAR> parameter.
4649         #  @param theShape Shape to find sub-shapes of.
4650         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4651         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4652         #                direction of the plane to find shapes on.
4653         #  @param thePnt Point specifying location of the plane to find shapes on.
4654         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4655         #
4656         #  @return List of all found sub-shapes indices.
4657         #
4658         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4659         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4660             """
4661             Find in theShape all sub-shapes of type theShapeType,
4662             situated relatively the specified plane by the certain way,
4663             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                 theAx1 Vector (or line, or linear edge), specifying normal
4669                        direction and location of the plane to find shapes on.
4670                 thePnt Point specifying location of the plane 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.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4678                                                                   theAx1, thePnt, theState)
4679             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4680             return aList
4681
4682         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4683         #  the specified cylinder by the certain way, defined through \a theState parameter.
4684         #  @param theShape Shape to find sub-shapes of.
4685         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4686         #  @param theAxis Vector (or line, or linear edge), specifying
4687         #                 axis of the cylinder to find shapes on.
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_GetShapesOnCylinder "Example"
4697         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, 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.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4718             RaiseIfFailed("GetShapesOnCylinder", 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 theRadius Radius of the cylinder to find shapes on.
4729         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4730         #
4731         #  @return List of all found sub-shapes indices.
4732         #
4733         #  @ref swig_GetShapesOnCylinderIDs "Example"
4734         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4735             """
4736             Find in theShape all sub-shapes of type theShapeType, situated relatively
4737             the specified cylinder by the certain way, defined through theState parameter.
4738
4739             Parameters:
4740                 theShape Shape to find sub-shapes of.
4741                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4742                 theAxis Vector (or line, or linear edge), specifying
4743                         axis of the cylinder to find shapes on.
4744                 theRadius Radius of the cylinder to find shapes on.
4745                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4746
4747             Returns:
4748                 List of all found sub-shapes indices.
4749             """
4750             # Example: see GEOM_TestOthers.py
4751             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4752             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4753             return aList
4754
4755         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4756         #  the specified cylinder by the certain way, defined through \a theState parameter.
4757         #  @param theShape Shape to find sub-shapes of.
4758         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4759         #  @param theAxis Vector (or line, or linear edge), specifying
4760         #                 axis of the cylinder to find shapes on.
4761         #  @param thePnt Point specifying location of the bottom of the cylinder.
4762         #  @param theRadius Radius of the cylinder to find shapes on.
4763         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4764         #  @param theName Object name; when specified, this parameter is used
4765         #         for result publication in the study. Otherwise, if automatic
4766         #         publication is switched on, default value is used for result name.
4767         #
4768         #  @return List of all found sub-shapes.
4769         #
4770         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4771         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4772             """
4773             Find in theShape all sub-shapes of type theShapeType, situated relatively
4774             the specified cylinder by the certain way, defined through theState parameter.
4775
4776             Parameters:
4777                 theShape Shape to find sub-shapes of.
4778                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4779                 theAxis Vector (or line, or linear edge), specifying
4780                         axis of the cylinder to find shapes on.
4781                 theRadius Radius of the cylinder to find shapes on.
4782                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4783                 theName Object name; when specified, this parameter is used
4784                         for result publication in the study. Otherwise, if automatic
4785                         publication is switched on, default value is used for result name.
4786
4787             Returns:
4788                 List of all found sub-shapes.
4789             """
4790             # Example: see GEOM_TestOthers.py
4791             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4792             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4793             self._autoPublish(aList, theName, "shapeOnCylinder")
4794             return aList
4795
4796         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4797         #  the specified cylinder by the certain way, defined through \a theState parameter.
4798         #  @param theShape Shape to find sub-shapes of.
4799         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4800         #  @param theAxis Vector (or line, or linear edge), specifying
4801         #                 axis of the cylinder to find shapes on.
4802         #  @param thePnt Point specifying location of the bottom of the cylinder.
4803         #  @param theRadius Radius of the cylinder to find shapes on.
4804         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4805         #
4806         #  @return List of all found sub-shapes indices
4807         #
4808         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4809         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4810             """
4811             Find in theShape all sub-shapes of type theShapeType, situated relatively
4812             the specified cylinder by the certain way, defined through theState parameter.
4813
4814             Parameters:
4815                 theShape Shape to find sub-shapes of.
4816                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4817                 theAxis Vector (or line, or linear edge), specifying
4818                         axis of the cylinder to find shapes on.
4819                 theRadius Radius of the cylinder to find shapes on.
4820                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4821
4822             Returns:
4823                 List of all found sub-shapes indices.            
4824             """
4825             # Example: see GEOM_TestOthers.py
4826             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4827             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4828             return aList
4829
4830         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4831         #  the specified sphere by the certain way, defined through \a theState parameter.
4832         #  @param theShape Shape to find sub-shapes of.
4833         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4834         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4835         #  @param theRadius Radius of the sphere to find shapes on.
4836         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4837         #  @param theName Object name; when specified, this parameter is used
4838         #         for result publication in the study. Otherwise, if automatic
4839         #         publication is switched on, default value is used for result name.
4840         #
4841         #  @return List of all found sub-shapes.
4842         #
4843         #  @ref swig_GetShapesOnSphere "Example"
4844         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4845             """
4846             Find in theShape all sub-shapes of type theShapeType, situated relatively
4847             the specified sphere by the certain way, defined through theState parameter.
4848
4849             Parameters:
4850                 theShape Shape to find sub-shapes of.
4851                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4852                 theCenter Point, specifying center of the sphere to find shapes on.
4853                 theRadius Radius of the sphere to find shapes on.
4854                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4855                 theName Object name; when specified, this parameter is used
4856                         for result publication in the study. Otherwise, if automatic
4857                         publication is switched on, default value is used for result name.
4858
4859             Returns:
4860                 List of all found sub-shapes.
4861             """
4862             # Example: see GEOM_TestOthers.py
4863             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4864             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4865             self._autoPublish(aList, theName, "shapeOnSphere")
4866             return aList
4867
4868         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4869         #  the specified sphere by the certain way, defined through \a theState parameter.
4870         #  @param theShape Shape to find sub-shapes of.
4871         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4872         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4873         #  @param theRadius Radius of the sphere to find shapes on.
4874         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4875         #
4876         #  @return List of all found sub-shapes indices.
4877         #
4878         #  @ref swig_GetShapesOnSphereIDs "Example"
4879         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4880             """
4881             Find in theShape all sub-shapes of type theShapeType, situated relatively
4882             the specified sphere by the certain way, defined through theState parameter.
4883
4884             Parameters:
4885                 theShape Shape to find sub-shapes of.
4886                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4887                 theCenter Point, specifying center of the sphere to find shapes on.
4888                 theRadius Radius of the sphere to find shapes on.
4889                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4890
4891             Returns:
4892                 List of all found sub-shapes indices.
4893             """
4894             # Example: see GEOM_TestOthers.py
4895             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4896             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4897             return aList
4898
4899         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4900         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4901         #  @param theShape Shape to find sub-shapes of.
4902         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4903         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4904         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4905         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4906         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4907         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4908         #  @param theName Object name; when specified, this parameter is used
4909         #         for result publication in the study. Otherwise, if automatic
4910         #         publication is switched on, default value is used for result name.
4911         #
4912         #  @return List of all found sub-shapes.
4913         #
4914         #  @ref swig_GetShapesOnQuadrangle "Example"
4915         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4916                                   theTopLeftPoint, theTopRigthPoint,
4917                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4918             """
4919             Find in theShape all sub-shapes of type theShapeType, situated relatively
4920             the specified quadrangle by the certain way, defined through theState parameter.
4921
4922             Parameters:
4923                 theShape Shape to find sub-shapes of.
4924                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4925                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4926                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4927                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4928                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4929                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4930                 theName Object name; when specified, this parameter is used
4931                         for result publication in the study. Otherwise, if automatic
4932                         publication is switched on, default value is used for result name.
4933
4934             Returns:
4935                 List of all found sub-shapes.
4936             """
4937             # Example: see GEOM_TestOthers.py
4938             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4939                                                         theTopLeftPoint, theTopRigthPoint,
4940                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4941             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4942             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4943             return aList
4944
4945         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4946         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4947         #  @param theShape Shape to find sub-shapes of.
4948         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4949         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4950         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4951         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4952         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4953         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4954         #
4955         #  @return List of all found sub-shapes indices.
4956         #
4957         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4958         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4959                                      theTopLeftPoint, theTopRigthPoint,
4960                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4961             """
4962             Find in theShape all sub-shapes of type theShapeType, situated relatively
4963             the specified quadrangle by the certain way, defined through theState parameter.
4964
4965             Parameters:
4966                 theShape Shape to find sub-shapes of.
4967                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4968                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4969                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4970                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4971                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4972                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4973
4974             Returns:
4975                 List of all found sub-shapes indices.
4976             """
4977
4978             # Example: see GEOM_TestOthers.py
4979             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4980                                                            theTopLeftPoint, theTopRigthPoint,
4981                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4982             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4983             return aList
4984
4985         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4986         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4987         #  @param theBox Shape for relative comparing.
4988         #  @param theShape Shape to find sub-shapes of.
4989         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4990         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4991         #  @param theName Object name; when specified, this parameter is used
4992         #         for result publication in the study. Otherwise, if automatic
4993         #         publication is switched on, default value is used for result name.
4994         #
4995         #  @return List of all found sub-shapes.
4996         #
4997         #  @ref swig_GetShapesOnBox "Example"
4998         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4999             """
5000             Find in theShape all sub-shapes of type theShapeType, situated relatively
5001             the specified theBox by the certain way, defined through theState parameter.
5002
5003             Parameters:
5004                 theBox Shape for relative comparing.
5005                 theShape Shape to find sub-shapes of.
5006                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5007                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5008                 theName Object name; when specified, this parameter is used
5009                         for result publication in the study. Otherwise, if automatic
5010                         publication is switched on, default value is used for result name.
5011
5012             Returns:
5013                 List of all found sub-shapes.
5014             """
5015             # Example: see GEOM_TestOthers.py
5016             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5017             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5018             self._autoPublish(aList, theName, "shapeOnBox")
5019             return aList
5020
5021         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5022         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5023         #  @param theBox Shape for relative comparing.
5024         #  @param theShape Shape to find sub-shapes of.
5025         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5026         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5027         #
5028         #  @return List of all found sub-shapes indices.
5029         #
5030         #  @ref swig_GetShapesOnBoxIDs "Example"
5031         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5032             """
5033             Find in theShape all sub-shapes of type theShapeType, situated relatively
5034             the specified theBox by the certain way, defined through theState parameter.
5035
5036             Parameters:
5037                 theBox Shape for relative comparing.
5038                 theShape Shape to find sub-shapes of.
5039                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5040                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5041
5042             Returns:
5043                 List of all found sub-shapes indices.
5044             """
5045             # Example: see GEOM_TestOthers.py
5046             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5047             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5048             return aList
5049
5050         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5051         #  situated relatively the specified \a theCheckShape by the
5052         #  certain way, defined through \a theState parameter.
5053         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5054         #  @param theShape Shape to find sub-shapes of.
5055         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5056         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5057         #  @param theName Object name; when specified, this parameter is used
5058         #         for result publication in the study. Otherwise, if automatic
5059         #         publication is switched on, default value is used for result name.
5060         #
5061         #  @return List of all found sub-shapes.
5062         #
5063         #  @ref swig_GetShapesOnShape "Example"
5064         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5065             """
5066             Find in theShape all sub-shapes of type theShapeType,
5067             situated relatively the specified theCheckShape by the
5068             certain way, defined through theState parameter.
5069
5070             Parameters:
5071                 theCheckShape Shape for relative comparing. It must be a solid.
5072                 theShape Shape to find sub-shapes of.
5073                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5074                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5075                 theName Object name; when specified, this parameter is used
5076                         for result publication in the study. Otherwise, if automatic
5077                         publication is switched on, default value is used for result name.
5078
5079             Returns:
5080                 List of all found sub-shapes.
5081             """
5082             # Example: see GEOM_TestOthers.py
5083             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5084                                                    theShapeType, theState)
5085             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5086             self._autoPublish(aList, theName, "shapeOnShape")
5087             return aList
5088
5089         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5090         #  situated relatively the specified \a theCheckShape by the
5091         #  certain way, defined through \a theState parameter.
5092         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5093         #  @param theShape Shape to find sub-shapes of.
5094         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5095         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5096         #  @param theName Object name; when specified, this parameter is used
5097         #         for result publication in the study. Otherwise, if automatic
5098         #         publication is switched on, default value is used for result name.
5099         #
5100         #  @return All found sub-shapes as compound.
5101         #
5102         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5103         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5104             """
5105             Find in theShape all sub-shapes of type theShapeType,
5106             situated relatively the specified theCheckShape by the
5107             certain way, defined through theState parameter.
5108
5109             Parameters:
5110                 theCheckShape Shape for relative comparing. It must be a solid.
5111                 theShape Shape to find sub-shapes of.
5112                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5113                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5114                 theName Object name; when specified, this parameter is used
5115                         for result publication in the study. Otherwise, if automatic
5116                         publication is switched on, default value is used for result name.
5117
5118             Returns:
5119                 All found sub-shapes as compound.
5120             """
5121             # Example: see GEOM_TestOthers.py
5122             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5123                                                              theShapeType, theState)
5124             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5125             self._autoPublish(anObj, theName, "shapeOnShape")
5126             return anObj
5127
5128         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5129         #  situated relatively the specified \a theCheckShape by the
5130         #  certain way, defined through \a theState parameter.
5131         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5132         #  @param theShape Shape to find sub-shapes of.
5133         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5134         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5135         #
5136         #  @return List of all found sub-shapes indices.
5137         #
5138         #  @ref swig_GetShapesOnShapeIDs "Example"
5139         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5140             """
5141             Find in theShape all sub-shapes of type theShapeType,
5142             situated relatively the specified theCheckShape by the
5143             certain way, defined through theState parameter.
5144
5145             Parameters:
5146                 theCheckShape Shape for relative comparing. It must be a solid.
5147                 theShape Shape to find sub-shapes of.
5148                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5149                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5150
5151             Returns:
5152                 List of all found sub-shapes indices.
5153             """
5154             # Example: see GEOM_TestOthers.py
5155             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5156                                                       theShapeType, theState)
5157             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5158             return aList
5159
5160         ## Get sub-shape(s) of theShapeWhere, which are
5161         #  coincident with \a theShapeWhat or could be a part of it.
5162         #  @param theShapeWhere Shape to find sub-shapes of.
5163         #  @param theShapeWhat Shape, specifying what to find.
5164         #  @param isNewImplementation implementation of GetInPlace functionality
5165         #             (default = False, old alghorithm based on shape properties)
5166         #  @param theName Object name; when specified, this parameter is used
5167         #         for result publication in the study. Otherwise, if automatic
5168         #         publication is switched on, default value is used for result name.
5169         #
5170         #  @return Group of all found sub-shapes or a single found sub-shape.
5171         #
5172         #  @note This function has a restriction on argument shapes.
5173         #        If \a theShapeWhere has curved parts with significantly
5174         #        outstanding centres (i.e. the mass centre of a part is closer to
5175         #        \a theShapeWhat than to the part), such parts will not be found.
5176         #        @image html get_in_place_lost_part.png
5177         #
5178         #  @ref swig_GetInPlace "Example"
5179         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5180             """
5181             Get sub-shape(s) of theShapeWhere, which are
5182             coincident with  theShapeWhat or could be a part of it.
5183
5184             Parameters:
5185                 theShapeWhere Shape to find sub-shapes of.
5186                 theShapeWhat Shape, specifying what to find.
5187                 isNewImplementation Implementation of GetInPlace functionality
5188                                     (default = False, old alghorithm based on shape properties)
5189                 theName Object name; when specified, this parameter is used
5190                         for result publication in the study. Otherwise, if automatic
5191                         publication is switched on, default value is used for result name.
5192
5193             Returns:
5194                 Group of all found sub-shapes or a single found sub-shape.
5195
5196                 
5197             Note:
5198                 This function has a restriction on argument shapes.
5199                 If theShapeWhere has curved parts with significantly
5200                 outstanding centres (i.e. the mass centre of a part is closer to
5201                 theShapeWhat than to the part), such parts will not be found.
5202             """
5203             # Example: see GEOM_TestOthers.py
5204             anObj = None
5205             if isNewImplementation:
5206                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5207             else:
5208                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5209                 pass
5210             RaiseIfFailed("GetInPlace", self.ShapesOp)
5211             self._autoPublish(anObj, theName, "inplace")
5212             return anObj
5213
5214         ## Get sub-shape(s) of \a theShapeWhere, which are
5215         #  coincident with \a theShapeWhat or could be a part of it.
5216         #
5217         #  Implementation of this method is based on a saved history of an operation,
5218         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5219         #  arguments (an argument shape or a sub-shape of an argument shape).
5220         #  The operation could be the Partition or one of boolean operations,
5221         #  performed on simple shapes (not on compounds).
5222         #
5223         #  @param theShapeWhere Shape to find sub-shapes of.
5224         #  @param theShapeWhat Shape, specifying what to find (must be in the
5225         #                      building history of the ShapeWhere).
5226         #  @param theName Object name; when specified, this parameter is used
5227         #         for result publication in the study. Otherwise, if automatic
5228         #         publication is switched on, default value is used for result name.
5229         #
5230         #  @return Group of all found sub-shapes or a single found sub-shape.
5231         #
5232         #  @ref swig_GetInPlace "Example"
5233         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5234             """
5235             Implementation of this method is based on a saved history of an operation,
5236             produced theShapeWhere. The theShapeWhat must be among this operation's
5237             arguments (an argument shape or a sub-shape of an argument shape).
5238             The operation could be the Partition or one of boolean operations,
5239             performed on simple shapes (not on compounds).
5240
5241             Parameters:
5242                 theShapeWhere Shape to find sub-shapes of.
5243                 theShapeWhat Shape, specifying what to find (must be in the
5244                                 building history of the ShapeWhere).
5245                 theName Object name; when specified, this parameter is used
5246                         for result publication in the study. Otherwise, if automatic
5247                         publication is switched on, default value is used for result name.
5248
5249             Returns:
5250                 Group of all found sub-shapes or a single found sub-shape.
5251             """
5252             # Example: see GEOM_TestOthers.py
5253             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5254             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5255             self._autoPublish(anObj, theName, "inplace")
5256             return anObj
5257
5258         ## Get sub-shape of theShapeWhere, which is
5259         #  equal to \a theShapeWhat.
5260         #  @param theShapeWhere Shape to find sub-shape of.
5261         #  @param theShapeWhat Shape, specifying what to find.
5262         #  @param theName Object name; when specified, this parameter is used
5263         #         for result publication in the study. Otherwise, if automatic
5264         #         publication is switched on, default value is used for result name.
5265         #
5266         #  @return New GEOM.GEOM_Object for found sub-shape.
5267         #
5268         #  @ref swig_GetSame "Example"
5269         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5270             """
5271             Get sub-shape of theShapeWhere, which is
5272             equal to theShapeWhat.
5273
5274             Parameters:
5275                 theShapeWhere Shape to find sub-shape of.
5276                 theShapeWhat Shape, specifying what to find.
5277                 theName Object name; when specified, this parameter is used
5278                         for result publication in the study. Otherwise, if automatic
5279                         publication is switched on, default value is used for result name.
5280
5281             Returns:
5282                 New GEOM.GEOM_Object for found sub-shape.
5283             """
5284             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5285             RaiseIfFailed("GetSame", self.ShapesOp)
5286             self._autoPublish(anObj, theName, "sameShape")
5287             return anObj
5288
5289
5290         ## Get sub-shape indices of theShapeWhere, which is
5291         #  equal to \a theShapeWhat.
5292         #  @param theShapeWhere Shape to find sub-shape of.
5293         #  @param theShapeWhat Shape, specifying what to find.
5294         #  @return List of all found sub-shapes indices. 
5295         #
5296         #  @ref swig_GetSame "Example"
5297         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5298             """
5299             Get sub-shape indices of theShapeWhere, which is
5300             equal to theShapeWhat.
5301
5302             Parameters:
5303                 theShapeWhere Shape to find sub-shape of.
5304                 theShapeWhat Shape, specifying what to find.
5305
5306             Returns:
5307                 List of all found sub-shapes indices.
5308             """
5309             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5310             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5311             return anObj
5312
5313
5314         # end of l4_obtain
5315         ## @}
5316
5317         ## @addtogroup l4_access
5318         ## @{
5319
5320         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5321         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5322         #  @param aShape Shape to get sub-shape of.
5323         #  @param ListOfID List of sub-shapes indices.
5324         #  @param theName Object name; when specified, this parameter is used
5325         #         for result publication in the study. Otherwise, if automatic
5326         #         publication is switched on, default value is used for result name.
5327         #
5328         #  @return Found sub-shape.
5329         #
5330         #  @ref swig_all_decompose "Example"
5331         def GetSubShape(self, aShape, ListOfID, theName=None):
5332             """
5333             Obtain a composite sub-shape of aShape, composed from sub-shapes
5334             of aShape, selected by their unique IDs inside aShape
5335
5336             Parameters:
5337                 aShape Shape to get sub-shape of.
5338                 ListOfID List of sub-shapes indices.
5339                 theName Object name; when specified, this parameter is used
5340                         for result publication in the study. Otherwise, if automatic
5341                         publication is switched on, default value is used for result name.
5342
5343             Returns:
5344                 Found sub-shape.
5345             """
5346             # Example: see GEOM_TestAll.py
5347             anObj = self.AddSubShape(aShape,ListOfID)
5348             self._autoPublish(anObj, theName, "subshape")
5349             return anObj
5350
5351         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5352         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5353         #  @param aShape Shape to get sub-shape of.
5354         #  @param aSubShape Sub-shapes of aShape.
5355         #  @return ID of found sub-shape.
5356         #
5357         #  @ref swig_all_decompose "Example"
5358         def GetSubShapeID(self, aShape, aSubShape):
5359             """
5360             Obtain unique ID of sub-shape aSubShape inside aShape
5361             of aShape, selected by their unique IDs inside aShape
5362
5363             Parameters:
5364                aShape Shape to get sub-shape of.
5365                aSubShape Sub-shapes of aShape.
5366
5367             Returns:
5368                ID of found sub-shape.
5369             """
5370             # Example: see GEOM_TestAll.py
5371             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5372             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5373             return anID
5374             
5375         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5376         #  This function is provided for performance purpose. The complexity is O(n) with n
5377         #  the number of subobjects of aShape
5378         #  @param aShape Shape to get sub-shape of.
5379         #  @param aSubShapes Sub-shapes of aShape.
5380         #  @return list of IDs of found sub-shapes.
5381         #
5382         #  @ref swig_all_decompose "Example"
5383         def GetSubShapesIDs(self, aShape, aSubShapes):
5384             """
5385             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5386             This function is provided for performance purpose. The complexity is O(n) with n
5387             the number of subobjects of aShape
5388
5389             Parameters:
5390                aShape Shape to get sub-shape of.
5391                aSubShapes Sub-shapes of aShape.
5392
5393             Returns:
5394                List of IDs of found sub-shape.
5395             """
5396             # Example: see GEOM_TestAll.py
5397             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5398             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5399             return anIDs
5400
5401         # end of l4_access
5402         ## @}
5403
5404         ## @addtogroup l4_decompose
5405         ## @{
5406
5407         ## Get all sub-shapes and groups of \a theShape,
5408         #  that were created already by any other methods.
5409         #  @param theShape Any shape.
5410         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5411         #                       returned, else all found sub-shapes and groups.
5412         #  @return List of existing sub-objects of \a theShape.
5413         #
5414         #  @ref swig_all_decompose "Example"
5415         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5416             """
5417             Get all sub-shapes and groups of theShape,
5418             that were created already by any other methods.
5419
5420             Parameters:
5421                 theShape Any shape.
5422                 theGroupsOnly If this parameter is TRUE, only groups will be
5423                                  returned, else all found sub-shapes and groups.
5424
5425             Returns:
5426                 List of existing sub-objects of theShape.
5427             """
5428             # Example: see GEOM_TestAll.py
5429             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5430             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5431             return ListObj
5432
5433         ## Get all groups of \a theShape,
5434         #  that were created already by any other methods.
5435         #  @param theShape Any shape.
5436         #  @return List of existing groups of \a theShape.
5437         #
5438         #  @ref swig_all_decompose "Example"
5439         def GetGroups(self, theShape):
5440             """
5441             Get all groups of theShape,
5442             that were created already by any other methods.
5443
5444             Parameters:
5445                 theShape Any shape.
5446
5447             Returns:
5448                 List of existing groups of theShape.
5449             """
5450             # Example: see GEOM_TestAll.py
5451             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5452             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5453             return ListObj
5454
5455         ## Explode a shape on sub-shapes of a given type.
5456         #  If the shape itself matches the type, it is also returned.
5457         #  @param aShape Shape to be exploded.
5458         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5459         #  @param theName Object name; when specified, this parameter is used
5460         #         for result publication in the study. Otherwise, if automatic
5461         #         publication is switched on, default value is used for result name.
5462         #
5463         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5464         #
5465         #  @ref swig_all_decompose "Example"
5466         def SubShapeAll(self, aShape, aType, theName=None):
5467             """
5468             Explode a shape on sub-shapes of a given type.
5469             If the shape itself matches the type, it is also returned.
5470
5471             Parameters:
5472                 aShape Shape to be exploded.
5473                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5474                 theName Object name; when specified, this parameter is used
5475                         for result publication in the study. Otherwise, if automatic
5476                         publication is switched on, default value is used for result name.
5477
5478             Returns:
5479                 List of sub-shapes of type theShapeType, contained in theShape.
5480             """
5481             # Example: see GEOM_TestAll.py
5482             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5483             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5484             self._autoPublish(ListObj, theName, "subshape")
5485             return ListObj
5486
5487         ## Explode a shape on sub-shapes of a given type.
5488         #  @param aShape Shape to be exploded.
5489         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5490         #  @return List of IDs of sub-shapes.
5491         #
5492         #  @ref swig_all_decompose "Example"
5493         def SubShapeAllIDs(self, aShape, aType):
5494             """
5495             Explode a shape on sub-shapes of a given type.
5496
5497             Parameters:
5498                 aShape Shape to be exploded (see geompy.ShapeType)
5499                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5500
5501             Returns:
5502                 List of IDs of sub-shapes.
5503             """
5504             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5505             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5506             return ListObj
5507
5508         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5509         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5510         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5511         #  @param aShape Shape to get sub-shape of.
5512         #  @param ListOfInd List of sub-shapes indices.
5513         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5514         #  @param theName Object name; when specified, this parameter is used
5515         #         for result publication in the study. Otherwise, if automatic
5516         #         publication is switched on, default value is used for result name.
5517         #
5518         #  @return A compound of sub-shapes of aShape.
5519         #
5520         #  @ref swig_all_decompose "Example"
5521         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5522             """
5523             Obtain a compound of sub-shapes of aShape,
5524             selected by their indices in list of all sub-shapes of type aType.
5525             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5526             
5527             Parameters:
5528                 aShape Shape to get sub-shape of.
5529                 ListOfID List of sub-shapes indices.
5530                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5531                 theName Object name; when specified, this parameter is used
5532                         for result publication in the study. Otherwise, if automatic
5533                         publication is switched on, default value is used for result name.
5534
5535             Returns:
5536                 A compound of sub-shapes of aShape.
5537             """
5538             # Example: see GEOM_TestAll.py
5539             ListOfIDs = []
5540             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5541             for ind in ListOfInd:
5542                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5543             # note: auto-publishing is done in self.GetSubShape()
5544             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5545             return anObj
5546
5547         ## Explode a shape on sub-shapes of a given type.
5548         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5549         #  If the shape itself matches the type, it is also returned.
5550         #  @param aShape Shape to be exploded.
5551         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5552         #  @param theName Object name; when specified, this parameter is used
5553         #         for result publication in the study. Otherwise, if automatic
5554         #         publication is switched on, default value is used for result name.
5555         #
5556         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5557         #
5558         #  @ref swig_SubShapeAllSorted "Example"
5559         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5560             """
5561             Explode a shape on sub-shapes of a given type.
5562             Sub-shapes will be sorted by coordinates of their gravity centers.
5563             If the shape itself matches the type, it is also returned.
5564
5565             Parameters: 
5566                 aShape Shape to be exploded.
5567                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5568                 theName Object name; when specified, this parameter is used
5569                         for result publication in the study. Otherwise, if automatic
5570                         publication is switched on, default value is used for result name.
5571
5572             Returns: 
5573                 List of sub-shapes of type theShapeType, contained in theShape.
5574             """
5575             # Example: see GEOM_TestAll.py
5576             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5577             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5578             self._autoPublish(ListObj, theName, "subshape")
5579             return ListObj
5580
5581         ## Explode a shape on sub-shapes of a given type.
5582         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5583         #  @param aShape Shape to be exploded.
5584         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5585         #  @return List of IDs of sub-shapes.
5586         #
5587         #  @ref swig_all_decompose "Example"
5588         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5589             """
5590             Explode a shape on sub-shapes of a given type.
5591             Sub-shapes will be sorted by coordinates of their gravity centers.
5592
5593             Parameters: 
5594                 aShape Shape to be exploded.
5595                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5596
5597             Returns: 
5598                 List of IDs of sub-shapes.
5599             """
5600             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5601             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5602             return ListIDs
5603
5604         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5605         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5606         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5607         #  @param aShape Shape to get sub-shape of.
5608         #  @param ListOfInd List of sub-shapes indices.
5609         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5610         #  @param theName Object name; when specified, this parameter is used
5611         #         for result publication in the study. Otherwise, if automatic
5612         #         publication is switched on, default value is used for result name.
5613         #
5614         #  @return A compound of sub-shapes of aShape.
5615         #
5616         #  @ref swig_all_decompose "Example"
5617         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5618             """
5619             Obtain a compound of sub-shapes of aShape,
5620             selected by they indices in sorted list of all sub-shapes of type aType.
5621             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5622
5623             Parameters:
5624                 aShape Shape to get sub-shape of.
5625                 ListOfID List of sub-shapes indices.
5626                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5627                 theName Object name; when specified, this parameter is used
5628                         for result publication in the study. Otherwise, if automatic
5629                         publication is switched on, default value is used for result name.
5630
5631             Returns:
5632                 A compound of sub-shapes of aShape.
5633             """
5634             # Example: see GEOM_TestAll.py
5635             ListOfIDs = []
5636             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5637             for ind in ListOfInd:
5638                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5639             # note: auto-publishing is done in self.GetSubShape()
5640             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5641             return anObj
5642
5643         ## Extract shapes (excluding the main shape) of given type.
5644         #  @param aShape The shape.
5645         #  @param aType  The shape type (see ShapeType())
5646         #  @param isSorted Boolean flag to switch sorting on/off.
5647         #  @param theName Object name; when specified, this parameter is used
5648         #         for result publication in the study. Otherwise, if automatic
5649         #         publication is switched on, default value is used for result name.
5650         #
5651         #  @return List of sub-shapes of type aType, contained in aShape.
5652         #
5653         #  @ref swig_FilletChamfer "Example"
5654         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5655             """
5656             Extract shapes (excluding the main shape) of given type.
5657
5658             Parameters:
5659                 aShape The shape.
5660                 aType  The shape type (see geompy.ShapeType)
5661                 isSorted Boolean flag to switch sorting on/off.
5662                 theName Object name; when specified, this parameter is used
5663                         for result publication in the study. Otherwise, if automatic
5664                         publication is switched on, default value is used for result name.
5665
5666             Returns:     
5667                 List of sub-shapes of type aType, contained in aShape.
5668             """
5669             # Example: see GEOM_TestAll.py
5670             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5671             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5672             self._autoPublish(ListObj, theName, "subshape")
5673             return ListObj
5674
5675         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5676         #  @param aShape Main shape.
5677         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5678         #  @param theName Object name; when specified, this parameter is used
5679         #         for result publication in the study. Otherwise, if automatic
5680         #         publication is switched on, default value is used for result name.
5681         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5682         #
5683         #  @ref swig_all_decompose "Example"
5684         def SubShapes(self, aShape, anIDs, theName=None):
5685             """
5686             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5687
5688             Parameters:
5689                 aShape Main shape.
5690                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5691                 theName Object name; when specified, this parameter is used
5692                         for result publication in the study. Otherwise, if automatic
5693                         publication is switched on, default value is used for result name.
5694
5695             Returns:      
5696                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5697             """
5698             # Example: see GEOM_TestAll.py
5699             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5700             RaiseIfFailed("SubShapes", self.ShapesOp)
5701             self._autoPublish(ListObj, theName, "subshape")
5702             return ListObj
5703
5704         # end of l4_decompose
5705         ## @}
5706
5707         ## @addtogroup l4_decompose_d
5708         ## @{
5709
5710         ## Deprecated method
5711         #  It works like SubShapeAllSortedCentres(), but wrongly
5712         #  defines centres of faces, shells and solids.
5713         def SubShapeAllSorted(self, aShape, aType, theName=None):
5714             """
5715             Deprecated method
5716             It works like geompy.SubShapeAllSortedCentres, but wrongly
5717             defines centres of faces, shells and solids.
5718             """
5719             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5720             RaiseIfFailed("MakeExplode", self.ShapesOp)
5721             self._autoPublish(ListObj, theName, "subshape")
5722             return ListObj
5723
5724         ## Deprecated method
5725         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5726         #  defines centres of faces, shells and solids.
5727         def SubShapeAllSortedIDs(self, aShape, aType):
5728             """
5729             Deprecated method
5730             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5731             defines centres of faces, shells and solids.
5732             """
5733             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5734             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5735             return ListIDs
5736
5737         ## Deprecated method
5738         #  It works like SubShapeSortedCentres(), but has a bug
5739         #  (wrongly defines centres of faces, shells and solids).
5740         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5741             """
5742             Deprecated method
5743             It works like geompy.SubShapeSortedCentres, but has a bug
5744             (wrongly defines centres of faces, shells and solids).
5745             """
5746             ListOfIDs = []
5747             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5748             for ind in ListOfInd:
5749                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5750             # note: auto-publishing is done in self.GetSubShape()
5751             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5752             return anObj
5753
5754         # end of l4_decompose_d
5755         ## @}
5756
5757         ## @addtogroup l3_healing
5758         ## @{
5759
5760         ## Apply a sequence of Shape Healing operators to the given object.
5761         #  @param theShape Shape to be processed.
5762         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5763         #  @param theParameters List of names of parameters
5764         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5765         #  @param theValues List of values of parameters, in the same order
5766         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5767         #  @param theName Object name; when specified, this parameter is used
5768         #         for result publication in the study. Otherwise, if automatic
5769         #         publication is switched on, default value is used for result name.
5770         #
5771         #  <b> Operators and Parameters: </b> \n
5772         #
5773         #  * \b FixShape - corrects invalid shapes. \n
5774         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5775         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5776         #
5777         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5778         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5779         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5780         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5781         #
5782         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5783         #    surfaces in segments using a certain angle. \n
5784         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5785         #    if Angle=180, four if Angle=90, etc). \n
5786         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5787         #
5788         #  * \b SplitClosedFaces - splits closed faces in segments.
5789         #    The number of segments depends on the number of splitting points.\n
5790         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5791         #
5792         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5793         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5794         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5795         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5796         #   This and the previous parameters can take the following values:\n
5797         #   \b Parametric \b Continuity \n
5798         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5799         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5800         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5801         #    ruling out sharp edges).\n
5802         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5803         #       are of the same magnitude).\n
5804         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5805         #    or surfaces (d/du C(u)) are the same at junction. \n
5806         #   \b Geometric \b Continuity \n
5807         #   \b G1: first derivatives are proportional at junction.\n
5808         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5809         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5810         #   \b G2: first and second derivatives are proportional at junction.
5811         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5812         #    continuity requires that the underlying parameterization was continuous as well.
5813         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5814         #
5815         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5816         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5817         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5818         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5819         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5820         #       with the specified parameters.\n
5821         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5822         #       with the specified parameters.\n
5823         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5824         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5825         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5826         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5827         #
5828         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5829         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5830         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5831         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5832         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5833         #
5834         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5835         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5836         #
5837         #
5838         #  @return New GEOM.GEOM_Object, containing processed shape.
5839         #
5840         #  \n @ref tui_shape_processing "Example"
5841         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5842             """
5843             Apply a sequence of Shape Healing operators to the given object.
5844
5845             Parameters:
5846                 theShape Shape to be processed.
5847                 theValues List of values of parameters, in the same order
5848                           as parameters are listed in theParameters list.
5849                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5850                 theParameters List of names of parameters
5851                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5852                 theName Object name; when specified, this parameter is used
5853                         for result publication in the study. Otherwise, if automatic
5854                         publication is switched on, default value is used for result name.
5855
5856                 Operators and Parameters:
5857
5858                  * FixShape - corrects invalid shapes.
5859                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5860                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5861                  * FixFaceSize - removes small faces, such as spots and strips.
5862                      * FixFaceSize.Tolerance - defines minimum possible face size.
5863                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5864                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5865                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5866                                 in segments using a certain angle.
5867                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5868                                           if Angle=180, four if Angle=90, etc).
5869                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5870                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5871                                       splitting points.
5872                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5873                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5874                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5875                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5876                      * SplitContinuity.CurveContinuity - required continuity for curves.
5877                        This and the previous parameters can take the following values:
5878                        
5879                        Parametric Continuity:
5880                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5881                                                    coincidental. The curves or surfaces may still meet at an angle,
5882                                                    giving rise to a sharp corner or edge).
5883                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5884                                                    are parallel, ruling out sharp edges).
5885                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5886                                                   or surfaces are of the same magnitude).
5887                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5888                           curves or surfaces (d/du C(u)) are the same at junction.
5889                           
5890                        Geometric Continuity:
5891                        G1: first derivatives are proportional at junction.
5892                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5893                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5894                        G2: first and second derivatives are proportional at junction. As the names imply,
5895                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5896                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5897                            geometric continuity of order n, but not vice-versa.
5898                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5899                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5900                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5901                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5902                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5903                                                         the specified parameters.
5904                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5905                                                         the specified parameters.
5906                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5907                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5908                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5909                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5910                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5911                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5912                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5913                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5914                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5915                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5916                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5917
5918             Returns:
5919                 New GEOM.GEOM_Object, containing processed shape.
5920
5921             Note: For more information look through SALOME Geometry User's Guide->
5922                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5923             """
5924             # Example: see GEOM_TestHealing.py
5925             theValues,Parameters = ParseList(theValues)
5926             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5927             # To avoid script failure in case of good argument shape
5928             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5929                 return theShape
5930             RaiseIfFailed("ProcessShape", self.HealOp)
5931             for string in (theOperators + theParameters):
5932                 Parameters = ":" + Parameters
5933                 pass
5934             anObj.SetParameters(Parameters)
5935             self._autoPublish(anObj, theName, "healed")
5936             return anObj
5937
5938         ## Remove faces from the given object (shape).
5939         #  @param theObject Shape to be processed.
5940         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5941         #                  removes ALL faces of the given object.
5942         #  @param theName Object name; when specified, this parameter is used
5943         #         for result publication in the study. Otherwise, if automatic
5944         #         publication is switched on, default value is used for result name.
5945         #
5946         #  @return New GEOM.GEOM_Object, containing processed shape.
5947         #
5948         #  @ref tui_suppress_faces "Example"
5949         def SuppressFaces(self, theObject, theFaces, theName=None):
5950             """
5951             Remove faces from the given object (shape).
5952
5953             Parameters:
5954                 theObject Shape to be processed.
5955                 theFaces Indices of faces to be removed, if EMPTY then the method
5956                          removes ALL faces of the given object.
5957                 theName Object name; when specified, this parameter is used
5958                         for result publication in the study. Otherwise, if automatic
5959                         publication is switched on, default value is used for result name.
5960
5961             Returns:
5962                 New GEOM.GEOM_Object, containing processed shape.
5963             """
5964             # Example: see GEOM_TestHealing.py
5965             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5966             RaiseIfFailed("SuppressFaces", self.HealOp)
5967             self._autoPublish(anObj, theName, "suppressFaces")
5968             return anObj
5969
5970         ## Sewing of some shapes into single shape.
5971         #  @param ListShape Shapes to be processed.
5972         #  @param theTolerance Required tolerance value.
5973         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5974         #  @param theName Object name; when specified, this parameter is used
5975         #         for result publication in the study. Otherwise, if automatic
5976         #         publication is switched on, default value is used for result name.
5977         #
5978         #  @return New GEOM.GEOM_Object, containing processed shape.
5979         #
5980         #  @ref tui_sewing "Example"
5981         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5982             """
5983             Sewing of some shapes into single shape.
5984
5985             Parameters:
5986                 ListShape Shapes to be processed.
5987                 theTolerance Required tolerance value.
5988                 AllowNonManifold Flag that allows non-manifold sewing.
5989                 theName Object name; when specified, this parameter is used
5990                         for result publication in the study. Otherwise, if automatic
5991                         publication is switched on, default value is used for result name.
5992
5993             Returns:
5994                 New GEOM.GEOM_Object, containing processed shape.
5995             """
5996             # Example: see GEOM_TestHealing.py
5997             comp = self.MakeCompound(ListShape)
5998             # note: auto-publishing is done in self.Sew()
5999             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6000             return anObj
6001
6002         ## Sewing of the given object.
6003         #  @param theObject Shape to be processed.
6004         #  @param theTolerance Required tolerance value.
6005         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6006         #  @param theName Object name; when specified, this parameter is used
6007         #         for result publication in the study. Otherwise, if automatic
6008         #         publication is switched on, default value is used for result name.
6009         #
6010         #  @return New GEOM.GEOM_Object, containing processed shape.
6011         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6012             """
6013             Sewing of the given object.
6014
6015             Parameters:
6016                 theObject Shape to be processed.
6017                 theTolerance Required tolerance value.
6018                 AllowNonManifold Flag that allows non-manifold sewing.
6019                 theName Object name; when specified, this parameter is used
6020                         for result publication in the study. Otherwise, if automatic
6021                         publication is switched on, default value is used for result name.
6022
6023             Returns:
6024                 New GEOM.GEOM_Object, containing processed shape.
6025             """
6026             # Example: see MakeSewing() above
6027             theTolerance,Parameters = ParseParameters(theTolerance)
6028             if AllowNonManifold:
6029                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6030             else:
6031                 anObj = self.HealOp.Sew(theObject, theTolerance)
6032             # To avoid script failure in case of good argument shape
6033             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6034                 return theObject
6035             RaiseIfFailed("Sew", self.HealOp)
6036             anObj.SetParameters(Parameters)
6037             self._autoPublish(anObj, theName, "sewed")
6038             return anObj
6039
6040         ## Rebuild the topology of theCompound of solids by removing
6041         #  of the faces that are shared by several solids.
6042         #  @param theCompound Shape to be processed.
6043         #  @param 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         #  @return New GEOM.GEOM_Object, containing processed shape.
6048         #
6049         #  @ref tui_remove_webs "Example"
6050         def RemoveInternalFaces (self, theCompound, theName=None):
6051             """
6052             Rebuild the topology of theCompound of solids by removing
6053             of the faces that are shared by several solids.
6054
6055             Parameters:
6056                 theCompound Shape to be processed.
6057                 theName Object name; when specified, this parameter is used
6058                         for result publication in the study. Otherwise, if automatic
6059                         publication is switched on, default value is used for result name.
6060
6061             Returns:
6062                 New GEOM.GEOM_Object, containing processed shape.
6063             """
6064             # Example: see GEOM_TestHealing.py
6065             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6066             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6067             self._autoPublish(anObj, theName, "removeWebs")
6068             return anObj
6069
6070         ## Remove internal wires and edges from the given object (face).
6071         #  @param theObject Shape to be processed.
6072         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6073         #                  removes ALL internal wires of the given object.
6074         #  @param theName Object name; when specified, this parameter is used
6075         #         for result publication in the study. Otherwise, if automatic
6076         #         publication is switched on, default value is used for result name.
6077         #
6078         #  @return New GEOM.GEOM_Object, containing processed shape.
6079         #
6080         #  @ref tui_suppress_internal_wires "Example"
6081         def SuppressInternalWires(self, theObject, theWires, theName=None):
6082             """
6083             Remove internal wires and edges from the given object (face).
6084
6085             Parameters:
6086                 theObject Shape to be processed.
6087                 theWires Indices of wires to be removed, if EMPTY then the method
6088                          removes ALL internal wires of the given object.
6089                 theName Object name; when specified, this parameter is used
6090                         for result publication in the study. Otherwise, if automatic
6091                         publication is switched on, default value is used for result name.
6092
6093             Returns:                
6094                 New GEOM.GEOM_Object, containing processed shape.
6095             """
6096             # Example: see GEOM_TestHealing.py
6097             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6098             RaiseIfFailed("RemoveIntWires", self.HealOp)
6099             self._autoPublish(anObj, theName, "suppressWires")
6100             return anObj
6101
6102         ## Remove internal closed contours (holes) from the given object.
6103         #  @param theObject Shape to be processed.
6104         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6105         #                  removes ALL internal holes of the given object
6106         #  @param theName Object name; when specified, this parameter is used
6107         #         for result publication in the study. Otherwise, if automatic
6108         #         publication is switched on, default value is used for result name.
6109         #
6110         #  @return New GEOM.GEOM_Object, containing processed shape.
6111         #
6112         #  @ref tui_suppress_holes "Example"
6113         def SuppressHoles(self, theObject, theWires, theName=None):
6114             """
6115             Remove internal closed contours (holes) from the given object.
6116
6117             Parameters:
6118                 theObject Shape to be processed.
6119                 theWires Indices of wires to be removed, if EMPTY then the method
6120                          removes ALL internal holes of the given object
6121                 theName Object name; when specified, this parameter is used
6122                         for result publication in the study. Otherwise, if automatic
6123                         publication is switched on, default value is used for result name.
6124
6125             Returns:    
6126                 New GEOM.GEOM_Object, containing processed shape.
6127             """
6128             # Example: see GEOM_TestHealing.py
6129             anObj = self.HealOp.FillHoles(theObject, theWires)
6130             RaiseIfFailed("FillHoles", self.HealOp)
6131             self._autoPublish(anObj, theName, "suppressHoles")
6132             return anObj
6133
6134         ## Close an open wire.
6135         #  @param theObject Shape to be processed.
6136         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6137         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6138         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6139         #                        If False : closure by creation of an edge between ends.
6140         #  @param theName Object name; when specified, this parameter is used
6141         #         for result publication in the study. Otherwise, if automatic
6142         #         publication is switched on, default value is used for result name.
6143         #
6144         #  @return New GEOM.GEOM_Object, containing processed shape.
6145         #
6146         #  @ref tui_close_contour "Example"
6147         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6148             """
6149             Close an open wire.
6150
6151             Parameters: 
6152                 theObject Shape to be processed.
6153                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6154                          if [ ], then theObject itself is a wire.
6155                 isCommonVertex If True  : closure by creation of a common vertex,
6156                                If False : closure by creation of an edge between ends.
6157                 theName Object name; when specified, this parameter is used
6158                         for result publication in the study. Otherwise, if automatic
6159                         publication is switched on, default value is used for result name.
6160
6161             Returns:                      
6162                 New GEOM.GEOM_Object, containing processed shape. 
6163             """
6164             # Example: see GEOM_TestHealing.py
6165             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6166             RaiseIfFailed("CloseContour", self.HealOp)
6167             self._autoPublish(anObj, theName, "closeContour")
6168             return anObj
6169
6170         ## Addition of a point to a given edge object.
6171         #  @param theObject Shape to be processed.
6172         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6173         #                      if -1, then theObject itself is the edge.
6174         #  @param theValue Value of parameter on edge or length parameter,
6175         #                  depending on \a isByParameter.
6176         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6177         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
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_add_point_on_edge "Example"
6185         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6186             """
6187             Addition of a point to a given edge object.
6188
6189             Parameters: 
6190                 theObject Shape to be processed.
6191                 theEdgeIndex Index of edge to be divided within theObject's shape,
6192                              if -1, then theObject itself is the edge.
6193                 theValue Value of parameter on edge or length parameter,
6194                          depending on isByParameter.
6195                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6196                               if FALSE : theValue is treated as a length parameter [0..1]
6197                 theName Object name; when specified, this parameter is used
6198                         for result publication in the study. Otherwise, if automatic
6199                         publication is switched on, default value is used for result name.
6200
6201             Returns:  
6202                 New GEOM.GEOM_Object, containing processed shape.
6203             """
6204             # Example: see GEOM_TestHealing.py
6205             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6206             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6207             RaiseIfFailed("DivideEdge", self.HealOp)
6208             anObj.SetParameters(Parameters)
6209             self._autoPublish(anObj, theName, "divideEdge")
6210             return anObj
6211
6212         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6213         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6214         #  @param theVertices A list of vertices to suppress. If the list
6215         #                     is empty, all vertices in a wire will be assumed.
6216         #  @param theName Object name; when specified, this parameter is used
6217         #         for result publication in the study. Otherwise, if automatic
6218         #         publication is switched on, default value is used for result name.
6219         #
6220         #  @return New GEOM.GEOM_Object with modified wire.
6221         #
6222         #  @ref tui_fuse_collinear_edges "Example"
6223         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6224             """
6225             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6226
6227             Parameters: 
6228                 theWire Wire to minimize the number of C1 continuous edges in.
6229                 theVertices A list of vertices to suppress. If the list
6230                             is empty, all vertices in a wire will be assumed.
6231                 theName Object name; when specified, this parameter is used
6232                         for result publication in the study. Otherwise, if automatic
6233                         publication is switched on, default value is used for result name.
6234
6235             Returns:  
6236                 New GEOM.GEOM_Object with modified wire.
6237             """
6238             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6239             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6240             self._autoPublish(anObj, theName, "fuseEdges")
6241             return anObj
6242
6243         ## Change orientation of the given object. Updates given shape.
6244         #  @param theObject Shape to be processed.
6245         #  @return Updated <var>theObject</var>
6246         #
6247         #  @ref swig_todo "Example"
6248         def ChangeOrientationShell(self,theObject):
6249             """
6250             Change orientation of the given object. Updates given shape.
6251
6252             Parameters: 
6253                 theObject Shape to be processed.
6254
6255             Returns:  
6256                 Updated theObject
6257             """
6258             theObject = self.HealOp.ChangeOrientation(theObject)
6259             RaiseIfFailed("ChangeOrientation", self.HealOp)
6260             pass
6261
6262         ## Change orientation of the given object.
6263         #  @param theObject Shape to be processed.
6264         #  @param theName Object name; when specified, this parameter is used
6265         #         for result publication in the study. Otherwise, if automatic
6266         #         publication is switched on, default value is used for result name.
6267         #
6268         #  @return New GEOM.GEOM_Object, containing processed shape.
6269         #
6270         #  @ref swig_todo "Example"
6271         def ChangeOrientationShellCopy(self, theObject, theName=None):
6272             """
6273             Change orientation of the given object.
6274
6275             Parameters:
6276                 theObject Shape to be processed.
6277                 theName Object name; when specified, this parameter is used
6278                         for result publication in the study. Otherwise, if automatic
6279                         publication is switched on, default value is used for result name.
6280
6281             Returns:   
6282                 New GEOM.GEOM_Object, containing processed shape.
6283             """
6284             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6285             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6286             self._autoPublish(anObj, theName, "reversed")
6287             return anObj
6288
6289         ## Try to limit tolerance of the given object by value \a theTolerance.
6290         #  @param theObject Shape to be processed.
6291         #  @param theTolerance Required tolerance value.
6292         #  @param theName Object name; when specified, this parameter is used
6293         #         for result publication in the study. Otherwise, if automatic
6294         #         publication is switched on, default value is used for result name.
6295         #
6296         #  @return New GEOM.GEOM_Object, containing processed shape.
6297         #
6298         #  @ref tui_limit_tolerance "Example"
6299         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6300             """
6301             Try to limit tolerance of the given object by value theTolerance.
6302
6303             Parameters:
6304                 theObject Shape to be processed.
6305                 theTolerance Required tolerance value.
6306                 theName Object name; when specified, this parameter is used
6307                         for result publication in the study. Otherwise, if automatic
6308                         publication is switched on, default value is used for result name.
6309
6310             Returns:   
6311                 New GEOM.GEOM_Object, containing processed shape.
6312             """
6313             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6314             RaiseIfFailed("LimitTolerance", self.HealOp)
6315             self._autoPublish(anObj, theName, "limitTolerance")
6316             return anObj
6317
6318         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6319         #  that constitute a free boundary of the given shape.
6320         #  @param theObject Shape to get free boundary of.
6321         #  @param theName Object name; when specified, this parameter is used
6322         #         for result publication in the study. Otherwise, if automatic
6323         #         publication is switched on, default value is used for result name.
6324         #
6325         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6326         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6327         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6328         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6329         #
6330         #  @ref tui_measurement_tools_page "Example"
6331         def GetFreeBoundary(self, theObject, theName=None):
6332             """
6333             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6334             that constitute a free boundary of the given shape.
6335
6336             Parameters:
6337                 theObject Shape to get free boundary of.
6338                 theName Object name; when specified, this parameter is used
6339                         for result publication in the study. Otherwise, if automatic
6340                         publication is switched on, default value is used for result name.
6341
6342             Returns: 
6343                 [status, theClosedWires, theOpenWires]
6344                  status: FALSE, if an error(s) occured during the method execution.
6345                  theClosedWires: Closed wires on the free boundary of the given shape.
6346                  theOpenWires: Open wires on the free boundary of the given shape.
6347             """
6348             # Example: see GEOM_TestHealing.py
6349             anObj = self.HealOp.GetFreeBoundary(theObject)
6350             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6351             self._autoPublish(anObj[1], theName, "closedWire")
6352             self._autoPublish(anObj[2], theName, "openWire")
6353             return anObj
6354
6355         ## Replace coincident faces in theShape by one face.
6356         #  @param theShape Initial shape.
6357         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6358         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6359         #                         otherwise all initial shapes.
6360         #  @param theName Object name; when specified, this parameter is used
6361         #         for result publication in the study. Otherwise, if automatic
6362         #         publication is switched on, default value is used for result name.
6363         #
6364         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6365         #
6366         #  @ref tui_glue_faces "Example"
6367         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6368             """
6369             Replace coincident faces in theShape by one face.
6370
6371             Parameters:
6372                 theShape Initial shape.
6373                 theTolerance Maximum distance between faces, which can be considered as coincident.
6374                 doKeepNonSolids If FALSE, only solids will present in the result,
6375                                 otherwise all initial shapes.
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 faces.
6382             """
6383             # Example: see GEOM_Spanner.py
6384             theTolerance,Parameters = ParseParameters(theTolerance)
6385             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6386             if anObj is None:
6387                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6388             anObj.SetParameters(Parameters)
6389             self._autoPublish(anObj, theName, "glueFaces")
6390             return anObj
6391
6392         ## Find coincident faces in theShape for possible gluing.
6393         #  @param theShape Initial shape.
6394         #  @param theTolerance Maximum distance between faces,
6395         #                      which can be considered as coincident.
6396         #  @param theName Object name; when specified, this parameter is used
6397         #         for result publication in the study. Otherwise, if automatic
6398         #         publication is switched on, default value is used for result name.
6399         #
6400         #  @return GEOM.ListOfGO
6401         #
6402         #  @ref tui_glue_faces "Example"
6403         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6404             """
6405             Find coincident faces in theShape for possible gluing.
6406
6407             Parameters:
6408                 theShape Initial shape.
6409                 theTolerance Maximum distance between faces,
6410                              which can be considered as coincident.
6411                 theName Object name; when specified, this parameter is used
6412                         for result publication in the study. Otherwise, if automatic
6413                         publication is switched on, default value is used for result name.
6414
6415             Returns:                    
6416                 GEOM.ListOfGO
6417             """
6418             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6419             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6420             self._autoPublish(anObj, theName, "facesToGlue")
6421             return anObj
6422
6423         ## Replace coincident faces in theShape by one face
6424         #  in compliance with given list of faces
6425         #  @param theShape Initial shape.
6426         #  @param theTolerance Maximum distance between faces,
6427         #                      which can be considered as coincident.
6428         #  @param theFaces List of faces for gluing.
6429         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6430         #                         otherwise all initial shapes.
6431         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6432         #                        will be glued, otherwise only the edges,
6433         #                        belonging to <VAR>theFaces</VAR>.
6434         #  @param theName Object name; when specified, this parameter is used
6435         #         for result publication in the study. Otherwise, if automatic
6436         #         publication is switched on, default value is used for result name.
6437         #
6438         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6439         #          without some faces.
6440         #
6441         #  @ref tui_glue_faces "Example"
6442         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6443                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6444             """
6445             Replace coincident faces in theShape by one face
6446             in compliance with given list of faces
6447
6448             Parameters:
6449                 theShape Initial shape.
6450                 theTolerance Maximum distance between faces,
6451                              which can be considered as coincident.
6452                 theFaces List of faces for gluing.
6453                 doKeepNonSolids If FALSE, only solids will present in the result,
6454                                 otherwise all initial shapes.
6455                 doGlueAllEdges If TRUE, all coincident edges of theShape
6456                                will be glued, otherwise only the edges,
6457                                belonging to theFaces.
6458                 theName Object name; when specified, this parameter is used
6459                         for result publication in the study. Otherwise, if automatic
6460                         publication is switched on, default value is used for result name.
6461
6462             Returns:
6463                 New GEOM.GEOM_Object, containing a copy of theShape
6464                     without some faces.
6465             """
6466             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6467                                                       doKeepNonSolids, doGlueAllEdges)
6468             if anObj is None:
6469                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6470             self._autoPublish(anObj, theName, "glueFaces")
6471             return anObj
6472
6473         ## Replace coincident edges in theShape by one edge.
6474         #  @param theShape Initial shape.
6475         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6476         #  @param theName Object name; when specified, this parameter is used
6477         #         for result publication in the study. Otherwise, if automatic
6478         #         publication is switched on, default value is used for result name.
6479         #
6480         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6481         #
6482         #  @ref tui_glue_edges "Example"
6483         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6484             """
6485             Replace coincident edges in theShape by one edge.
6486
6487             Parameters:
6488                 theShape Initial shape.
6489                 theTolerance Maximum distance between edges, which can be considered as coincident.
6490                 theName Object name; when specified, this parameter is used
6491                         for result publication in the study. Otherwise, if automatic
6492                         publication is switched on, default value is used for result name.
6493
6494             Returns:    
6495                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6496             """
6497             theTolerance,Parameters = ParseParameters(theTolerance)
6498             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6499             if anObj is None:
6500                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6501             anObj.SetParameters(Parameters)
6502             self._autoPublish(anObj, theName, "glueEdges")
6503             return anObj
6504
6505         ## Find coincident edges in theShape for possible gluing.
6506         #  @param theShape Initial shape.
6507         #  @param theTolerance Maximum distance between edges,
6508         #                      which can be considered as coincident.
6509         #  @param theName Object name; when specified, this parameter is used
6510         #         for result publication in the study. Otherwise, if automatic
6511         #         publication is switched on, default value is used for result name.
6512         #
6513         #  @return GEOM.ListOfGO
6514         #
6515         #  @ref tui_glue_edges "Example"
6516         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6517             """
6518             Find coincident edges in theShape for possible gluing.
6519
6520             Parameters:
6521                 theShape Initial shape.
6522                 theTolerance Maximum distance between edges,
6523                              which can be considered as coincident.
6524                 theName Object name; when specified, this parameter is used
6525                         for result publication in the study. Otherwise, if automatic
6526                         publication is switched on, default value is used for result name.
6527
6528             Returns:                         
6529                 GEOM.ListOfGO
6530             """
6531             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6532             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6533             self._autoPublish(anObj, theName, "edgesToGlue")
6534             return anObj
6535
6536         ## Replace coincident edges in theShape by one edge
6537         #  in compliance with given list of edges.
6538         #  @param theShape Initial shape.
6539         #  @param theTolerance Maximum distance between edges,
6540         #                      which can be considered as coincident.
6541         #  @param theEdges List of edges for gluing.
6542         #  @param theName Object name; when specified, this parameter is used
6543         #         for result publication in the study. Otherwise, if automatic
6544         #         publication is switched on, default value is used for result name.
6545         #
6546         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6547         #          without some edges.
6548         #
6549         #  @ref tui_glue_edges "Example"
6550         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6551             """
6552             Replace coincident edges in theShape by one edge
6553             in compliance with given list of edges.
6554
6555             Parameters:
6556                 theShape Initial shape.
6557                 theTolerance Maximum distance between edges,
6558                              which can be considered as coincident.
6559                 theEdges List of edges for gluing.
6560                 theName Object name; when specified, this parameter is used
6561                         for result publication in the study. Otherwise, if automatic
6562                         publication is switched on, default value is used for result name.
6563
6564             Returns:  
6565                 New GEOM.GEOM_Object, containing a copy of theShape
6566                 without some edges.
6567             """
6568             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6569             if anObj is None:
6570                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6571             self._autoPublish(anObj, theName, "glueEdges")
6572             return anObj
6573
6574         # end of l3_healing
6575         ## @}
6576
6577         ## @addtogroup l3_boolean Boolean Operations
6578         ## @{
6579
6580         # -----------------------------------------------------------------------------
6581         # Boolean (Common, Cut, Fuse, Section)
6582         # -----------------------------------------------------------------------------
6583
6584         ## Perform one of boolean operations on two given shapes.
6585         #  @param theShape1 First argument for boolean operation.
6586         #  @param theShape2 Second argument for boolean operation.
6587         #  @param theOperation Indicates the operation to be done:\n
6588         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6589         #  @param theName Object name; when specified, this parameter is used
6590         #         for result publication in the study. Otherwise, if automatic
6591         #         publication is switched on, default value is used for result name.
6592         #
6593         #  @return New GEOM.GEOM_Object, containing the result shape.
6594         #
6595         #  @ref tui_fuse "Example"
6596         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6597             """
6598             Perform one of boolean operations on two given shapes.
6599
6600             Parameters: 
6601                 theShape1 First argument for boolean operation.
6602                 theShape2 Second argument for boolean operation.
6603                 theOperation Indicates the operation to be done:
6604                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6605                 theName Object name; when specified, this parameter is used
6606                         for result publication in the study. Otherwise, if automatic
6607                         publication is switched on, default value is used for result name.
6608
6609             Returns:   
6610                 New GEOM.GEOM_Object, containing the result shape.
6611             """
6612             # Example: see GEOM_TestAll.py
6613             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6614             RaiseIfFailed("MakeBoolean", self.BoolOp)
6615             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6616             self._autoPublish(anObj, theName, def_names[theOperation])
6617             return anObj
6618
6619         ## Perform Common boolean operation on two given shapes.
6620         #  @param theShape1 First argument for boolean operation.
6621         #  @param theShape2 Second argument for boolean operation.
6622         #  @param theName Object name; when specified, this parameter is used
6623         #         for result publication in the study. Otherwise, if automatic
6624         #         publication is switched on, default value is used for result name.
6625         #
6626         #  @return New GEOM.GEOM_Object, containing the result shape.
6627         #
6628         #  @ref tui_common "Example 1"
6629         #  \n @ref swig_MakeCommon "Example 2"
6630         def MakeCommon(self, theShape1, theShape2, theName=None):
6631             """
6632             Perform Common boolean operation on two given shapes.
6633
6634             Parameters: 
6635                 theShape1 First argument for boolean operation.
6636                 theShape2 Second argument for boolean operation.
6637                 theName Object name; when specified, this parameter is used
6638                         for result publication in the study. Otherwise, if automatic
6639                         publication is switched on, default value is used for result name.
6640
6641             Returns:   
6642                 New GEOM.GEOM_Object, containing the result shape.
6643             """
6644             # Example: see GEOM_TestOthers.py
6645             # note: auto-publishing is done in self.MakeBoolean()
6646             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6647
6648         ## Perform Cut boolean operation on two given shapes.
6649         #  @param theShape1 First argument for boolean operation.
6650         #  @param theShape2 Second argument for boolean operation.
6651         #  @param theName Object name; when specified, this parameter is used
6652         #         for result publication in the study. Otherwise, if automatic
6653         #         publication is switched on, default value is used for result name.
6654         #
6655         #  @return New GEOM.GEOM_Object, containing the result shape.
6656         #
6657         #  @ref tui_cut "Example 1"
6658         #  \n @ref swig_MakeCommon "Example 2"
6659         def MakeCut(self, theShape1, theShape2, theName=None):
6660             """
6661             Perform Cut boolean operation on two given shapes.
6662
6663             Parameters: 
6664                 theShape1 First argument for boolean operation.
6665                 theShape2 Second argument for boolean operation.
6666                 theName Object name; when specified, this parameter is used
6667                         for result publication in the study. Otherwise, if automatic
6668                         publication is switched on, default value is used for result name.
6669
6670             Returns:   
6671                 New GEOM.GEOM_Object, containing the result shape.
6672             
6673             """
6674             # Example: see GEOM_TestOthers.py
6675             # note: auto-publishing is done in self.MakeBoolean()
6676             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6677
6678         ## Perform Fuse boolean operation on two given shapes.
6679         #  @param theShape1 First argument for boolean operation.
6680         #  @param theShape2 Second argument for boolean operation.
6681         #  @param theName Object name; when specified, this parameter is used
6682         #         for result publication in the study. Otherwise, if automatic
6683         #         publication is switched on, default value is used for result name.
6684         #
6685         #  @return New GEOM.GEOM_Object, containing the result shape.
6686         #
6687         #  @ref tui_fuse "Example 1"
6688         #  \n @ref swig_MakeCommon "Example 2"
6689         def MakeFuse(self, theShape1, theShape2, theName=None):
6690             """
6691             Perform Fuse boolean operation on two given shapes.
6692
6693             Parameters: 
6694                 theShape1 First argument for boolean operation.
6695                 theShape2 Second argument for boolean operation.
6696                 theName Object name; when specified, this parameter is used
6697                         for result publication in the study. Otherwise, if automatic
6698                         publication is switched on, default value is used for result name.
6699
6700             Returns:   
6701                 New GEOM.GEOM_Object, containing the result shape.
6702             
6703             """
6704             # Example: see GEOM_TestOthers.py
6705             # note: auto-publishing is done in self.MakeBoolean()
6706             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6707
6708         ## Perform Section boolean operation on two given shapes.
6709         #  @param theShape1 First argument for boolean operation.
6710         #  @param theShape2 Second argument for boolean operation.
6711         #  @param theName Object name; when specified, this parameter is used
6712         #         for result publication in the study. Otherwise, if automatic
6713         #         publication is switched on, default value is used for result name.
6714         #
6715         #  @return New GEOM.GEOM_Object, containing the result shape.
6716         #
6717         #  @ref tui_section "Example 1"
6718         #  \n @ref swig_MakeCommon "Example 2"
6719         def MakeSection(self, theShape1, theShape2, theName=None):
6720             """
6721             Perform Section boolean operation on two given shapes.
6722
6723             Parameters: 
6724                 theShape1 First argument for boolean operation.
6725                 theShape2 Second argument for boolean operation.
6726                 theName Object name; when specified, this parameter is used
6727                         for result publication in the study. Otherwise, if automatic
6728                         publication is switched on, default value is used for result name.
6729
6730             Returns:   
6731                 New GEOM.GEOM_Object, containing the result shape.
6732             
6733             """
6734             # Example: see GEOM_TestOthers.py
6735             # note: auto-publishing is done in self.MakeBoolean()
6736             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6737
6738         ## Perform Fuse boolean operation on the list of shapes.
6739         #  @param theShapesList Shapes to be fused.
6740         #  @param theName Object name; when specified, this parameter is used
6741         #         for result publication in the study. Otherwise, if automatic
6742         #         publication is switched on, default value is used for result name.
6743         #
6744         #  @return New GEOM.GEOM_Object, containing the result shape.
6745         #
6746         #  @ref tui_fuse "Example 1"
6747         #  \n @ref swig_MakeCommon "Example 2"
6748         def MakeFuseList(self, theShapesList, theName=None):
6749             """
6750             Perform Fuse boolean operation on the list of shapes.
6751
6752             Parameters: 
6753                 theShapesList Shapes to be fused.
6754                 theName Object name; when specified, this parameter is used
6755                         for result publication in the study. Otherwise, if automatic
6756                         publication is switched on, default value is used for result name.
6757
6758             Returns:   
6759                 New GEOM.GEOM_Object, containing the result shape.
6760             
6761             """
6762             # Example: see GEOM_TestOthers.py
6763             anObj = self.BoolOp.MakeFuseList(theShapesList)
6764             RaiseIfFailed("MakeFuseList", self.BoolOp)
6765             self._autoPublish(anObj, theName, "fuse")
6766             return anObj
6767
6768         ## Perform Common boolean operation on the list of shapes.
6769         #  @param theShapesList Shapes for Common operation.
6770         #  @param theName Object name; when specified, this parameter is used
6771         #         for result publication in the study. Otherwise, if automatic
6772         #         publication is switched on, default value is used for result name.
6773         #
6774         #  @return New GEOM.GEOM_Object, containing the result shape.
6775         #
6776         #  @ref tui_common "Example 1"
6777         #  \n @ref swig_MakeCommon "Example 2"
6778         def MakeCommonList(self, theShapesList, theName=None):
6779             """
6780             Perform Common boolean operation on the list of shapes.
6781
6782             Parameters: 
6783                 theShapesList Shapes for Common operation.
6784                 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             Returns:   
6789                 New GEOM.GEOM_Object, containing the result shape.
6790             
6791             """
6792             # Example: see GEOM_TestOthers.py
6793             anObj = self.BoolOp.MakeCommonList(theShapesList)
6794             RaiseIfFailed("MakeCommonList", self.BoolOp)
6795             self._autoPublish(anObj, theName, "common")
6796             return anObj
6797
6798         ## Perform Cut boolean operation on one object and the list of tools.
6799         #  @param theMainShape The object of the operation.
6800         #  @param theShapesList The list of tools of the operation.
6801         #  @param theName Object name; when specified, this parameter is used
6802         #         for result publication in the study. Otherwise, if automatic
6803         #         publication is switched on, default value is used for result name.
6804         #
6805         #  @return New GEOM.GEOM_Object, containing the result shape.
6806         #
6807         #  @ref tui_cut "Example 1"
6808         #  \n @ref swig_MakeCommon "Example 2"
6809         def MakeCutList(self, theMainShape, theShapesList, theName=None):
6810             """
6811             Perform Cut boolean operation on one object and the list of tools.
6812
6813             Parameters: 
6814                 theMainShape The object of the operation.
6815                 theShapesList The list of tools of the operation.
6816                 theName Object name; when specified, this parameter is used
6817                         for result publication in the study. Otherwise, if automatic
6818                         publication is switched on, default value is used for result name.
6819
6820             Returns:   
6821                 New GEOM.GEOM_Object, containing the result shape.
6822             
6823             """
6824             # Example: see GEOM_TestOthers.py
6825             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList)
6826             RaiseIfFailed("MakeCutList", self.BoolOp)
6827             self._autoPublish(anObj, theName, "cut")
6828             return anObj
6829
6830         # end of l3_boolean
6831         ## @}
6832
6833         ## @addtogroup l3_basic_op
6834         ## @{
6835
6836         ## Perform partition operation.
6837         #  @param ListShapes Shapes to be intersected.
6838         #  @param ListTools Shapes to intersect theShapes.
6839         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6840         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6841         #         type will be detected automatically.
6842         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6843         #                             target type (equal to Limit) are kept in the result,
6844         #                             else standalone shapes of lower dimension
6845         #                             are kept also (if they exist).
6846         #  @param theName Object name; when specified, this parameter is used
6847         #         for result publication in the study. Otherwise, if automatic
6848         #         publication is switched on, default value is used for result name.
6849         #
6850         #  @note Each compound from ListShapes and ListTools will be exploded
6851         #        in order to avoid possible intersection between shapes from this compound.
6852         #
6853         #  After implementation new version of PartitionAlgo (October 2006)
6854         #  other parameters are ignored by current functionality. They are kept
6855         #  in this function only for support old versions.
6856         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6857         #         Each shape from theKeepInside must belong to theShapes also.
6858         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6859         #         Each shape from theRemoveInside must belong to theShapes also.
6860         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6861         #      @param ListMaterials Material indices for each shape. Make sence,
6862         #         only if theRemoveWebs is TRUE.
6863         #
6864         #  @return New GEOM.GEOM_Object, containing the result shapes.
6865         #
6866         #  @ref tui_partition "Example"
6867         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6868                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6869                           KeepNonlimitShapes=0, theName=None):
6870             """
6871             Perform partition operation.
6872
6873             Parameters: 
6874                 ListShapes Shapes to be intersected.
6875                 ListTools Shapes to intersect theShapes.
6876                 Limit Type of resulting shapes (see geompy.ShapeType)
6877                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6878                       type will be detected automatically.
6879                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6880                                     target type (equal to Limit) are kept in the result,
6881                                     else standalone shapes of lower dimension
6882                                     are kept also (if they exist).
6883                 theName Object name; when specified, this parameter is used
6884                         for result publication in the study. Otherwise, if automatic
6885                         publication is switched on, default value is used for result name.
6886             Note:
6887                     Each compound from ListShapes and ListTools will be exploded
6888                     in order to avoid possible intersection between shapes from
6889                     this compound.
6890                     
6891             After implementation new version of PartitionAlgo (October 2006) other
6892             parameters are ignored by current functionality. They are kept in this
6893             function only for support old versions.
6894             
6895             Ignored parameters:
6896                 ListKeepInside Shapes, outside which the results will be deleted.
6897                                Each shape from theKeepInside must belong to theShapes also.
6898                 ListRemoveInside Shapes, inside which the results will be deleted.
6899                                  Each shape from theRemoveInside must belong to theShapes also.
6900                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6901                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6902
6903             Returns:   
6904                 New GEOM.GEOM_Object, containing the result shapes.
6905             """
6906             # Example: see GEOM_TestAll.py
6907             if Limit == self.ShapeType["AUTO"]:
6908                 # automatic detection of the most appropriate shape limit type
6909                 lim = GEOM.SHAPE
6910                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6911                 Limit = EnumToLong(lim)
6912                 pass
6913             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6914                                               ListKeepInside, ListRemoveInside,
6915                                               Limit, RemoveWebs, ListMaterials,
6916                                               KeepNonlimitShapes);
6917             RaiseIfFailed("MakePartition", self.BoolOp)
6918             self._autoPublish(anObj, theName, "partition")
6919             return anObj
6920
6921         ## Perform partition operation.
6922         #  This method may be useful if it is needed to make a partition for
6923         #  compound contains nonintersected shapes. Performance will be better
6924         #  since intersection between shapes from compound is not performed.
6925         #
6926         #  Description of all parameters as in previous method MakePartition()
6927         #
6928         #  @note Passed compounds (via ListShapes or via ListTools)
6929         #           have to consist of nonintersecting shapes.
6930         #
6931         #  @return New GEOM.GEOM_Object, containing the result shapes.
6932         #
6933         #  @ref swig_todo "Example"
6934         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6935                                                  ListKeepInside=[], ListRemoveInside=[],
6936                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6937                                                  ListMaterials=[], KeepNonlimitShapes=0,
6938                                                  theName=None):
6939             """
6940             Perform partition operation.
6941             This method may be useful if it is needed to make a partition for
6942             compound contains nonintersected shapes. Performance will be better
6943             since intersection between shapes from compound is not performed.
6944
6945             Parameters: 
6946                 Description of all parameters as in method geompy.MakePartition
6947         
6948             NOTE:
6949                 Passed compounds (via ListShapes or via ListTools)
6950                 have to consist of nonintersecting shapes.
6951
6952             Returns:   
6953                 New GEOM.GEOM_Object, containing the result shapes.
6954             """
6955             if Limit == self.ShapeType["AUTO"]:
6956                 # automatic detection of the most appropriate shape limit type
6957                 lim = GEOM.SHAPE
6958                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6959                 Limit = EnumToLong(lim)
6960                 pass
6961             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6962                                                                      ListKeepInside, ListRemoveInside,
6963                                                                      Limit, RemoveWebs, ListMaterials,
6964                                                                      KeepNonlimitShapes);
6965             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6966             self._autoPublish(anObj, theName, "partition")
6967             return anObj
6968
6969         ## See method MakePartition() for more information.
6970         #
6971         #  @ref tui_partition "Example 1"
6972         #  \n @ref swig_Partition "Example 2"
6973         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6974                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6975                       KeepNonlimitShapes=0, theName=None):
6976             """
6977             See method geompy.MakePartition for more information.
6978             """
6979             # Example: see GEOM_TestOthers.py
6980             # note: auto-publishing is done in self.MakePartition()
6981             anObj = self.MakePartition(ListShapes, ListTools,
6982                                        ListKeepInside, ListRemoveInside,
6983                                        Limit, RemoveWebs, ListMaterials,
6984                                        KeepNonlimitShapes, theName);
6985             return anObj
6986
6987         ## Perform partition of the Shape with the Plane
6988         #  @param theShape Shape to be intersected.
6989         #  @param thePlane Tool shape, to intersect theShape.
6990         #  @param theName Object name; when specified, this parameter is used
6991         #         for result publication in the study. Otherwise, if automatic
6992         #         publication is switched on, default value is used for result name.
6993         #
6994         #  @return New GEOM.GEOM_Object, containing the result shape.
6995         #
6996         #  @ref tui_partition "Example"
6997         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6998             """
6999             Perform partition of the Shape with the Plane
7000
7001             Parameters: 
7002                 theShape Shape to be intersected.
7003                 thePlane Tool shape, to intersect theShape.
7004                 theName Object name; when specified, this parameter is used
7005                         for result publication in the study. Otherwise, if automatic
7006                         publication is switched on, default value is used for result name.
7007
7008             Returns:  
7009                 New GEOM.GEOM_Object, containing the result shape.
7010             """
7011             # Example: see GEOM_TestAll.py
7012             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7013             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7014             self._autoPublish(anObj, theName, "partition")
7015             return anObj
7016
7017         # end of l3_basic_op
7018         ## @}
7019
7020         ## @addtogroup l3_transform
7021         ## @{
7022
7023         ## Translate the given object along the vector, specified
7024         #  by its end points.
7025         #  @param theObject The object to be translated.
7026         #  @param thePoint1 Start point of translation vector.
7027         #  @param thePoint2 End point of translation vector.
7028         #  @param theCopy Flag used to translate object itself or create a copy.
7029         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7030         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7031         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7032             """
7033             Translate the given object along the vector, specified by its end points.
7034
7035             Parameters: 
7036                 theObject The object to be translated.
7037                 thePoint1 Start point of translation vector.
7038                 thePoint2 End point of translation vector.
7039                 theCopy Flag used to translate object itself or create a copy.
7040
7041             Returns: 
7042                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7043                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7044             """
7045             if theCopy:
7046                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7047             else:
7048                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7049             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7050             return anObj
7051
7052         ## Translate the given object along the vector, specified
7053         #  by its end points, creating its copy before the translation.
7054         #  @param theObject The object to be translated.
7055         #  @param thePoint1 Start point of translation vector.
7056         #  @param thePoint2 End point of translation vector.
7057         #  @param theName Object name; when specified, this parameter is used
7058         #         for result publication in the study. Otherwise, if automatic
7059         #         publication is switched on, default value is used for result name.
7060         #
7061         #  @return New GEOM.GEOM_Object, containing the translated object.
7062         #
7063         #  @ref tui_translation "Example 1"
7064         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7065         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7066             """
7067             Translate the given object along the vector, specified
7068             by its end points, creating its copy before the translation.
7069
7070             Parameters: 
7071                 theObject The object to be translated.
7072                 thePoint1 Start point of translation vector.
7073                 thePoint2 End point of translation vector.
7074                 theName Object name; when specified, this parameter is used
7075                         for result publication in the study. Otherwise, if automatic
7076                         publication is switched on, default value is used for result name.
7077
7078             Returns:  
7079                 New GEOM.GEOM_Object, containing the translated object.
7080             """
7081             # Example: see GEOM_TestAll.py
7082             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7083             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7084             self._autoPublish(anObj, theName, "translated")
7085             return anObj
7086
7087         ## Translate the given object along the vector, specified by its components.
7088         #  @param theObject The object to be translated.
7089         #  @param theDX,theDY,theDZ Components of translation vector.
7090         #  @param theCopy Flag used to translate object itself or create a copy.
7091         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7092         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7093         #
7094         #  @ref tui_translation "Example"
7095         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7096             """
7097             Translate the given object along the vector, specified by its components.
7098
7099             Parameters: 
7100                 theObject The object to be translated.
7101                 theDX,theDY,theDZ Components of translation vector.
7102                 theCopy Flag used to translate object itself or create a copy.
7103
7104             Returns: 
7105                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7106                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7107             """
7108             # Example: see GEOM_TestAll.py
7109             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7110             if theCopy:
7111                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7112             else:
7113                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7114             anObj.SetParameters(Parameters)
7115             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7116             return anObj
7117
7118         ## Translate the given object along the vector, specified
7119         #  by its components, creating its copy before the translation.
7120         #  @param theObject The object to be translated.
7121         #  @param theDX,theDY,theDZ Components of translation vector.
7122         #  @param theName Object name; when specified, this parameter is used
7123         #         for result publication in the study. Otherwise, if automatic
7124         #         publication is switched on, default value is used for result name.
7125         #
7126         #  @return New GEOM.GEOM_Object, containing the translated object.
7127         #
7128         #  @ref tui_translation "Example"
7129         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7130             """
7131             Translate the given object along the vector, specified
7132             by its components, creating its copy before the translation.
7133
7134             Parameters: 
7135                 theObject The object to be translated.
7136                 theDX,theDY,theDZ Components of translation vector.
7137                 theName Object name; when specified, this parameter is used
7138                         for result publication in the study. Otherwise, if automatic
7139                         publication is switched on, default value is used for result name.
7140
7141             Returns: 
7142                 New GEOM.GEOM_Object, containing the translated object.
7143             """
7144             # Example: see GEOM_TestAll.py
7145             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7146             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7147             anObj.SetParameters(Parameters)
7148             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7149             self._autoPublish(anObj, theName, "translated")
7150             return anObj
7151
7152         ## Translate the given object along the given vector.
7153         #  @param theObject The object to be translated.
7154         #  @param theVector The translation vector.
7155         #  @param theCopy Flag used to translate object itself or create a copy.
7156         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7157         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7158         def TranslateVector(self, theObject, theVector, theCopy=False):
7159             """
7160             Translate the given object along the given vector.
7161
7162             Parameters: 
7163                 theObject The object to be translated.
7164                 theVector The translation vector.
7165                 theCopy Flag used to translate object itself or create a copy.
7166
7167             Returns: 
7168                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7169                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7170             """
7171             if theCopy:
7172                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7173             else:
7174                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7175             RaiseIfFailed("TranslateVector", self.TrsfOp)
7176             return anObj
7177
7178         ## Translate the given object along the given vector,
7179         #  creating its copy before the translation.
7180         #  @param theObject The object to be translated.
7181         #  @param theVector The translation vector.
7182         #  @param theName Object name; when specified, this parameter is used
7183         #         for result publication in the study. Otherwise, if automatic
7184         #         publication is switched on, default value is used for result name.
7185         #
7186         #  @return New GEOM.GEOM_Object, containing the translated object.
7187         #
7188         #  @ref tui_translation "Example"
7189         def MakeTranslationVector(self, theObject, theVector, theName=None):
7190             """
7191             Translate the given object along the given vector,
7192             creating its copy before the translation.
7193
7194             Parameters: 
7195                 theObject The object to be translated.
7196                 theVector The translation vector.
7197                 theName Object name; when specified, this parameter is used
7198                         for result publication in the study. Otherwise, if automatic
7199                         publication is switched on, default value is used for result name.
7200
7201             Returns: 
7202                 New GEOM.GEOM_Object, containing the translated object.
7203             """
7204             # Example: see GEOM_TestAll.py
7205             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7206             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7207             self._autoPublish(anObj, theName, "translated")
7208             return anObj
7209
7210         ## Translate the given object along the given vector on given distance.
7211         #  @param theObject The object to be translated.
7212         #  @param theVector The translation vector.
7213         #  @param theDistance The translation distance.
7214         #  @param theCopy Flag used to translate object itself or create a copy.
7215         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7216         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7217         #
7218         #  @ref tui_translation "Example"
7219         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7220             """
7221             Translate the given object along the given vector on given distance.
7222
7223             Parameters: 
7224                 theObject The object to be translated.
7225                 theVector The translation vector.
7226                 theDistance The translation distance.
7227                 theCopy Flag used to translate object itself or create a copy.
7228
7229             Returns: 
7230                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7231                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7232             """
7233             # Example: see GEOM_TestAll.py
7234             theDistance,Parameters = ParseParameters(theDistance)
7235             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7236             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7237             anObj.SetParameters(Parameters)
7238             return anObj
7239
7240         ## Translate the given object along the given vector on given distance,
7241         #  creating its copy before the translation.
7242         #  @param theObject The object to be translated.
7243         #  @param theVector The translation vector.
7244         #  @param theDistance The translation distance.
7245         #  @param theName Object name; when specified, this parameter is used
7246         #         for result publication in the study. Otherwise, if automatic
7247         #         publication is switched on, default value is used for result name.
7248         #
7249         #  @return New GEOM.GEOM_Object, containing the translated object.
7250         #
7251         #  @ref tui_translation "Example"
7252         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7253             """
7254             Translate the given object along the given vector on given distance,
7255             creating its copy before the translation.
7256
7257             Parameters:
7258                 theObject The object to be translated.
7259                 theVector The translation vector.
7260                 theDistance The translation distance.
7261                 theName Object name; when specified, this parameter is used
7262                         for result publication in the study. Otherwise, if automatic
7263                         publication is switched on, default value is used for result name.
7264
7265             Returns: 
7266                 New GEOM.GEOM_Object, containing the translated object.
7267             """
7268             # Example: see GEOM_TestAll.py
7269             theDistance,Parameters = ParseParameters(theDistance)
7270             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7271             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7272             anObj.SetParameters(Parameters)
7273             self._autoPublish(anObj, theName, "translated")
7274             return anObj
7275
7276         ## Rotate the given object around the given axis on the given angle.
7277         #  @param theObject The object to be rotated.
7278         #  @param theAxis Rotation axis.
7279         #  @param theAngle Rotation angle in radians.
7280         #  @param theCopy Flag used to rotate object itself or create a copy.
7281         #
7282         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7283         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7284         #
7285         #  @ref tui_rotation "Example"
7286         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7287             """
7288             Rotate the given object around the given axis on the given angle.
7289
7290             Parameters:
7291                 theObject The object to be rotated.
7292                 theAxis Rotation axis.
7293                 theAngle Rotation angle in radians.
7294                 theCopy Flag used to rotate object itself or create a copy.
7295
7296             Returns:
7297                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7298                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7299             """
7300             # Example: see GEOM_TestAll.py
7301             flag = False
7302             if isinstance(theAngle,str):
7303                 flag = True
7304             theAngle, Parameters = ParseParameters(theAngle)
7305             if flag:
7306                 theAngle = theAngle*math.pi/180.0
7307             if theCopy:
7308                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7309             else:
7310                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7311             RaiseIfFailed("Rotate", self.TrsfOp)
7312             anObj.SetParameters(Parameters)
7313             return anObj
7314
7315         ## Rotate the given object around the given axis
7316         #  on the given angle, creating its copy before the rotatation.
7317         #  @param theObject The object to be rotated.
7318         #  @param theAxis Rotation axis.
7319         #  @param theAngle Rotation angle in radians.
7320         #  @param theName Object name; when specified, this parameter is used
7321         #         for result publication in the study. Otherwise, if automatic
7322         #         publication is switched on, default value is used for result name.
7323         #
7324         #  @return New GEOM.GEOM_Object, containing the rotated object.
7325         #
7326         #  @ref tui_rotation "Example"
7327         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7328             """
7329             Rotate the given object around the given axis
7330             on the given angle, creating its copy before the rotatation.
7331
7332             Parameters:
7333                 theObject The object to be rotated.
7334                 theAxis Rotation axis.
7335                 theAngle Rotation angle in radians.
7336                 theName Object name; when specified, this parameter is used
7337                         for result publication in the study. Otherwise, if automatic
7338                         publication is switched on, default value is used for result name.
7339
7340             Returns:
7341                 New GEOM.GEOM_Object, containing the rotated object.
7342             """
7343             # Example: see GEOM_TestAll.py
7344             flag = False
7345             if isinstance(theAngle,str):
7346                 flag = True
7347             theAngle, Parameters = ParseParameters(theAngle)
7348             if flag:
7349                 theAngle = theAngle*math.pi/180.0
7350             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7351             RaiseIfFailed("RotateCopy", self.TrsfOp)
7352             anObj.SetParameters(Parameters)
7353             self._autoPublish(anObj, theName, "rotated")
7354             return anObj
7355
7356         ## Rotate given object around vector perpendicular to plane
7357         #  containing three points.
7358         #  @param theObject The object to be rotated.
7359         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7360         #  containing the three points.
7361         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7362         #  @param theCopy Flag used to rotate object itself or create a copy.
7363         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7364         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7365         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7366             """
7367             Rotate given object around vector perpendicular to plane
7368             containing three points.
7369
7370             Parameters:
7371                 theObject The object to be rotated.
7372                 theCentPoint central point  the axis is the vector perpendicular to the plane
7373                              containing the three points.
7374                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7375                 theCopy Flag used to rotate object itself or create a copy.
7376
7377             Returns:
7378                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7379                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7380             """
7381             if theCopy:
7382                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7383             else:
7384                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7385             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7386             return anObj
7387
7388         ## Rotate given object around vector perpendicular to plane
7389         #  containing three points, creating its copy before the rotatation.
7390         #  @param theObject The object to be rotated.
7391         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7392         #  containing the three points.
7393         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7394         #  @param theName Object name; when specified, this parameter is used
7395         #         for result publication in the study. Otherwise, if automatic
7396         #         publication is switched on, default value is used for result name.
7397         #
7398         #  @return New GEOM.GEOM_Object, containing the rotated object.
7399         #
7400         #  @ref tui_rotation "Example"
7401         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7402             """
7403             Rotate given object around vector perpendicular to plane
7404             containing three points, creating its copy before the rotatation.
7405
7406             Parameters:
7407                 theObject The object to be rotated.
7408                 theCentPoint central point  the axis is the vector perpendicular to the plane
7409                              containing the three points.
7410                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7411                 theName Object name; when specified, this parameter is used
7412                         for result publication in the study. Otherwise, if automatic
7413                         publication is switched on, default value is used for result name.
7414
7415             Returns:
7416                 New GEOM.GEOM_Object, containing the rotated object.
7417             """
7418             # Example: see GEOM_TestAll.py
7419             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7420             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7421             self._autoPublish(anObj, theName, "rotated")
7422             return anObj
7423
7424         ## Scale the given object by the specified factor.
7425         #  @param theObject The object to be scaled.
7426         #  @param thePoint Center point for scaling.
7427         #                  Passing None for it means scaling relatively the origin of global CS.
7428         #  @param theFactor Scaling factor value.
7429         #  @param theCopy Flag used to scale object itself or create a copy.
7430         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7431         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7432         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7433             """
7434             Scale the given object by the specified factor.
7435
7436             Parameters:
7437                 theObject The object to be scaled.
7438                 thePoint Center point for scaling.
7439                          Passing None for it means scaling relatively the origin of global CS.
7440                 theFactor Scaling factor value.
7441                 theCopy Flag used to scale object itself or create a copy.
7442
7443             Returns:    
7444                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7445                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7446             """
7447             # Example: see GEOM_TestAll.py
7448             theFactor, Parameters = ParseParameters(theFactor)
7449             if theCopy:
7450                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7451             else:
7452                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7453             RaiseIfFailed("Scale", self.TrsfOp)
7454             anObj.SetParameters(Parameters)
7455             return anObj
7456
7457         ## Scale the given object by the factor, creating its copy before the scaling.
7458         #  @param theObject The object to be scaled.
7459         #  @param thePoint Center point for scaling.
7460         #                  Passing None for it means scaling relatively the origin of global CS.
7461         #  @param theFactor Scaling factor value.
7462         #  @param 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         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7467         #
7468         #  @ref tui_scale "Example"
7469         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7470             """
7471             Scale the given object by the factor, creating its copy before the scaling.
7472
7473             Parameters:
7474                 theObject The object to be scaled.
7475                 thePoint Center point for scaling.
7476                          Passing None for it means scaling relatively the origin of global CS.
7477                 theFactor Scaling factor value.
7478                 theName Object name; when specified, this parameter is used
7479                         for result publication in the study. Otherwise, if automatic
7480                         publication is switched on, default value is used for result name.
7481
7482             Returns:    
7483                 New GEOM.GEOM_Object, containing the scaled shape.
7484             """
7485             # Example: see GEOM_TestAll.py
7486             theFactor, Parameters = ParseParameters(theFactor)
7487             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7488             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7489             anObj.SetParameters(Parameters)
7490             self._autoPublish(anObj, theName, "scaled")
7491             return anObj
7492
7493         ## Scale the given object by different factors along coordinate axes.
7494         #  @param theObject The object to be scaled.
7495         #  @param thePoint Center point for scaling.
7496         #                  Passing None for it means scaling relatively the origin of global CS.
7497         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7498         #  @param theCopy Flag used to scale object itself or create a copy.
7499         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7500         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7501         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7502             """
7503             Scale the given object by different factors along coordinate axes.
7504
7505             Parameters:
7506                 theObject The object to be scaled.
7507                 thePoint Center point for scaling.
7508                             Passing None for it means scaling relatively the origin of global CS.
7509                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7510                 theCopy Flag used to scale object itself or create a copy.
7511
7512             Returns:    
7513                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7514                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7515             """
7516             # Example: see GEOM_TestAll.py
7517             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7518             if theCopy:
7519                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7520                                                             theFactorX, theFactorY, theFactorZ)
7521             else:
7522                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7523                                                         theFactorX, theFactorY, theFactorZ)
7524             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7525             anObj.SetParameters(Parameters)
7526             return anObj
7527
7528         ## Scale the given object by different factors along coordinate axes,
7529         #  creating its copy before the scaling.
7530         #  @param theObject The object to be scaled.
7531         #  @param thePoint Center point for scaling.
7532         #                  Passing None for it means scaling relatively the origin of global CS.
7533         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7534         #  @param theName Object name; when specified, this parameter is used
7535         #         for result publication in the study. Otherwise, if automatic
7536         #         publication is switched on, default value is used for result name.
7537         #
7538         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7539         #
7540         #  @ref swig_scale "Example"
7541         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7542             """
7543             Scale the given object by different factors along coordinate axes,
7544             creating its copy before the scaling.
7545
7546             Parameters:
7547                 theObject The object to be scaled.
7548                 thePoint Center point for scaling.
7549                             Passing None for it means scaling relatively the origin of global CS.
7550                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7551                 theName Object name; when specified, this parameter is used
7552                         for result publication in the study. Otherwise, if automatic
7553                         publication is switched on, default value is used for result name.
7554
7555             Returns:
7556                 New GEOM.GEOM_Object, containing the scaled shape.
7557             """
7558             # Example: see GEOM_TestAll.py
7559             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7560             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7561                                                         theFactorX, theFactorY, theFactorZ)
7562             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7563             anObj.SetParameters(Parameters)
7564             self._autoPublish(anObj, theName, "scaled")
7565             return anObj
7566
7567         ## Mirror an object relatively the given plane.
7568         #  @param theObject The object to be mirrored.
7569         #  @param thePlane Plane of symmetry.
7570         #  @param theCopy Flag used to mirror object itself or create a copy.
7571         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7572         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7573         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7574             """
7575             Mirror an object relatively the given plane.
7576
7577             Parameters:
7578                 theObject The object to be mirrored.
7579                 thePlane Plane of symmetry.
7580                 theCopy Flag used to mirror object itself or create a copy.
7581
7582             Returns:
7583                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7584                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7585             """
7586             if theCopy:
7587                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7588             else:
7589                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7590             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7591             return anObj
7592
7593         ## Create an object, symmetrical
7594         #  to the given one relatively the given plane.
7595         #  @param theObject The object to be mirrored.
7596         #  @param thePlane Plane of symmetry.
7597         #  @param theName Object name; when specified, this parameter is used
7598         #         for result publication in the study. Otherwise, if automatic
7599         #         publication is switched on, default value is used for result name.
7600         #
7601         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7602         #
7603         #  @ref tui_mirror "Example"
7604         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7605             """
7606             Create an object, symmetrical to the given one relatively the given plane.
7607
7608             Parameters:
7609                 theObject The object to be mirrored.
7610                 thePlane Plane of symmetry.
7611                 theName Object name; when specified, this parameter is used
7612                         for result publication in the study. Otherwise, if automatic
7613                         publication is switched on, default value is used for result name.
7614
7615             Returns:
7616                 New GEOM.GEOM_Object, containing the mirrored shape.
7617             """
7618             # Example: see GEOM_TestAll.py
7619             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7620             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7621             self._autoPublish(anObj, theName, "mirrored")
7622             return anObj
7623
7624         ## Mirror an object relatively the given axis.
7625         #  @param theObject The object to be mirrored.
7626         #  @param theAxis Axis of symmetry.
7627         #  @param theCopy Flag used to mirror object itself or create a copy.
7628         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7629         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7630         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7631             """
7632             Mirror an object relatively the given axis.
7633
7634             Parameters:
7635                 theObject The object to be mirrored.
7636                 theAxis Axis of symmetry.
7637                 theCopy Flag used to mirror object itself or create a copy.
7638
7639             Returns:
7640                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7641                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7642             """
7643             if theCopy:
7644                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7645             else:
7646                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7647             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7648             return anObj
7649
7650         ## Create an object, symmetrical
7651         #  to the given one relatively the given axis.
7652         #  @param theObject The object to be mirrored.
7653         #  @param theAxis Axis of symmetry.
7654         #  @param theName Object name; when specified, this parameter is used
7655         #         for result publication in the study. Otherwise, if automatic
7656         #         publication is switched on, default value is used for result name.
7657         #
7658         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7659         #
7660         #  @ref tui_mirror "Example"
7661         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7662             """
7663             Create an object, symmetrical to the given one relatively the given axis.
7664
7665             Parameters:
7666                 theObject The object to be mirrored.
7667                 theAxis Axis of symmetry.
7668                 theName Object name; when specified, this parameter is used
7669                         for result publication in the study. Otherwise, if automatic
7670                         publication is switched on, default value is used for result name.
7671
7672             Returns: 
7673                 New GEOM.GEOM_Object, containing the mirrored shape.
7674             """
7675             # Example: see GEOM_TestAll.py
7676             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7677             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7678             self._autoPublish(anObj, theName, "mirrored")
7679             return anObj
7680
7681         ## Mirror an object relatively the given point.
7682         #  @param theObject The object to be mirrored.
7683         #  @param thePoint Point of symmetry.
7684         #  @param theCopy Flag used to mirror object itself or create a copy.
7685         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7686         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7687         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7688             """
7689             Mirror an object relatively the given point.
7690
7691             Parameters:
7692                 theObject The object to be mirrored.
7693                 thePoint Point of symmetry.
7694                 theCopy Flag used to mirror object itself or create a copy.
7695
7696             Returns:
7697                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7698                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7699             """
7700             # Example: see GEOM_TestAll.py
7701             if theCopy:
7702                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7703             else:
7704                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7705             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7706             return anObj
7707
7708         ## Create an object, symmetrical
7709         #  to the given one relatively the given point.
7710         #  @param theObject The object to be mirrored.
7711         #  @param thePoint Point of symmetry.
7712         #  @param theName Object name; when specified, this parameter is used
7713         #         for result publication in the study. Otherwise, if automatic
7714         #         publication is switched on, default value is used for result name.
7715         #
7716         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7717         #
7718         #  @ref tui_mirror "Example"
7719         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7720             """
7721             Create an object, symmetrical
7722             to the given one relatively the given point.
7723
7724             Parameters:
7725                 theObject The object to be mirrored.
7726                 thePoint Point of symmetry.
7727                 theName Object name; when specified, this parameter is used
7728                         for result publication in the study. Otherwise, if automatic
7729                         publication is switched on, default value is used for result name.
7730
7731             Returns:  
7732                 New GEOM.GEOM_Object, containing the mirrored shape.
7733             """
7734             # Example: see GEOM_TestAll.py
7735             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7736             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7737             self._autoPublish(anObj, theName, "mirrored")
7738             return anObj
7739
7740         ## Modify the location of the given object.
7741         #  @param theObject The object to be displaced.
7742         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7743         #                     If \a theStartLCS is NULL, displacement
7744         #                     will be performed from global CS.\n
7745         #                     If \a theObject itself is used as \a theStartLCS,
7746         #                     its location will be changed to \a theEndLCS.
7747         #  @param theEndLCS Coordinate system to perform displacement to it.
7748         #  @param theCopy Flag used to displace object itself or create a copy.
7749         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7750         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7751         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7752             """
7753             Modify the Location of the given object by LCS, creating its copy before the setting.
7754
7755             Parameters:
7756                 theObject The object to be displaced.
7757                 theStartLCS Coordinate system to perform displacement from it.
7758                             If theStartLCS is NULL, displacement
7759                             will be performed from global CS.
7760                             If theObject itself is used as theStartLCS,
7761                             its location will be changed to theEndLCS.
7762                 theEndLCS Coordinate system to perform displacement to it.
7763                 theCopy Flag used to displace object itself or create a copy.
7764
7765             Returns:
7766                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7767                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7768             """
7769             # Example: see GEOM_TestAll.py
7770             if theCopy:
7771                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7772             else:
7773                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7774             RaiseIfFailed("Displace", self.TrsfOp)
7775             return anObj
7776
7777         ## Modify the Location of the given object by LCS,
7778         #  creating its copy before the setting.
7779         #  @param theObject The object to be displaced.
7780         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7781         #                     If \a theStartLCS is NULL, displacement
7782         #                     will be performed from global CS.\n
7783         #                     If \a theObject itself is used as \a theStartLCS,
7784         #                     its location will be changed to \a theEndLCS.
7785         #  @param theEndLCS Coordinate system to perform displacement to it.
7786         #  @param theName Object name; when specified, this parameter is used
7787         #         for result publication in the study. Otherwise, if automatic
7788         #         publication is switched on, default value is used for result name.
7789         #
7790         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7791         #
7792         #  @ref tui_modify_location "Example"
7793         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7794             """
7795             Modify the Location of the given object by LCS, creating its copy before the setting.
7796
7797             Parameters:
7798                 theObject The object to be displaced.
7799                 theStartLCS Coordinate system to perform displacement from it.
7800                             If theStartLCS is NULL, displacement
7801                             will be performed from global CS.
7802                             If theObject itself is used as theStartLCS,
7803                             its location will be changed to theEndLCS.
7804                 theEndLCS Coordinate system to perform displacement to it.
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 the displaced shape.
7811
7812             Example of usage:
7813                 # create local coordinate systems
7814                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7815                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7816                 # modify the location of the given object
7817                 position = geompy.MakePosition(cylinder, cs1, cs2)
7818             """
7819             # Example: see GEOM_TestAll.py
7820             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7821             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7822             self._autoPublish(anObj, theName, "displaced")
7823             return anObj
7824
7825         ## Modify the Location of the given object by Path.
7826         #  @param  theObject The object to be displaced.
7827         #  @param  thePath Wire or Edge along that the object will be translated.
7828         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7829         #  @param  theCopy is to create a copy objects if true.
7830         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7831         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7832         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7833         #
7834         #  @ref tui_modify_location "Example"
7835         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7836             """
7837             Modify the Location of the given object by Path.
7838
7839             Parameters:
7840                  theObject The object to be displaced.
7841                  thePath Wire or Edge along that the object will be translated.
7842                  theDistance progress of Path (0 = start location, 1 = end of path location).
7843                  theCopy is to create a copy objects if true.
7844                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7845
7846             Returns:  
7847                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7848                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7849
7850             Example of usage:
7851                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7852             """
7853             # Example: see GEOM_TestAll.py
7854             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7855             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7856             return anObj
7857
7858         ## Modify the Location of the given object by Path, creating its copy before the operation.
7859         #  @param theObject The object to be displaced.
7860         #  @param thePath Wire or Edge along that the object will be translated.
7861         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7862         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7863         #  @param theName Object name; when specified, this parameter is used
7864         #         for result publication in the study. Otherwise, if automatic
7865         #         publication is switched on, default value is used for result name.
7866         #
7867         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7868         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7869             """
7870             Modify the Location of the given object by Path, creating its copy before the operation.
7871
7872             Parameters:
7873                  theObject The object to be displaced.
7874                  thePath Wire or Edge along that the object will be translated.
7875                  theDistance progress of Path (0 = start location, 1 = end of path location).
7876                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7877                  theName Object name; when specified, this parameter is used
7878                          for result publication in the study. Otherwise, if automatic
7879                          publication is switched on, default value is used for result name.
7880
7881             Returns:  
7882                 New GEOM.GEOM_Object, containing the displaced shape.
7883             """
7884             # Example: see GEOM_TestAll.py
7885             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7886             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7887             self._autoPublish(anObj, theName, "displaced")
7888             return anObj
7889
7890         ## Offset given shape.
7891         #  @param theObject The base object for the offset.
7892         #  @param theOffset Offset value.
7893         #  @param theCopy Flag used to offset object itself or create a copy.
7894         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7895         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7896         def Offset(self, theObject, theOffset, theCopy=False):
7897             """
7898             Offset given shape.
7899
7900             Parameters:
7901                 theObject The base object for the offset.
7902                 theOffset Offset value.
7903                 theCopy Flag used to offset object itself or create a copy.
7904
7905             Returns: 
7906                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7907                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7908             """
7909             theOffset, Parameters = ParseParameters(theOffset)
7910             if theCopy:
7911                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7912             else:
7913                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7914             RaiseIfFailed("Offset", self.TrsfOp)
7915             anObj.SetParameters(Parameters)
7916             return anObj
7917
7918         ## Create new object as offset of the given one.
7919         #  @param theObject The base object for the offset.
7920         #  @param theOffset Offset value.
7921         #  @param theName Object name; when specified, this parameter is used
7922         #         for result publication in the study. Otherwise, if automatic
7923         #         publication is switched on, default value is used for result name.
7924         #
7925         #  @return New GEOM.GEOM_Object, containing the offset object.
7926         #
7927         #  @ref tui_offset "Example"
7928         def MakeOffset(self, theObject, theOffset, theName=None):
7929             """
7930             Create new object as offset of the given one.
7931
7932             Parameters:
7933                 theObject The base object for the offset.
7934                 theOffset Offset value.
7935                 theName Object name; when specified, this parameter is used
7936                         for result publication in the study. Otherwise, if automatic
7937                         publication is switched on, default value is used for result name.
7938
7939             Returns:  
7940                 New GEOM.GEOM_Object, containing the offset object.
7941
7942             Example of usage:
7943                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7944                  # create a new object as offset of the given object
7945                  offset = geompy.MakeOffset(box, 70.)
7946             """
7947             # Example: see GEOM_TestAll.py
7948             theOffset, Parameters = ParseParameters(theOffset)
7949             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7950             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7951             anObj.SetParameters(Parameters)
7952             self._autoPublish(anObj, theName, "offset")
7953             return anObj
7954
7955         ## Create new object as projection of the given one on a 2D surface.
7956         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7957         #  @param theTarget The target object. It can be planar or cylindrical face.
7958         #  @param theName Object name; when specified, this parameter is used
7959         #         for result publication in the study. Otherwise, if automatic
7960         #         publication is switched on, default value is used for result name.
7961         #
7962         #  @return New GEOM.GEOM_Object, containing the projection.
7963         #
7964         #  @ref tui_projection "Example"
7965         def MakeProjection(self, theSource, theTarget, theName=None):
7966             """
7967             Create new object as projection of the given one on a 2D surface.
7968
7969             Parameters:
7970                 theSource The source object for the projection. It can be a point, edge or wire.
7971                 theTarget The target object. It can be planar or cylindrical face.
7972                 theName Object name; when specified, this parameter is used
7973                         for result publication in the study. Otherwise, if automatic
7974                         publication is switched on, default value is used for result name.
7975
7976             Returns:  
7977                 New GEOM.GEOM_Object, containing the projection.
7978             """
7979             # Example: see GEOM_TestAll.py
7980             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7981             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7982             self._autoPublish(anObj, theName, "projection")
7983             return anObj
7984
7985         # -----------------------------------------------------------------------------
7986         # Patterns
7987         # -----------------------------------------------------------------------------
7988
7989         ## Translate the given object along the given vector a given number times
7990         #  @param theObject The object to be translated.
7991         #  @param theVector Direction of the translation. DX if None.
7992         #  @param theStep Distance to translate on.
7993         #  @param theNbTimes Quantity of translations to be done.
7994         #  @param theName Object name; when specified, this parameter is used
7995         #         for result publication in the study. Otherwise, if automatic
7996         #         publication is switched on, default value is used for result name.
7997         #
7998         #  @return New GEOM.GEOM_Object, containing compound of all
7999         #          the shapes, obtained after each translation.
8000         #
8001         #  @ref tui_multi_translation "Example"
8002         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8003             """
8004             Translate the given object along the given vector a given number times
8005
8006             Parameters:
8007                 theObject The object to be translated.
8008                 theVector Direction of the translation. DX if None.
8009                 theStep Distance to translate on.
8010                 theNbTimes Quantity of translations to be done.
8011                 theName Object name; when specified, this parameter is used
8012                         for result publication in the study. Otherwise, if automatic
8013                         publication is switched on, default value is used for result name.
8014
8015             Returns:     
8016                 New GEOM.GEOM_Object, containing compound of all
8017                 the shapes, obtained after each translation.
8018
8019             Example of usage:
8020                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8021             """
8022             # Example: see GEOM_TestAll.py
8023             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8024             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8025             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8026             anObj.SetParameters(Parameters)
8027             self._autoPublish(anObj, theName, "multitranslation")
8028             return anObj
8029
8030         ## Conseqently apply two specified translations to theObject specified number of times.
8031         #  @param theObject The object to be translated.
8032         #  @param theVector1 Direction of the first translation. DX if None.
8033         #  @param theStep1 Step of the first translation.
8034         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8035         #  @param theVector2 Direction of the second translation. DY if None.
8036         #  @param theStep2 Step of the second translation.
8037         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8038         #  @param theName Object name; when specified, this parameter is used
8039         #         for result publication in the study. Otherwise, if automatic
8040         #         publication is switched on, default value is used for result name.
8041         #
8042         #  @return New GEOM.GEOM_Object, containing compound of all
8043         #          the shapes, obtained after each translation.
8044         #
8045         #  @ref tui_multi_translation "Example"
8046         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8047                                    theVector2, theStep2, theNbTimes2, theName=None):
8048             """
8049             Conseqently apply two specified translations to theObject specified number of times.
8050
8051             Parameters:
8052                 theObject The object to be translated.
8053                 theVector1 Direction of the first translation. DX if None.
8054                 theStep1 Step of the first translation.
8055                 theNbTimes1 Quantity of translations to be done along theVector1.
8056                 theVector2 Direction of the second translation. DY if None.
8057                 theStep2 Step of the second translation.
8058                 theNbTimes2 Quantity of translations to be done along theVector2.
8059                 theName Object name; when specified, this parameter is used
8060                         for result publication in the study. Otherwise, if automatic
8061                         publication is switched on, default value is used for result name.
8062
8063             Returns:
8064                 New GEOM.GEOM_Object, containing compound of all
8065                 the shapes, obtained after each translation.
8066
8067             Example of usage:
8068                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8069             """
8070             # Example: see GEOM_TestAll.py
8071             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8072             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8073                                                  theVector2, theStep2, theNbTimes2)
8074             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8075             anObj.SetParameters(Parameters)
8076             self._autoPublish(anObj, theName, "multitranslation")
8077             return anObj
8078
8079         ## Rotate the given object around the given axis a given number times.
8080         #  Rotation angle will be 2*PI/theNbTimes.
8081         #  @param theObject The object to be rotated.
8082         #  @param theAxis The rotation axis. DZ if None.
8083         #  @param theNbTimes Quantity of rotations to be done.
8084         #  @param theName Object name; when specified, this parameter is used
8085         #         for result publication in the study. Otherwise, if automatic
8086         #         publication is switched on, default value is used for result name.
8087         #
8088         #  @return New GEOM.GEOM_Object, containing compound of all the
8089         #          shapes, obtained after each rotation.
8090         #
8091         #  @ref tui_multi_rotation "Example"
8092         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8093             """
8094             Rotate the given object around the given axis a given number times.
8095             Rotation angle will be 2*PI/theNbTimes.
8096
8097             Parameters:
8098                 theObject The object to be rotated.
8099                 theAxis The rotation axis. DZ if None.
8100                 theNbTimes Quantity of rotations to be done.
8101                 theName Object name; when specified, this parameter is used
8102                         for result publication in the study. Otherwise, if automatic
8103                         publication is switched on, default value is used for result name.
8104
8105             Returns:     
8106                 New GEOM.GEOM_Object, containing compound of all the
8107                 shapes, obtained after each rotation.
8108
8109             Example of usage:
8110                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8111             """
8112             # Example: see GEOM_TestAll.py
8113             theNbTimes, Parameters = ParseParameters(theNbTimes)
8114             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8115             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8116             anObj.SetParameters(Parameters)
8117             self._autoPublish(anObj, theName, "multirotation")
8118             return anObj
8119
8120         ## Rotate the given object around the given axis
8121         #  a given number times on the given angle.
8122         #  @param theObject The object to be rotated.
8123         #  @param theAxis The rotation axis. DZ if None.
8124         #  @param theAngleStep Rotation angle in radians.
8125         #  @param theNbTimes Quantity of rotations to be done.
8126         #  @param theName Object name; when specified, this parameter is used
8127         #         for result publication in the study. Otherwise, if automatic
8128         #         publication is switched on, default value is used for result name.
8129         #
8130         #  @return New GEOM.GEOM_Object, containing compound of all the
8131         #          shapes, obtained after each rotation.
8132         #
8133         #  @ref tui_multi_rotation "Example"
8134         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8135             """
8136             Rotate the given object around the given axis
8137             a given number times on the given angle.
8138
8139             Parameters:
8140                 theObject The object to be rotated.
8141                 theAxis The rotation axis. DZ if None.
8142                 theAngleStep Rotation angle in radians.
8143                 theNbTimes Quantity of rotations to be done.
8144                 theName Object name; when specified, this parameter is used
8145                         for result publication in the study. Otherwise, if automatic
8146                         publication is switched on, default value is used for result name.
8147
8148             Returns:     
8149                 New GEOM.GEOM_Object, containing compound of all the
8150                 shapes, obtained after each rotation.
8151
8152             Example of usage:
8153                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8154             """
8155             # Example: see GEOM_TestAll.py
8156             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8157             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8158             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8159             anObj.SetParameters(Parameters)
8160             self._autoPublish(anObj, theName, "multirotation")
8161             return anObj
8162
8163         ## Rotate the given object around the given axis a given
8164         #  number times and multi-translate each rotation result.
8165         #  Rotation angle will be 2*PI/theNbTimes1.
8166         #  Translation direction passes through center of gravity
8167         #  of rotated shape and its projection on the rotation axis.
8168         #  @param theObject The object to be rotated.
8169         #  @param theAxis Rotation axis. DZ if None.
8170         #  @param theNbTimes1 Quantity of rotations to be done.
8171         #  @param theRadialStep Translation distance.
8172         #  @param theNbTimes2 Quantity of translations to be done.
8173         #  @param theName Object name; when specified, this parameter is used
8174         #         for result publication in the study. Otherwise, if automatic
8175         #         publication is switched on, default value is used for result name.
8176         #
8177         #  @return New GEOM.GEOM_Object, containing compound of all the
8178         #          shapes, obtained after each transformation.
8179         #
8180         #  @ref tui_multi_rotation "Example"
8181         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8182             """
8183             Rotate the given object around the
8184             given axis on the given angle a given number
8185             times and multi-translate each rotation result.
8186             Translation direction passes through center of gravity
8187             of rotated shape and its projection on the rotation axis.
8188
8189             Parameters:
8190                 theObject The object to be rotated.
8191                 theAxis Rotation axis. DZ if None.
8192                 theNbTimes1 Quantity of rotations to be done.
8193                 theRadialStep Translation distance.
8194                 theNbTimes2 Quantity of translations to be done.
8195                 theName Object name; when specified, this parameter is used
8196                         for result publication in the study. Otherwise, if automatic
8197                         publication is switched on, default value is used for result name.
8198
8199             Returns:    
8200                 New GEOM.GEOM_Object, containing compound of all the
8201                 shapes, obtained after each transformation.
8202
8203             Example of usage:
8204                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8205             """
8206             # Example: see GEOM_TestAll.py
8207             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8208             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8209             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8210             anObj.SetParameters(Parameters)
8211             self._autoPublish(anObj, theName, "multirotation")
8212             return anObj
8213
8214         ## Rotate the given object around the
8215         #  given axis on the given angle a given number
8216         #  times and multi-translate each rotation result.
8217         #  Translation direction passes through center of gravity
8218         #  of rotated shape and its projection on the rotation axis.
8219         #  @param theObject The object to be rotated.
8220         #  @param theAxis Rotation axis. DZ if None.
8221         #  @param theAngleStep Rotation angle in radians.
8222         #  @param theNbTimes1 Quantity of rotations to be done.
8223         #  @param theRadialStep Translation distance.
8224         #  @param theNbTimes2 Quantity of translations to be done.
8225         #  @param 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         #  @return New GEOM.GEOM_Object, containing compound of all the
8230         #          shapes, obtained after each transformation.
8231         #
8232         #  @ref tui_multi_rotation "Example"
8233         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8234             """
8235             Rotate the given object around the
8236             given axis on the given angle a given number
8237             times and multi-translate each rotation result.
8238             Translation direction passes through center of gravity
8239             of rotated shape and its projection on the rotation axis.
8240
8241             Parameters:
8242                 theObject The object to be rotated.
8243                 theAxis Rotation axis. DZ if None.
8244                 theAngleStep Rotation angle in radians.
8245                 theNbTimes1 Quantity of rotations to be done.
8246                 theRadialStep Translation distance.
8247                 theNbTimes2 Quantity of translations to be done.
8248                 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             Returns:    
8253                 New GEOM.GEOM_Object, containing compound of all the
8254                 shapes, obtained after each transformation.
8255
8256             Example of usage:
8257                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8258             """
8259             # Example: see GEOM_TestAll.py
8260             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8261             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8262             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8263             anObj.SetParameters(Parameters)
8264             self._autoPublish(anObj, theName, "multirotation")
8265             return anObj
8266
8267         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8268         #
8269         #  @ref swig_MakeMultiRotation "Example"
8270         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8271             """
8272             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8273
8274             Example of usage:
8275                 pz = geompy.MakeVertex(0, 0, 100)
8276                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8277                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8278             """
8279             # Example: see GEOM_TestOthers.py
8280             aVec = self.MakeLine(aPoint,aDir)
8281             # note: auto-publishing is done in self.MultiRotate1D()
8282             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8283             return anObj
8284
8285         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8286         #
8287         #  @ref swig_MakeMultiRotation "Example"
8288         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8289             """
8290             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8291
8292             Example of usage:
8293                 pz = geompy.MakeVertex(0, 0, 100)
8294                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8295                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8296             """
8297             # Example: see GEOM_TestOthers.py
8298             aVec = self.MakeLine(aPoint,aDir)
8299             # note: auto-publishing is done in self.MultiRotate1D()
8300             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8301             return anObj
8302
8303         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8304         #
8305         #  @ref swig_MakeMultiRotation "Example"
8306         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8307             """
8308             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8309             
8310             Example of usage:
8311                 pz = geompy.MakeVertex(0, 0, 100)
8312                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8313                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8314             """
8315             # Example: see GEOM_TestOthers.py
8316             aVec = self.MakeLine(aPoint,aDir)
8317             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8318             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8319             return anObj
8320
8321         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8322         #
8323         #  @ref swig_MakeMultiRotation "Example"
8324         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8325             """
8326             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8327             
8328             Example of usage:
8329                 pz = geompy.MakeVertex(0, 0, 100)
8330                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8331                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8332             """
8333             # Example: see GEOM_TestOthers.py
8334             aVec = self.MakeLine(aPoint,aDir)
8335             # note: auto-publishing is done in self.MultiRotate2D()
8336             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8337             return anObj
8338
8339         # end of l3_transform
8340         ## @}
8341
8342         ## @addtogroup l3_transform_d
8343         ## @{
8344
8345         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8346         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8347             """
8348             Deprecated method. Use MultiRotate1DNbTimes instead.
8349             """
8350             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8351             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8352
8353         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8354         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8355         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8356             """
8357             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8358             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8359
8360             Example of usage:
8361                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8362             """
8363             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8364             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8365             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8366             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8367             anObj.SetParameters(Parameters)
8368             self._autoPublish(anObj, theName, "multirotation")
8369             return anObj
8370
8371         ## The same, as MultiRotate1D(), but axis is given by direction and point
8372         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8373         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8374             """
8375             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8376             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8377
8378             Example of usage:
8379                 pz = geompy.MakeVertex(0, 0, 100)
8380                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8381                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8382             """
8383             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8384             aVec = self.MakeLine(aPoint,aDir)
8385             # note: auto-publishing is done in self.MultiRotate1D()
8386             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8387             return anObj
8388
8389         ## The same, as MultiRotate2D(), but axis is given by direction and point
8390         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8391         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8392             """
8393             The same, as MultiRotate2D(), but axis is given by direction and point
8394             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8395             
8396             Example of usage:
8397                 pz = geompy.MakeVertex(0, 0, 100)
8398                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8399                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8400             """
8401             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8402             aVec = self.MakeLine(aPoint,aDir)
8403             # note: auto-publishing is done in self.MultiRotate2D()
8404             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8405             return anObj
8406
8407         # end of l3_transform_d
8408         ## @}
8409
8410         ## @addtogroup l3_local
8411         ## @{
8412
8413         ## Perform a fillet on all edges of the given shape.
8414         #  @param theShape Shape, to perform fillet on.
8415         #  @param theR Fillet radius.
8416         #  @param theName Object name; when specified, this parameter is used
8417         #         for result publication in the study. Otherwise, if automatic
8418         #         publication is switched on, default value is used for result name.
8419         #
8420         #  @return New GEOM.GEOM_Object, containing the result shape.
8421         #
8422         #  @ref tui_fillet "Example 1"
8423         #  \n @ref swig_MakeFilletAll "Example 2"
8424         def MakeFilletAll(self, theShape, theR, theName=None):
8425             """
8426             Perform a fillet on all edges of the given shape.
8427
8428             Parameters:
8429                 theShape Shape, to perform fillet on.
8430                 theR Fillet radius.
8431                 theName Object name; when specified, this parameter is used
8432                         for result publication in the study. Otherwise, if automatic
8433                         publication is switched on, default value is used for result name.
8434
8435             Returns: 
8436                 New GEOM.GEOM_Object, containing the result shape.
8437
8438             Example of usage: 
8439                filletall = geompy.MakeFilletAll(prism, 10.)
8440             """
8441             # Example: see GEOM_TestOthers.py
8442             theR,Parameters = ParseParameters(theR)
8443             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8444             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8445             anObj.SetParameters(Parameters)
8446             self._autoPublish(anObj, theName, "fillet")
8447             return anObj
8448
8449         ## Perform a fillet on the specified edges/faces of the given shape
8450         #  @param theShape Shape, to perform fillet on.
8451         #  @param theR Fillet radius.
8452         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8453         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8454         #  @param theName Object name; when specified, this parameter is used
8455         #         for result publication in the study. Otherwise, if automatic
8456         #         publication is switched on, default value is used for result name.
8457         #
8458         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8459         #
8460         #  @return New GEOM.GEOM_Object, containing the result shape.
8461         #
8462         #  @ref tui_fillet "Example"
8463         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8464             """
8465             Perform a fillet on the specified edges/faces of the given shape
8466
8467             Parameters:
8468                 theShape Shape, to perform fillet on.
8469                 theR Fillet radius.
8470                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8471                 theListShapes Global indices of edges/faces to perform fillet on.
8472                 theName Object name; when specified, this parameter is used
8473                         for result publication in the study. Otherwise, if automatic
8474                         publication is switched on, default value is used for result name.
8475
8476             Note:
8477                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8478
8479             Returns: 
8480                 New GEOM.GEOM_Object, containing the result shape.
8481
8482             Example of usage:
8483                 # get the list of IDs (IDList) for the fillet
8484                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8485                 IDlist_e = []
8486                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8487                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8488                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8489                 # make a fillet on the specified edges of the given shape
8490                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8491             """
8492             # Example: see GEOM_TestAll.py
8493             theR,Parameters = ParseParameters(theR)
8494             anObj = None
8495             if theShapeType == self.ShapeType["EDGE"]:
8496                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8497                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8498             else:
8499                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8500                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8501             anObj.SetParameters(Parameters)
8502             self._autoPublish(anObj, theName, "fillet")
8503             return anObj
8504
8505         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8506         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8507             """
8508             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8509
8510             Example of usage:
8511                 # get the list of IDs (IDList) for the fillet
8512                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8513                 IDlist_e = []
8514                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8515                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8516                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8517                 # make a fillet on the specified edges of the given shape
8518                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8519             """
8520             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8521             anObj = None
8522             if theShapeType == self.ShapeType["EDGE"]:
8523                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8524                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8525             else:
8526                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8527                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8528             anObj.SetParameters(Parameters)
8529             self._autoPublish(anObj, theName, "fillet")
8530             return anObj
8531
8532         ## Perform a fillet on the specified edges of the given shape
8533         #  @param theShape  Wire Shape to perform fillet on.
8534         #  @param theR  Fillet radius.
8535         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8536         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8537         #    \note The list of vertices could be empty,
8538         #          in this case fillet will done done at all vertices in wire
8539         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8540         #         by the length of the edges, nearest to the fillet vertex.
8541         #         But sometimes the next edge is C1 continuous with the one, nearest to
8542         #         the fillet point, and such two (or more) edges can be united to allow
8543         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8544         #         thus ignoring the secant vertex (vertices).
8545         #  @param theName Object name; when specified, this parameter is used
8546         #         for result publication in the study. Otherwise, if automatic
8547         #         publication is switched on, default value is used for result name.
8548         #
8549         #  @return New GEOM.GEOM_Object, containing the result shape.
8550         #
8551         #  @ref tui_fillet2d "Example"
8552         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8553             """
8554             Perform a fillet on the specified edges of the given shape
8555
8556             Parameters:
8557                 theShape  Wire Shape to perform fillet on.
8558                 theR  Fillet radius.
8559                 theListOfVertexes Global indices of vertexes to perform fillet on.
8560                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8561                     by the length of the edges, nearest to the fillet vertex.
8562                     But sometimes the next edge is C1 continuous with the one, nearest to
8563                     the fillet point, and such two (or more) edges can be united to allow
8564                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8565                     thus ignoring the secant vertex (vertices).
8566                 theName Object name; when specified, this parameter is used
8567                         for result publication in the study. Otherwise, if automatic
8568                         publication is switched on, default value is used for result name.
8569             Note:
8570                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8571
8572                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8573
8574             Returns: 
8575                 New GEOM.GEOM_Object, containing the result shape.
8576
8577             Example of usage:  
8578                 # create wire
8579                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8580                 # make fillet at given wire vertices with giver radius
8581                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8582             """
8583             # Example: see GEOM_TestAll.py
8584             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8585             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8586             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8587             anObj.SetParameters(Parameters)
8588             self._autoPublish(anObj, theName, "fillet")
8589             return anObj
8590
8591         ## Perform a fillet at the specified vertices of the given face/shell.
8592         #  @param theShape Face or Shell shape to perform fillet on.
8593         #  @param theR Fillet radius.
8594         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8595         #  @param theName Object name; when specified, this parameter is used
8596         #         for result publication in the study. Otherwise, if automatic
8597         #         publication is switched on, default value is used for result name.
8598         #
8599         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8600         #
8601         #  @return New GEOM.GEOM_Object, containing the result shape.
8602         #
8603         #  @ref tui_fillet2d "Example"
8604         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8605             """
8606             Perform a fillet at the specified vertices of the given face/shell.
8607
8608             Parameters:
8609                 theShape  Face or Shell shape to perform fillet on.
8610                 theR  Fillet radius.
8611                 theListOfVertexes Global indices of vertexes to perform fillet on.
8612                 theName Object name; when specified, this parameter is used
8613                         for result publication in the study. Otherwise, if automatic
8614                         publication is switched on, default value is used for result name.
8615             Note:
8616                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8617
8618             Returns: 
8619                 New GEOM.GEOM_Object, containing the result shape.
8620
8621             Example of usage:
8622                 face = geompy.MakeFaceHW(100, 100, 1)
8623                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8624             """
8625             # Example: see GEOM_TestAll.py
8626             theR,Parameters = ParseParameters(theR)
8627             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8628             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8629             anObj.SetParameters(Parameters)
8630             self._autoPublish(anObj, theName, "fillet")
8631             return anObj
8632
8633         ## Perform a symmetric chamfer on all edges of the given shape.
8634         #  @param theShape Shape, to perform chamfer on.
8635         #  @param theD Chamfer size along each face.
8636         #  @param theName Object name; when specified, this parameter is used
8637         #         for result publication in the study. Otherwise, if automatic
8638         #         publication is switched on, default value is used for result name.
8639         #
8640         #  @return New GEOM.GEOM_Object, containing the result shape.
8641         #
8642         #  @ref tui_chamfer "Example 1"
8643         #  \n @ref swig_MakeChamferAll "Example 2"
8644         def MakeChamferAll(self, theShape, theD, theName=None):
8645             """
8646             Perform a symmetric chamfer on all edges of the given shape.
8647
8648             Parameters:
8649                 theShape Shape, to perform chamfer on.
8650                 theD Chamfer size along each face.
8651                 theName Object name; when specified, this parameter is used
8652                         for result publication in the study. Otherwise, if automatic
8653                         publication is switched on, default value is used for result name.
8654
8655             Returns:     
8656                 New GEOM.GEOM_Object, containing the result shape.
8657
8658             Example of usage:
8659                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8660             """
8661             # Example: see GEOM_TestOthers.py
8662             theD,Parameters = ParseParameters(theD)
8663             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8664             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8665             anObj.SetParameters(Parameters)
8666             self._autoPublish(anObj, theName, "chamfer")
8667             return anObj
8668
8669         ## Perform a chamfer on edges, common to the specified faces,
8670         #  with distance D1 on the Face1
8671         #  @param theShape Shape, to perform chamfer on.
8672         #  @param theD1 Chamfer size along \a theFace1.
8673         #  @param theD2 Chamfer size along \a theFace2.
8674         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8675         #  @param theName Object name; when specified, this parameter is used
8676         #         for result publication in the study. Otherwise, if automatic
8677         #         publication is switched on, default value is used for result name.
8678         #
8679         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8680         #
8681         #  @return New GEOM.GEOM_Object, containing the result shape.
8682         #
8683         #  @ref tui_chamfer "Example"
8684         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8685             """
8686             Perform a chamfer on edges, common to the specified faces,
8687             with distance D1 on the Face1
8688
8689             Parameters:
8690                 theShape Shape, to perform chamfer on.
8691                 theD1 Chamfer size along theFace1.
8692                 theD2 Chamfer size along theFace2.
8693                 theFace1,theFace2 Global indices of two faces of theShape.
8694                 theName Object name; when specified, this parameter is used
8695                         for result publication in the study. Otherwise, if automatic
8696                         publication is switched on, default value is used for result name.
8697
8698             Note:
8699                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8700
8701             Returns:      
8702                 New GEOM.GEOM_Object, containing the result shape.
8703
8704             Example of usage:
8705                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8706                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8707                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8708                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8709             """
8710             # Example: see GEOM_TestAll.py
8711             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8712             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8713             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8714             anObj.SetParameters(Parameters)
8715             self._autoPublish(anObj, theName, "chamfer")
8716             return anObj
8717
8718         ## Perform a chamfer on edges
8719         #  @param theShape Shape, to perform chamfer on.
8720         #  @param theD Chamfer length
8721         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8722         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8723         #  @param theName Object name; when specified, this parameter is used
8724         #         for result publication in the study. Otherwise, if automatic
8725         #         publication is switched on, default value is used for result name.
8726         #
8727         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8728         #
8729         #  @return New GEOM.GEOM_Object, containing the result shape.
8730         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8731             """
8732             Perform a chamfer on edges
8733
8734             Parameters:
8735                 theShape Shape, to perform chamfer on.
8736                 theD1 Chamfer size along theFace1.
8737                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8738                 theFace1,theFace2 Global indices of two faces of theShape.
8739                 theName Object name; when specified, this parameter is used
8740                         for result publication in the study. Otherwise, if automatic
8741                         publication is switched on, default value is used for result name.
8742
8743             Note:
8744                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8745
8746             Returns:      
8747                 New GEOM.GEOM_Object, containing the result shape.
8748
8749             Example of usage:
8750                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8751                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8752                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8753                 ang = 30
8754                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8755             """
8756             flag = False
8757             if isinstance(theAngle,str):
8758                 flag = True
8759             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8760             if flag:
8761                 theAngle = theAngle*math.pi/180.0
8762             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8763             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8764             anObj.SetParameters(Parameters)
8765             self._autoPublish(anObj, theName, "chamfer")
8766             return anObj
8767
8768         ## Perform a chamfer on all edges of the specified faces,
8769         #  with distance D1 on the first specified face (if several for one edge)
8770         #  @param theShape Shape, to perform chamfer on.
8771         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8772         #               connected to the edge, are in \a theFaces, \a theD1
8773         #               will be get along face, which is nearer to \a theFaces beginning.
8774         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8775         #  @param theFaces Sequence of global indices of faces of \a theShape.
8776         #  @param theName Object name; when specified, this parameter is used
8777         #         for result publication in the study. Otherwise, if automatic
8778         #         publication is switched on, default value is used for result name.
8779         #
8780         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8781         #
8782         #  @return New GEOM.GEOM_Object, containing the result shape.
8783         #
8784         #  @ref tui_chamfer "Example"
8785         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8786             """
8787             Perform a chamfer on all edges of the specified faces,
8788             with distance D1 on the first specified face (if several for one edge)
8789
8790             Parameters:
8791                 theShape Shape, to perform chamfer on.
8792                 theD1 Chamfer size along face from  theFaces. If both faces,
8793                       connected to the edge, are in theFaces, theD1
8794                       will be get along face, which is nearer to theFaces beginning.
8795                 theD2 Chamfer size along another of two faces, connected to the edge.
8796                 theFaces Sequence of global indices of faces of theShape.
8797                 theName Object name; when specified, this parameter is used
8798                         for result publication in the study. Otherwise, if automatic
8799                         publication is switched on, default value is used for result name.
8800                 
8801             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8802
8803             Returns:  
8804                 New GEOM.GEOM_Object, containing the result shape.
8805             """
8806             # Example: see GEOM_TestAll.py
8807             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8808             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8809             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8810             anObj.SetParameters(Parameters)
8811             self._autoPublish(anObj, theName, "chamfer")
8812             return anObj
8813
8814         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8815         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8816         #
8817         #  @ref swig_FilletChamfer "Example"
8818         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8819             """
8820             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8821             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8822             """
8823             flag = False
8824             if isinstance(theAngle,str):
8825                 flag = True
8826             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8827             if flag:
8828                 theAngle = theAngle*math.pi/180.0
8829             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8830             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8831             anObj.SetParameters(Parameters)
8832             self._autoPublish(anObj, theName, "chamfer")
8833             return anObj
8834
8835         ## Perform a chamfer on edges,
8836         #  with distance D1 on the first specified face (if several for one edge)
8837         #  @param theShape Shape, to perform chamfer on.
8838         #  @param theD1,theD2 Chamfer size
8839         #  @param theEdges Sequence of edges of \a theShape.
8840         #  @param theName Object name; when specified, this parameter is used
8841         #         for result publication in the study. Otherwise, if automatic
8842         #         publication is switched on, default value is used for result name.
8843         #
8844         #  @return New GEOM.GEOM_Object, containing the result shape.
8845         #
8846         #  @ref swig_FilletChamfer "Example"
8847         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8848             """
8849             Perform a chamfer on edges,
8850             with distance D1 on the first specified face (if several for one edge)
8851             
8852             Parameters:
8853                 theShape Shape, to perform chamfer on.
8854                 theD1,theD2 Chamfer size
8855                 theEdges Sequence of edges of theShape.
8856                 theName Object name; when specified, this parameter is used
8857                         for result publication in the study. Otherwise, if automatic
8858                         publication is switched on, default value is used for result name.
8859
8860             Returns:
8861                 New GEOM.GEOM_Object, containing the result shape.
8862             """
8863             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8864             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8865             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8866             anObj.SetParameters(Parameters)
8867             self._autoPublish(anObj, theName, "chamfer")
8868             return anObj
8869
8870         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8871         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8872         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8873             """
8874             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8875             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8876             """
8877             flag = False
8878             if isinstance(theAngle,str):
8879                 flag = True
8880             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8881             if flag:
8882                 theAngle = theAngle*math.pi/180.0
8883             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8884             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8885             anObj.SetParameters(Parameters)
8886             self._autoPublish(anObj, theName, "chamfer")
8887             return anObj
8888
8889         ## @sa MakeChamferEdge(), MakeChamferFaces()
8890         #
8891         #  @ref swig_MakeChamfer "Example"
8892         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8893             """
8894             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8895             """
8896             # Example: see GEOM_TestOthers.py
8897             anObj = None
8898             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8899             if aShapeType == self.ShapeType["EDGE"]:
8900                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8901             else:
8902                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8903             return anObj
8904             
8905         ## Remove material from a solid by extrusion of the base shape on the given distance.
8906         #  @param theInit Shape to remove material from. It must be a solid or 
8907         #  a compound made of a single solid.
8908         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8909         #  @param theH Prism dimension along the normal to theBase
8910         #  @param theAngle Draft angle in degrees.
8911         #  @param theName Object name; when specified, this parameter is used
8912         #         for result publication in the study. Otherwise, if automatic
8913         #         publication is switched on, default value is used for result name.
8914         #
8915         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8916         #
8917         #  @ref tui_creation_prism "Example"
8918         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8919             """
8920             Add material to a solid by extrusion of the base shape on the given distance.
8921
8922             Parameters:
8923                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8924                 theBase Closed edge or wire defining the base shape to be extruded.
8925                 theH Prism dimension along the normal  to theBase
8926                 theAngle Draft angle in degrees.
8927                 theName Object name; when specified, this parameter is used
8928                         for result publication in the study. Otherwise, if automatic
8929                         publication is switched on, default value is used for result name.
8930
8931             Returns:
8932                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8933             """
8934             # Example: see GEOM_TestAll.py
8935             #theH,Parameters = ParseParameters(theH)
8936             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8937             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8938             #anObj.SetParameters(Parameters)
8939             self._autoPublish(anObj, theName, "extrudedCut")
8940             return anObj   
8941             
8942         ## Add material to a solid by extrusion of the base shape on the given distance.
8943         #  @param theInit Shape to add material to. It must be a solid or 
8944         #  a compound made of a single solid.
8945         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8946         #  @param theH Prism dimension along the normal to theBase
8947         #  @param theAngle Draft angle in degrees.
8948         #  @param theName Object name; when specified, this parameter is used
8949         #         for result publication in the study. Otherwise, if automatic
8950         #         publication is switched on, default value is used for result name.
8951         #
8952         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8953         #
8954         #  @ref tui_creation_prism "Example"
8955         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8956             """
8957             Add material to a solid by extrusion of the base shape on the given distance.
8958
8959             Parameters:
8960                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8961                 theBase Closed edge or wire defining the base shape to be extruded.
8962                 theH Prism dimension along the normal  to theBase
8963                 theAngle Draft angle in degrees.
8964                 theName Object name; when specified, this parameter is used
8965                         for result publication in the study. Otherwise, if automatic
8966                         publication is switched on, default value is used for result name.
8967
8968             Returns:
8969                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8970             """
8971             # Example: see GEOM_TestAll.py
8972             #theH,Parameters = ParseParameters(theH)
8973             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8974             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8975             #anObj.SetParameters(Parameters)
8976             self._autoPublish(anObj, theName, "extrudedBoss")
8977             return anObj   
8978
8979         # end of l3_local
8980         ## @}
8981
8982         ## @addtogroup l3_basic_op
8983         ## @{
8984
8985         ## Perform an Archimde operation on the given shape with given parameters.
8986         #  The object presenting the resulting face is returned.
8987         #  @param theShape Shape to be put in water.
8988         #  @param theWeight Weight og the shape.
8989         #  @param theWaterDensity Density of the water.
8990         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8991         #  @param theName Object name; when specified, this parameter is used
8992         #         for result publication in the study. Otherwise, if automatic
8993         #         publication is switched on, default value is used for result name.
8994         #
8995         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8996         #          by a plane, corresponding to water level.
8997         #
8998         #  @ref tui_archimede "Example"
8999         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9000             """
9001             Perform an Archimde operation on the given shape with given parameters.
9002             The object presenting the resulting face is returned.
9003
9004             Parameters: 
9005                 theShape Shape to be put in water.
9006                 theWeight Weight og the shape.
9007                 theWaterDensity Density of the water.
9008                 theMeshDeflection Deflection of the mesh, using to compute the section.
9009                 theName Object name; when specified, this parameter is used
9010                         for result publication in the study. Otherwise, if automatic
9011                         publication is switched on, default value is used for result name.
9012
9013             Returns: 
9014                 New GEOM.GEOM_Object, containing a section of theShape
9015                 by a plane, corresponding to water level.
9016             """
9017             # Example: see GEOM_TestAll.py
9018             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9019               theWeight,theWaterDensity,theMeshDeflection)
9020             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9021             RaiseIfFailed("MakeArchimede", self.LocalOp)
9022             anObj.SetParameters(Parameters)
9023             self._autoPublish(anObj, theName, "archimede")
9024             return anObj
9025
9026         # end of l3_basic_op
9027         ## @}
9028
9029         ## @addtogroup l2_measure
9030         ## @{
9031
9032         ## Get point coordinates
9033         #  @return [x, y, z]
9034         #
9035         #  @ref tui_measurement_tools_page "Example"
9036         def PointCoordinates(self,Point):
9037             """
9038             Get point coordinates
9039
9040             Returns:
9041                 [x, y, z]
9042             """
9043             # Example: see GEOM_TestMeasures.py
9044             aTuple = self.MeasuOp.PointCoordinates(Point)
9045             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9046             return aTuple 
9047         
9048         ## Get vector coordinates
9049         #  @return [x, y, z]
9050         #
9051         #  @ref tui_measurement_tools_page "Example"
9052         def VectorCoordinates(self,Vector):
9053             """
9054             Get vector coordinates
9055
9056             Returns:
9057                 [x, y, z]
9058             """
9059
9060             p1=self.GetFirstVertex(Vector)
9061             p2=self.GetLastVertex(Vector)
9062             
9063             X1=self.PointCoordinates(p1)
9064             X2=self.PointCoordinates(p2)
9065
9066             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9067
9068
9069         ## Compute cross product
9070         #  @return vector w=u^v
9071         #
9072         #  @ref tui_measurement_tools_page "Example"
9073         def CrossProduct(self, Vector1, Vector2):
9074             """ 
9075             Compute cross product
9076             
9077             Returns: vector w=u^v
9078             """
9079             u=self.VectorCoordinates(Vector1)
9080             v=self.VectorCoordinates(Vector2)
9081             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])
9082             
9083             return w
9084         
9085         ## Compute cross product
9086         #  @return dot product  p=u.v
9087         #
9088         #  @ref tui_measurement_tools_page "Example"
9089         def DotProduct(self, Vector1, Vector2):
9090             """ 
9091             Compute cross product
9092             
9093             Returns: dot product  p=u.v
9094             """
9095             u=self.VectorCoordinates(Vector1)
9096             v=self.VectorCoordinates(Vector2)
9097             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9098             
9099             return p
9100
9101
9102         ## Get summarized length of all wires,
9103         #  area of surface and volume of the given shape.
9104         #  @param theShape Shape to define properties of.
9105         #  @return [theLength, theSurfArea, theVolume]\n
9106         #  theLength:   Summarized length of all wires of the given shape.\n
9107         #  theSurfArea: Area of surface of the given shape.\n
9108         #  theVolume:   Volume of the given shape.
9109         #
9110         #  @ref tui_measurement_tools_page "Example"
9111         def BasicProperties(self,theShape):
9112             """
9113             Get summarized length of all wires,
9114             area of surface and volume of the given shape.
9115
9116             Parameters: 
9117                 theShape Shape to define properties of.
9118
9119             Returns:
9120                 [theLength, theSurfArea, theVolume]
9121                  theLength:   Summarized length of all wires of the given shape.
9122                  theSurfArea: Area of surface of the given shape.
9123                  theVolume:   Volume of the given shape.
9124             """
9125             # Example: see GEOM_TestMeasures.py
9126             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9127             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9128             return aTuple
9129
9130         ## Get parameters of bounding box of the given shape
9131         #  @param theShape Shape to obtain bounding box of.
9132         #  @param precise TRUE for precise computation; FALSE for fast one.
9133         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9134         #  Xmin,Xmax: Limits of shape along OX axis.
9135         #  Ymin,Ymax: Limits of shape along OY axis.
9136         #  Zmin,Zmax: Limits of shape along OZ axis.
9137         #
9138         #  @ref tui_measurement_tools_page "Example"
9139         def BoundingBox (self, theShape, precise=False):
9140             """
9141             Get parameters of bounding box of the given shape
9142
9143             Parameters: 
9144                 theShape Shape to obtain bounding box of.
9145                 precise TRUE for precise computation; FALSE for fast one.
9146
9147             Returns:
9148                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9149                  Xmin,Xmax: Limits of shape along OX axis.
9150                  Ymin,Ymax: Limits of shape along OY axis.
9151                  Zmin,Zmax: Limits of shape along OZ axis.
9152             """
9153             # Example: see GEOM_TestMeasures.py
9154             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9155             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9156             return aTuple
9157
9158         ## Get bounding box of the given shape
9159         #  @param theShape Shape to obtain bounding box of.
9160         #  @param precise TRUE for precise computation; FALSE for fast one.
9161         #  @param theName Object name; when specified, this parameter is used
9162         #         for result publication in the study. Otherwise, if automatic
9163         #         publication is switched on, default value is used for result name.
9164         #
9165         #  @return New GEOM.GEOM_Object, containing the created box.
9166         #
9167         #  @ref tui_measurement_tools_page "Example"
9168         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9169             """
9170             Get bounding box of the given shape
9171
9172             Parameters: 
9173                 theShape Shape to obtain bounding box of.
9174                 precise TRUE for precise computation; FALSE for fast one.
9175                 theName Object name; when specified, this parameter is used
9176                         for result publication in the study. Otherwise, if automatic
9177                         publication is switched on, default value is used for result name.
9178
9179             Returns:
9180                 New GEOM.GEOM_Object, containing the created box.
9181             """
9182             # Example: see GEOM_TestMeasures.py
9183             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9184             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9185             self._autoPublish(anObj, theName, "bndbox")
9186             return anObj
9187
9188         ## Get inertia matrix and moments of inertia of theShape.
9189         #  @param theShape Shape to calculate inertia of.
9190         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9191         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9192         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9193         #
9194         #  @ref tui_measurement_tools_page "Example"
9195         def Inertia(self,theShape):
9196             """
9197             Get inertia matrix and moments of inertia of theShape.
9198
9199             Parameters: 
9200                 theShape Shape to calculate inertia of.
9201
9202             Returns:
9203                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9204                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9205                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9206             """
9207             # Example: see GEOM_TestMeasures.py
9208             aTuple = self.MeasuOp.GetInertia(theShape)
9209             RaiseIfFailed("GetInertia", self.MeasuOp)
9210             return aTuple
9211
9212         ## Get if coords are included in the shape (ST_IN or ST_ON)
9213         #  @param theShape Shape
9214         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9215         #  @param tolerance to be used (default is 1.0e-7)
9216         #  @return list_of_boolean = [res1, res2, ...]
9217         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9218             """
9219             Get if coords are included in the shape (ST_IN or ST_ON)
9220             
9221             Parameters: 
9222                 theShape Shape
9223                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9224                 tolerance to be used (default is 1.0e-7)
9225
9226             Returns:
9227                 list_of_boolean = [res1, res2, ...]
9228             """
9229             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9230
9231         ## Get minimal distance between the given shapes.
9232         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9233         #  @return Value of the minimal distance between the given shapes.
9234         #
9235         #  @ref tui_measurement_tools_page "Example"
9236         def MinDistance(self, theShape1, theShape2):
9237             """
9238             Get minimal distance between the given shapes.
9239             
9240             Parameters: 
9241                 theShape1,theShape2 Shapes to find minimal distance between.
9242
9243             Returns:    
9244                 Value of the minimal distance between the given shapes.
9245             """
9246             # Example: see GEOM_TestMeasures.py
9247             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9248             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9249             return aTuple[0]
9250
9251         ## Get minimal distance between the given shapes.
9252         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9253         #  @return Value of the minimal distance between the given shapes, in form of list
9254         #          [Distance, DX, DY, DZ].
9255         #
9256         #  @ref swig_all_measure "Example"
9257         def MinDistanceComponents(self, theShape1, theShape2):
9258             """
9259             Get minimal distance between the given shapes.
9260
9261             Parameters: 
9262                 theShape1,theShape2 Shapes to find minimal distance between.
9263
9264             Returns:  
9265                 Value of the minimal distance between the given shapes, in form of list
9266                 [Distance, DX, DY, DZ]
9267             """
9268             # Example: see GEOM_TestMeasures.py
9269             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9270             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9271             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9272             return aRes
9273
9274         ## Get closest points of the given shapes.
9275         #  @param theShape1,theShape2 Shapes to find closest points of.
9276         #  @return The number of found solutions (-1 in case of infinite number of
9277         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9278         #
9279         #  @ref tui_measurement_tools_page "Example"
9280         def ClosestPoints (self, theShape1, theShape2):
9281             """
9282             Get closest points of the given shapes.
9283
9284             Parameters: 
9285                 theShape1,theShape2 Shapes to find closest points of.
9286
9287             Returns:    
9288                 The number of found solutions (-1 in case of infinite number of
9289                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9290             """
9291             # Example: see GEOM_TestMeasures.py
9292             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9293             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9294             return aTuple
9295
9296         ## Get angle between the given shapes in degrees.
9297         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9298         #  @note If both arguments are vectors, the angle is computed in accordance
9299         #        with their orientations, otherwise the minimum angle is computed.
9300         #  @return Value of the angle between the given shapes in degrees.
9301         #
9302         #  @ref tui_measurement_tools_page "Example"
9303         def GetAngle(self, theShape1, theShape2):
9304             """
9305             Get angle between the given shapes in degrees.
9306
9307             Parameters: 
9308                 theShape1,theShape2 Lines or linear edges to find angle between.
9309
9310             Note:
9311                 If both arguments are vectors, the angle is computed in accordance
9312                 with their orientations, otherwise the minimum angle is computed.
9313
9314             Returns:  
9315                 Value of the angle between the given shapes in degrees.
9316             """
9317             # Example: see GEOM_TestMeasures.py
9318             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9319             RaiseIfFailed("GetAngle", self.MeasuOp)
9320             return anAngle
9321
9322         ## Get angle between the given shapes in radians.
9323         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9324         #  @note If both arguments are vectors, the angle is computed in accordance
9325         #        with their orientations, otherwise the minimum angle is computed.
9326         #  @return Value of the angle between the given shapes in radians.
9327         #
9328         #  @ref tui_measurement_tools_page "Example"
9329         def GetAngleRadians(self, theShape1, theShape2):
9330             """
9331             Get angle between the given shapes in radians.
9332
9333             Parameters: 
9334                 theShape1,theShape2 Lines or linear edges to find angle between.
9335
9336                 
9337             Note:
9338                 If both arguments are vectors, the angle is computed in accordance
9339                 with their orientations, otherwise the minimum angle is computed.
9340
9341             Returns:  
9342                 Value of the angle between the given shapes in radians.
9343             """
9344             # Example: see GEOM_TestMeasures.py
9345             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9346             RaiseIfFailed("GetAngle", self.MeasuOp)
9347             return anAngle
9348
9349         ## Get angle between the given vectors in degrees.
9350         #  @param theShape1,theShape2 Vectors to find angle between.
9351         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9352         #                 if False, the opposite vector to the normal vector is used.
9353         #  @return Value of the angle between the given vectors in degrees.
9354         #
9355         #  @ref tui_measurement_tools_page "Example"
9356         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9357             """
9358             Get angle between the given vectors in degrees.
9359
9360             Parameters: 
9361                 theShape1,theShape2 Vectors to find angle between.
9362                 theFlag If True, the normal vector is defined by the two vectors cross,
9363                         if False, the opposite vector to the normal vector is used.
9364
9365             Returns:  
9366                 Value of the angle between the given vectors in degrees.
9367             """
9368             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9369             if not theFlag:
9370                 anAngle = 360. - anAngle
9371             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9372             return anAngle
9373
9374         ## The same as GetAngleVectors, but the result is in radians.
9375         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9376             """
9377             Get angle between the given vectors in radians.
9378
9379             Parameters: 
9380                 theShape1,theShape2 Vectors to find angle between.
9381                 theFlag If True, the normal vector is defined by the two vectors cross,
9382                         if False, the opposite vector to the normal vector is used.
9383
9384             Returns:  
9385                 Value of the angle between the given vectors in radians.
9386             """
9387             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9388             return anAngle
9389
9390         ## @name Curve Curvature Measurement
9391         #  Methods for receiving radius of curvature of curves
9392         #  in the given point
9393         ## @{
9394
9395         ## Measure curvature of a curve at a point, set by parameter.
9396         #  @param theCurve a curve.
9397         #  @param theParam parameter.
9398         #  @return radius of curvature of \a theCurve.
9399         #
9400         #  @ref swig_todo "Example"
9401         def CurveCurvatureByParam(self, theCurve, theParam):
9402             """
9403             Measure curvature of a curve at a point, set by parameter.
9404
9405             Parameters: 
9406                 theCurve a curve.
9407                 theParam parameter.
9408
9409             Returns: 
9410                 radius of curvature of theCurve.
9411             """
9412             # Example: see GEOM_TestMeasures.py
9413             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9414             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9415             return aCurv
9416
9417         ## Measure curvature of a curve at a point.
9418         #  @param theCurve a curve.
9419         #  @param thePoint given point.
9420         #  @return radius of curvature of \a theCurve.
9421         #
9422         #  @ref swig_todo "Example"
9423         def CurveCurvatureByPoint(self, theCurve, thePoint):
9424             """
9425             Measure curvature of a curve at a point.
9426
9427             Parameters: 
9428                 theCurve a curve.
9429                 thePoint given point.
9430
9431             Returns: 
9432                 radius of curvature of theCurve.           
9433             """
9434             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9435             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9436             return aCurv
9437         ## @}
9438
9439         ## @name Surface Curvature Measurement
9440         #  Methods for receiving max and min radius of curvature of surfaces
9441         #  in the given point
9442         ## @{
9443
9444         ## Measure max radius of curvature of surface.
9445         #  @param theSurf the given surface.
9446         #  @param theUParam Value of U-parameter on the referenced surface.
9447         #  @param theVParam Value of V-parameter on the referenced surface.
9448         #  @return max radius of curvature of theSurf.
9449         #
9450         ## @ref swig_todo "Example"
9451         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9452             """
9453             Measure max radius of curvature of surface.
9454
9455             Parameters: 
9456                 theSurf the given surface.
9457                 theUParam Value of U-parameter on the referenced surface.
9458                 theVParam Value of V-parameter on the referenced surface.
9459                 
9460             Returns:     
9461                 max radius of curvature of theSurf.
9462             """
9463             # Example: see GEOM_TestMeasures.py
9464             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9465             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9466             return aSurf
9467
9468         ## Measure max radius of curvature of surface in the given point
9469         #  @param theSurf the given surface.
9470         #  @param thePoint given point.
9471         #  @return max radius of curvature of theSurf.
9472         #
9473         ## @ref swig_todo "Example"
9474         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9475             """
9476             Measure max radius of curvature of surface in the given point.
9477
9478             Parameters: 
9479                 theSurf the given surface.
9480                 thePoint given point.
9481                 
9482             Returns:     
9483                 max radius of curvature of theSurf.          
9484             """
9485             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9486             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9487             return aSurf
9488
9489         ## Measure min radius of curvature of surface.
9490         #  @param theSurf the given surface.
9491         #  @param theUParam Value of U-parameter on the referenced surface.
9492         #  @param theVParam Value of V-parameter on the referenced surface.
9493         #  @return min radius of curvature of theSurf.
9494         #   
9495         ## @ref swig_todo "Example"
9496         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9497             """
9498             Measure min radius of curvature of surface.
9499
9500             Parameters: 
9501                 theSurf the given surface.
9502                 theUParam Value of U-parameter on the referenced surface.
9503                 theVParam Value of V-parameter on the referenced surface.
9504                 
9505             Returns:     
9506                 Min radius of curvature of theSurf.
9507             """
9508             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9509             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9510             return aSurf
9511
9512         ## Measure min radius of curvature of surface in the given point
9513         #  @param theSurf the given surface.
9514         #  @param thePoint given point.
9515         #  @return min radius of curvature of theSurf.
9516         #
9517         ## @ref swig_todo "Example"
9518         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9519             """
9520             Measure min radius of curvature of surface in the given point.
9521
9522             Parameters: 
9523                 theSurf the given surface.
9524                 thePoint given point.
9525                 
9526             Returns:     
9527                 Min radius of curvature of theSurf.          
9528             """
9529             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9530             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9531             return aSurf
9532         ## @}
9533
9534         ## Get min and max tolerances of sub-shapes of theShape
9535         #  @param theShape Shape, to get tolerances of.
9536         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9537         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9538         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9539         #  VertMin,VertMax: Min and max tolerances of the vertices.
9540         #
9541         #  @ref tui_measurement_tools_page "Example"
9542         def Tolerance(self,theShape):
9543             """
9544             Get min and max tolerances of sub-shapes of theShape
9545
9546             Parameters: 
9547                 theShape Shape, to get tolerances of.
9548
9549             Returns:    
9550                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9551                  FaceMin,FaceMax: Min and max tolerances of the faces.
9552                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9553                  VertMin,VertMax: Min and max tolerances of the vertices.
9554             """
9555             # Example: see GEOM_TestMeasures.py
9556             aTuple = self.MeasuOp.GetTolerance(theShape)
9557             RaiseIfFailed("GetTolerance", self.MeasuOp)
9558             return aTuple
9559
9560         ## Obtain description of the given shape (number of sub-shapes of each type)
9561         #  @param theShape Shape to be described.
9562         #  @return Description of the given shape.
9563         #
9564         #  @ref tui_measurement_tools_page "Example"
9565         def WhatIs(self,theShape):
9566             """
9567             Obtain description of the given shape (number of sub-shapes of each type)
9568
9569             Parameters:
9570                 theShape Shape to be described.
9571
9572             Returns:
9573                 Description of the given shape.
9574             """
9575             # Example: see GEOM_TestMeasures.py
9576             aDescr = self.MeasuOp.WhatIs(theShape)
9577             RaiseIfFailed("WhatIs", self.MeasuOp)
9578             return aDescr
9579
9580         ## Obtain quantity of shapes of the given type in \a theShape.
9581         #  If \a theShape is of type \a theType, it is also counted.
9582         #  @param theShape Shape to be described.
9583         #  @param theType the given ShapeType().
9584         #  @return Quantity of shapes of type \a theType in \a theShape.
9585         #
9586         #  @ref tui_measurement_tools_page "Example"
9587         def NbShapes (self, theShape, theType):
9588             """
9589             Obtain quantity of shapes of the given type in theShape.
9590             If theShape is of type theType, it is also counted.
9591
9592             Parameters:
9593                 theShape Shape to be described.
9594                 theType the given geompy.ShapeType
9595
9596             Returns:
9597                 Quantity of shapes of type theType in theShape.
9598             """
9599             # Example: see GEOM_TestMeasures.py
9600             listSh = self.SubShapeAllIDs(theShape, theType)
9601             Nb = len(listSh)
9602             t       = EnumToLong(theShape.GetShapeType())
9603             theType = EnumToLong(theType)
9604             if t == theType:
9605                 Nb = Nb + 1
9606                 pass
9607             return Nb
9608
9609         ## Obtain quantity of shapes of each type in \a theShape.
9610         #  The \a theShape is also counted.
9611         #  @param theShape Shape to be described.
9612         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9613         #
9614         #  @ref tui_measurement_tools_page "Example"
9615         def ShapeInfo (self, theShape):
9616             """
9617             Obtain quantity of shapes of each type in theShape.
9618             The theShape is also counted.
9619
9620             Parameters:
9621                 theShape Shape to be described.
9622
9623             Returns:
9624                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9625             """
9626             # Example: see GEOM_TestMeasures.py
9627             aDict = {}
9628             for typeSh in self.ShapeType:
9629                 if typeSh in ( "AUTO", "SHAPE" ): continue
9630                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9631                 Nb = len(listSh)
9632                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9633                     Nb = Nb + 1
9634                     pass
9635                 aDict[typeSh] = Nb
9636                 pass
9637             return aDict
9638
9639         def GetCreationInformation(self, theShape):
9640             info = theShape.GetCreationInformation()
9641             # operationName
9642             opName = info.operationName
9643             if not opName: opName = "no info available"
9644             res = "Operation: " + opName
9645             # parameters
9646             for parVal in info.params:
9647                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9648             return res
9649
9650         ## Get a point, situated at the centre of mass of theShape.
9651         #  @param theShape Shape to define centre of mass of.
9652         #  @param theName Object name; when specified, this parameter is used
9653         #         for result publication in the study. Otherwise, if automatic
9654         #         publication is switched on, default value is used for result name.
9655         #
9656         #  @return New GEOM.GEOM_Object, containing the created point.
9657         #
9658         #  @ref tui_measurement_tools_page "Example"
9659         def MakeCDG(self, theShape, theName=None):
9660             """
9661             Get a point, situated at the centre of mass of theShape.
9662
9663             Parameters:
9664                 theShape Shape to define centre of mass of.
9665                 theName Object name; when specified, this parameter is used
9666                         for result publication in the study. Otherwise, if automatic
9667                         publication is switched on, default value is used for result name.
9668
9669             Returns:
9670                 New GEOM.GEOM_Object, containing the created point.
9671             """
9672             # Example: see GEOM_TestMeasures.py
9673             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9674             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9675             self._autoPublish(anObj, theName, "centerOfMass")
9676             return anObj
9677
9678         ## Get a vertex sub-shape by index depended with orientation.
9679         #  @param theShape Shape to find sub-shape.
9680         #  @param theIndex Index to find vertex by this index (starting from zero)
9681         #  @param theName Object name; when specified, this parameter is used
9682         #         for result publication in the study. Otherwise, if automatic
9683         #         publication is switched on, default value is used for result name.
9684         #
9685         #  @return New GEOM.GEOM_Object, containing the created vertex.
9686         #
9687         #  @ref tui_measurement_tools_page "Example"
9688         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9689             """
9690             Get a vertex sub-shape by index depended with orientation.
9691
9692             Parameters:
9693                 theShape Shape to find sub-shape.
9694                 theIndex Index to find vertex by this index (starting from zero)
9695                 theName Object name; when specified, this parameter is used
9696                         for result publication in the study. Otherwise, if automatic
9697                         publication is switched on, default value is used for result name.
9698
9699             Returns:
9700                 New GEOM.GEOM_Object, containing the created vertex.
9701             """
9702             # Example: see GEOM_TestMeasures.py
9703             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9704             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9705             self._autoPublish(anObj, theName, "vertex")
9706             return anObj
9707
9708         ## Get the first vertex of wire/edge depended orientation.
9709         #  @param theShape Shape to find first vertex.
9710         #  @param theName Object name; when specified, this parameter is used
9711         #         for result publication in the study. Otherwise, if automatic
9712         #         publication is switched on, default value is used for result name.
9713         #
9714         #  @return New GEOM.GEOM_Object, containing the created vertex.
9715         #
9716         #  @ref tui_measurement_tools_page "Example"
9717         def GetFirstVertex(self, theShape, theName=None):
9718             """
9719             Get the first vertex of wire/edge depended orientation.
9720
9721             Parameters:
9722                 theShape Shape to find first vertex.
9723                 theName Object name; when specified, this parameter is used
9724                         for result publication in the study. Otherwise, if automatic
9725                         publication is switched on, default value is used for result name.
9726
9727             Returns:    
9728                 New GEOM.GEOM_Object, containing the created vertex.
9729             """
9730             # Example: see GEOM_TestMeasures.py
9731             # note: auto-publishing is done in self.GetVertexByIndex()
9732             anObj = self.GetVertexByIndex(theShape, 0, theName)
9733             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9734             return anObj
9735
9736         ## Get the last vertex of wire/edge depended orientation.
9737         #  @param theShape Shape to find last vertex.
9738         #  @param theName Object name; when specified, this parameter is used
9739         #         for result publication in the study. Otherwise, if automatic
9740         #         publication is switched on, default value is used for result name.
9741         #
9742         #  @return New GEOM.GEOM_Object, containing the created vertex.
9743         #
9744         #  @ref tui_measurement_tools_page "Example"
9745         def GetLastVertex(self, theShape, theName=None):
9746             """
9747             Get the last vertex of wire/edge depended orientation.
9748
9749             Parameters: 
9750                 theShape Shape to find last vertex.
9751                 theName Object name; when specified, this parameter is used
9752                         for result publication in the study. Otherwise, if automatic
9753                         publication is switched on, default value is used for result name.
9754
9755             Returns:   
9756                 New GEOM.GEOM_Object, containing the created vertex.
9757             """
9758             # Example: see GEOM_TestMeasures.py
9759             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9760             # note: auto-publishing is done in self.GetVertexByIndex()
9761             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9762             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9763             return anObj
9764
9765         ## Get a normale to the given face. If the point is not given,
9766         #  the normale is calculated at the center of mass.
9767         #  @param theFace Face to define normale of.
9768         #  @param theOptionalPoint Point to compute the normale at.
9769         #  @param theName Object name; when specified, this parameter is used
9770         #         for result publication in the study. Otherwise, if automatic
9771         #         publication is switched on, default value is used for result name.
9772         #
9773         #  @return New GEOM.GEOM_Object, containing the created vector.
9774         #
9775         #  @ref swig_todo "Example"
9776         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9777             """
9778             Get a normale to the given face. If the point is not given,
9779             the normale is calculated at the center of mass.
9780             
9781             Parameters: 
9782                 theFace Face to define normale of.
9783                 theOptionalPoint Point to compute the normale at.
9784                 theName Object name; when specified, this parameter is used
9785                         for result publication in the study. Otherwise, if automatic
9786                         publication is switched on, default value is used for result name.
9787
9788             Returns:   
9789                 New GEOM.GEOM_Object, containing the created vector.
9790             """
9791             # Example: see GEOM_TestMeasures.py
9792             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9793             RaiseIfFailed("GetNormal", self.MeasuOp)
9794             self._autoPublish(anObj, theName, "normal")
9795             return anObj
9796
9797         ## Check a topology of the given shape.
9798         #  @param theShape Shape to check validity of.
9799         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9800         #                        if TRUE, the shape's geometry will be checked also.
9801         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9802         #                        of problem is printed.
9803         #                        if TRUE and if theShape is invalid, the description 
9804         #                        of problem is also returned.
9805         #  @return TRUE, if the shape "seems to be valid".
9806         #
9807         #  @ref tui_measurement_tools_page "Example"
9808         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9809             """
9810             Check a topology of the given shape.
9811
9812             Parameters: 
9813                 theShape Shape to check validity of.
9814                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9815                                if TRUE, the shape's geometry will be checked also.
9816                 theReturnStatus If FALSE and if theShape is invalid, a description
9817                                 of problem is printed.
9818                                 if TRUE and if theShape is invalid, the description 
9819                                 of problem is returned.
9820
9821             Returns:   
9822                 TRUE, if the shape "seems to be valid".
9823                 If theShape is invalid, prints a description of problem.
9824                 This description can also be returned.
9825             """
9826             # Example: see GEOM_TestMeasures.py
9827             if theIsCheckGeom:
9828                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9829                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9830             else:
9831                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9832                 RaiseIfFailed("CheckShape", self.MeasuOp)
9833             if IsValid == 0:
9834                 if theReturnStatus == 0:
9835                     print Status
9836             if theReturnStatus == 1:
9837               return (IsValid, Status)
9838             return IsValid
9839
9840         ## Detect self-intersections in the given shape.
9841         #  @param theShape Shape to check.
9842         #  @return TRUE, if the shape contains no self-intersections.
9843         #
9844         #  @ref tui_measurement_tools_page "Example"
9845         def CheckSelfIntersections(self, theShape):
9846             """
9847             Detect self-intersections in the given shape.
9848
9849             Parameters: 
9850                 theShape Shape to check.
9851
9852             Returns:   
9853                 TRUE, if the shape contains no self-intersections.
9854             """
9855             # Example: see GEOM_TestMeasures.py
9856             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9857             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9858             return IsValid
9859
9860         ## Get position (LCS) of theShape.
9861         #
9862         #  Origin of the LCS is situated at the shape's center of mass.
9863         #  Axes of the LCS are obtained from shape's location or,
9864         #  if the shape is a planar face, from position of its plane.
9865         #
9866         #  @param theShape Shape to calculate position of.
9867         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9868         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9869         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9870         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9871         #
9872         #  @ref swig_todo "Example"
9873         def GetPosition(self,theShape):
9874             """
9875             Get position (LCS) of theShape.
9876             Origin of the LCS is situated at the shape's center of mass.
9877             Axes of the LCS are obtained from shape's location or,
9878             if the shape is a planar face, from position of its plane.
9879
9880             Parameters: 
9881                 theShape Shape to calculate position of.
9882
9883             Returns:  
9884                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9885                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9886                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9887                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9888             """
9889             # Example: see GEOM_TestMeasures.py
9890             aTuple = self.MeasuOp.GetPosition(theShape)
9891             RaiseIfFailed("GetPosition", self.MeasuOp)
9892             return aTuple
9893
9894         ## Get kind of theShape.
9895         #
9896         #  @param theShape Shape to get a kind of.
9897         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9898         #          and a list of parameters, describing the shape.
9899         #  @note  Concrete meaning of each value, returned via \a theIntegers
9900         #         or \a theDoubles list depends on the kind() of the shape.
9901         #
9902         #  @ref swig_todo "Example"
9903         def KindOfShape(self,theShape):
9904             """
9905             Get kind of theShape.
9906          
9907             Parameters: 
9908                 theShape Shape to get a kind of.
9909
9910             Returns:
9911                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9912                     and a list of parameters, describing the shape.
9913             Note:
9914                 Concrete meaning of each value, returned via theIntegers
9915                 or theDoubles list depends on the geompy.kind of the shape
9916             """
9917             # Example: see GEOM_TestMeasures.py
9918             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9919             RaiseIfFailed("KindOfShape", self.MeasuOp)
9920
9921             aKind  = aRoughTuple[0]
9922             anInts = aRoughTuple[1]
9923             aDbls  = aRoughTuple[2]
9924
9925             # Now there is no exception from this rule:
9926             aKindTuple = [aKind] + aDbls + anInts
9927
9928             # If they are we will regroup parameters for such kind of shape.
9929             # For example:
9930             #if aKind == kind.SOME_KIND:
9931             #    #  SOME_KIND     int int double int double double
9932             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9933
9934             return aKindTuple
9935
9936         # end of l2_measure
9937         ## @}
9938
9939         ## @addtogroup l2_import_export
9940         ## @{
9941
9942         ## Import a shape from the BREP or IGES or STEP file
9943         #  (depends on given format) with given name.
9944         #  @param theFileName The file, containing the shape.
9945         #  @param theFormatName Specify format for the file reading.
9946         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9947         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9948         #            format 'STEP_SCALE' is used instead of 'STEP',
9949         #            length unit will be set to 'meter' and result model will be scaled.
9950         #  @param theName Object name; when specified, this parameter is used
9951         #         for result publication in the study. Otherwise, if automatic
9952         #         publication is switched on, default value is used for result name.
9953         #
9954         #  @return New GEOM.GEOM_Object, containing the imported shape.
9955         #
9956         #  @ref swig_Import_Export "Example"
9957         def ImportFile(self, theFileName, theFormatName, theName=None):
9958             """
9959             Import a shape from the BREP or IGES or STEP file
9960             (depends on given format) with given name.
9961
9962             Parameters: 
9963                 theFileName The file, containing the shape.
9964                 theFormatName Specify format for the file reading.
9965                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9966                     If format 'IGES_SCALE' is used instead of 'IGES' or
9967                        format 'STEP_SCALE' is used instead of 'STEP',
9968                        length unit will be set to 'meter' and result model will be scaled.
9969                 theName Object name; when specified, this parameter is used
9970                         for result publication in the study. Otherwise, if automatic
9971                         publication is switched on, default value is used for result name.
9972
9973             Returns:
9974                 New GEOM.GEOM_Object, containing the imported shape.
9975             """
9976             # Example: see GEOM_TestOthers.py
9977             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9978             RaiseIfFailed("ImportFile", self.InsertOp)
9979             self._autoPublish(anObj, theName, "imported")
9980             return anObj
9981
9982         ## Deprecated analog of ImportFile()
9983         def Import(self, theFileName, theFormatName, theName=None):
9984             """
9985             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9986             """
9987             print "WARNING: Function Import is deprecated, use ImportFile instead"
9988             # note: auto-publishing is done in self.ImportFile()
9989             return self.ImportFile(theFileName, theFormatName, theName)
9990
9991         ## Shortcut to ImportFile() for BREP format.
9992         #  Import a shape from the BREP file with given name.
9993         #  @param theFileName The file, containing the shape.
9994         #  @param theName Object name; when specified, this parameter is used
9995         #         for result publication in the study. Otherwise, if automatic
9996         #         publication is switched on, default value is used for result name.
9997         #
9998         #  @return New GEOM.GEOM_Object, containing the imported shape.
9999         #
10000         #  @ref swig_Import_Export "Example"
10001         def ImportBREP(self, theFileName, theName=None):
10002             """
10003             geompy.ImportFile(...) function for BREP format
10004             Import a shape from the BREP file with given name.
10005
10006             Parameters: 
10007                 theFileName The file, containing the shape.
10008                 theName Object name; when specified, this parameter is used
10009                         for result publication in the study. Otherwise, if automatic
10010                         publication is switched on, default value is used for result name.
10011
10012             Returns:
10013                 New GEOM.GEOM_Object, containing the imported shape.
10014             """
10015             # Example: see GEOM_TestOthers.py
10016             # note: auto-publishing is done in self.ImportFile()
10017             return self.ImportFile(theFileName, "BREP", theName)
10018
10019         ## Shortcut to ImportFile() for IGES format
10020         #  Import a shape from the IGES file with given name.
10021         #  @param theFileName The file, containing the shape.
10022         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10023         #                     and result model will be scaled, if its units are not meters.
10024         #                     If False (default), file length units will be taken into account.
10025         #  @param theName Object name; when specified, this parameter is used
10026         #         for result publication in the study. Otherwise, if automatic
10027         #         publication is switched on, default value is used for result name.
10028         #
10029         #  @return New GEOM.GEOM_Object, containing the imported shape.
10030         #
10031         #  @ref swig_Import_Export "Example"
10032         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10033             """
10034             geompy.ImportFile(...) function for IGES format
10035
10036             Parameters:
10037                 theFileName The file, containing the shape.
10038                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10039                             and result model will be scaled, if its units are not meters.
10040                             If False (default), file length units will be taken into account.
10041                 theName Object name; when specified, this parameter is used
10042                         for result publication in the study. Otherwise, if automatic
10043                         publication is switched on, default value is used for result name.
10044
10045             Returns:
10046                 New GEOM.GEOM_Object, containing the imported shape.
10047             """
10048             # Example: see GEOM_TestOthers.py
10049             # note: auto-publishing is done in self.ImportFile()
10050             if ignoreUnits:
10051                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10052             return self.ImportFile(theFileName, "IGES", theName)
10053
10054         ## Return length unit from given IGES file
10055         #  @param theFileName The file, containing the shape.
10056         #  @return String, containing the units name.
10057         #
10058         #  @ref swig_Import_Export "Example"
10059         def GetIGESUnit(self, theFileName):
10060             """
10061             Return length units from given IGES file
10062
10063             Parameters:
10064                 theFileName The file, containing the shape.
10065
10066             Returns:
10067                 String, containing the units name.
10068             """
10069             # Example: see GEOM_TestOthers.py
10070             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10071             return aUnitName
10072
10073         ## Shortcut to ImportFile() for STEP format
10074         #  Import a shape from the STEP file with given name.
10075         #  @param theFileName The file, containing the shape.
10076         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10077         #                     and result model will be scaled, if its units are not meters.
10078         #                     If False (default), file length units will be taken into account.
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 imported shape.
10084         #
10085         #  @ref swig_Import_Export "Example"
10086         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10087             """
10088             geompy.ImportFile(...) function for STEP format
10089
10090             Parameters:
10091                 theFileName The file, containing the shape.
10092                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10093                             and result model will be scaled, if its units are not meters.
10094                             If False (default), file length units will be taken into account.
10095                 theName Object name; when specified, this parameter is used
10096                         for result publication in the study. Otherwise, if automatic
10097                         publication is switched on, default value is used for result name.
10098
10099             Returns:
10100                 New GEOM.GEOM_Object, containing the imported shape.
10101             """
10102             # Example: see GEOM_TestOthers.py
10103             # note: auto-publishing is done in self.ImportFile()
10104             if ignoreUnits:
10105                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10106             return self.ImportFile(theFileName, "STEP", theName)
10107
10108         ## Return length unit from given IGES or STEP file
10109         #  @param theFileName The file, containing the shape.
10110         #  @return String, containing the units name.
10111         #
10112         #  @ref swig_Import_Export "Example"
10113         def GetSTEPUnit(self, theFileName):
10114             """
10115             Return length units from given STEP file
10116
10117             Parameters:
10118                 theFileName The file, containing the shape.
10119
10120             Returns:
10121                 String, containing the units name.
10122             """
10123             # Example: see GEOM_TestOthers.py
10124             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10125             return aUnitName
10126
10127         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10128         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10129         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10130         #  @param theStream The BRep binary stream.
10131         #  @param theName Object name; when specified, this parameter is used
10132         #         for result publication in the study. Otherwise, if automatic
10133         #         publication is switched on, default value is used for result name.
10134         #
10135         #  @return New GEOM_Object, containing the shape, read from theStream.
10136         #
10137         #  @ref swig_Import_Export "Example"
10138         def RestoreShape (self, theStream, theName=None):
10139             """
10140             Read a shape from the binary stream, containing its bounding representation (BRep).
10141
10142             Note:
10143                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10144
10145             Parameters: 
10146                 theStream The BRep binary stream.
10147                 theName Object name; when specified, this parameter is used
10148                         for result publication in the study. Otherwise, if automatic
10149                         publication is switched on, default value is used for result name.
10150
10151             Returns:
10152                 New GEOM_Object, containing the shape, read from theStream.
10153             """
10154             # Example: see GEOM_TestOthers.py
10155             anObj = self.InsertOp.RestoreShape(theStream)
10156             RaiseIfFailed("RestoreShape", self.InsertOp)
10157             self._autoPublish(anObj, theName, "restored")
10158             return anObj
10159
10160         ## Export the given shape into a file with given name.
10161         #  @param theObject Shape to be stored in the file.
10162         #  @param theFileName Name of the file to store the given shape in.
10163         #  @param theFormatName Specify format for the shape storage.
10164         #         Available formats can be obtained with
10165         #         geompy.InsertOp.ExportTranslators()[0] method.
10166         #
10167         #  @ref swig_Import_Export "Example"
10168         def Export(self, theObject, theFileName, theFormatName):
10169             """
10170             Export the given shape into a file with given name.
10171
10172             Parameters: 
10173                 theObject Shape to be stored in the file.
10174                 theFileName Name of the file to store the given shape in.
10175                 theFormatName Specify format for the shape storage.
10176                               Available formats can be obtained with
10177                               geompy.InsertOp.ExportTranslators()[0] method.
10178             """
10179             # Example: see GEOM_TestOthers.py
10180             self.InsertOp.Export(theObject, theFileName, theFormatName)
10181             if self.InsertOp.IsDone() == 0:
10182                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10183                 pass
10184             pass
10185
10186         ## Shortcut to Export() for BREP format
10187         #
10188         #  @ref swig_Import_Export "Example"
10189         def ExportBREP(self,theObject, theFileName):
10190             """
10191             geompy.Export(...) function for BREP format
10192             """
10193             # Example: see GEOM_TestOthers.py
10194             return self.Export(theObject, theFileName, "BREP")
10195
10196         ## Shortcut to Export() for IGES format
10197         #
10198         #  @ref swig_Import_Export "Example"
10199         def ExportIGES(self,theObject, theFileName):
10200             """
10201             geompy.Export(...) function for IGES format
10202             """
10203             # Example: see GEOM_TestOthers.py
10204             return self.Export(theObject, theFileName, "IGES")
10205
10206         ## Shortcut to Export() for STEP format
10207         #
10208         #  @ref swig_Import_Export "Example"
10209         def ExportSTEP(self,theObject, theFileName):
10210             """
10211             geompy.Export(...) function for STEP format
10212             """
10213             # Example: see GEOM_TestOthers.py
10214             return self.Export(theObject, theFileName, "STEP")
10215
10216         # end of l2_import_export
10217         ## @}
10218
10219         ## @addtogroup l3_blocks
10220         ## @{
10221
10222         ## Create a quadrangle face from four edges. Order of Edges is not
10223         #  important. It is  not necessary that edges share the same vertex.
10224         #  @param E1,E2,E3,E4 Edges for the face bound.
10225         #  @param theName Object name; when specified, this parameter is used
10226         #         for result publication in the study. Otherwise, if automatic
10227         #         publication is switched on, default value is used for result name.
10228         #
10229         #  @return New GEOM.GEOM_Object, containing the created face.
10230         #
10231         #  @ref tui_building_by_blocks_page "Example"
10232         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10233             """
10234             Create a quadrangle face from four edges. Order of Edges is not
10235             important. It is  not necessary that edges share the same vertex.
10236
10237             Parameters: 
10238                 E1,E2,E3,E4 Edges for the face bound.
10239                 theName Object name; when specified, this parameter is used
10240                         for result publication in the study. Otherwise, if automatic
10241                         publication is switched on, default value is used for result name.
10242
10243             Returns: 
10244                 New GEOM.GEOM_Object, containing the created face.
10245
10246             Example of usage:               
10247                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10248             """
10249             # Example: see GEOM_Spanner.py
10250             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10251             RaiseIfFailed("MakeQuad", self.BlocksOp)
10252             self._autoPublish(anObj, theName, "quad")
10253             return anObj
10254
10255         ## Create a quadrangle face on two edges.
10256         #  The missing edges will be built by creating the shortest ones.
10257         #  @param E1,E2 Two opposite edges for the face.
10258         #  @param theName Object name; when specified, this parameter is used
10259         #         for result publication in the study. Otherwise, if automatic
10260         #         publication is switched on, default value is used for result name.
10261         #
10262         #  @return New GEOM.GEOM_Object, containing the created face.
10263         #
10264         #  @ref tui_building_by_blocks_page "Example"
10265         def MakeQuad2Edges(self, E1, E2, theName=None):
10266             """
10267             Create a quadrangle face on two edges.
10268             The missing edges will be built by creating the shortest ones.
10269
10270             Parameters: 
10271                 E1,E2 Two opposite edges for the face.
10272                 theName Object name; when specified, this parameter is used
10273                         for result publication in the study. Otherwise, if automatic
10274                         publication is switched on, default value is used for result name.
10275
10276             Returns: 
10277                 New GEOM.GEOM_Object, containing the created face.
10278             
10279             Example of usage:
10280                 # create vertices
10281                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10282                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10283                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10284                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10285                 # create edges
10286                 edge1 = geompy.MakeEdge(p1, p2)
10287                 edge2 = geompy.MakeEdge(p3, p4)
10288                 # create a quadrangle face from two edges
10289                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10290             """
10291             # Example: see GEOM_Spanner.py
10292             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10293             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10294             self._autoPublish(anObj, theName, "quad")
10295             return anObj
10296
10297         ## Create a quadrangle face with specified corners.
10298         #  The missing edges will be built by creating the shortest ones.
10299         #  @param V1,V2,V3,V4 Corner vertices for the face.
10300         #  @param theName Object name; when specified, this parameter is used
10301         #         for result publication in the study. Otherwise, if automatic
10302         #         publication is switched on, default value is used for result name.
10303         #
10304         #  @return New GEOM.GEOM_Object, containing the created face.
10305         #
10306         #  @ref tui_building_by_blocks_page "Example 1"
10307         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10308         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10309             """
10310             Create a quadrangle face with specified corners.
10311             The missing edges will be built by creating the shortest ones.
10312
10313             Parameters: 
10314                 V1,V2,V3,V4 Corner vertices for the face.
10315                 theName Object name; when specified, this parameter is used
10316                         for result publication in the study. Otherwise, if automatic
10317                         publication is switched on, default value is used for result name.
10318
10319             Returns: 
10320                 New GEOM.GEOM_Object, containing the created face.
10321
10322             Example of usage:
10323                 # create vertices
10324                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10325                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10326                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10327                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10328                 # create a quadrangle from four points in its corners
10329                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10330             """
10331             # Example: see GEOM_Spanner.py
10332             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10333             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10334             self._autoPublish(anObj, theName, "quad")
10335             return anObj
10336
10337         ## Create a hexahedral solid, bounded by the six given faces. Order of
10338         #  faces is not important. It is  not necessary that Faces share the same edge.
10339         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10340         #  @param theName Object name; when specified, this parameter is used
10341         #         for result publication in the study. Otherwise, if automatic
10342         #         publication is switched on, default value is used for result name.
10343         #
10344         #  @return New GEOM.GEOM_Object, containing the created solid.
10345         #
10346         #  @ref tui_building_by_blocks_page "Example 1"
10347         #  \n @ref swig_MakeHexa "Example 2"
10348         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10349             """
10350             Create a hexahedral solid, bounded by the six given faces. Order of
10351             faces is not important. It is  not necessary that Faces share the same edge.
10352
10353             Parameters: 
10354                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10355                 theName Object name; when specified, this parameter is used
10356                         for result publication in the study. Otherwise, if automatic
10357                         publication is switched on, default value is used for result name.
10358
10359             Returns:    
10360                 New GEOM.GEOM_Object, containing the created solid.
10361
10362             Example of usage:
10363                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10364             """
10365             # Example: see GEOM_Spanner.py
10366             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10367             RaiseIfFailed("MakeHexa", self.BlocksOp)
10368             self._autoPublish(anObj, theName, "hexa")
10369             return anObj
10370
10371         ## Create a hexahedral solid between two given faces.
10372         #  The missing faces will be built by creating the smallest ones.
10373         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10374         #  @param theName Object name; when specified, this parameter is used
10375         #         for result publication in the study. Otherwise, if automatic
10376         #         publication is switched on, default value is used for result name.
10377         #
10378         #  @return New GEOM.GEOM_Object, containing the created solid.
10379         #
10380         #  @ref tui_building_by_blocks_page "Example 1"
10381         #  \n @ref swig_MakeHexa2Faces "Example 2"
10382         def MakeHexa2Faces(self, F1, F2, theName=None):
10383             """
10384             Create a hexahedral solid between two given faces.
10385             The missing faces will be built by creating the smallest ones.
10386
10387             Parameters: 
10388                 F1,F2 Two opposite faces for the hexahedral solid.
10389                 theName Object name; when specified, this parameter is used
10390                         for result publication in the study. Otherwise, if automatic
10391                         publication is switched on, default value is used for result name.
10392
10393             Returns:
10394                 New GEOM.GEOM_Object, containing the created solid.
10395
10396             Example of usage:
10397                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10398             """
10399             # Example: see GEOM_Spanner.py
10400             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10401             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10402             self._autoPublish(anObj, theName, "hexa")
10403             return anObj
10404
10405         # end of l3_blocks
10406         ## @}
10407
10408         ## @addtogroup l3_blocks_op
10409         ## @{
10410
10411         ## Get a vertex, found in the given shape by its coordinates.
10412         #  @param theShape Block or a compound of blocks.
10413         #  @param theX,theY,theZ Coordinates of the sought vertex.
10414         #  @param theEpsilon Maximum allowed distance between the resulting
10415         #                    vertex and point with the given coordinates.
10416         #  @param theName Object name; when specified, this parameter is used
10417         #         for result publication in the study. Otherwise, if automatic
10418         #         publication is switched on, default value is used for result name.
10419         #
10420         #  @return New GEOM.GEOM_Object, containing the found vertex.
10421         #
10422         #  @ref swig_GetPoint "Example"
10423         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10424             """
10425             Get a vertex, found in the given shape by its coordinates.
10426
10427             Parameters: 
10428                 theShape Block or a compound of blocks.
10429                 theX,theY,theZ Coordinates of the sought vertex.
10430                 theEpsilon Maximum allowed distance between the resulting
10431                            vertex and point with the given coordinates.
10432                 theName Object name; when specified, this parameter is used
10433                         for result publication in the study. Otherwise, if automatic
10434                         publication is switched on, default value is used for result name.
10435
10436             Returns:                  
10437                 New GEOM.GEOM_Object, containing the found vertex.
10438
10439             Example of usage:
10440                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10441             """
10442             # Example: see GEOM_TestOthers.py
10443             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10444             RaiseIfFailed("GetPoint", self.BlocksOp)
10445             self._autoPublish(anObj, theName, "vertex")
10446             return anObj
10447
10448         ## Find a vertex of the given shape, which has minimal distance to the given point.
10449         #  @param theShape Any shape.
10450         #  @param thePoint Point, close to the desired vertex.
10451         #  @param theName Object name; when specified, this parameter is used
10452         #         for result publication in the study. Otherwise, if automatic
10453         #         publication is switched on, default value is used for result name.
10454         #
10455         #  @return New GEOM.GEOM_Object, containing the found vertex.
10456         #
10457         #  @ref swig_GetVertexNearPoint "Example"
10458         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10459             """
10460             Find a vertex of the given shape, which has minimal distance to the given point.
10461
10462             Parameters: 
10463                 theShape Any shape.
10464                 thePoint Point, close to the desired vertex.
10465                 theName Object name; when specified, this parameter is used
10466                         for result publication in the study. Otherwise, if automatic
10467                         publication is switched on, default value is used for result name.
10468
10469             Returns:
10470                 New GEOM.GEOM_Object, containing the found vertex.
10471
10472             Example of usage:
10473                 pmidle = geompy.MakeVertex(50, 0, 50)
10474                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10475             """
10476             # Example: see GEOM_TestOthers.py
10477             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10478             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10479             self._autoPublish(anObj, theName, "vertex")
10480             return anObj
10481
10482         ## Get an edge, found in the given shape by two given vertices.
10483         #  @param theShape Block or a compound of blocks.
10484         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10485         #  @param theName Object name; when specified, this parameter is used
10486         #         for result publication in the study. Otherwise, if automatic
10487         #         publication is switched on, default value is used for result name.
10488         #
10489         #  @return New GEOM.GEOM_Object, containing the found edge.
10490         #
10491         #  @ref swig_GetEdge "Example"
10492         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10493             """
10494             Get an edge, found in the given shape by two given vertices.
10495
10496             Parameters: 
10497                 theShape Block or a compound of blocks.
10498                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10499                 theName Object name; when specified, this parameter is used
10500                         for result publication in the study. Otherwise, if automatic
10501                         publication is switched on, default value is used for result name.
10502
10503             Returns:
10504                 New GEOM.GEOM_Object, containing the found edge.
10505             """
10506             # Example: see GEOM_Spanner.py
10507             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10508             RaiseIfFailed("GetEdge", self.BlocksOp)
10509             self._autoPublish(anObj, theName, "edge")
10510             return anObj
10511
10512         ## Find an edge of the given shape, which has minimal distance to the given point.
10513         #  @param theShape Block or a compound of blocks.
10514         #  @param thePoint Point, close to the desired edge.
10515         #  @param theName Object name; when specified, this parameter is used
10516         #         for result publication in the study. Otherwise, if automatic
10517         #         publication is switched on, default value is used for result name.
10518         #
10519         #  @return New GEOM.GEOM_Object, containing the found edge.
10520         #
10521         #  @ref swig_GetEdgeNearPoint "Example"
10522         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10523             """
10524             Find an edge of the given shape, which has minimal distance to the given point.
10525
10526             Parameters: 
10527                 theShape Block or a compound of blocks.
10528                 thePoint Point, close to the desired edge.
10529                 theName Object name; when specified, this parameter is used
10530                         for result publication in the study. Otherwise, if automatic
10531                         publication is switched on, default value is used for result name.
10532
10533             Returns:
10534                 New GEOM.GEOM_Object, containing the found edge.
10535             """
10536             # Example: see GEOM_TestOthers.py
10537             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10538             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10539             self._autoPublish(anObj, theName, "edge")
10540             return anObj
10541
10542         ## Returns a face, found in the given shape by four given corner vertices.
10543         #  @param theShape Block or a compound of blocks.
10544         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10545         #  @param theName Object name; when specified, this parameter is used
10546         #         for result publication in the study. Otherwise, if automatic
10547         #         publication is switched on, default value is used for result name.
10548         #
10549         #  @return New GEOM.GEOM_Object, containing the found face.
10550         #
10551         #  @ref swig_todo "Example"
10552         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10553             """
10554             Returns a face, found in the given shape by four given corner vertices.
10555
10556             Parameters:
10557                 theShape Block or a compound of blocks.
10558                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10559                 theName Object name; when specified, this parameter is used
10560                         for result publication in the study. Otherwise, if automatic
10561                         publication is switched on, default value is used for result name.
10562
10563             Returns:
10564                 New GEOM.GEOM_Object, containing the found face.
10565             """
10566             # Example: see GEOM_Spanner.py
10567             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10568             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10569             self._autoPublish(anObj, theName, "face")
10570             return anObj
10571
10572         ## Get a face of block, found in the given shape by two given edges.
10573         #  @param theShape Block or a compound of blocks.
10574         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10575         #  @param theName Object name; when specified, this parameter is used
10576         #         for result publication in the study. Otherwise, if automatic
10577         #         publication is switched on, default value is used for result name.
10578         #
10579         #  @return New GEOM.GEOM_Object, containing the found face.
10580         #
10581         #  @ref swig_todo "Example"
10582         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10583             """
10584             Get a face of block, found in the given shape by two given edges.
10585
10586             Parameters:
10587                 theShape Block or a compound of blocks.
10588                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10589                 theName Object name; when specified, this parameter is used
10590                         for result publication in the study. Otherwise, if automatic
10591                         publication is switched on, default value is used for result name.
10592
10593             Returns:
10594                 New GEOM.GEOM_Object, containing the found face.
10595             """
10596             # Example: see GEOM_Spanner.py
10597             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10598             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10599             self._autoPublish(anObj, theName, "face")
10600             return anObj
10601
10602         ## Find a face, opposite to the given one in the given block.
10603         #  @param theBlock Must be a hexahedral solid.
10604         #  @param theFace Face of \a theBlock, opposite to the desired face.
10605         #  @param theName Object name; when specified, this parameter is used
10606         #         for result publication in the study. Otherwise, if automatic
10607         #         publication is switched on, default value is used for result name.
10608         #
10609         #  @return New GEOM.GEOM_Object, containing the found face.
10610         #
10611         #  @ref swig_GetOppositeFace "Example"
10612         def GetOppositeFace(self, theBlock, theFace, theName=None):
10613             """
10614             Find a face, opposite to the given one in the given block.
10615
10616             Parameters:
10617                 theBlock Must be a hexahedral solid.
10618                 theFace Face of theBlock, opposite to the desired face.
10619                 theName Object name; when specified, this parameter is used
10620                         for result publication in the study. Otherwise, if automatic
10621                         publication is switched on, default value is used for result name.
10622
10623             Returns: 
10624                 New GEOM.GEOM_Object, containing the found face.
10625             """
10626             # Example: see GEOM_Spanner.py
10627             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10628             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10629             self._autoPublish(anObj, theName, "face")
10630             return anObj
10631
10632         ## Find a face of the given shape, which has minimal distance to the given point.
10633         #  @param theShape Block or a compound of blocks.
10634         #  @param thePoint Point, close to the desired face.
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 New GEOM.GEOM_Object, containing the found face.
10640         #
10641         #  @ref swig_GetFaceNearPoint "Example"
10642         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10643             """
10644             Find a face of the given shape, which has minimal distance to the given point.
10645
10646             Parameters:
10647                 theShape Block or a compound of blocks.
10648                 thePoint Point, close to the desired face.
10649                 theName Object name; when specified, this parameter is used
10650                         for result publication in the study. Otherwise, if automatic
10651                         publication is switched on, default value is used for result name.
10652
10653             Returns:
10654                 New GEOM.GEOM_Object, containing the found face.
10655             """
10656             # Example: see GEOM_Spanner.py
10657             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10658             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10659             self._autoPublish(anObj, theName, "face")
10660             return anObj
10661
10662         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10663         #  @param theBlock Block or a compound of blocks.
10664         #  @param theVector Vector, close to the normale of the desired face.
10665         #  @param theName Object name; when specified, this parameter is used
10666         #         for result publication in the study. Otherwise, if automatic
10667         #         publication is switched on, default value is used for result name.
10668         #
10669         #  @return New GEOM.GEOM_Object, containing the found face.
10670         #
10671         #  @ref swig_todo "Example"
10672         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10673             """
10674             Find a face of block, whose outside normale has minimal angle with the given vector.
10675
10676             Parameters:
10677                 theBlock Block or a compound of blocks.
10678                 theVector Vector, close to the normale of the desired face.
10679                 theName Object name; when specified, this parameter is used
10680                         for result publication in the study. Otherwise, if automatic
10681                         publication is switched on, default value is used for result name.
10682
10683             Returns:
10684                 New GEOM.GEOM_Object, containing the found face.
10685             """
10686             # Example: see GEOM_Spanner.py
10687             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10688             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10689             self._autoPublish(anObj, theName, "face")
10690             return anObj
10691
10692         ## Find all sub-shapes of type \a theShapeType of the given shape,
10693         #  which have minimal distance to the given point.
10694         #  @param theShape Any shape.
10695         #  @param thePoint Point, close to the desired shape.
10696         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10697         #  @param theTolerance The tolerance for distances comparison. All shapes
10698         #                      with distances to the given point in interval
10699         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10700         #  @param theName Object name; when specified, this parameter is used
10701         #         for result publication in the study. Otherwise, if automatic
10702         #         publication is switched on, default value is used for result name.
10703         #
10704         #  @return New GEOM_Object, containing a group of all found shapes.
10705         #
10706         #  @ref swig_GetShapesNearPoint "Example"
10707         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10708             """
10709             Find all sub-shapes of type theShapeType of the given shape,
10710             which have minimal distance to the given point.
10711
10712             Parameters:
10713                 theShape Any shape.
10714                 thePoint Point, close to the desired shape.
10715                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10716                 theTolerance The tolerance for distances comparison. All shapes
10717                                 with distances to the given point in interval
10718                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10719                 theName Object name; when specified, this parameter is used
10720                         for result publication in the study. Otherwise, if automatic
10721                         publication is switched on, default value is used for result name.
10722
10723             Returns:
10724                 New GEOM_Object, containing a group of all found shapes.
10725             """
10726             # Example: see GEOM_TestOthers.py
10727             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10728             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10729             self._autoPublish(anObj, theName, "group")
10730             return anObj
10731
10732         # end of l3_blocks_op
10733         ## @}
10734
10735         ## @addtogroup l4_blocks_measure
10736         ## @{
10737
10738         ## Check, if the compound of blocks is given.
10739         #  To be considered as a compound of blocks, the
10740         #  given shape must satisfy the following conditions:
10741         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10742         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10743         #  - The compound should be connexe.
10744         #  - The glue between two quadrangle faces should be applied.
10745         #  @param theCompound The compound to check.
10746         #  @return TRUE, if the given shape is a compound of blocks.
10747         #  If theCompound is not valid, prints all discovered errors.
10748         #
10749         #  @ref tui_measurement_tools_page "Example 1"
10750         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10751         def CheckCompoundOfBlocks(self,theCompound):
10752             """
10753             Check, if the compound of blocks is given.
10754             To be considered as a compound of blocks, the
10755             given shape must satisfy the following conditions:
10756             - Each element of the compound should be a Block (6 faces and 12 edges).
10757             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10758             - The compound should be connexe.
10759             - The glue between two quadrangle faces should be applied.
10760
10761             Parameters:
10762                 theCompound The compound to check.
10763
10764             Returns:
10765                 TRUE, if the given shape is a compound of blocks.
10766                 If theCompound is not valid, prints all discovered errors.            
10767             """
10768             # Example: see GEOM_Spanner.py
10769             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10770             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10771             if IsValid == 0:
10772                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10773                 print Descr
10774             return IsValid
10775
10776         ## Retrieve all non blocks solids and faces from \a theShape.
10777         #  @param theShape The shape to explore.
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 A tuple of two GEOM_Objects. The first object is a group of all
10783         #          non block solids (= not 6 faces, or with 6 faces, but with the
10784         #          presence of non-quadrangular faces). The second object is a
10785         #          group of all non quadrangular faces.
10786         #
10787         #  @ref tui_measurement_tools_page "Example 1"
10788         #  \n @ref swig_GetNonBlocks "Example 2"
10789         def GetNonBlocks (self, theShape, theName=None):
10790             """
10791             Retrieve all non blocks solids and faces from theShape.
10792
10793             Parameters:
10794                 theShape The shape to explore.
10795                 theName Object name; when specified, this parameter is used
10796                         for result publication in the study. Otherwise, if automatic
10797                         publication is switched on, default value is used for result name.
10798
10799             Returns:
10800                 A tuple of two GEOM_Objects. The first object is a group of all
10801                 non block solids (= not 6 faces, or with 6 faces, but with the
10802                 presence of non-quadrangular faces). The second object is a
10803                 group of all non quadrangular faces.
10804
10805             Usage:
10806                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10807             """
10808             # Example: see GEOM_Spanner.py
10809             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10810             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10811             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10812             return aTuple
10813
10814         ## Remove all seam and degenerated edges from \a theShape.
10815         #  Unite faces and edges, sharing one surface. It means that
10816         #  this faces must have references to one C++ surface object (handle).
10817         #  @param theShape The compound or single solid to remove irregular edges from.
10818         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10819         #         do not unite faces.
10820         #  @param theName Object name; when specified, this parameter is used
10821         #         for result publication in the study. Otherwise, if automatic
10822         #         publication is switched on, default value is used for result name.
10823         #
10824         #  @return Improved shape.
10825         #
10826         #  @ref swig_RemoveExtraEdges "Example"
10827         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10828             """
10829             Remove all seam and degenerated edges from theShape.
10830             Unite faces and edges, sharing one surface. It means that
10831             this faces must have references to one C++ surface object (handle).
10832
10833             Parameters:
10834                 theShape The compound or single solid to remove irregular edges from.
10835                 doUnionFaces If True, then unite faces. If False (the default value),
10836                              do not unite faces.
10837                 theName Object name; when specified, this parameter is used
10838                         for result publication in the study. Otherwise, if automatic
10839                         publication is switched on, default value is used for result name.
10840
10841             Returns: 
10842                 Improved shape.
10843             """
10844             # Example: see GEOM_TestOthers.py
10845             nbFacesOptimum = -1 # -1 means do not unite faces
10846             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10847             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10848             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10849             self._autoPublish(anObj, theName, "removeExtraEdges")
10850             return anObj
10851
10852         ## Performs union faces of \a theShape
10853         #  Unite faces sharing one surface. It means that
10854         #  these faces must have references to one C++ surface object (handle).
10855         #  @param theShape The compound or single solid that contains faces
10856         #         to perform union.
10857         #  @param theName Object name; when specified, this parameter is used
10858         #         for result publication in the study. Otherwise, if automatic
10859         #         publication is switched on, default value is used for result name.
10860         #
10861         #  @return Improved shape.
10862         #
10863         #  @ref swig_UnionFaces "Example"
10864         def UnionFaces(self, theShape, theName=None):
10865             """
10866             Performs union faces of theShape.
10867             Unite faces sharing one surface. It means that
10868             these faces must have references to one C++ surface object (handle).
10869
10870             Parameters:
10871                 theShape The compound or single solid that contains faces
10872                          to perform union.
10873                 theName Object name; when specified, this parameter is used
10874                         for result publication in the study. Otherwise, if automatic
10875                         publication is switched on, default value is used for result name.
10876
10877             Returns: 
10878                 Improved shape.
10879             """
10880             # Example: see GEOM_TestOthers.py
10881             anObj = self.BlocksOp.UnionFaces(theShape)
10882             RaiseIfFailed("UnionFaces", self.BlocksOp)
10883             self._autoPublish(anObj, theName, "unionFaces")
10884             return anObj
10885
10886         ## Check, if the given shape is a blocks compound.
10887         #  Fix all detected errors.
10888         #    \note Single block can be also fixed by this method.
10889         #  @param theShape The compound to check and improve.
10890         #  @param theName Object name; when specified, this parameter is used
10891         #         for result publication in the study. Otherwise, if automatic
10892         #         publication is switched on, default value is used for result name.
10893         #
10894         #  @return Improved compound.
10895         #
10896         #  @ref swig_CheckAndImprove "Example"
10897         def CheckAndImprove(self, theShape, theName=None):
10898             """
10899             Check, if the given shape is a blocks compound.
10900             Fix all detected errors.
10901
10902             Note:
10903                 Single block can be also fixed by this method.
10904
10905             Parameters:
10906                 theShape The compound to check and improve.
10907                 theName Object name; when specified, this parameter is used
10908                         for result publication in the study. Otherwise, if automatic
10909                         publication is switched on, default value is used for result name.
10910
10911             Returns: 
10912                 Improved compound.
10913             """
10914             # Example: see GEOM_TestOthers.py
10915             anObj = self.BlocksOp.CheckAndImprove(theShape)
10916             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10917             self._autoPublish(anObj, theName, "improved")
10918             return anObj
10919
10920         # end of l4_blocks_measure
10921         ## @}
10922
10923         ## @addtogroup l3_blocks_op
10924         ## @{
10925
10926         ## Get all the blocks, contained in the given compound.
10927         #  @param theCompound The compound to explode.
10928         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10929         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
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         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10935         #
10936         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10937         #
10938         #  @ref tui_explode_on_blocks "Example 1"
10939         #  \n @ref swig_MakeBlockExplode "Example 2"
10940         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10941             """
10942             Get all the blocks, contained in the given compound.
10943
10944             Parameters:
10945                 theCompound The compound to explode.
10946                 theMinNbFaces If solid has lower number of faces, it is not a block.
10947                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10948                 theName Object name; when specified, this parameter is used
10949                         for result publication in the study. Otherwise, if automatic
10950                         publication is switched on, default value is used for result name.
10951
10952             Note:
10953                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10954
10955             Returns:  
10956                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10957             """
10958             # Example: see GEOM_TestOthers.py
10959             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10960             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10961             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10962             for anObj in aList:
10963                 anObj.SetParameters(Parameters)
10964                 pass
10965             self._autoPublish(aList, theName, "block")
10966             return aList
10967
10968         ## Find block, containing the given point inside its volume or on boundary.
10969         #  @param theCompound Compound, to find block in.
10970         #  @param thePoint Point, close to the desired block. If the point lays on
10971         #         boundary between some blocks, we return block with nearest center.
10972         #  @param theName Object name; when specified, this parameter is used
10973         #         for result publication in the study. Otherwise, if automatic
10974         #         publication is switched on, default value is used for result name.
10975         #
10976         #  @return New GEOM.GEOM_Object, containing the found block.
10977         #
10978         #  @ref swig_todo "Example"
10979         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10980             """
10981             Find block, containing the given point inside its volume or on boundary.
10982
10983             Parameters:
10984                 theCompound Compound, to find block in.
10985                 thePoint Point, close to the desired block. If the point lays on
10986                          boundary between some blocks, we return block with nearest center.
10987                 theName Object name; when specified, this parameter is used
10988                         for result publication in the study. Otherwise, if automatic
10989                         publication is switched on, default value is used for result name.
10990
10991             Returns:
10992                 New GEOM.GEOM_Object, containing the found block.
10993             """
10994             # Example: see GEOM_Spanner.py
10995             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10996             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10997             self._autoPublish(anObj, theName, "block")
10998             return anObj
10999
11000         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11001         #  @param theCompound Compound, to find block in.
11002         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11003         #  @param theName Object name; when specified, this parameter is used
11004         #         for result publication in the study. Otherwise, if automatic
11005         #         publication is switched on, default value is used for result name.
11006         #
11007         #  @return New GEOM.GEOM_Object, containing the found block.
11008         #
11009         #  @ref swig_GetBlockByParts "Example"
11010         def GetBlockByParts(self, theCompound, theParts, theName=None):
11011             """
11012              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11013
11014              Parameters:
11015                 theCompound Compound, to find block in.
11016                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11017                 theName Object name; when specified, this parameter is used
11018                         for result publication in the study. Otherwise, if automatic
11019                         publication is switched on, default value is used for result name.
11020
11021             Returns: 
11022                 New GEOM_Object, containing the found block.
11023             """
11024             # Example: see GEOM_TestOthers.py
11025             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11026             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11027             self._autoPublish(anObj, theName, "block")
11028             return anObj
11029
11030         ## Return all blocks, containing all the elements, passed as the parts.
11031         #  @param theCompound Compound, to find blocks in.
11032         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11033         #  @param theName Object name; when specified, this parameter is used
11034         #         for result publication in the study. Otherwise, if automatic
11035         #         publication is switched on, default value is used for result name.
11036         #
11037         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11038         #
11039         #  @ref swig_todo "Example"
11040         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11041             """
11042             Return all blocks, containing all the elements, passed as the parts.
11043
11044             Parameters:
11045                 theCompound Compound, to find blocks in.
11046                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11047                 theName Object name; when specified, this parameter is used
11048                         for result publication in the study. Otherwise, if automatic
11049                         publication is switched on, default value is used for result name.
11050
11051             Returns:
11052                 List of GEOM.GEOM_Object, containing the found blocks.
11053             """
11054             # Example: see GEOM_Spanner.py
11055             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11056             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11057             self._autoPublish(aList, theName, "block")
11058             return aList
11059
11060         ## Multi-transformate block and glue the result.
11061         #  Transformation is defined so, as to superpose direction faces.
11062         #  @param Block Hexahedral solid to be multi-transformed.
11063         #  @param DirFace1 ID of First direction face.
11064         #  @param DirFace2 ID of Second direction face.
11065         #  @param NbTimes Quantity of transformations to be done.
11066         #  @param theName Object name; when specified, this parameter is used
11067         #         for result publication in the study. Otherwise, if automatic
11068         #         publication is switched on, default value is used for result name.
11069         #
11070         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11071         #
11072         #  @return New GEOM.GEOM_Object, containing the result shape.
11073         #
11074         #  @ref tui_multi_transformation "Example"
11075         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11076             """
11077             Multi-transformate block and glue the result.
11078             Transformation is defined so, as to superpose direction faces.
11079
11080             Parameters:
11081                 Block Hexahedral solid to be multi-transformed.
11082                 DirFace1 ID of First direction face.
11083                 DirFace2 ID of Second direction face.
11084                 NbTimes Quantity of transformations to be done.
11085                 theName Object name; when specified, this parameter is used
11086                         for result publication in the study. Otherwise, if automatic
11087                         publication is switched on, default value is used for result name.
11088
11089             Note:
11090                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11091
11092             Returns:
11093                 New GEOM.GEOM_Object, containing the result shape.
11094             """
11095             # Example: see GEOM_Spanner.py
11096             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11097             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11098             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11099             anObj.SetParameters(Parameters)
11100             self._autoPublish(anObj, theName, "transformed")
11101             return anObj
11102
11103         ## Multi-transformate block and glue the result.
11104         #  @param Block Hexahedral solid to be multi-transformed.
11105         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11106         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11107         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11108         #  @param theName Object name; when specified, this parameter is used
11109         #         for result publication in the study. Otherwise, if automatic
11110         #         publication is switched on, default value is used for result name.
11111         #
11112         #  @return New GEOM.GEOM_Object, containing the result shape.
11113         #
11114         #  @ref tui_multi_transformation "Example"
11115         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11116                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11117             """
11118             Multi-transformate block and glue the result.
11119
11120             Parameters:
11121                 Block Hexahedral solid to be multi-transformed.
11122                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11123                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11124                 NbTimesU,NbTimesV Quantity of transformations to be done.
11125                 theName Object name; when specified, this parameter is used
11126                         for result publication in the study. Otherwise, if automatic
11127                         publication is switched on, default value is used for result name.
11128
11129             Returns:
11130                 New GEOM.GEOM_Object, containing the result shape.
11131             """
11132             # Example: see GEOM_Spanner.py
11133             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11134               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11135             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11136                                                             DirFace1V, DirFace2V, NbTimesV)
11137             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11138             anObj.SetParameters(Parameters)
11139             self._autoPublish(anObj, theName, "transformed")
11140             return anObj
11141
11142         ## Build all possible propagation groups.
11143         #  Propagation group is a set of all edges, opposite to one (main)
11144         #  edge of this group directly or through other opposite edges.
11145         #  Notion of Opposite Edge make sence only on quadrangle face.
11146         #  @param theShape Shape to build propagation groups on.
11147         #  @param theName Object name; when specified, this parameter is used
11148         #         for result publication in the study. Otherwise, if automatic
11149         #         publication is switched on, default value is used for result name.
11150         #
11151         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11152         #
11153         #  @ref swig_Propagate "Example"
11154         def Propagate(self, theShape, theName=None):
11155             """
11156             Build all possible propagation groups.
11157             Propagation group is a set of all edges, opposite to one (main)
11158             edge of this group directly or through other opposite edges.
11159             Notion of Opposite Edge make sence only on quadrangle face.
11160
11161             Parameters:
11162                 theShape Shape to build propagation groups on.
11163                 theName Object name; when specified, this parameter is used
11164                         for result publication in the study. Otherwise, if automatic
11165                         publication is switched on, default value is used for result name.
11166
11167             Returns:
11168                 List of GEOM.GEOM_Object, each of them is a propagation group.
11169             """
11170             # Example: see GEOM_TestOthers.py
11171             listChains = self.BlocksOp.Propagate(theShape)
11172             RaiseIfFailed("Propagate", self.BlocksOp)
11173             self._autoPublish(listChains, theName, "propagate")
11174             return listChains
11175
11176         # end of l3_blocks_op
11177         ## @}
11178
11179         ## @addtogroup l3_groups
11180         ## @{
11181
11182         ## Creates a new group which will store sub-shapes of theMainShape
11183         #  @param theMainShape is a GEOM object on which the group is selected
11184         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
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 (GEOM.GEOM_Object)
11190         #
11191         #  @ref tui_working_with_groups_page "Example 1"
11192         #  \n @ref swig_CreateGroup "Example 2"
11193         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11194             """
11195             Creates a new group which will store sub-shapes of theMainShape
11196
11197             Parameters:
11198                theMainShape is a GEOM object on which the group is selected
11199                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11200                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11201                 theName Object name; when specified, this parameter is used
11202                         for result publication in the study. Otherwise, if automatic
11203                         publication is switched on, default value is used for result name.
11204
11205             Returns:
11206                a newly created GEOM group
11207
11208             Example of usage:
11209                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11210                 
11211             """
11212             # Example: see GEOM_TestOthers.py
11213             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11214             RaiseIfFailed("CreateGroup", self.GroupOp)
11215             self._autoPublish(anObj, theName, "group")
11216             return anObj
11217
11218         ## Adds a sub-object with ID theSubShapeId to the group
11219         #  @param theGroup is a GEOM group to which the new sub-shape is added
11220         #  @param theSubShapeID is a sub-shape ID in the main object.
11221         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11222         #
11223         #  @ref tui_working_with_groups_page "Example"
11224         def AddObject(self,theGroup, theSubShapeID):
11225             """
11226             Adds a sub-object with ID theSubShapeId to the group
11227
11228             Parameters:
11229                 theGroup       is a GEOM group to which the new sub-shape is added
11230                 theSubShapeID  is a sub-shape ID in the main object.
11231
11232             Note:
11233                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11234             """
11235             # Example: see GEOM_TestOthers.py
11236             self.GroupOp.AddObject(theGroup, theSubShapeID)
11237             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11238                 RaiseIfFailed("AddObject", self.GroupOp)
11239                 pass
11240             pass
11241
11242         ## Removes a sub-object with ID \a theSubShapeId from the group
11243         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11244         #  @param theSubShapeID is a sub-shape ID in the main object.
11245         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11246         #
11247         #  @ref tui_working_with_groups_page "Example"
11248         def RemoveObject(self,theGroup, theSubShapeID):
11249             """
11250             Removes a sub-object with ID theSubShapeId from the group
11251
11252             Parameters:
11253                 theGroup is a GEOM group from which the new sub-shape is removed
11254                 theSubShapeID is a sub-shape ID in the main object.
11255
11256             Note:
11257                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11258             """
11259             # Example: see GEOM_TestOthers.py
11260             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11261             RaiseIfFailed("RemoveObject", self.GroupOp)
11262             pass
11263
11264         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11265         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11266         #  @param theSubShapes is a list of sub-shapes to be added.
11267         #
11268         #  @ref tui_working_with_groups_page "Example"
11269         def UnionList (self,theGroup, theSubShapes):
11270             """
11271             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11272
11273             Parameters:
11274                 theGroup is a GEOM group to which the new sub-shapes are added.
11275                 theSubShapes is a list of sub-shapes to be added.
11276             """
11277             # Example: see GEOM_TestOthers.py
11278             self.GroupOp.UnionList(theGroup, theSubShapes)
11279             RaiseIfFailed("UnionList", self.GroupOp)
11280             pass
11281
11282         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11283         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11284         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11285         #
11286         #  @ref swig_UnionIDs "Example"
11287         def UnionIDs(self,theGroup, theSubShapes):
11288             """
11289             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11290
11291             Parameters:
11292                 theGroup is a GEOM group to which the new sub-shapes are added.
11293                 theSubShapes is a list of indices of sub-shapes to be added.
11294             """
11295             # Example: see GEOM_TestOthers.py
11296             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11297             RaiseIfFailed("UnionIDs", self.GroupOp)
11298             pass
11299
11300         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11301         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11302         #  @param theSubShapes is a list of sub-shapes to be removed.
11303         #
11304         #  @ref tui_working_with_groups_page "Example"
11305         def DifferenceList (self,theGroup, theSubShapes):
11306             """
11307             Removes from the group all the given shapes. No errors, if some shapes are not included.
11308
11309             Parameters:
11310                 theGroup is a GEOM group from which the sub-shapes are removed.
11311                 theSubShapes is a list of sub-shapes to be removed.
11312             """
11313             # Example: see GEOM_TestOthers.py
11314             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11315             RaiseIfFailed("DifferenceList", self.GroupOp)
11316             pass
11317
11318         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11319         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11320         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11321         #
11322         #  @ref swig_DifferenceIDs "Example"
11323         def DifferenceIDs(self,theGroup, theSubShapes):
11324             """
11325             Removes from the group all the given shapes. No errors, if some shapes are not included.
11326
11327             Parameters:
11328                 theGroup is a GEOM group from which the sub-shapes are removed.
11329                 theSubShapes is a list of indices of sub-shapes to be removed.
11330             """            
11331             # Example: see GEOM_TestOthers.py
11332             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11333             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11334             pass
11335
11336         ## Union of two groups.
11337         #  New group is created. It will contain all entities
11338         #  which are present in groups theGroup1 and theGroup2.
11339         #  @param theGroup1, theGroup2 are the initial GEOM groups
11340         #                              to create the united group from.
11341         #  @param theName Object name; when specified, this parameter is used
11342         #         for result publication in the study. Otherwise, if automatic
11343         #         publication is switched on, default value is used for result name.
11344         #
11345         #  @return a newly created GEOM group.
11346         #
11347         #  @ref tui_union_groups_anchor "Example"
11348         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11349             """
11350             Union of two groups.
11351             New group is created. It will contain all entities
11352             which are present in groups theGroup1 and theGroup2.
11353
11354             Parameters:
11355                 theGroup1, theGroup2 are the initial GEOM groups
11356                                      to create the united group from.
11357                 theName Object name; when specified, this parameter is used
11358                         for result publication in the study. Otherwise, if automatic
11359                         publication is switched on, default value is used for result name.
11360
11361             Returns:
11362                 a newly created GEOM group.
11363             """
11364             # Example: see GEOM_TestOthers.py
11365             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11366             RaiseIfFailed("UnionGroups", self.GroupOp)
11367             self._autoPublish(aGroup, theName, "group")
11368             return aGroup
11369
11370         ## Intersection of two groups.
11371         #  New group is created. It will contain only those entities
11372         #  which are present in both groups theGroup1 and theGroup2.
11373         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11374         #  @param theName Object name; when specified, this parameter is used
11375         #         for result publication in the study. Otherwise, if automatic
11376         #         publication is switched on, default value is used for result name.
11377         #
11378         #  @return a newly created GEOM group.
11379         #
11380         #  @ref tui_intersect_groups_anchor "Example"
11381         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11382             """
11383             Intersection of two groups.
11384             New group is created. It will contain only those entities
11385             which are present in both groups theGroup1 and theGroup2.
11386
11387             Parameters:
11388                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11389                 theName Object name; when specified, this parameter is used
11390                         for result publication in the study. Otherwise, if automatic
11391                         publication is switched on, default value is used for result name.
11392
11393             Returns:
11394                 a newly created GEOM group.
11395             """
11396             # Example: see GEOM_TestOthers.py
11397             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11398             RaiseIfFailed("IntersectGroups", self.GroupOp)
11399             self._autoPublish(aGroup, theName, "group")
11400             return aGroup
11401
11402         ## Cut of two groups.
11403         #  New group is created. It will contain entities which are
11404         #  present in group theGroup1 but are not present in group theGroup2.
11405         #  @param theGroup1 is a GEOM group to include elements of.
11406         #  @param theGroup2 is a GEOM group to exclude elements of.
11407         #  @param theName Object name; when specified, this parameter is used
11408         #         for result publication in the study. Otherwise, if automatic
11409         #         publication is switched on, default value is used for result name.
11410         #
11411         #  @return a newly created GEOM group.
11412         #
11413         #  @ref tui_cut_groups_anchor "Example"
11414         def CutGroups (self, theGroup1, theGroup2, theName=None):
11415             """
11416             Cut of two groups.
11417             New group is created. It will contain entities which are
11418             present in group theGroup1 but are not present in group theGroup2.
11419
11420             Parameters:
11421                 theGroup1 is a GEOM group to include elements of.
11422                 theGroup2 is a GEOM group to exclude elements of.
11423                 theName Object name; when specified, this parameter is used
11424                         for result publication in the study. Otherwise, if automatic
11425                         publication is switched on, default value is used for result name.
11426
11427             Returns:
11428                 a newly created GEOM group.
11429             """
11430             # Example: see GEOM_TestOthers.py
11431             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11432             RaiseIfFailed("CutGroups", self.GroupOp)
11433             self._autoPublish(aGroup, theName, "group")
11434             return aGroup
11435
11436         ## Union of list of groups.
11437         #  New group is created. It will contain all entities that are
11438         #  present in groups listed in theGList.
11439         #  @param theGList is a list of GEOM groups to create the united group from.
11440         #  @param theName Object name; when specified, this parameter is used
11441         #         for result publication in the study. Otherwise, if automatic
11442         #         publication is switched on, default value is used for result name.
11443         #
11444         #  @return a newly created GEOM group.
11445         #
11446         #  @ref tui_union_groups_anchor "Example"
11447         def UnionListOfGroups (self, theGList, theName=None):
11448             """
11449             Union of list of groups.
11450             New group is created. It will contain all entities that are
11451             present in groups listed in theGList.
11452
11453             Parameters:
11454                 theGList is a list of GEOM groups to create the united group from.
11455                 theName Object name; when specified, this parameter is used
11456                         for result publication in the study. Otherwise, if automatic
11457                         publication is switched on, default value is used for result name.
11458
11459             Returns:
11460                 a newly created GEOM group.
11461             """
11462             # Example: see GEOM_TestOthers.py
11463             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11464             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11465             self._autoPublish(aGroup, theName, "group")
11466             return aGroup
11467
11468         ## Cut of lists of groups.
11469         #  New group is created. It will contain only entities
11470         #  which are present in groups listed in theGList.
11471         #  @param theGList is a list of GEOM groups to include elements of.
11472         #  @param theName Object name; when specified, this parameter is used
11473         #         for result publication in the study. Otherwise, if automatic
11474         #         publication is switched on, default value is used for result name.
11475         #
11476         #  @return a newly created GEOM group.
11477         #
11478         #  @ref tui_intersect_groups_anchor "Example"
11479         def IntersectListOfGroups (self, theGList, theName=None):
11480             """
11481             Cut of lists of groups.
11482             New group is created. It will contain only entities
11483             which are present in groups listed in theGList.
11484
11485             Parameters:
11486                 theGList is a list of GEOM groups to include elements of.
11487                 theName Object name; when specified, this parameter is used
11488                         for result publication in the study. Otherwise, if automatic
11489                         publication is switched on, default value is used for result name.
11490
11491             Returns:
11492                 a newly created GEOM group.
11493             """
11494             # Example: see GEOM_TestOthers.py
11495             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11496             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11497             self._autoPublish(aGroup, theName, "group")
11498             return aGroup
11499
11500         ## Cut of lists of groups.
11501         #  New group is created. It will contain only entities
11502         #  which are present in groups listed in theGList1 but 
11503         #  are not present in groups from theGList2.
11504         #  @param theGList1 is a list of GEOM groups to include elements of.
11505         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11506         #  @param theName Object name; when specified, this parameter is used
11507         #         for result publication in the study. Otherwise, if automatic
11508         #         publication is switched on, default value is used for result name.
11509         #
11510         #  @return a newly created GEOM group.
11511         #
11512         #  @ref tui_cut_groups_anchor "Example"
11513         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11514             """
11515             Cut of lists of groups.
11516             New group is created. It will contain only entities
11517             which are present in groups listed in theGList1 but 
11518             are not present in groups from theGList2.
11519
11520             Parameters:
11521                 theGList1 is a list of GEOM groups to include elements of.
11522                 theGList2 is a list of GEOM groups to exclude elements of.
11523                 theName Object name; when specified, this parameter is used
11524                         for result publication in the study. Otherwise, if automatic
11525                         publication is switched on, default value is used for result name.
11526
11527             Returns:
11528                 a newly created GEOM group.
11529             """
11530             # Example: see GEOM_TestOthers.py
11531             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11532             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11533             self._autoPublish(aGroup, theName, "group")
11534             return aGroup
11535
11536         ## Returns a list of sub-objects ID stored in the group
11537         #  @param theGroup is a GEOM group for which a list of IDs is requested
11538         #
11539         #  @ref swig_GetObjectIDs "Example"
11540         def GetObjectIDs(self,theGroup):
11541             """
11542             Returns a list of sub-objects ID stored in the group
11543
11544             Parameters:
11545                 theGroup is a GEOM group for which a list of IDs is requested
11546             """
11547             # Example: see GEOM_TestOthers.py
11548             ListIDs = self.GroupOp.GetObjects(theGroup)
11549             RaiseIfFailed("GetObjects", self.GroupOp)
11550             return ListIDs
11551
11552         ## Returns a type of sub-objects stored in the group
11553         #  @param theGroup is a GEOM group which type is returned.
11554         #
11555         #  @ref swig_GetType "Example"
11556         def GetType(self,theGroup):
11557             """
11558             Returns a type of sub-objects stored in the group
11559
11560             Parameters:
11561                 theGroup is a GEOM group which type is returned.
11562             """
11563             # Example: see GEOM_TestOthers.py
11564             aType = self.GroupOp.GetType(theGroup)
11565             RaiseIfFailed("GetType", self.GroupOp)
11566             return aType
11567
11568         ## Convert a type of geom object from id to string value
11569         #  @param theId is a GEOM obect type id.
11570         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11571         #  @ref swig_GetType "Example"
11572         def ShapeIdToType(self, theId):
11573             """
11574             Convert a type of geom object from id to string value
11575
11576             Parameters:
11577                 theId is a GEOM obect type id.
11578                 
11579             Returns:
11580                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11581             """
11582             if theId == 0:
11583                 return "COPY"
11584             if theId == 1:
11585                 return "IMPORT"
11586             if theId == 2:
11587                 return "POINT"
11588             if theId == 3:
11589                 return "VECTOR"
11590             if theId == 4:
11591                 return "PLANE"
11592             if theId == 5:
11593                 return "LINE"
11594             if theId == 6:
11595                 return "TORUS"
11596             if theId == 7:
11597                 return "BOX"
11598             if theId == 8:
11599                 return "CYLINDER"
11600             if theId == 9:
11601                 return "CONE"
11602             if theId == 10:
11603                 return "SPHERE"
11604             if theId == 11:
11605                 return "PRISM"
11606             if theId == 12:
11607                 return "REVOLUTION"
11608             if theId == 13:
11609                 return "BOOLEAN"
11610             if theId == 14:
11611                 return "PARTITION"
11612             if theId == 15:
11613                 return "POLYLINE"
11614             if theId == 16:
11615                 return "CIRCLE"
11616             if theId == 17:
11617                 return "SPLINE"
11618             if theId == 18:
11619                 return "ELLIPSE"
11620             if theId == 19:
11621                 return "CIRC_ARC"
11622             if theId == 20:
11623                 return "FILLET"
11624             if theId == 21:
11625                 return "CHAMFER"
11626             if theId == 22:
11627                 return "EDGE"
11628             if theId == 23:
11629                 return "WIRE"
11630             if theId == 24:
11631                 return "FACE"
11632             if theId == 25:
11633                 return "SHELL"
11634             if theId == 26:
11635                 return "SOLID"
11636             if theId == 27:
11637                 return "COMPOUND"
11638             if theId == 28:
11639                 return "SUBSHAPE"
11640             if theId == 29:
11641                 return "PIPE"
11642             if theId == 30:
11643                 return "ARCHIMEDE"
11644             if theId == 31:
11645                 return "FILLING"
11646             if theId == 32:
11647                 return "EXPLODE"
11648             if theId == 33:
11649                 return "GLUED"
11650             if theId == 34:
11651                 return "SKETCHER"
11652             if theId == 35:
11653                 return "CDG"
11654             if theId == 36:
11655                 return "FREE_BOUNDS"
11656             if theId == 37:
11657                 return "GROUP"
11658             if theId == 38:
11659                 return "BLOCK"
11660             if theId == 39:
11661                 return "MARKER"
11662             if theId == 40:
11663                 return "THRUSECTIONS"
11664             if theId == 41:
11665                 return "COMPOUNDFILTER"
11666             if theId == 42:
11667                 return "SHAPES_ON_SHAPE"
11668             if theId == 43:
11669                 return "ELLIPSE_ARC"
11670             if theId == 44:
11671                 return "3DSKETCHER"
11672             if theId == 45:
11673                 return "FILLET_2D"
11674             if theId == 46:
11675                 return "FILLET_1D"
11676             if theId == 201:
11677                 return "PIPETSHAPE"
11678             return "Shape Id not exist."
11679
11680         ## Returns a main shape associated with the group
11681         #  @param theGroup is a GEOM group for which a main shape object is requested
11682         #  @return a GEOM object which is a main shape for theGroup
11683         #
11684         #  @ref swig_GetMainShape "Example"
11685         def GetMainShape(self,theGroup):
11686             """
11687             Returns a main shape associated with the group
11688
11689             Parameters:
11690                 theGroup is a GEOM group for which a main shape object is requested
11691
11692             Returns:
11693                 a GEOM object which is a main shape for theGroup
11694
11695             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11696             """
11697             # Example: see GEOM_TestOthers.py
11698             anObj = self.GroupOp.GetMainShape(theGroup)
11699             RaiseIfFailed("GetMainShape", self.GroupOp)
11700             return anObj
11701
11702         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11703         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11704         #  @param theShape given shape (see GEOM.GEOM_Object)
11705         #  @param min_length minimum length of edges of theShape
11706         #  @param max_length maximum length of edges of theShape
11707         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11708         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11709         #  @param theName Object name; when specified, this parameter is used
11710         #         for result publication in the study. Otherwise, if automatic
11711         #         publication is switched on, default value is used for result name.
11712         #
11713         #  @return a newly created GEOM group of edges
11714         #
11715         #  @@ref swig_todo "Example"
11716         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11717             """
11718             Create group of edges of theShape, whose length is in range [min_length, max_length].
11719             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11720
11721             Parameters:
11722                 theShape given shape
11723                 min_length minimum length of edges of theShape
11724                 max_length maximum length of edges of theShape
11725                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11726                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11727                 theName Object name; when specified, this parameter is used
11728                         for result publication in the study. Otherwise, if automatic
11729                         publication is switched on, default value is used for result name.
11730
11731              Returns:
11732                 a newly created GEOM group of edges.
11733             """
11734             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11735             edges_in_range = []
11736             for edge in edges:
11737                 Props = self.BasicProperties(edge)
11738                 if min_length <= Props[0] and Props[0] <= max_length:
11739                     if (not include_min) and (min_length == Props[0]):
11740                         skip = 1
11741                     else:
11742                         if (not include_max) and (Props[0] == max_length):
11743                             skip = 1
11744                         else:
11745                             edges_in_range.append(edge)
11746
11747             if len(edges_in_range) <= 0:
11748                 print "No edges found by given criteria"
11749                 return None
11750
11751             # note: auto-publishing is done in self.CreateGroup()
11752             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11753             self.UnionList(group_edges, edges_in_range)
11754
11755             return group_edges
11756
11757         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11758         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11759         #  @param min_length minimum length of edges of selected shape
11760         #  @param max_length maximum length of edges of selected shape
11761         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11762         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11763         #  @return a newly created GEOM group of edges
11764         #  @ref swig_todo "Example"
11765         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11766             """
11767             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11768             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11769
11770             Parameters:
11771                 min_length minimum length of edges of selected shape
11772                 max_length maximum length of edges of selected shape
11773                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11774                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11775
11776              Returns:
11777                 a newly created GEOM group of edges.
11778             """
11779             nb_selected = sg.SelectedCount()
11780             if nb_selected < 1:
11781                 print "Select a shape before calling this function, please."
11782                 return 0
11783             if nb_selected > 1:
11784                 print "Only one shape must be selected"
11785                 return 0
11786
11787             id_shape = sg.getSelected(0)
11788             shape = IDToObject( id_shape )
11789
11790             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11791
11792             left_str  = " < "
11793             right_str = " < "
11794             if include_min: left_str  = " <= "
11795             if include_max: right_str  = " <= "
11796
11797             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11798                                     + left_str + "length" + right_str + `max_length`)
11799
11800             sg.updateObjBrowser(1)
11801
11802             return group_edges
11803
11804         # end of l3_groups
11805         ## @}
11806
11807         ## @addtogroup l4_advanced
11808         ## @{
11809
11810         ## Create a T-shape object with specified caracteristics for the main
11811         #  and the incident pipes (radius, width, half-length).
11812         #  The extremities of the main pipe are located on junctions points P1 and P2.
11813         #  The extremity of the incident pipe is located on junction point P3.
11814         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11815         #  the main plane of the T-shape is XOY.
11816         #
11817         #  @param theR1 Internal radius of main pipe
11818         #  @param theW1 Width of main pipe
11819         #  @param theL1 Half-length of main pipe
11820         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11821         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11822         #  @param theL2 Half-length of incident pipe
11823         #
11824         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11825         #  @param theP1 1st junction point of main pipe
11826         #  @param theP2 2nd junction point of main pipe
11827         #  @param theP3 Junction point of incident pipe
11828         #
11829         #  @param theRL Internal radius of left thickness reduction
11830         #  @param theWL Width of left thickness reduction
11831         #  @param theLtransL Length of left transition part
11832         #  @param theLthinL Length of left thin part
11833         #
11834         #  @param theRR Internal radius of right thickness reduction
11835         #  @param theWR Width of right thickness reduction
11836         #  @param theLtransR Length of right transition part
11837         #  @param theLthinR Length of right thin part
11838         #
11839         #  @param theRI Internal radius of incident thickness reduction
11840         #  @param theWI Width of incident thickness reduction
11841         #  @param theLtransI Length of incident transition part
11842         #  @param theLthinI Length of incident thin part
11843         #
11844         #  @param theName Object name; when specified, this parameter is used
11845         #         for result publication in the study. Otherwise, if automatic
11846         #         publication is switched on, default value is used for result name.
11847         #
11848         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11849         #
11850         #  @ref tui_creation_pipetshape "Example"
11851         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11852                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11853                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11854                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11855                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11856                             theName=None):
11857             """
11858             Create a T-shape object with specified caracteristics for the main
11859             and the incident pipes (radius, width, half-length).
11860             The extremities of the main pipe are located on junctions points P1 and P2.
11861             The extremity of the incident pipe is located on junction point P3.
11862             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11863             the main plane of the T-shape is XOY.
11864
11865             Parameters:
11866                 theR1 Internal radius of main pipe
11867                 theW1 Width of main pipe
11868                 theL1 Half-length of main pipe
11869                 theR2 Internal radius of incident pipe (R2 < R1)
11870                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11871                 theL2 Half-length of incident pipe
11872                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11873                 theP1 1st junction point of main pipe
11874                 theP2 2nd junction point of main pipe
11875                 theP3 Junction point of incident pipe
11876
11877                 theRL Internal radius of left thickness reduction
11878                 theWL Width of left thickness reduction
11879                 theLtransL Length of left transition part
11880                 theLthinL Length of left thin part
11881
11882                 theRR Internal radius of right thickness reduction
11883                 theWR Width of right thickness reduction
11884                 theLtransR Length of right transition part
11885                 theLthinR Length of right thin part
11886
11887                 theRI Internal radius of incident thickness reduction
11888                 theWI Width of incident thickness reduction
11889                 theLtransI Length of incident transition part
11890                 theLthinI Length of incident thin part
11891
11892                 theName Object name; when specified, this parameter is used
11893                         for result publication in the study. Otherwise, if automatic
11894                         publication is switched on, default value is used for result name.
11895
11896             Returns:
11897                 List of GEOM_Object, containing the created shape and propagation groups.
11898
11899             Example of usage:
11900                 # create PipeTShape object
11901                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11902                 # create PipeTShape object with position
11903                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11904                 # create PipeTShape object with left thickness reduction
11905                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11906             """
11907             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)
11908             if (theP1 and theP2 and theP3):
11909                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11910                                                                 theRL, theWL, theLtransL, theLthinL,
11911                                                                 theRR, theWR, theLtransR, theLthinR,
11912                                                                 theRI, theWI, theLtransI, theLthinI,
11913                                                                 theHexMesh, theP1, theP2, theP3)
11914             else:
11915                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11916                                                     theRL, theWL, theLtransL, theLthinL,
11917                                                     theRR, theWR, theLtransR, theLthinR,
11918                                                     theRI, theWI, theLtransI, theLthinI,
11919                                                     theHexMesh)
11920             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11921             if Parameters: anObj[0].SetParameters(Parameters)
11922             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11923             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11924             return anObj
11925
11926         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11927         #  and the incident pipes (radius, width, half-length). The chamfer is
11928         #  created on the junction of the pipes.
11929         #  The extremities of the main pipe are located on junctions points P1 and P2.
11930         #  The extremity of the incident pipe is located on junction point P3.
11931         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11932         #  the main plane of the T-shape is XOY.
11933         #  @param theR1 Internal radius of main pipe
11934         #  @param theW1 Width of main pipe
11935         #  @param theL1 Half-length of main pipe
11936         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11937         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11938         #  @param theL2 Half-length of incident pipe
11939         #  @param theH Height of the chamfer.
11940         #  @param theW Width of the chamfer.
11941         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11942         #  @param theP1 1st junction point of main pipe
11943         #  @param theP2 2nd junction point of main pipe
11944         #  @param theP3 Junction point of incident pipe
11945         #
11946         #  @param theRL Internal radius of left thickness reduction
11947         #  @param theWL Width of left thickness reduction
11948         #  @param theLtransL Length of left transition part
11949         #  @param theLthinL Length of left thin part
11950         #
11951         #  @param theRR Internal radius of right thickness reduction
11952         #  @param theWR Width of right thickness reduction
11953         #  @param theLtransR Length of right transition part
11954         #  @param theLthinR Length of right thin part
11955         #
11956         #  @param theRI Internal radius of incident thickness reduction
11957         #  @param theWI Width of incident thickness reduction
11958         #  @param theLtransI Length of incident transition part
11959         #  @param theLthinI Length of incident thin part
11960         #
11961         #  @param theName Object name; when specified, this parameter is used
11962         #         for result publication in the study. Otherwise, if automatic
11963         #         publication is switched on, default value is used for result name.
11964         #
11965         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11966         #
11967         #  @ref tui_creation_pipetshape "Example"
11968         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11969                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11970                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11971                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11972                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11973                                    theName=None):
11974             """
11975             Create a T-shape object with chamfer and with specified caracteristics for the main
11976             and the incident pipes (radius, width, half-length). The chamfer is
11977             created on the junction of the pipes.
11978             The extremities of the main pipe are located on junctions points P1 and P2.
11979             The extremity of the incident pipe is located on junction point P3.
11980             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11981             the main plane of the T-shape is XOY.
11982
11983             Parameters:
11984                 theR1 Internal radius of main pipe
11985                 theW1 Width of main pipe
11986                 theL1 Half-length of main pipe
11987                 theR2 Internal radius of incident pipe (R2 < R1)
11988                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11989                 theL2 Half-length of incident pipe
11990                 theH Height of the chamfer.
11991                 theW Width of the chamfer.
11992                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11993                 theP1 1st junction point of main pipe
11994                 theP2 2nd junction point of main pipe
11995                 theP3 Junction point of incident pipe
11996
11997                 theRL Internal radius of left thickness reduction
11998                 theWL Width of left thickness reduction
11999                 theLtransL Length of left transition part
12000                 theLthinL Length of left thin part
12001
12002                 theRR Internal radius of right thickness reduction
12003                 theWR Width of right thickness reduction
12004                 theLtransR Length of right transition part
12005                 theLthinR Length of right thin part
12006
12007                 theRI Internal radius of incident thickness reduction
12008                 theWI Width of incident thickness reduction
12009                 theLtransI Length of incident transition part
12010                 theLthinI Length of incident thin part
12011
12012                 theName Object name; when specified, this parameter is used
12013                         for result publication in the study. Otherwise, if automatic
12014                         publication is switched on, default value is used for result name.
12015
12016             Returns:
12017                 List of GEOM_Object, containing the created shape and propagation groups.
12018
12019             Example of usage:
12020                 # create PipeTShape with chamfer object
12021                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12022                 # create PipeTShape with chamfer object with position
12023                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12024                 # create PipeTShape with chamfer object with left thickness reduction
12025                 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)
12026             """
12027             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)
12028             if (theP1 and theP2 and theP3):
12029               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12030                                                                      theRL, theWL, theLtransL, theLthinL,
12031                                                                      theRR, theWR, theLtransR, theLthinR,
12032                                                                      theRI, theWI, theLtransI, theLthinI,
12033                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12034             else:
12035               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12036                                                          theRL, theWL, theLtransL, theLthinL,
12037                                                          theRR, theWR, theLtransR, theLthinR,
12038                                                          theRI, theWI, theLtransI, theLthinI,
12039                                                          theH, theW, theHexMesh)
12040             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12041             if Parameters: anObj[0].SetParameters(Parameters)
12042             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12043             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12044             return anObj
12045
12046         ## Create a T-shape object with fillet and with specified caracteristics for the main
12047         #  and the incident pipes (radius, width, half-length). The fillet is
12048         #  created on the junction of the pipes.
12049         #  The extremities of the main pipe are located on junctions points P1 and P2.
12050         #  The extremity of the incident pipe is located on junction point P3.
12051         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12052         #  the main plane of the T-shape is XOY.
12053         #  @param theR1 Internal radius of main pipe
12054         #  @param theW1 Width of main pipe
12055         #  @param theL1 Half-length of main pipe
12056         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12057         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12058         #  @param theL2 Half-length of incident pipe
12059         #  @param theRF Radius of curvature of fillet.
12060         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12061         #  @param theP1 1st junction point of main pipe
12062         #  @param theP2 2nd junction point of main pipe
12063         #  @param theP3 Junction point of incident pipe
12064         #
12065         #  @param theRL Internal radius of left thickness reduction
12066         #  @param theWL Width of left thickness reduction
12067         #  @param theLtransL Length of left transition part
12068         #  @param theLthinL Length of left thin part
12069         #
12070         #  @param theRR Internal radius of right thickness reduction
12071         #  @param theWR Width of right thickness reduction
12072         #  @param theLtransR Length of right transition part
12073         #  @param theLthinR Length of right thin part
12074         #
12075         #  @param theRI Internal radius of incident thickness reduction
12076         #  @param theWI Width of incident thickness reduction
12077         #  @param theLtransI Length of incident transition part
12078         #  @param theLthinI Length of incident thin part
12079         #
12080         #  @param theName Object name; when specified, this parameter is used
12081         #         for result publication in the study. Otherwise, if automatic
12082         #         publication is switched on, default value is used for result name.
12083         #
12084         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12085         #
12086         #  @ref tui_creation_pipetshape "Example"
12087         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12088                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12089                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12090                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12091                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12092                                   theName=None):
12093             """
12094             Create a T-shape object with fillet and with specified caracteristics for the main
12095             and the incident pipes (radius, width, half-length). The fillet is
12096             created on the junction of the pipes.
12097             The extremities of the main pipe are located on junctions points P1 and P2.
12098             The extremity of the incident pipe is located on junction point P3.
12099
12100             Parameters:
12101                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12102                 the main plane of the T-shape is XOY.
12103                 theR1 Internal radius of main pipe
12104                 theW1 Width of main pipe
12105                 heL1 Half-length of main pipe
12106                 theR2 Internal radius of incident pipe (R2 < R1)
12107                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12108                 theL2 Half-length of incident pipe
12109                 theRF Radius of curvature of fillet.
12110                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12111                 theP1 1st junction point of main pipe
12112                 theP2 2nd junction point of main pipe
12113                 theP3 Junction point of incident pipe
12114
12115                 theRL Internal radius of left thickness reduction
12116                 theWL Width of left thickness reduction
12117                 theLtransL Length of left transition part
12118                 theLthinL Length of left thin part
12119
12120                 theRR Internal radius of right thickness reduction
12121                 theWR Width of right thickness reduction
12122                 theLtransR Length of right transition part
12123                 theLthinR Length of right thin part
12124
12125                 theRI Internal radius of incident thickness reduction
12126                 theWI Width of incident thickness reduction
12127                 theLtransI Length of incident transition part
12128                 theLthinI Length of incident thin part
12129
12130                 theName Object name; when specified, this parameter is used
12131                         for result publication in the study. Otherwise, if automatic
12132                         publication is switched on, default value is used for result name.
12133                 
12134             Returns:
12135                 List of GEOM_Object, containing the created shape and propagation groups.
12136                 
12137             Example of usage:
12138                 # create PipeTShape with fillet object
12139                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12140                 # create PipeTShape with fillet object with position
12141                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12142                 # create PipeTShape with fillet object with left thickness reduction
12143                 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)
12144             """
12145             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)
12146             if (theP1 and theP2 and theP3):
12147               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12148                                                                     theRL, theWL, theLtransL, theLthinL,
12149                                                                     theRR, theWR, theLtransR, theLthinR,
12150                                                                     theRI, theWI, theLtransI, theLthinI,
12151                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12152             else:
12153               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12154                                                         theRL, theWL, theLtransL, theLthinL,
12155                                                         theRR, theWR, theLtransR, theLthinR,
12156                                                         theRI, theWI, theLtransI, theLthinI,
12157                                                         theRF, theHexMesh)
12158             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12159             if Parameters: anObj[0].SetParameters(Parameters)
12160             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12161             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12162             return anObj
12163
12164         ## This function allows creating a disk already divided into blocks. It
12165         #  can be used to create divided pipes for later meshing in hexaedra.
12166         #  @param theR Radius of the disk
12167         #  @param theOrientation Orientation of the plane on which the disk will be built
12168         #         1 = XOY, 2 = OYZ, 3 = OZX
12169         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12170         #  @param theName Object name; when specified, this parameter is used
12171         #         for result publication in the study. Otherwise, if automatic
12172         #         publication is switched on, default value is used for result name.
12173         #
12174         #  @return New GEOM_Object, containing the created shape.
12175         #
12176         #  @ref tui_creation_divideddisk "Example"
12177         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12178             """
12179             Creates a disk, divided into blocks. It can be used to create divided pipes
12180             for later meshing in hexaedra.
12181
12182             Parameters:
12183                 theR Radius of the disk
12184                 theOrientation Orientation of the plane on which the disk will be built:
12185                                1 = XOY, 2 = OYZ, 3 = OZX
12186                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12187                 theName Object name; when specified, this parameter is used
12188                         for result publication in the study. Otherwise, if automatic
12189                         publication is switched on, default value is used for result name.
12190
12191             Returns:
12192                 New GEOM_Object, containing the created shape.
12193             """
12194             theR, Parameters = ParseParameters(theR)
12195             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12196             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12197             if Parameters: anObj.SetParameters(Parameters)
12198             self._autoPublish(anObj, theName, "dividedDisk")
12199             return anObj
12200             
12201         ## This function allows creating a disk already divided into blocks. It
12202         #  can be used to create divided pipes for later meshing in hexaedra.
12203         #  @param theCenter Center of the disk
12204         #  @param theVector Normal vector to the plane of the created disk
12205         #  @param theRadius Radius of the disk
12206         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12207         #  @param theName Object name; when specified, this parameter is used
12208         #         for result publication in the study. Otherwise, if automatic
12209         #         publication is switched on, default value is used for result name.
12210         #
12211         #  @return New GEOM_Object, containing the created shape.
12212         #
12213         #  @ref tui_creation_divideddisk "Example"
12214         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12215             """
12216             Creates a disk already divided into blocks. It can be used to create divided pipes
12217             for later meshing in hexaedra.
12218
12219             Parameters:
12220                 theCenter Center of the disk
12221                 theVector Normal vector to the plane of the created disk
12222                 theRadius Radius of the disk
12223                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12224                 theName Object name; when specified, this parameter is used
12225                         for result publication in the study. Otherwise, if automatic
12226                         publication is switched on, default value is used for result name.
12227
12228             Returns:
12229                 New GEOM_Object, containing the created shape.
12230             """
12231             theRadius, Parameters = ParseParameters(theRadius)
12232             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12233             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12234             if Parameters: anObj.SetParameters(Parameters)
12235             self._autoPublish(anObj, theName, "dividedDisk")
12236             return anObj
12237
12238         ## Builds a cylinder prepared for hexa meshes
12239         #  @param theR Radius of the cylinder
12240         #  @param theH Height of the cylinder
12241         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12242         #  @param theName Object name; when specified, this parameter is used
12243         #         for result publication in the study. Otherwise, if automatic
12244         #         publication is switched on, default value is used for result name.
12245         #
12246         #  @return New GEOM_Object, containing the created shape.
12247         #
12248         #  @ref tui_creation_dividedcylinder "Example"
12249         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12250             """
12251             Builds a cylinder prepared for hexa meshes
12252
12253             Parameters:
12254                 theR Radius of the cylinder
12255                 theH Height of the cylinder
12256                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12257                 theName Object name; when specified, this parameter is used
12258                         for result publication in the study. Otherwise, if automatic
12259                         publication is switched on, default value is used for result name.
12260
12261             Returns:
12262                 New GEOM_Object, containing the created shape.
12263             """
12264             theR, theH, Parameters = ParseParameters(theR, theH)
12265             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12266             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12267             if Parameters: anObj.SetParameters(Parameters)
12268             self._autoPublish(anObj, theName, "dividedCylinder")
12269             return anObj
12270
12271         ## Create a surface from a cloud of points
12272         #  @param thelPoints list of points
12273         #  @return New GEOM_Object, containing the created shape.
12274         #
12275         #  @ref tui_creation_smoothingsurface "Example"
12276         def MakeSmoothingSurface(self, thelPoints):
12277             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12278             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12279             return anObj
12280
12281         #@@ insert new functions before this line @@ do not remove this line @@#
12282
12283         # end of l4_advanced
12284         ## @}
12285
12286         ## Create a copy of the given object
12287         #
12288         #  @param theOriginal geometry object for copy
12289         #  @param theName Object name; when specified, this parameter is used
12290         #         for result publication in the study. Otherwise, if automatic
12291         #         publication is switched on, default value is used for result name.
12292         #
12293         #  @return New GEOM_Object, containing the copied shape.
12294         #
12295         #  @ingroup l1_geomBuilder_auxiliary
12296         #  @ref swig_MakeCopy "Example"
12297         def MakeCopy(self, theOriginal, theName=None):
12298             """
12299             Create a copy of the given object
12300
12301             Parameters:
12302                 theOriginal geometry object for copy
12303                 theName Object name; when specified, this parameter is used
12304                         for result publication in the study. Otherwise, if automatic
12305                         publication is switched on, default value is used for result name.
12306
12307             Returns:
12308                 New GEOM_Object, containing the copied shape.
12309
12310             Example of usage: Copy = geompy.MakeCopy(Box)
12311             """
12312             # Example: see GEOM_TestAll.py
12313             anObj = self.InsertOp.MakeCopy(theOriginal)
12314             RaiseIfFailed("MakeCopy", self.InsertOp)
12315             self._autoPublish(anObj, theName, "copy")
12316             return anObj
12317
12318         ## Add Path to load python scripts from
12319         #  @param Path a path to load python scripts from
12320         #  @ingroup l1_geomBuilder_auxiliary
12321         def addPath(self,Path):
12322             """
12323             Add Path to load python scripts from
12324
12325             Parameters:
12326                 Path a path to load python scripts from
12327             """
12328             if (sys.path.count(Path) < 1):
12329                 sys.path.append(Path)
12330                 pass
12331             pass
12332
12333         ## Load marker texture from the file
12334         #  @param Path a path to the texture file
12335         #  @return unique texture identifier
12336         #  @ingroup l1_geomBuilder_auxiliary
12337         def LoadTexture(self, Path):
12338             """
12339             Load marker texture from the file
12340             
12341             Parameters:
12342                 Path a path to the texture file
12343                 
12344             Returns:
12345                 unique texture identifier
12346             """
12347             # Example: see GEOM_TestAll.py
12348             ID = self.InsertOp.LoadTexture(Path)
12349             RaiseIfFailed("LoadTexture", self.InsertOp)
12350             return ID
12351
12352         ## Get internal name of the object based on its study entry
12353         #  @note This method does not provide an unique identifier of the geometry object.
12354         #  @note This is internal function of GEOM component, though it can be used outside it for 
12355         #  appropriate reason (e.g. for identification of geometry object).
12356         #  @param obj geometry object
12357         #  @return unique object identifier
12358         #  @ingroup l1_geomBuilder_auxiliary
12359         def getObjectID(self, obj):
12360             """
12361             Get internal name of the object based on its study entry.
12362             Note: this method does not provide an unique identifier of the geometry object.
12363             It is an internal function of GEOM component, though it can be used outside GEOM for 
12364             appropriate reason (e.g. for identification of geometry object).
12365
12366             Parameters:
12367                 obj geometry object
12368
12369             Returns:
12370                 unique object identifier
12371             """
12372             ID = ""
12373             entry = salome.ObjectToID(obj)
12374             if entry is not None:
12375                 lst = entry.split(":")
12376                 if len(lst) > 0:
12377                     ID = lst[-1] # -1 means last item in the list            
12378                     return "GEOM_" + ID
12379             return ID
12380                 
12381             
12382
12383         ## Add marker texture. @a Width and @a Height parameters
12384         #  specify width and height of the texture in pixels.
12385         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12386         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12387         #  parameter should be unpacked string, in which '1' symbols represent opaque
12388         #  pixels and '0' represent transparent pixels of the texture bitmap.
12389         #
12390         #  @param Width texture width in pixels
12391         #  @param Height texture height in pixels
12392         #  @param Texture texture data
12393         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12394         #  @return unique texture identifier
12395         #  @ingroup l1_geomBuilder_auxiliary
12396         def AddTexture(self, Width, Height, Texture, RowData=False):
12397             """
12398             Add marker texture. Width and Height parameters
12399             specify width and height of the texture in pixels.
12400             If RowData is True, Texture parameter should represent texture data
12401             packed into the byte array. If RowData is False (default), Texture
12402             parameter should be unpacked string, in which '1' symbols represent opaque
12403             pixels and '0' represent transparent pixels of the texture bitmap.
12404
12405             Parameters:
12406                 Width texture width in pixels
12407                 Height texture height in pixels
12408                 Texture texture data
12409                 RowData if True, Texture data are packed in the byte stream
12410
12411             Returns:
12412                 return unique texture identifier
12413             """
12414             if not RowData: Texture = PackData(Texture)
12415             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12416             RaiseIfFailed("AddTexture", self.InsertOp)
12417             return ID
12418
12419         ## Creates a new folder object. It is a container for any GEOM objects.
12420         #  @param Name name of the container
12421         #  @param Father parent object. If None, 
12422         #         folder under 'Geometry' root object will be created.
12423         #  @return a new created folder
12424         def NewFolder(self, Name, Father=None):
12425             """
12426             Create a new folder object. It is an auxiliary container for any GEOM objects.
12427             
12428             Parameters:
12429                 Name name of the container
12430                 Father parent object. If None, 
12431                 folder under 'Geometry' root object will be created.
12432             
12433             Returns:
12434                 a new created folder
12435             """
12436             if not Father: Father = self.father
12437             return self.CreateFolder(Name, Father)
12438
12439         ## Move object to the specified folder
12440         #  @param Object object to move
12441         #  @param Folder target folder
12442         def PutToFolder(self, Object, Folder):
12443             """
12444             Move object to the specified folder
12445             
12446             Parameters:
12447                 Object object to move
12448                 Folder target folder
12449             """
12450             self.MoveToFolder(Object, Folder)
12451             pass
12452
12453         ## Move list of objects to the specified folder
12454         #  @param ListOfSO list of objects to move
12455         #  @param Folder target folder
12456         def PutListToFolder(self, ListOfSO, Folder):
12457             """
12458             Move list of objects to the specified folder
12459             
12460             Parameters:
12461                 ListOfSO list of objects to move
12462                 Folder target folder
12463             """
12464             self.MoveListToFolder(ListOfSO, Folder)
12465             pass
12466
12467 import omniORB
12468 # Register the new proxy for GEOM_Gen
12469 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12470
12471 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12472 #  interface to GEOM operations.
12473 #
12474 #  Typical use is:
12475 #  \code
12476 #    import salome
12477 #    salome.salome_init()
12478 #    from salome.geom import geomBuilder
12479 #    geompy = geomBuilder.New(salome.myStudy)
12480 #  \endcode
12481 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12482 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12483 #  @return geomBuilder instance
12484 def New( study, instance=None):
12485     """
12486     Create a new geomBuilder instance.The geomBuilder class provides the Python
12487     interface to GEOM operations.
12488
12489     Typical use is:
12490         import salome
12491         salome.salome_init()
12492         from salome.geom import geomBuilder
12493         geompy = geomBuilder.New(salome.myStudy)
12494
12495     Parameters:
12496         study     SALOME study, generally obtained by salome.myStudy.
12497         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12498     Returns:
12499         geomBuilder instance
12500     """
12501     #print "New geomBuilder ", study, instance
12502     global engine
12503     global geom
12504     global doLcc
12505     engine = instance
12506     if engine is None:
12507       doLcc = True
12508     geom = geomBuilder()
12509     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12510     geom.init_geom(study)
12511     return geom