]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
0022227: [CEA 827] Building a surface from a cloud of points
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup l1_publish_data Publishing results in SALOME study
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ## 
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ## 
50 ## For example, consider the following Python script:
51 ## 
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ## 
60 ## Last two lines can be replaced by one-line instruction:
61 ## 
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ## 
66 ## ... or simply
67 ## 
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ## 
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Not that some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## @}
148
149
150 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
151
152 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
153 ## @{
154 ##   @defgroup l2_import_export Importing/exporting geometrical objects
155 ##   @defgroup l2_creating      Creating geometrical objects
156 ##   @{
157 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
158 ##     @{
159 ##       @defgroup l4_curves        Creating Curves
160
161 ##     @}
162 ##     @defgroup l3_3d_primitives Creating 3D Primitives
163 ##     @defgroup l3_complex       Creating Complex Objects
164 ##     @defgroup l3_groups        Working with groups
165 ##     @defgroup l3_blocks        Building by blocks
166 ##     @{
167 ##       @defgroup l4_blocks_measure Check and Improve
168
169 ##     @}
170 ##     @defgroup l3_sketcher      Sketcher
171 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
172 ##     @{
173 ##       @defgroup l4_decompose     Decompose objects
174 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
175 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
176 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
177 ##       @defgroup l4_advanced      Advanced objects creation functions
178
179 ##     @}
180
181 ##   @}
182 ##   @defgroup l2_transforming  Transforming geometrical objects
183 ##   @{
184 ##     @defgroup l3_basic_op      Basic Operations
185 ##     @defgroup l3_boolean       Boolean Operations
186 ##     @defgroup l3_transform     Transformation Operations
187 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
188 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
189 ##     @defgroup l3_blocks_op     Blocks Operations
190 ##     @defgroup l3_healing       Repairing Operations
191 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
192
193 ##   @}
194 ##   @defgroup l2_measure       Using measurement tools
195
196 ## @}
197
198 # initialize SALOME session in try/except block
199 # to avoid problems in some cases, e.g. when generating documentation
200 try:
201     import salome
202     salome.salome_init()
203     from salome import *
204 except:
205     pass
206
207 from salome_notebook import *
208
209 import GEOM
210 import math
211 import os
212
213 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
214
215 # service function
216 def _toListOfNames(_names, _size=-1):
217     l = []
218     import types
219     if type(_names) in [types.ListType, types.TupleType]:
220         for i in _names: l.append(i)
221     elif _names:
222         l.append(_names)
223     if l and len(l) < _size:
224         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
225     return l
226
227 ## Raise an Error, containing the Method_name, if Operation is Failed
228 ## @ingroup l1_geomBuilder_auxiliary
229 def RaiseIfFailed (Method_name, Operation):
230     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
231         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
232
233 ## Return list of variables value from salome notebook
234 ## @ingroup l1_geomBuilder_auxiliary
235 def ParseParameters(*parameters):
236     Result = []
237     StringResult = []
238     for parameter in parameters:
239         if isinstance(parameter, list):
240             lResults = ParseParameters(*parameter)
241             if len(lResults) > 0:
242                 Result.append(lResults[:-1])
243                 StringResult += lResults[-1].split(":")
244                 pass
245             pass
246         else:
247             if isinstance(parameter,str):
248                 if notebook.isVariable(parameter):
249                     Result.append(notebook.get(parameter))
250                 else:
251                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
252                 pass
253             else:
254                 Result.append(parameter)
255                 pass
256             StringResult.append(str(parameter))
257             pass
258         pass
259     if Result:
260         Result.append(":".join(StringResult))
261     else:
262         Result = ":".join(StringResult)
263     return Result
264
265 ## Return list of variables value from salome notebook
266 ## @ingroup l1_geomBuilder_auxiliary
267 def ParseList(list):
268     Result = []
269     StringResult = ""
270     for parameter in list:
271         if isinstance(parameter,str) and notebook.isVariable(parameter):
272             Result.append(str(notebook.get(parameter)))
273             pass
274         else:
275             Result.append(str(parameter))
276             pass
277
278         StringResult = StringResult + str(parameter)
279         StringResult = StringResult + ":"
280         pass
281     StringResult = StringResult[:len(StringResult)-1]
282     return Result, StringResult
283
284 ## Return list of variables value from salome notebook
285 ## @ingroup l1_geomBuilder_auxiliary
286 def ParseSketcherCommand(command):
287     Result = ""
288     StringResult = ""
289     sections = command.split(":")
290     for section in sections:
291         parameters = section.split(" ")
292         paramIndex = 1
293         for parameter in parameters:
294             if paramIndex > 1 and parameter.find("'") != -1:
295                 parameter = parameter.replace("'","")
296                 if notebook.isVariable(parameter):
297                     Result = Result + str(notebook.get(parameter)) + " "
298                     pass
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                     pass
302                 pass
303             else:
304                 Result = Result + str(parameter) + " "
305                 pass
306             if paramIndex > 1:
307                 StringResult = StringResult + parameter
308                 StringResult = StringResult + ":"
309                 pass
310             paramIndex = paramIndex + 1
311             pass
312         Result = Result[:len(Result)-1] + ":"
313         pass
314     Result = Result[:len(Result)-1]
315     return Result, StringResult
316
317 ## Helper function which can be used to pack the passed string to the byte data.
318 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
319 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
320 ## For example,
321 ## \code
322 ## val = PackData("10001110") # val = 0xAE
323 ## val = PackData("1")        # val = 0x80
324 ## \endcode
325 ## @param data unpacked data - a string containing '1' and '0' symbols
326 ## @return data packed to the byte stream
327 ## @ingroup l1_geomBuilder_auxiliary
328 def PackData(data):
329     """
330     Helper function which can be used to pack the passed string to the byte data.
331     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
332     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
333
334     Parameters:
335         data unpacked data - a string containing '1' and '0' symbols
336
337     Returns:
338         data packed to the byte stream
339         
340     Example of usage:
341         val = PackData("10001110") # val = 0xAE
342         val = PackData("1")        # val = 0x80
343     """
344     bytes = len(data)/8
345     if len(data)%8: bytes += 1
346     res = ""
347     for b in range(bytes):
348         d = data[b*8:(b+1)*8]
349         val = 0
350         for i in range(8):
351             val *= 2
352             if i < len(d):
353                 if d[i] == "1": val += 1
354                 elif d[i] != "0":
355                     raise "Invalid symbol %s" % d[i]
356                 pass
357             pass
358         res += chr(val)
359         pass
360     return res
361
362 ## Read bitmap texture from the text file.
363 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
364 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
365 ## The function returns width and height of the pixmap in pixels and byte stream representing
366 ## texture bitmap itself.
367 ##
368 ## This function can be used to read the texture to the byte stream in order to pass it to
369 ## the AddTexture() function of geomBuilder class.
370 ## For example,
371 ## \code
372 ## from salome.geom import geomBuilder
373 ## geompy = geomBuilder.New(salome.myStudy)
374 ## texture = geompy.readtexture('mytexture.dat')
375 ## texture = geompy.AddTexture(*texture)
376 ## obj.SetMarkerTexture(texture)
377 ## \endcode
378 ## @param fname texture file name
379 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
380 ## @ingroup l1_geomBuilder_auxiliary
381 def ReadTexture(fname):
382     """
383     Read bitmap texture from the text file.
384     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
385     A zero symbol ('0') represents transparent pixel of the texture bitmap.
386     The function returns width and height of the pixmap in pixels and byte stream representing
387     texture bitmap itself.
388     This function can be used to read the texture to the byte stream in order to pass it to
389     the AddTexture() function of geomBuilder class.
390     
391     Parameters:
392         fname texture file name
393
394     Returns:
395         sequence of tree values: texture's width, height in pixels and its byte stream
396     
397     Example of usage:
398         from salome.geom import geomBuilder
399         geompy = geomBuilder.New(salome.myStudy)
400         texture = geompy.readtexture('mytexture.dat')
401         texture = geompy.AddTexture(*texture)
402         obj.SetMarkerTexture(texture)
403     """
404     try:
405         f = open(fname)
406         lines = [ l.strip() for l in f.readlines()]
407         f.close()
408         maxlen = 0
409         if lines: maxlen = max([len(x) for x in lines])
410         lenbytes = maxlen/8
411         if maxlen%8: lenbytes += 1
412         bytedata=""
413         for line in lines:
414             if len(line)%8:
415                 lenline = (len(line)/8+1)*8
416                 pass
417             else:
418                 lenline = (len(line)/8)*8
419                 pass
420             for i in range(lenline/8):
421                 byte=""
422                 for j in range(8):
423                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
424                     else: byte += "0"
425                     pass
426                 bytedata += PackData(byte)
427                 pass
428             for i in range(lenline/8, lenbytes):
429                 bytedata += PackData("0")
430             pass
431         return lenbytes*8, len(lines), bytedata
432     except:
433         pass
434     return 0, 0, ""
435
436 ## Returns a long value from enumeration type
437 #  Can be used for CORBA enumerator types like GEOM.shape_type
438 #  @param theItem enumeration type
439 #  @ingroup l1_geomBuilder_auxiliary
440 def EnumToLong(theItem):
441     """
442     Returns a long value from enumeration type
443     Can be used for CORBA enumerator types like geomBuilder.ShapeType
444
445     Parameters:
446         theItem enumeration type
447     """
448     ret = theItem
449     if hasattr(theItem, "_v"): ret = theItem._v
450     return ret
451
452 ## Information about closed/unclosed state of shell or wire
453 #  @ingroup l1_geomBuilder_auxiliary
454 class info:
455     """
456     Information about closed/unclosed state of shell or wire
457     """
458     UNKNOWN  = 0
459     CLOSED   = 1
460     UNCLOSED = 2
461
462 # Warning: geom is a singleton
463 geom = None
464 engine = None
465 doLcc = False
466 created = False
467
468 class geomBuilder(object, GEOM._objref_GEOM_Gen):
469
470         ## Enumeration ShapeType as a dictionary. \n
471         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
472         #  @ingroup l1_geomBuilder_auxiliary
473         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
474
475         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
476         #  and a list of parameters, describing the shape.
477         #  List of parameters, describing the shape:
478         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
479         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
480         #
481         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
482         #
483         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
484         #
485         #  - SPHERE:       [xc yc zc            R]
486         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
487         #  - BOX:          [xc yc zc                      ax ay az]
488         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
489         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
490         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
491         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
492         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
493         #
494         #  - SPHERE2D:     [xc yc zc            R]
495         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
496         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
497         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
498         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
499         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
500         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
501         #  - PLANE:        [xo yo zo  dx dy dz]
502         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
503         #  - FACE:                                       [nb_edges  nb_vertices]
504         #
505         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
506         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
507         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
508         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
509         #  - LINE:         [xo yo zo  dx dy dz]
510         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
511         #  - EDGE:                                                 [nb_vertices]
512         #
513         #  - VERTEX:       [x  y  z]
514         #  @ingroup l1_geomBuilder_auxiliary
515         kind = GEOM.GEOM_IKindOfShape
516
517         def __new__(cls):
518             global engine
519             global geom
520             global doLcc
521             global created
522             #print "==== __new__ ", engine, geom, doLcc, created
523             if geom is None:
524                 # geom engine is either retrieved from engine, or created
525                 geom = engine
526                 # Following test avoids a recursive loop
527                 if doLcc:
528                     if geom is not None:
529                         # geom engine not created: existing engine found
530                         doLcc = False
531                     if doLcc and not created:
532                         doLcc = False
533                         # FindOrLoadComponent called:
534                         # 1. CORBA resolution of server
535                         # 2. the __new__ method is called again
536                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
537                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
538                         #print "====1 ",geom
539                 else:
540                     # FindOrLoadComponent not called
541                     if geom is None:
542                         # geomBuilder instance is created from lcc.FindOrLoadComponent
543                         #print "==== super ", engine, geom, doLcc, created
544                         geom = super(geomBuilder,cls).__new__(cls)
545                         #print "====2 ",geom
546                     else:
547                         # geom engine not created: existing engine found
548                         #print "==== existing ", engine, geom, doLcc, created
549                         pass
550                 #print "return geom 1 ", geom
551                 return geom
552
553             #print "return geom 2 ", geom
554             return geom
555
556         def __init__(self):
557             global created
558             #print "-------- geomBuilder __init__ --- ", created, self
559             if not created:
560               created = True
561               GEOM._objref_GEOM_Gen.__init__(self)
562               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
563               self.myBuilder = None
564               self.myStudyId = 0
565               self.father    = None
566
567               self.BasicOp  = None
568               self.CurvesOp = None
569               self.PrimOp   = None
570               self.ShapesOp = None
571               self.HealOp   = None
572               self.InsertOp = None
573               self.BoolOp   = None
574               self.TrsfOp   = None
575               self.LocalOp  = None
576               self.MeasuOp  = None
577               self.BlocksOp = None
578               self.GroupOp  = None
579               self.AdvOp    = None
580             pass
581
582         ## Process object publication in the study, as follows:
583         #  - if @a theName is specified (not None), the object is published in the study
584         #    with this name, not taking into account "auto-publishing" option;
585         #  - if @a theName is NOT specified, the object is published in the study
586         #    (using default name, which can be customized using @a theDefaultName parameter)
587         #    only if auto-publishing is switched on.
588         #
589         #  @param theObj  object, a subject for publishing
590         #  @param theName object name for study
591         #  @param theDefaultName default name for the auto-publishing
592         #
593         #  @sa addToStudyAuto()
594         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
595             # ---
596             def _item_name(_names, _defname, _idx=-1):
597                 if not _names: _names = _defname
598                 if type(_names) in [types.ListType, types.TupleType]:
599                     if _idx >= 0:
600                         if _idx >= len(_names) or not _names[_idx]:
601                             if type(_defname) not in [types.ListType, types.TupleType]:
602                                 _name = "%s_%d"%(_defname, _idx+1)
603                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
604                                 _name = _defname[_idx]
605                             else:
606                                 _name = "%noname_%d"%(dn, _idx+1)
607                             pass
608                         else:
609                             _name = _names[_idx]
610                         pass
611                     else:
612                         # must be wrong  usage
613                         _name = _names[0]
614                     pass
615                 else:
616                     if _idx >= 0:
617                         _name = "%s_%d"%(_names, _idx+1)
618                     else:
619                         _name = _names
620                     pass
621                 return _name
622             # ---
623             if not theObj:
624                 return # null object
625             if not theName and not self.myMaxNbSubShapesAllowed:
626                 return # nothing to do: auto-publishing is disabled
627             if not theName and not theDefaultName:
628                 return # neither theName nor theDefaultName is given
629             import types
630             if type(theObj) in [types.ListType, types.TupleType]:
631                 # list of objects is being published
632                 idx = 0
633                 for obj in theObj:
634                     if not obj: continue # bad object
635                     ###if obj.GetStudyEntry(): continue # already published
636                     name = _item_name(theName, theDefaultName, idx)
637                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
638                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
639                     else:
640                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
641                         pass
642                     idx = idx+1
643                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
644                     pass
645                 pass
646             else:
647                 # single object is published
648                 ###if theObj.GetStudyEntry(): return # already published
649                 name = _item_name(theName, theDefaultName)
650                 if theObj.IsMainShape():
651                     self.addToStudy(theObj, name)
652                 else:
653                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
654                     pass
655                 pass
656             pass
657
658         ## @addtogroup l1_geomBuilder_auxiliary
659         ## @{
660         def init_geom(self,theStudy):
661             self.myStudy = theStudy
662             self.myStudyId = self.myStudy._get_StudyId()
663             self.myBuilder = self.myStudy.NewBuilder()
664             self.father = self.myStudy.FindComponent("GEOM")
665             if self.father is None:
666                 self.father = self.myBuilder.NewComponent("GEOM")
667                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
668                 FName = A1._narrow(SALOMEDS.AttributeName)
669                 FName.SetValue("Geometry")
670                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
671                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
672                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
673                 self.myBuilder.DefineComponentInstance(self.father,self)
674                 pass
675             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
676             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
677             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
678             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
679             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
680             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
681             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
682             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
683             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
684             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
685             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
686             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
687             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
688             # set GEOM as root in the use case tree
689             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
690             self.myUseCaseBuilder.SetRootCurrent()
691             self.myUseCaseBuilder.Append(self.father)
692             pass
693
694         ## Enable / disable results auto-publishing
695         # 
696         #  The automatic publishing is managed in the following way:
697         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
698         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
699         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
700         #  value passed as parameter has the same effect.
701         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
702         #  maximum number of sub-shapes allowed for publishing is set to specified value.
703         #
704         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
705         #  @ingroup l1_publish_data
706         def addToStudyAuto(self, maxNbSubShapes=-1):
707             """
708             Enable / disable results auto-publishing
709
710             The automatic publishing is managed in the following way:
711             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
712             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
713             maximum number of sub-shapes allowed for publishing is unlimited; any negative
714             value passed as parameter has the same effect.
715             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
716             maximum number of sub-shapes allowed for publishing is set to this value.
717
718             Parameters:
719                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
720
721             Example of usage:
722                 geompy.addToStudyAuto()   # enable auto-publishing
723                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
724                 geompy.addToStudyAuto(0)  # disable auto-publishing
725             """
726             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
727             pass
728
729         ## Dump component to the Python script
730         #  This method overrides IDL function to allow default values for the parameters.
731         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
732             """
733             Dump component to the Python script
734             This method overrides IDL function to allow default values for the parameters.
735             """
736             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
737
738         ## Get name for sub-shape aSubObj of shape aMainObj
739         #
740         # @ref swig_SubShapeName "Example"
741         def SubShapeName(self,aSubObj, aMainObj):
742             """
743             Get name for sub-shape aSubObj of shape aMainObj
744             """
745             # Example: see GEOM_TestAll.py
746
747             #aSubId  = orb.object_to_string(aSubObj)
748             #aMainId = orb.object_to_string(aMainObj)
749             #index = gg.getIndexTopology(aSubId, aMainId)
750             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
751             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
752             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
753             return name
754
755         ## Publish in study aShape with name aName
756         #
757         #  \param aShape the shape to be published
758         #  \param aName  the name for the shape
759         #  \param doRestoreSubShapes if True, finds and publishes also
760         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
761         #         and published sub-shapes of arguments
762         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
763         #                                                  these arguments description
764         #  \return study entry of the published shape in form of string
765         #
766         #  @ingroup l1_publish_data
767         #  @ref swig_all_addtostudy "Example"
768         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
769                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
770             """
771             Publish in study aShape with name aName
772
773             Parameters:
774                 aShape the shape to be published
775                 aName  the name for the shape
776                 doRestoreSubShapes if True, finds and publishes also
777                                    sub-shapes of aShape, corresponding to its arguments
778                                    and published sub-shapes of arguments
779                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
780                                                          these arguments description
781
782             Returns:
783                 study entry of the published shape in form of string
784
785             Example of usage:
786                 id_block1 = geompy.addToStudy(Block1, "Block 1")
787             """
788             # Example: see GEOM_TestAll.py
789             try:
790                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
791                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
792                 if doRestoreSubShapes:
793                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
794                                             theFindMethod, theInheritFirstArg, True )
795             except:
796                 print "addToStudy() failed"
797                 return ""
798             return aShape.GetStudyEntry()
799
800         ## Publish in study aShape with name aName as sub-object of previously published aFather
801         #  \param aFather previously published object
802         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
803         #  \param aName  the name for the shape
804         #
805         #  \return study entry of the published shape in form of string
806         #
807         #  @ingroup l1_publish_data
808         #  @ref swig_all_addtostudyInFather "Example"
809         def addToStudyInFather(self, aFather, aShape, aName):
810             """
811             Publish in study aShape with name aName as sub-object of previously published aFather
812
813             Parameters:
814                 aFather previously published object
815                 aShape the shape to be published as sub-object of aFather
816                 aName  the name for the shape
817
818             Returns:
819                 study entry of the published shape in form of string
820             """
821             # Example: see GEOM_TestAll.py
822             try:
823                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
824                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
825             except:
826                 print "addToStudyInFather() failed"
827                 return ""
828             return aShape.GetStudyEntry()
829
830         ## Unpublish object in study
831         #
832         #  \param obj the object to be unpublished
833         def hideInStudy(self, obj):
834             """
835             Unpublish object in study
836
837             Parameters:
838                 obj the object to be unpublished
839             """
840             ior = salome.orb.object_to_string(obj)
841             aSObject = self.myStudy.FindObjectIOR(ior)
842             if aSObject is not None:
843                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
844                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
845                 drwAttribute.SetDrawable(False)
846                 pass
847
848         # end of l1_geomBuilder_auxiliary
849         ## @}
850
851         ## @addtogroup l3_restore_ss
852         ## @{
853
854         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
855         #  To be used from python scripts out of addToStudy() (non-default usage)
856         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
857         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
858         #                   If this list is empty, all operation arguments will be published
859         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
860         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
861         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
862         #                            Do not publish sub-shapes in place of arguments, but only
863         #                            in place of sub-shapes of the first argument,
864         #                            because the whole shape corresponds to the first argument.
865         #                            Mainly to be used after transformations, but it also can be
866         #                            usefull after partition with one object shape, and some other
867         #                            operations, where only the first argument has to be considered.
868         #                            If theObject has only one argument shape, this flag is automatically
869         #                            considered as True, not regarding really passed value.
870         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
871         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
872         #  \return list of published sub-shapes
873         #
874         #  @ref tui_restore_prs_params "Example"
875         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
876                               theInheritFirstArg=False, theAddPrefix=True):
877             """
878             Publish sub-shapes, standing for arguments and sub-shapes of arguments
879             To be used from python scripts out of geompy.addToStudy (non-default usage)
880
881             Parameters:
882                 theObject published GEOM.GEOM_Object, arguments of which will be published
883                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
884                           If this list is empty, all operation arguments will be published
885                 theFindMethod method to search sub-shapes, corresponding to arguments and
886                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
887                 theInheritFirstArg set properties of the first argument for theObject.
888                                    Do not publish sub-shapes in place of arguments, but only
889                                    in place of sub-shapes of the first argument,
890                                    because the whole shape corresponds to the first argument.
891                                    Mainly to be used after transformations, but it also can be
892                                    usefull after partition with one object shape, and some other
893                                    operations, where only the first argument has to be considered.
894                                    If theObject has only one argument shape, this flag is automatically
895                                    considered as True, not regarding really passed value.
896                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
897                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
898             Returns:
899                 list of published sub-shapes
900             """
901             # Example: see GEOM_TestAll.py
902             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
903                                           theFindMethod, theInheritFirstArg, theAddPrefix)
904
905         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
906         #  To be used from python scripts out of addToStudy() (non-default usage)
907         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
908         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
909         #                   If this list is empty, all operation arguments will be published
910         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
911         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
912         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
913         #                            Do not publish sub-shapes in place of arguments, but only
914         #                            in place of sub-shapes of the first argument,
915         #                            because the whole shape corresponds to the first argument.
916         #                            Mainly to be used after transformations, but it also can be
917         #                            usefull after partition with one object shape, and some other
918         #                            operations, where only the first argument has to be considered.
919         #                            If theObject has only one argument shape, this flag is automatically
920         #                            considered as True, not regarding really passed value.
921         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
922         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
923         #  \return list of published sub-shapes
924         #
925         #  @ref tui_restore_prs_params "Example"
926         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
927                                    theInheritFirstArg=False, theAddPrefix=True):
928             """
929             Publish sub-shapes, standing for arguments and sub-shapes of arguments
930             To be used from python scripts out of geompy.addToStudy() (non-default usage)
931
932             Parameters:
933                 theObject published GEOM.GEOM_Object, arguments of which will be published
934                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
935                           If this list is empty, all operation arguments will be published
936                 theFindMethod method to search sub-shapes, corresponding to arguments and
937                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
938                 theInheritFirstArg set properties of the first argument for theObject.
939                                    Do not publish sub-shapes in place of arguments, but only
940                                    in place of sub-shapes of the first argument,
941                                    because the whole shape corresponds to the first argument.
942                                    Mainly to be used after transformations, but it also can be
943                                    usefull after partition with one object shape, and some other
944                                    operations, where only the first argument has to be considered.
945                                    If theObject has only one argument shape, this flag is automatically
946                                    considered as True, not regarding really passed value.
947                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
948                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
949
950             Returns: 
951                 list of published sub-shapes
952             """
953             # Example: see GEOM_TestAll.py
954             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
955                                                theFindMethod, theInheritFirstArg, theAddPrefix)
956
957         # end of l3_restore_ss
958         ## @}
959
960         ## @addtogroup l3_basic_go
961         ## @{
962
963         ## Create point by three coordinates.
964         #  @param theX The X coordinate of the point.
965         #  @param theY The Y coordinate of the point.
966         #  @param theZ The Z coordinate of the point.
967         #  @param theName Object name; when specified, this parameter is used
968         #         for result publication in the study. Otherwise, if automatic
969         #         publication is switched on, default value is used for result name.
970         #
971         #  @return New GEOM.GEOM_Object, containing the created point.
972         #
973         #  @ref tui_creation_point "Example"
974         def MakeVertex(self, theX, theY, theZ, theName=None):
975             """
976             Create point by three coordinates.
977
978             Parameters:
979                 theX The X coordinate of the point.
980                 theY The Y coordinate of the point.
981                 theZ The Z coordinate of the point.
982                 theName Object name; when specified, this parameter is used
983                         for result publication in the study. Otherwise, if automatic
984                         publication is switched on, default value is used for result name.
985                 
986             Returns: 
987                 New GEOM.GEOM_Object, containing the created point.
988             """
989             # Example: see GEOM_TestAll.py
990             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
991             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
992             RaiseIfFailed("MakePointXYZ", self.BasicOp)
993             anObj.SetParameters(Parameters)
994             self._autoPublish(anObj, theName, "vertex")
995             return anObj
996
997         ## Create a point, distant from the referenced point
998         #  on the given distances along the coordinate axes.
999         #  @param theReference The referenced point.
1000         #  @param theX Displacement from the referenced point along OX axis.
1001         #  @param theY Displacement from the referenced point along OY axis.
1002         #  @param theZ Displacement from the referenced point along OZ axis.
1003         #  @param theName Object name; when specified, this parameter is used
1004         #         for result publication in the study. Otherwise, if automatic
1005         #         publication is switched on, default value is used for result name.
1006         #
1007         #  @return New GEOM.GEOM_Object, containing the created point.
1008         #
1009         #  @ref tui_creation_point "Example"
1010         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1011             """
1012             Create a point, distant from the referenced point
1013             on the given distances along the coordinate axes.
1014
1015             Parameters:
1016                 theReference The referenced point.
1017                 theX Displacement from the referenced point along OX axis.
1018                 theY Displacement from the referenced point along OY axis.
1019                 theZ Displacement from the referenced point along OZ axis.
1020                 theName Object name; when specified, this parameter is used
1021                         for result publication in the study. Otherwise, if automatic
1022                         publication is switched on, default value is used for result name.
1023
1024             Returns:
1025                 New GEOM.GEOM_Object, containing the created point.
1026             """
1027             # Example: see GEOM_TestAll.py
1028             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1029             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1030             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1031             anObj.SetParameters(Parameters)
1032             self._autoPublish(anObj, theName, "vertex")
1033             return anObj
1034
1035         ## Create a point, corresponding to the given parameter on the given curve.
1036         #  @param theRefCurve The referenced curve.
1037         #  @param theParameter Value of parameter on the referenced curve.
1038         #  @param theName Object name; when specified, this parameter is used
1039         #         for result publication in the study. Otherwise, if automatic
1040         #         publication is switched on, default value is used for result name.
1041         #
1042         #  @return New GEOM.GEOM_Object, containing the created point.
1043         #
1044         #  @ref tui_creation_point "Example"
1045         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1046             """
1047             Create a point, corresponding to the given parameter on the given curve.
1048
1049             Parameters:
1050                 theRefCurve The referenced curve.
1051                 theParameter Value of parameter on the referenced curve.
1052                 theName Object name; when specified, this parameter is used
1053                         for result publication in the study. Otherwise, if automatic
1054                         publication is switched on, default value is used for result name.
1055
1056             Returns:
1057                 New GEOM.GEOM_Object, containing the created point.
1058
1059             Example of usage:
1060                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1061             """
1062             # Example: see GEOM_TestAll.py
1063             theParameter, Parameters = ParseParameters(theParameter)
1064             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1065             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1066             anObj.SetParameters(Parameters)
1067             self._autoPublish(anObj, theName, "vertex")
1068             return anObj
1069
1070         ## Create a point by projection give coordinates on the given curve
1071         #  @param theRefCurve The referenced curve.
1072         #  @param theX X-coordinate in 3D space
1073         #  @param theY Y-coordinate in 3D space
1074         #  @param theZ Z-coordinate in 3D space
1075         #  @param theName Object name; when specified, this parameter is used
1076         #         for result publication in the study. Otherwise, if automatic
1077         #         publication is switched on, default value is used for result name.
1078         #
1079         #  @return New GEOM.GEOM_Object, containing the created point.
1080         #
1081         #  @ref tui_creation_point "Example"
1082         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1083             """
1084             Create a point by projection give coordinates on the given curve
1085             
1086             Parameters:
1087                 theRefCurve The referenced curve.
1088                 theX X-coordinate in 3D space
1089                 theY Y-coordinate in 3D space
1090                 theZ Z-coordinate in 3D space
1091                 theName Object name; when specified, this parameter is used
1092                         for result publication in the study. Otherwise, if automatic
1093                         publication is switched on, default value is used for result name.
1094
1095             Returns:
1096                 New GEOM.GEOM_Object, containing the created point.
1097
1098             Example of usage:
1099                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1100             """
1101             # Example: see GEOM_TestAll.py
1102             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1103             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1104             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1105             anObj.SetParameters(Parameters)
1106             self._autoPublish(anObj, theName, "vertex")
1107             return anObj
1108
1109         ## Create a point, corresponding to the given length on the given curve.
1110         #  @param theRefCurve The referenced curve.
1111         #  @param theLength Length on the referenced curve. It can be negative.
1112         #  @param theStartPoint Point allowing to choose the direction for the calculation
1113         #                       of the length. If None, start from the first point of theRefCurve.
1114         #  @param theName Object name; when specified, this parameter is used
1115         #         for result publication in the study. Otherwise, if automatic
1116         #         publication is switched on, default value is used for result name.
1117         #
1118         #  @return New GEOM.GEOM_Object, containing the created point.
1119         #
1120         #  @ref tui_creation_point "Example"
1121         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1122             """
1123             Create a point, corresponding to the given length on the given curve.
1124
1125             Parameters:
1126                 theRefCurve The referenced curve.
1127                 theLength Length on the referenced curve. It can be negative.
1128                 theStartPoint Point allowing to choose the direction for the calculation
1129                               of the length. If None, start from the first point of theRefCurve.
1130                 theName Object name; when specified, this parameter is used
1131                         for result publication in the study. Otherwise, if automatic
1132                         publication is switched on, default value is used for result name.
1133
1134             Returns:
1135                 New GEOM.GEOM_Object, containing the created point.
1136             """
1137             # Example: see GEOM_TestAll.py
1138             theLength, Parameters = ParseParameters(theLength)
1139             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1140             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1141             anObj.SetParameters(Parameters)
1142             self._autoPublish(anObj, theName, "vertex")
1143             return anObj
1144
1145         ## Create a point, corresponding to the given parameters on the
1146         #    given surface.
1147         #  @param theRefSurf The referenced surface.
1148         #  @param theUParameter Value of U-parameter on the referenced surface.
1149         #  @param theVParameter Value of V-parameter on the referenced surface.
1150         #  @param theName Object name; when specified, this parameter is used
1151         #         for result publication in the study. Otherwise, if automatic
1152         #         publication is switched on, default value is used for result name.
1153         #
1154         #  @return New GEOM.GEOM_Object, containing the created point.
1155         #
1156         #  @ref swig_MakeVertexOnSurface "Example"
1157         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1158             """
1159             Create a point, corresponding to the given parameters on the
1160             given surface.
1161
1162             Parameters:
1163                 theRefSurf The referenced surface.
1164                 theUParameter Value of U-parameter on the referenced surface.
1165                 theVParameter Value of V-parameter on the referenced surface.
1166                 theName Object name; when specified, this parameter is used
1167                         for result publication in the study. Otherwise, if automatic
1168                         publication is switched on, default value is used for result name.
1169
1170             Returns:
1171                 New GEOM.GEOM_Object, containing the created point.
1172
1173             Example of usage:
1174                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1175             """
1176             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1177             # Example: see GEOM_TestAll.py
1178             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1179             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1180             anObj.SetParameters(Parameters);
1181             self._autoPublish(anObj, theName, "vertex")
1182             return anObj
1183
1184         ## Create a point by projection give coordinates on the given surface
1185         #  @param theRefSurf The referenced surface.
1186         #  @param theX X-coordinate in 3D space
1187         #  @param theY Y-coordinate in 3D space
1188         #  @param theZ Z-coordinate in 3D space
1189         #  @param theName Object name; when specified, this parameter is used
1190         #         for result publication in the study. Otherwise, if automatic
1191         #         publication is switched on, default value is used for result name.
1192         #
1193         #  @return New GEOM.GEOM_Object, containing the created point.
1194         #
1195         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1196         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1197             """
1198             Create a point by projection give coordinates on the given surface
1199
1200             Parameters:
1201                 theRefSurf The referenced surface.
1202                 theX X-coordinate in 3D space
1203                 theY Y-coordinate in 3D space
1204                 theZ Z-coordinate in 3D space
1205                 theName Object name; when specified, this parameter is used
1206                         for result publication in the study. Otherwise, if automatic
1207                         publication is switched on, default value is used for result name.
1208
1209             Returns:
1210                 New GEOM.GEOM_Object, containing the created point.
1211
1212             Example of usage:
1213                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1214             """
1215             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1216             # Example: see GEOM_TestAll.py
1217             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1218             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1219             anObj.SetParameters(Parameters);
1220             self._autoPublish(anObj, theName, "vertex")
1221             return anObj
1222
1223         ## Create a point, which lays on the given face.
1224         #  The point will lay in arbitrary place of the face.
1225         #  The only condition on it is a non-zero distance to the face boundary.
1226         #  Such point can be used to uniquely identify the face inside any
1227         #  shape in case, when the shape does not contain overlapped faces.
1228         #  @param theFace The referenced face.
1229         #  @param theName Object name; when specified, this parameter is used
1230         #         for result publication in the study. Otherwise, if automatic
1231         #         publication is switched on, default value is used for result name.
1232         #
1233         #  @return New GEOM.GEOM_Object, containing the created point.
1234         #
1235         #  @ref swig_MakeVertexInsideFace "Example"
1236         def MakeVertexInsideFace (self, theFace, theName=None):
1237             """
1238             Create a point, which lays on the given face.
1239             The point will lay in arbitrary place of the face.
1240             The only condition on it is a non-zero distance to the face boundary.
1241             Such point can be used to uniquely identify the face inside any
1242             shape in case, when the shape does not contain overlapped faces.
1243
1244             Parameters:
1245                 theFace The referenced face.
1246                 theName Object name; when specified, this parameter is used
1247                         for result publication in the study. Otherwise, if automatic
1248                         publication is switched on, default value is used for result name.
1249
1250             Returns:
1251                 New GEOM.GEOM_Object, containing the created point.
1252
1253             Example of usage:
1254                 p_on_face = geompy.MakeVertexInsideFace(Face)
1255             """
1256             # Example: see GEOM_TestAll.py
1257             anObj = self.BasicOp.MakePointOnFace(theFace)
1258             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1259             self._autoPublish(anObj, theName, "vertex")
1260             return anObj
1261
1262         ## Create a point on intersection of two lines.
1263         #  @param theRefLine1, theRefLine2 The referenced lines.
1264         #  @param theName Object name; when specified, this parameter is used
1265         #         for result publication in the study. Otherwise, if automatic
1266         #         publication is switched on, default value is used for result name.
1267         #
1268         #  @return New GEOM.GEOM_Object, containing the created point.
1269         #
1270         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1271         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1272             """
1273             Create a point on intersection of two lines.
1274
1275             Parameters:
1276                 theRefLine1, theRefLine2 The referenced lines.
1277                 theName Object name; when specified, this parameter is used
1278                         for result publication in the study. Otherwise, if automatic
1279                         publication is switched on, default value is used for result name.
1280
1281             Returns:
1282                 New GEOM.GEOM_Object, containing the created point.
1283             """
1284             # Example: see GEOM_TestAll.py
1285             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1286             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1287             self._autoPublish(anObj, theName, "vertex")
1288             return anObj
1289
1290         ## Create a tangent, corresponding to the given parameter on the given curve.
1291         #  @param theRefCurve The referenced curve.
1292         #  @param theParameter Value of parameter on the referenced curve.
1293         #  @param theName Object name; when specified, this parameter is used
1294         #         for result publication in the study. Otherwise, if automatic
1295         #         publication is switched on, default value is used for result name.
1296         #
1297         #  @return New GEOM.GEOM_Object, containing the created tangent.
1298         #
1299         #  @ref swig_MakeTangentOnCurve "Example"
1300         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1301             """
1302             Create a tangent, corresponding to the given parameter on the given curve.
1303
1304             Parameters:
1305                 theRefCurve The referenced curve.
1306                 theParameter Value of parameter on the referenced curve.
1307                 theName Object name; when specified, this parameter is used
1308                         for result publication in the study. Otherwise, if automatic
1309                         publication is switched on, default value is used for result name.
1310
1311             Returns:
1312                 New GEOM.GEOM_Object, containing the created tangent.
1313
1314             Example of usage:
1315                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1316             """
1317             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1318             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1319             self._autoPublish(anObj, theName, "tangent")
1320             return anObj
1321
1322         ## Create a tangent plane, corresponding to the given parameter on the given face.
1323         #  @param theFace The face for which tangent plane should be built.
1324         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1325         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1326         #  @param theTrimSize the size of plane.
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_MakeTangentPlaneOnFace "Example"
1334         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1335             """
1336             Create a tangent plane, corresponding to the given parameter on the given face.
1337
1338             Parameters:
1339                 theFace The face for which tangent plane should be built.
1340                 theParameterV vertical value of the center point (0.0 - 1.0).
1341                 theParameterU horisontal value of the center point (0.0 - 1.0).
1342                 theTrimSize the size of plane.
1343                 theName Object name; when specified, this parameter is used
1344                         for result publication in the study. Otherwise, if automatic
1345                         publication is switched on, default value is used for result name.
1346
1347            Returns: 
1348                 New GEOM.GEOM_Object, containing the created tangent.
1349
1350            Example of usage:
1351                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1352             """
1353             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1354             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1355             self._autoPublish(anObj, theName, "tangent")
1356             return anObj
1357
1358         ## Create a vector with the given components.
1359         #  @param theDX X component of the vector.
1360         #  @param theDY Y component of the vector.
1361         #  @param theDZ Z component of the vector.
1362         #  @param theName Object name; when specified, this parameter is used
1363         #         for result publication in the study. Otherwise, if automatic
1364         #         publication is switched on, default value is used for result name.
1365         #
1366         #  @return New GEOM.GEOM_Object, containing the created vector.
1367         #
1368         #  @ref tui_creation_vector "Example"
1369         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1370             """
1371             Create a vector with the given components.
1372
1373             Parameters:
1374                 theDX X component of the vector.
1375                 theDY Y component of the vector.
1376                 theDZ Z component of the vector.
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 vector.
1383             """
1384             # Example: see GEOM_TestAll.py
1385             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1386             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1387             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1388             anObj.SetParameters(Parameters)
1389             self._autoPublish(anObj, theName, "vector")
1390             return anObj
1391
1392         ## Create a vector between two points.
1393         #  @param thePnt1 Start point for the vector.
1394         #  @param thePnt2 End point for the vector.
1395         #  @param theName Object name; when specified, this parameter is used
1396         #         for result publication in the study. Otherwise, if automatic
1397         #         publication is switched on, default value is used for result name.
1398         #
1399         #  @return New GEOM.GEOM_Object, containing the created vector.
1400         #
1401         #  @ref tui_creation_vector "Example"
1402         def MakeVector(self, thePnt1, thePnt2, theName=None):
1403             """
1404             Create a vector between two points.
1405
1406             Parameters:
1407                 thePnt1 Start point for the vector.
1408                 thePnt2 End point for the vector.
1409                 theName Object name; when specified, this parameter is used
1410                         for result publication in the study. Otherwise, if automatic
1411                         publication is switched on, default value is used for result name.
1412
1413             Returns:        
1414                 New GEOM.GEOM_Object, containing the created vector.
1415             """
1416             # Example: see GEOM_TestAll.py
1417             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1418             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1419             self._autoPublish(anObj, theName, "vector")
1420             return anObj
1421
1422         ## Create a line, passing through the given point
1423         #  and parrallel to the given direction
1424         #  @param thePnt Point. The resulting line will pass through it.
1425         #  @param theDir Direction. The resulting line will be parallel to it.
1426         #  @param theName Object name; when specified, this parameter is used
1427         #         for result publication in the study. Otherwise, if automatic
1428         #         publication is switched on, default value is used for result name.
1429         #
1430         #  @return New GEOM.GEOM_Object, containing the created line.
1431         #
1432         #  @ref tui_creation_line "Example"
1433         def MakeLine(self, thePnt, theDir, theName=None):
1434             """
1435             Create a line, passing through the given point
1436             and parrallel to the given direction
1437
1438             Parameters:
1439                 thePnt Point. The resulting line will pass through it.
1440                 theDir Direction. The resulting line will be parallel to it.
1441                 theName Object name; when specified, this parameter is used
1442                         for result publication in the study. Otherwise, if automatic
1443                         publication is switched on, default value is used for result name.
1444
1445             Returns:
1446                 New GEOM.GEOM_Object, containing the created line.
1447             """
1448             # Example: see GEOM_TestAll.py
1449             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1450             RaiseIfFailed("MakeLine", self.BasicOp)
1451             self._autoPublish(anObj, theName, "line")
1452             return anObj
1453
1454         ## Create a line, passing through the given points
1455         #  @param thePnt1 First of two points, defining the line.
1456         #  @param thePnt2 Second of two points, defining the line.
1457         #  @param theName Object name; when specified, this parameter is used
1458         #         for result publication in the study. Otherwise, if automatic
1459         #         publication is switched on, default value is used for result name.
1460         #
1461         #  @return New GEOM.GEOM_Object, containing the created line.
1462         #
1463         #  @ref tui_creation_line "Example"
1464         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1465             """
1466             Create a line, passing through the given points
1467
1468             Parameters:
1469                 thePnt1 First of two points, defining the line.
1470                 thePnt2 Second of two points, defining the line.
1471                 theName Object name; when specified, this parameter is used
1472                         for result publication in the study. Otherwise, if automatic
1473                         publication is switched on, default value is used for result name.
1474
1475             Returns:
1476                 New GEOM.GEOM_Object, containing the created line.
1477             """
1478             # Example: see GEOM_TestAll.py
1479             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1480             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1481             self._autoPublish(anObj, theName, "line")
1482             return anObj
1483
1484         ## Create a line on two faces intersection.
1485         #  @param theFace1 First of two faces, defining the line.
1486         #  @param theFace2 Second of two faces, defining the line.
1487         #  @param theName Object name; when specified, this parameter is used
1488         #         for result publication in the study. Otherwise, if automatic
1489         #         publication is switched on, default value is used for result name.
1490         #
1491         #  @return New GEOM.GEOM_Object, containing the created line.
1492         #
1493         #  @ref swig_MakeLineTwoFaces "Example"
1494         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1495             """
1496             Create a line on two faces intersection.
1497
1498             Parameters:
1499                 theFace1 First of two faces, defining the line.
1500                 theFace2 Second of two faces, defining the line.
1501                 theName Object name; when specified, this parameter is used
1502                         for result publication in the study. Otherwise, if automatic
1503                         publication is switched on, default value is used for result name.
1504
1505             Returns:
1506                 New GEOM.GEOM_Object, containing the created line.
1507             """
1508             # Example: see GEOM_TestAll.py
1509             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1510             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1511             self._autoPublish(anObj, theName, "line")
1512             return anObj
1513
1514         ## Create a plane, passing through the given point
1515         #  and normal to the given vector.
1516         #  @param thePnt Point, the plane has to pass through.
1517         #  @param theVec Vector, defining the plane normal direction.
1518         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1519         #  @param theName Object name; when specified, this parameter is used
1520         #         for result publication in the study. Otherwise, if automatic
1521         #         publication is switched on, default value is used for result name.
1522         #
1523         #  @return New GEOM.GEOM_Object, containing the created plane.
1524         #
1525         #  @ref tui_creation_plane "Example"
1526         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1527             """
1528             Create a plane, passing through the given point
1529             and normal to the given vector.
1530
1531             Parameters:
1532                 thePnt Point, the plane has to pass through.
1533                 theVec Vector, defining the plane normal direction.
1534                 theTrimSize Half size of a side of quadrangle face, representing the plane.
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 plane.
1541             """
1542             # Example: see GEOM_TestAll.py
1543             theTrimSize, Parameters = ParseParameters(theTrimSize);
1544             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1545             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1546             anObj.SetParameters(Parameters)
1547             self._autoPublish(anObj, theName, "plane")
1548             return anObj
1549
1550         ## Create a plane, passing through the three given points
1551         #  @param thePnt1 First of three points, defining the plane.
1552         #  @param thePnt2 Second of three points, defining the plane.
1553         #  @param thePnt3 Fird of three points, defining the plane.
1554         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1555         #  @param theName Object name; when specified, this parameter is used
1556         #         for result publication in the study. Otherwise, if automatic
1557         #         publication is switched on, default value is used for result name.
1558         #
1559         #  @return New GEOM.GEOM_Object, containing the created plane.
1560         #
1561         #  @ref tui_creation_plane "Example"
1562         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1563             """
1564             Create a plane, passing through the three given points
1565
1566             Parameters:
1567                 thePnt1 First of three points, defining the plane.
1568                 thePnt2 Second of three points, defining the plane.
1569                 thePnt3 Fird of three points, defining the plane.
1570                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1571                 theName Object name; when specified, this parameter is used
1572                         for result publication in the study. Otherwise, if automatic
1573                         publication is switched on, default value is used for result name.
1574
1575             Returns:
1576                 New GEOM.GEOM_Object, containing the created plane.
1577             """
1578             # Example: see GEOM_TestAll.py
1579             theTrimSize, Parameters = ParseParameters(theTrimSize);
1580             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1581             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1582             anObj.SetParameters(Parameters)
1583             self._autoPublish(anObj, theName, "plane")
1584             return anObj
1585
1586         ## Create a plane, similar to the existing one, but with another size of representing face.
1587         #  @param theFace Referenced plane or LCS(Marker).
1588         #  @param theTrimSize New 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 MakePlaneFace(self, theFace, theTrimSize, theName=None):
1597             """
1598             Create a plane, similar to the existing one, but with another size of representing face.
1599
1600             Parameters:
1601                 theFace Referenced plane or LCS(Marker).
1602                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1603                 theName Object name; when specified, this parameter is used
1604                         for result publication in the study. Otherwise, if automatic
1605                         publication is switched on, default value is used for result name.
1606
1607             Returns:
1608                 New GEOM.GEOM_Object, containing the created plane.
1609             """
1610             # Example: see GEOM_TestAll.py
1611             theTrimSize, Parameters = ParseParameters(theTrimSize);
1612             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1613             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1614             anObj.SetParameters(Parameters)
1615             self._autoPublish(anObj, theName, "plane")
1616             return anObj
1617
1618         ## Create a plane, passing through the 2 vectors
1619         #  with center in a start point of the first vector.
1620         #  @param theVec1 Vector, defining center point and plane direction.
1621         #  @param theVec2 Vector, defining the plane normal direction.
1622         #  @param theTrimSize 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 MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1631             """
1632             Create a plane, passing through the 2 vectors
1633             with center in a start point of the first vector.
1634
1635             Parameters:
1636                 theVec1 Vector, defining center point and plane direction.
1637                 theVec2 Vector, defining the plane normal direction.
1638                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1639                 theName Object name; when specified, this parameter is used
1640                         for result publication in the study. Otherwise, if automatic
1641                         publication is switched on, default value is used for result name.
1642
1643             Returns: 
1644                 New GEOM.GEOM_Object, containing the created plane.
1645             """
1646             # Example: see GEOM_TestAll.py
1647             theTrimSize, Parameters = ParseParameters(theTrimSize);
1648             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1649             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1650             anObj.SetParameters(Parameters)
1651             self._autoPublish(anObj, theName, "plane")
1652             return anObj
1653
1654         ## Create a plane, based on a Local coordinate system.
1655         #  @param theLCS  coordinate system, defining plane.
1656         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1657         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1658         #  @param theName Object name; when specified, this parameter is used
1659         #         for result publication in the study. Otherwise, if automatic
1660         #         publication is switched on, default value is used for result name.
1661         #
1662         #  @return New GEOM.GEOM_Object, containing the created plane.
1663         #
1664         #  @ref tui_creation_plane "Example"
1665         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1666             """
1667             Create a plane, based on a Local coordinate system.
1668
1669            Parameters: 
1670                 theLCS  coordinate system, defining plane.
1671                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1672                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
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.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1683             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1684             anObj.SetParameters(Parameters)
1685             self._autoPublish(anObj, theName, "plane")
1686             return anObj
1687
1688         ## Create a local coordinate system.
1689         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1690         #  @param XDX,XDY,XDZ Three components of OX direction
1691         #  @param YDX,YDY,YDZ Three components of OY direction
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 coordinate system.
1697         #
1698         #  @ref swig_MakeMarker "Example"
1699         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1700             """
1701             Create a local coordinate system.
1702
1703             Parameters: 
1704                 OX,OY,OZ Three coordinates of coordinate system origin.
1705                 XDX,XDY,XDZ Three components of OX direction
1706                 YDX,YDY,YDZ Three components of OY direction
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 coordinate system.
1713             """
1714             # Example: see GEOM_TestAll.py
1715             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1716             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1717             RaiseIfFailed("MakeMarker", self.BasicOp)
1718             anObj.SetParameters(Parameters)
1719             self._autoPublish(anObj, theName, "lcs")
1720             return anObj
1721
1722         ## Create a local coordinate system from shape.
1723         #  @param theShape The initial shape to detect the coordinate system.
1724         #  @param theName Object name; when specified, this parameter is used
1725         #         for result publication in the study. Otherwise, if automatic
1726         #         publication is switched on, default value is used for result name.
1727         #
1728         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1729         #
1730         #  @ref tui_creation_lcs "Example"
1731         def MakeMarkerFromShape(self, theShape, theName=None):
1732             """
1733             Create a local coordinate system from shape.
1734
1735             Parameters:
1736                 theShape The initial shape to detect the coordinate system.
1737                 theName Object name; when specified, this parameter is used
1738                         for result publication in the study. Otherwise, if automatic
1739                         publication is switched on, default value is used for result name.
1740                 
1741             Returns: 
1742                 New GEOM.GEOM_Object, containing the created coordinate system.
1743             """
1744             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1745             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1746             self._autoPublish(anObj, theName, "lcs")
1747             return anObj
1748
1749         ## Create a local coordinate system from point and two vectors.
1750         #  @param theOrigin Point of coordinate system origin.
1751         #  @param theXVec Vector of X direction
1752         #  @param theYVec Vector of Y direction
1753         #  @param theName Object name; when specified, this parameter is used
1754         #         for result publication in the study. Otherwise, if automatic
1755         #         publication is switched on, default value is used for result name.
1756         #
1757         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1758         #
1759         #  @ref tui_creation_lcs "Example"
1760         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1761             """
1762             Create a local coordinate system from point and two vectors.
1763
1764             Parameters:
1765                 theOrigin Point of coordinate system origin.
1766                 theXVec Vector of X direction
1767                 theYVec Vector of Y direction
1768                 theName Object name; when specified, this parameter is used
1769                         for result publication in the study. Otherwise, if automatic
1770                         publication is switched on, default value is used for result name.
1771
1772             Returns: 
1773                 New GEOM.GEOM_Object, containing the created coordinate system.
1774
1775             """
1776             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1777             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1778             self._autoPublish(anObj, theName, "lcs")
1779             return anObj
1780
1781         # end of l3_basic_go
1782         ## @}
1783
1784         ## @addtogroup l4_curves
1785         ## @{
1786
1787         ##  Create an arc of circle, passing through three given points.
1788         #  @param thePnt1 Start point of the arc.
1789         #  @param thePnt2 Middle point of the arc.
1790         #  @param thePnt3 End point of the arc.
1791         #  @param theName Object name; when specified, this parameter is used
1792         #         for result publication in the study. Otherwise, if automatic
1793         #         publication is switched on, default value is used for result name.
1794         #
1795         #  @return New GEOM.GEOM_Object, containing the created arc.
1796         #
1797         #  @ref swig_MakeArc "Example"
1798         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1799             """
1800             Create an arc of circle, passing through three given points.
1801
1802             Parameters:
1803                 thePnt1 Start point of the arc.
1804                 thePnt2 Middle point of the arc.
1805                 thePnt3 End point of the arc.
1806                 theName Object name; when specified, this parameter is used
1807                         for result publication in the study. Otherwise, if automatic
1808                         publication is switched on, default value is used for result name.
1809
1810             Returns: 
1811                 New GEOM.GEOM_Object, containing the created arc.
1812             """
1813             # Example: see GEOM_TestAll.py
1814             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1815             RaiseIfFailed("MakeArc", self.CurvesOp)
1816             self._autoPublish(anObj, theName, "arc")
1817             return anObj
1818
1819         ##  Create an arc of circle from a center and 2 points.
1820         #  @param thePnt1 Center of the arc
1821         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1822         #  @param thePnt3 End point of the arc (Gives also a direction)
1823         #  @param theSense Orientation of the arc
1824         #  @param theName Object name; when specified, this parameter is used
1825         #         for result publication in the study. Otherwise, if automatic
1826         #         publication is switched on, default value is used for result name.
1827         #
1828         #  @return New GEOM.GEOM_Object, containing the created arc.
1829         #
1830         #  @ref swig_MakeArc "Example"
1831         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1832             """
1833             Create an arc of circle from a center and 2 points.
1834
1835             Parameters:
1836                 thePnt1 Center of the arc
1837                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1838                 thePnt3 End point of the arc (Gives also a direction)
1839                 theSense Orientation 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.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1849             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1850             self._autoPublish(anObj, theName, "arc")
1851             return anObj
1852
1853         ##  Create an arc of ellipse, of center and two points.
1854         #  @param theCenter Center of the arc.
1855         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1856         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1857         #  @param theName Object name; when specified, this parameter is used
1858         #         for result publication in the study. Otherwise, if automatic
1859         #         publication is switched on, default value is used for result name.
1860         #
1861         #  @return New GEOM.GEOM_Object, containing the created arc.
1862         #
1863         #  @ref swig_MakeArc "Example"
1864         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1865             """
1866             Create an arc of ellipse, of center and two points.
1867
1868             Parameters:
1869                 theCenter Center of the arc.
1870                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1871                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1872                 theName Object name; when specified, this parameter is used
1873                         for result publication in the study. Otherwise, if automatic
1874                         publication is switched on, default value is used for result name.
1875
1876             Returns:
1877                 New GEOM.GEOM_Object, containing the created arc.
1878             """
1879             # Example: see GEOM_TestAll.py
1880             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1881             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1882             self._autoPublish(anObj, theName, "arc")
1883             return anObj
1884
1885         ## Create a circle with given center, normal vector and radius.
1886         #  @param thePnt Circle center.
1887         #  @param theVec Vector, normal to the plane of the circle.
1888         #  @param theR Circle radius.
1889         #  @param theName Object name; when specified, this parameter is used
1890         #         for result publication in the study. Otherwise, if automatic
1891         #         publication is switched on, default value is used for result name.
1892         #
1893         #  @return New GEOM.GEOM_Object, containing the created circle.
1894         #
1895         #  @ref tui_creation_circle "Example"
1896         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1897             """
1898             Create a circle with given center, normal vector and radius.
1899
1900             Parameters:
1901                 thePnt Circle center.
1902                 theVec Vector, normal to the plane of the circle.
1903                 theR Circle radius.
1904                 theName Object name; when specified, this parameter is used
1905                         for result publication in the study. Otherwise, if automatic
1906                         publication is switched on, default value is used for result name.
1907
1908             Returns:
1909                 New GEOM.GEOM_Object, containing the created circle.
1910             """
1911             # Example: see GEOM_TestAll.py
1912             theR, Parameters = ParseParameters(theR)
1913             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1914             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1915             anObj.SetParameters(Parameters)
1916             self._autoPublish(anObj, theName, "circle")
1917             return anObj
1918
1919         ## Create a circle with given radius.
1920         #  Center of the circle will be in the origin of global
1921         #  coordinate system and normal vector will be codirected with Z axis
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         def MakeCircleR(self, theR, theName=None):
1929             """
1930             Create a circle with given radius.
1931             Center of the circle will be in the origin of global
1932             coordinate system and normal vector will be codirected with Z axis
1933
1934             Parameters:
1935                 theR Circle radius.
1936                 theName Object name; when specified, this parameter is used
1937                         for result publication in the study. Otherwise, if automatic
1938                         publication is switched on, default value is used for result name.
1939
1940             Returns:
1941                 New GEOM.GEOM_Object, containing the created circle.
1942             """
1943             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1944             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1945             self._autoPublish(anObj, theName, "circle")
1946             return anObj
1947
1948         ## Create a circle, passing through three given points
1949         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1950         #  @param theName Object name; when specified, this parameter is used
1951         #         for result publication in the study. Otherwise, if automatic
1952         #         publication is switched on, default value is used for result name.
1953         #
1954         #  @return New GEOM.GEOM_Object, containing the created circle.
1955         #
1956         #  @ref tui_creation_circle "Example"
1957         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1958             """
1959             Create a circle, passing through three given points
1960
1961             Parameters:
1962                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1963                 theName Object name; when specified, this parameter is used
1964                         for result publication in the study. Otherwise, if automatic
1965                         publication is switched on, default value is used for result name.
1966
1967             Returns:
1968                 New GEOM.GEOM_Object, containing the created circle.
1969             """
1970             # Example: see GEOM_TestAll.py
1971             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1972             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1973             self._autoPublish(anObj, theName, "circle")
1974             return anObj
1975
1976         ## Create a circle, with given point1 as center,
1977         #  passing through the point2 as radius and laying in the plane,
1978         #  defined by all three given points.
1979         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1980         #  @param theName Object name; when specified, this parameter is used
1981         #         for result publication in the study. Otherwise, if automatic
1982         #         publication is switched on, default value is used for result name.
1983         #
1984         #  @return New GEOM.GEOM_Object, containing the created circle.
1985         #
1986         #  @ref swig_MakeCircle "Example"
1987         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1988             """
1989             Create a circle, with given point1 as center,
1990             passing through the point2 as radius and laying in the plane,
1991             defined by all three given points.
1992
1993             Parameters:
1994                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1995                 theName Object name; when specified, this parameter is used
1996                         for result publication in the study. Otherwise, if automatic
1997                         publication is switched on, default value is used for result name.
1998
1999             Returns:
2000                 New GEOM.GEOM_Object, containing the created circle.
2001             """
2002             # Example: see GEOM_example6.py
2003             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2004             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2005             self._autoPublish(anObj, theName, "circle")
2006             return anObj
2007
2008         ## Create an ellipse with given center, normal vector and radiuses.
2009         #  @param thePnt Ellipse center.
2010         #  @param theVec Vector, normal to the plane of the ellipse.
2011         #  @param theRMajor Major ellipse radius.
2012         #  @param theRMinor Minor ellipse radius.
2013         #  @param theVecMaj Vector, direction of the ellipse's main axis.
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 ellipse.
2019         #
2020         #  @ref tui_creation_ellipse "Example"
2021         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2022             """
2023             Create an ellipse with given center, normal vector and radiuses.
2024
2025             Parameters:
2026                 thePnt Ellipse center.
2027                 theVec Vector, normal to the plane of the ellipse.
2028                 theRMajor Major ellipse radius.
2029                 theRMinor Minor ellipse radius.
2030                 theVecMaj Vector, direction of the ellipse's main axis.
2031                 theName Object name; when specified, this parameter is used
2032                         for result publication in the study. Otherwise, if automatic
2033                         publication is switched on, default value is used for result name.
2034
2035             Returns:    
2036                 New GEOM.GEOM_Object, containing the created ellipse.
2037             """
2038             # Example: see GEOM_TestAll.py
2039             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2040             if theVecMaj is not None:
2041                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2042             else:
2043                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2044                 pass
2045             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2046             anObj.SetParameters(Parameters)
2047             self._autoPublish(anObj, theName, "ellipse")
2048             return anObj
2049
2050         ## Create an ellipse with given radiuses.
2051         #  Center of the ellipse will be in the origin of global
2052         #  coordinate system and normal vector will be codirected with Z axis
2053         #  @param theRMajor Major ellipse radius.
2054         #  @param theRMinor Minor ellipse radius.
2055         #  @param theName Object name; when specified, this parameter is used
2056         #         for result publication in the study. Otherwise, if automatic
2057         #         publication is switched on, default value is used for result name.
2058         #
2059         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2060         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2061             """
2062             Create an ellipse with given radiuses.
2063             Center of the ellipse will be in the origin of global
2064             coordinate system and normal vector will be codirected with Z axis
2065
2066             Parameters:
2067                 theRMajor Major ellipse radius.
2068                 theRMinor Minor ellipse radius.
2069                 theName Object name; when specified, this parameter is used
2070                         for result publication in the study. Otherwise, if automatic
2071                         publication is switched on, default value is used for result name.
2072
2073             Returns:
2074             New GEOM.GEOM_Object, containing the created ellipse.
2075             """
2076             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2077             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2078             self._autoPublish(anObj, theName, "ellipse")
2079             return anObj
2080
2081         ## Create a polyline on the set of points.
2082         #  @param thePoints Sequence of points for the polyline.
2083         #  @param theIsClosed If True, build a closed wire.
2084         #  @param theName Object name; when specified, this parameter is used
2085         #         for result publication in the study. Otherwise, if automatic
2086         #         publication is switched on, default value is used for result name.
2087         #
2088         #  @return New GEOM.GEOM_Object, containing the created polyline.
2089         #
2090         #  @ref tui_creation_curve "Example"
2091         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2092             """
2093             Create a polyline on the set of points.
2094
2095             Parameters:
2096                 thePoints Sequence of points for the polyline.
2097                 theIsClosed If True, build a closed wire.
2098                 theName Object name; when specified, this parameter is used
2099                         for result publication in the study. Otherwise, if automatic
2100                         publication is switched on, default value is used for result name.
2101
2102             Returns:
2103                 New GEOM.GEOM_Object, containing the created polyline.
2104             """
2105             # Example: see GEOM_TestAll.py
2106             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2107             RaiseIfFailed("MakePolyline", self.CurvesOp)
2108             self._autoPublish(anObj, theName, "polyline")
2109             return anObj
2110
2111         ## Create bezier curve on the set of points.
2112         #  @param thePoints Sequence of points for the bezier curve.
2113         #  @param theIsClosed If True, build a closed curve.
2114         #  @param theName Object name; when specified, this parameter is used
2115         #         for result publication in the study. Otherwise, if automatic
2116         #         publication is switched on, default value is used for result name.
2117         #
2118         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2119         #
2120         #  @ref tui_creation_curve "Example"
2121         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2122             """
2123             Create bezier curve on the set of points.
2124
2125             Parameters:
2126                 thePoints Sequence of points for the bezier curve.
2127                 theIsClosed If True, build a closed curve.
2128                 theName Object name; when specified, this parameter is used
2129                         for result publication in the study. Otherwise, if automatic
2130                         publication is switched on, default value is used for result name.
2131
2132             Returns:
2133                 New GEOM.GEOM_Object, containing the created bezier curve.
2134             """
2135             # Example: see GEOM_TestAll.py
2136             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2137             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2138             self._autoPublish(anObj, theName, "bezier")
2139             return anObj
2140
2141         ## Create B-Spline curve on the set of points.
2142         #  @param thePoints Sequence of points for the B-Spline curve.
2143         #  @param theIsClosed If True, build a closed curve.
2144         #  @param theDoReordering If TRUE, the algo does not follow the order of
2145         #                         \a thePoints but searches for the closest vertex.
2146         #  @param theName Object name; when specified, this parameter is used
2147         #         for result publication in the study. Otherwise, if automatic
2148         #         publication is switched on, default value is used for result name.
2149         #
2150         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2151         #
2152         #  @ref tui_creation_curve "Example"
2153         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2154             """
2155             Create B-Spline curve on the set of points.
2156
2157             Parameters:
2158                 thePoints Sequence of points for the B-Spline curve.
2159                 theIsClosed If True, build a closed curve.
2160                 theDoReordering If True, the algo does not follow the order of
2161                                 thePoints but searches for the closest vertex.
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 B-Spline curve.
2168             """
2169             # Example: see GEOM_TestAll.py
2170             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2171             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2172             self._autoPublish(anObj, theName, "bspline")
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 theFirstVec Vector object, defining the curve direction at its first point.
2178         #  @param theLastVec Vector object, defining the curve direction at its last point.
2179         #  @param theName Object name; when specified, this parameter is used
2180         #         for result publication in the study. Otherwise, if automatic
2181         #         publication is switched on, default value is used for result name.
2182         #
2183         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2184         #
2185         #  @ref tui_creation_curve "Example"
2186         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2187             """
2188             Create B-Spline curve on the set of points.
2189
2190             Parameters:
2191                 thePoints Sequence of points for the B-Spline curve.
2192                 theFirstVec Vector object, defining the curve direction at its first point.
2193                 theLastVec Vector object, defining the curve direction at its last point.
2194                 theName Object name; when specified, this parameter is used
2195                         for result publication in the study. Otherwise, if automatic
2196                         publication is switched on, default value is used for result name.
2197
2198             Returns:                     
2199                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2200             """
2201             # Example: see GEOM_TestAll.py
2202             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2203             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2204             self._autoPublish(anObj, theName, "bspline")
2205             return anObj
2206
2207         ## Creates a curve using the parametric definition of the basic points.
2208         #  @param thexExpr parametric equation of the coordinates X.
2209         #  @param theyExpr parametric equation of the coordinates Y.
2210         #  @param thezExpr parametric equation of the coordinates Z.
2211         #  @param theParamMin the minimal value of the parameter.
2212         #  @param theParamMax the maximum value of the parameter.
2213         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2214         #  @param theCurveType the type of the curve.
2215         #  @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.
2216         #  @param theName Object name; when specified, this parameter is used
2217         #         for result publication in the study. Otherwise, if automatic
2218         #         publication is switched on, default value is used for result name.
2219         #
2220         #  @return New GEOM.GEOM_Object, containing the created curve.
2221         #
2222         #  @ref tui_creation_curve "Example"
2223         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2224                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2225             """
2226             Creates a curve using the parametric definition of the basic points.
2227
2228             Parameters:
2229                 thexExpr parametric equation of the coordinates X.
2230                 theyExpr parametric equation of the coordinates Y.
2231                 thezExpr parametric equation of the coordinates Z.
2232                 theParamMin the minimal value of the parameter.
2233                 theParamMax the maximum value of the parameter.
2234                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2235                 theCurveType the type of the curve.
2236                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2237                              method is used which can lead to a bug.
2238                 theName Object name; when specified, this parameter is used
2239                         for result publication in the study. Otherwise, if automatic
2240                         publication is switched on, default value is used for result name.
2241
2242             Returns:
2243                 New GEOM.GEOM_Object, containing the created curve.
2244             """
2245             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2246             if theNewMethod:
2247               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2248             else:
2249               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2250             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2251             anObj.SetParameters(Parameters)
2252             self._autoPublish(anObj, theName, "curve")
2253             return anObj
2254
2255         # end of l4_curves
2256         ## @}
2257
2258         ## @addtogroup l3_sketcher
2259         ## @{
2260
2261         ## Create a sketcher (wire or face), following the textual description,
2262         #  passed through <VAR>theCommand</VAR> argument. \n
2263         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2264         #  Format of the description string have to be the following:
2265         #
2266         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2267         #
2268         #  Where:
2269         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2270         #  - CMD is one of
2271         #     - "R angle" : Set the direction by angle
2272         #     - "D dx dy" : Set the direction by DX & DY
2273         #     .
2274         #       \n
2275         #     - "TT x y" : Create segment by point at X & Y
2276         #     - "T dx dy" : Create segment by point with DX & DY
2277         #     - "L length" : Create segment by direction & Length
2278         #     - "IX x" : Create segment by direction & Intersect. X
2279         #     - "IY y" : Create segment by direction & Intersect. Y
2280         #     .
2281         #       \n
2282         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2283         #     - "AA x y": Create arc by point at X & Y
2284         #     - "A dx dy" : Create arc by point with DX & DY
2285         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2286         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2287         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2288         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2289         #     .
2290         #       \n
2291         #     - "WW" : Close Wire (to finish)
2292         #     - "WF" : Close Wire and build face (to finish)
2293         #     .
2294         #        \n
2295         #  - Flag1 (= reverse) is 0 or 2 ...
2296         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2297         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2298         #     .
2299         #        \n
2300         #  - Flag2 (= control tolerance) is 0 or 1 ...
2301         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2302         #     - if 1 the wire is built only if the end point is on the arc
2303         #       with a tolerance of 10^-7 on the distance else the creation fails
2304         #
2305         #  @param theCommand String, defining the sketcher in local
2306         #                    coordinates of the working plane.
2307         #  @param theWorkingPlane Nine double values, defining origin,
2308         #                         OZ and OX directions of the working plane.
2309         #  @param theName Object name; when specified, this parameter is used
2310         #         for result publication in the study. Otherwise, if automatic
2311         #         publication is switched on, default value is used for result name.
2312         #
2313         #  @return New GEOM.GEOM_Object, containing the created wire.
2314         #
2315         #  @ref tui_sketcher_page "Example"
2316         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2317             """
2318             Create a sketcher (wire or face), following the textual description, passed
2319             through theCommand argument.
2320             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2321             Format of the description string have to be the following:
2322                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2323             Where:
2324             - x1, y1 are coordinates of the first sketcher point (zero by default),
2325             - CMD is one of
2326                - "R angle" : Set the direction by angle
2327                - "D dx dy" : Set the direction by DX & DY
2328                
2329                - "TT x y" : Create segment by point at X & Y
2330                - "T dx dy" : Create segment by point with DX & DY
2331                - "L length" : Create segment by direction & Length
2332                - "IX x" : Create segment by direction & Intersect. X
2333                - "IY y" : Create segment by direction & Intersect. Y
2334
2335                - "C radius length" : Create arc by direction, radius and length(in degree)
2336                - "AA x y": Create arc by point at X & Y
2337                - "A dx dy" : Create arc by point with DX & DY
2338                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2339                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2340                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2341                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2342
2343                - "WW" : Close Wire (to finish)
2344                - "WF" : Close Wire and build face (to finish)
2345             
2346             - Flag1 (= reverse) is 0 or 2 ...
2347                - if 0 the drawn arc is the one of lower angle (< Pi)
2348                - if 2 the drawn arc ius the one of greater angle (> Pi)
2349         
2350             - Flag2 (= control tolerance) is 0 or 1 ...
2351                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2352                - if 1 the wire is built only if the end point is on the arc
2353                  with a tolerance of 10^-7 on the distance else the creation fails
2354
2355             Parameters:
2356                 theCommand String, defining the sketcher in local
2357                            coordinates of the working plane.
2358                 theWorkingPlane Nine double values, defining origin,
2359                                 OZ and OX directions of the working plane.
2360                 theName Object name; when specified, this parameter is used
2361                         for result publication in the study. Otherwise, if automatic
2362                         publication is switched on, default value is used for result name.
2363
2364             Returns:
2365                 New GEOM.GEOM_Object, containing the created wire.
2366             """
2367             # Example: see GEOM_TestAll.py
2368             theCommand,Parameters = ParseSketcherCommand(theCommand)
2369             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2370             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2371             anObj.SetParameters(Parameters)
2372             self._autoPublish(anObj, theName, "wire")
2373             return anObj
2374
2375         ## Create a sketcher (wire or face), following the textual description,
2376         #  passed through <VAR>theCommand</VAR> argument. \n
2377         #  For format of the description string see MakeSketcher() method.\n
2378         #  @param theCommand String, defining the sketcher in local
2379         #                    coordinates of the working plane.
2380         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2381         #  @param theName Object name; when specified, this parameter is used
2382         #         for result publication in the study. Otherwise, if automatic
2383         #         publication is switched on, default value is used for result name.
2384         #
2385         #  @return New GEOM.GEOM_Object, containing the created wire.
2386         #
2387         #  @ref tui_sketcher_page "Example"
2388         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2389             """
2390             Create a sketcher (wire or face), following the textual description,
2391             passed through theCommand argument.
2392             For format of the description string see geompy.MakeSketcher() method.
2393
2394             Parameters:
2395                 theCommand String, defining the sketcher in local
2396                            coordinates of the working plane.
2397                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2398                 theName Object name; when specified, this parameter is used
2399                         for result publication in the study. Otherwise, if automatic
2400                         publication is switched on, default value is used for result name.
2401
2402             Returns:
2403                 New GEOM.GEOM_Object, containing the created wire.
2404             """
2405             theCommand,Parameters = ParseSketcherCommand(theCommand)
2406             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2407             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2408             anObj.SetParameters(Parameters)
2409             self._autoPublish(anObj, theName, "wire")
2410             return anObj
2411
2412         ## Obtain a 2D sketcher interface
2413         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2414         def Sketcher2D (self):
2415             """
2416             Obtain a 2D sketcher interface.
2417
2418             Example of usage:
2419                sk = geompy.Sketcher2D()
2420                sk.addPoint(20, 20)
2421                sk.addSegmentRelative(15, 70)
2422                sk.addSegmentPerpY(50)
2423                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2424                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2425                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2426                sk.close()
2427                Sketch_1 = sk.wire(geomObj_1)
2428             """
2429             sk = Sketcher2D (self)
2430             return sk
2431         
2432         ## Create a sketcher wire, following the numerical description,
2433         #  passed through <VAR>theCoordinates</VAR> argument. \n
2434         #  @param theCoordinates double values, defining points to create a wire,
2435         #                                                      passing from it.
2436         #  @param theName Object name; when specified, this parameter is used
2437         #         for result publication in the study. Otherwise, if automatic
2438         #         publication is switched on, default value is used for result name.
2439         #
2440         #  @return New GEOM.GEOM_Object, containing the created wire.
2441         #
2442         #  @ref tui_3dsketcher_page "Example"
2443         def Make3DSketcher(self, theCoordinates, theName=None):
2444             """
2445             Create a sketcher wire, following the numerical description,
2446             passed through theCoordinates argument.
2447
2448             Parameters:
2449                 theCoordinates double values, defining points to create a wire,
2450                                passing from it.
2451                 theName Object name; when specified, this parameter is used
2452                         for result publication in the study. Otherwise, if automatic
2453                         publication is switched on, default value is used for result name.
2454
2455             Returns:
2456                 New GEOM_Object, containing the created wire.
2457             """
2458             theCoordinates,Parameters = ParseParameters(theCoordinates)
2459             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2460             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2461             anObj.SetParameters(Parameters)
2462             self._autoPublish(anObj, theName, "wire")
2463             return anObj
2464
2465         ## Obtain a 3D sketcher interface
2466         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2467         #
2468         #  @ref tui_3dsketcher_page "Example"
2469         def Sketcher3D (self):
2470             """
2471             Obtain a 3D sketcher interface.
2472
2473             Example of usage:
2474                 sk = geompy.Sketcher3D()
2475                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2476                 sk.addPointsRelative(0, 0, 130)
2477                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2478                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2479                 sk.close()
2480                 a3D_Sketcher_1 = sk.wire()
2481             """
2482             sk = Sketcher3D (self)
2483             return sk
2484
2485         # end of l3_sketcher
2486         ## @}
2487
2488         ## @addtogroup l3_3d_primitives
2489         ## @{
2490
2491         ## Create a box by coordinates of two opposite vertices.
2492         #
2493         #  @param x1,y1,z1 double values, defining first point it.
2494         #  @param x2,y2,z2 double values, defining first point it.
2495         #  @param theName Object name; when specified, this parameter is used
2496         #         for result publication in the study. Otherwise, if automatic
2497         #         publication is switched on, default value is used for result name.
2498         #
2499         #  @return New GEOM.GEOM_Object, containing the created box.
2500         #
2501         #  @ref tui_creation_box "Example"
2502         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2503             """
2504             Create a box by coordinates of two opposite vertices.
2505             
2506             Parameters:
2507                 x1,y1,z1 double values, defining first point.
2508                 x2,y2,z2 double values, defining second point.
2509                 theName Object name; when specified, this parameter is used
2510                         for result publication in the study. Otherwise, if automatic
2511                         publication is switched on, default value is used for result name.
2512                 
2513             Returns:
2514                 New GEOM.GEOM_Object, containing the created box.
2515             """
2516             # Example: see GEOM_TestAll.py
2517             pnt1 = self.MakeVertex(x1,y1,z1)
2518             pnt2 = self.MakeVertex(x2,y2,z2)
2519             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2520             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2521
2522         ## Create a box with specified dimensions along the coordinate axes
2523         #  and with edges, parallel to the coordinate axes.
2524         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2525         #  @param theDX Length of Box edges, parallel to OX axis.
2526         #  @param theDY Length of Box edges, parallel to OY axis.
2527         #  @param theDZ Length of Box edges, parallel to OZ axis.
2528         #  @param theName Object name; when specified, this parameter is used
2529         #         for result publication in the study. Otherwise, if automatic
2530         #         publication is switched on, default value is used for result name.
2531         #
2532         #  @return New GEOM.GEOM_Object, containing the created box.
2533         #
2534         #  @ref tui_creation_box "Example"
2535         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2536             """
2537             Create a box with specified dimensions along the coordinate axes
2538             and with edges, parallel to the coordinate axes.
2539             Center of the box will be at point (DX/2, DY/2, DZ/2).
2540
2541             Parameters:
2542                 theDX Length of Box edges, parallel to OX axis.
2543                 theDY Length of Box edges, parallel to OY axis.
2544                 theDZ Length of Box edges, parallel to OZ axis.
2545                 theName Object name; when specified, this parameter is used
2546                         for result publication in the study. Otherwise, if automatic
2547                         publication is switched on, default value is used for result name.
2548
2549             Returns:   
2550                 New GEOM.GEOM_Object, containing the created box.
2551             """
2552             # Example: see GEOM_TestAll.py
2553             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2554             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2555             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2556             anObj.SetParameters(Parameters)
2557             self._autoPublish(anObj, theName, "box")
2558             return anObj
2559
2560         ## Create a box with two specified opposite vertices,
2561         #  and with edges, parallel to the coordinate axes
2562         #  @param thePnt1 First of two opposite vertices.
2563         #  @param thePnt2 Second of two opposite vertices.
2564         #  @param theName Object name; when specified, this parameter is used
2565         #         for result publication in the study. Otherwise, if automatic
2566         #         publication is switched on, default value is used for result name.
2567         #
2568         #  @return New GEOM.GEOM_Object, containing the created box.
2569         #
2570         #  @ref tui_creation_box "Example"
2571         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2572             """
2573             Create a box with two specified opposite vertices,
2574             and with edges, parallel to the coordinate axes
2575
2576             Parameters:
2577                 thePnt1 First of two opposite vertices.
2578                 thePnt2 Second of two opposite vertices.
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             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2588             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2589             self._autoPublish(anObj, theName, "box")
2590             return anObj
2591
2592         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2593         #  @param theH height of Face.
2594         #  @param theW width of Face.
2595         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2596         #  @param theName Object name; when specified, this parameter is used
2597         #         for result publication in the study. Otherwise, if automatic
2598         #         publication is switched on, default value is used for result name.
2599         #
2600         #  @return New GEOM.GEOM_Object, containing the created face.
2601         #
2602         #  @ref tui_creation_face "Example"
2603         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2604             """
2605             Create a face with specified dimensions with edges parallel to coordinate axes.
2606
2607             Parameters:
2608                 theH height of Face.
2609                 theW width of Face.
2610                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2611                 theName Object name; when specified, this parameter is used
2612                         for result publication in the study. Otherwise, if automatic
2613                         publication is switched on, default value is used for result name.
2614
2615             Returns:
2616                 New GEOM.GEOM_Object, containing the created face.
2617             """
2618             # Example: see GEOM_TestAll.py
2619             theH,theW,Parameters = ParseParameters(theH, theW)
2620             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2621             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2622             anObj.SetParameters(Parameters)
2623             self._autoPublish(anObj, theName, "rectangle")
2624             return anObj
2625
2626         ## Create a face from another plane and two sizes,
2627         #  vertical size and horisontal size.
2628         #  @param theObj   Normale vector to the creating face or
2629         #  the face object.
2630         #  @param theH     Height (vertical size).
2631         #  @param theW     Width (horisontal size).
2632         #  @param theName Object name; when specified, this parameter is used
2633         #         for result publication in the study. Otherwise, if automatic
2634         #         publication is switched on, default value is used for result name.
2635         #
2636         #  @return New GEOM.GEOM_Object, containing the created face.
2637         #
2638         #  @ref tui_creation_face "Example"
2639         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2640             """
2641             Create a face from another plane and two sizes,
2642             vertical size and horisontal size.
2643
2644             Parameters:
2645                 theObj   Normale vector to the creating face or
2646                          the face object.
2647                 theH     Height (vertical size).
2648                 theW     Width (horisontal size).
2649                 theName Object name; when specified, this parameter is used
2650                         for result publication in the study. Otherwise, if automatic
2651                         publication is switched on, default value is used for result name.
2652
2653             Returns:
2654                 New GEOM_Object, containing the created face.
2655             """
2656             # Example: see GEOM_TestAll.py
2657             theH,theW,Parameters = ParseParameters(theH, theW)
2658             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2659             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2660             anObj.SetParameters(Parameters)
2661             self._autoPublish(anObj, theName, "rectangle")
2662             return anObj
2663
2664         ## Create a disk with given center, normal vector and radius.
2665         #  @param thePnt Disk center.
2666         #  @param theVec Vector, normal to the plane of the disk.
2667         #  @param theR Disk radius.
2668         #  @param theName Object name; when specified, this parameter is used
2669         #         for result publication in the study. Otherwise, if automatic
2670         #         publication is switched on, default value is used for result name.
2671         #
2672         #  @return New GEOM.GEOM_Object, containing the created disk.
2673         #
2674         #  @ref tui_creation_disk "Example"
2675         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2676             """
2677             Create a disk with given center, normal vector and radius.
2678
2679             Parameters:
2680                 thePnt Disk center.
2681                 theVec Vector, normal to the plane of the disk.
2682                 theR Disk radius.
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.GEOM_Object, containing the created disk.
2689             """
2690             # Example: see GEOM_TestAll.py
2691             theR,Parameters = ParseParameters(theR)
2692             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2693             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2694             anObj.SetParameters(Parameters)
2695             self._autoPublish(anObj, theName, "disk")
2696             return anObj
2697
2698         ## Create a disk, passing through three given points
2699         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2700         #  @param theName Object name; when specified, this parameter is used
2701         #         for result publication in the study. Otherwise, if automatic
2702         #         publication is switched on, default value is used for result name.
2703         #
2704         #  @return New GEOM.GEOM_Object, containing the created disk.
2705         #
2706         #  @ref tui_creation_disk "Example"
2707         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2708             """
2709             Create a disk, passing through three given points
2710
2711             Parameters:
2712                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2713                 theName Object name; when specified, this parameter is used
2714                         for result publication in the study. Otherwise, if automatic
2715                         publication is switched on, default value is used for result name.
2716
2717             Returns:    
2718                 New GEOM.GEOM_Object, containing the created disk.
2719             """
2720             # Example: see GEOM_TestAll.py
2721             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2722             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2723             self._autoPublish(anObj, theName, "disk")
2724             return anObj
2725
2726         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2727         #  @param theR Radius of Face.
2728         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2729         #  @param theName Object name; when specified, this parameter is used
2730         #         for result publication in the study. Otherwise, if automatic
2731         #         publication is switched on, default value is used for result name.
2732         #
2733         #  @return New GEOM.GEOM_Object, containing the created disk.
2734         #
2735         #  @ref tui_creation_face "Example"
2736         def MakeDiskR(self, theR, theOrientation, theName=None):
2737             """
2738             Create a disk with specified dimensions along OX-OY coordinate axes.
2739
2740             Parameters:
2741                 theR Radius of Face.
2742                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2743                 theName Object name; when specified, this parameter is used
2744                         for result publication in the study. Otherwise, if automatic
2745                         publication is switched on, default value is used for result name.
2746
2747             Returns: 
2748                 New GEOM.GEOM_Object, containing the created disk.
2749
2750             Example of usage:
2751                 Disk3 = geompy.MakeDiskR(100., 1)
2752             """
2753             # Example: see GEOM_TestAll.py
2754             theR,Parameters = ParseParameters(theR)
2755             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2756             RaiseIfFailed("MakeDiskR", self.PrimOp)
2757             anObj.SetParameters(Parameters)
2758             self._autoPublish(anObj, theName, "disk")
2759             return anObj
2760
2761         ## Create a cylinder with given base point, axis, radius and height.
2762         #  @param thePnt Central point of cylinder base.
2763         #  @param theAxis Cylinder axis.
2764         #  @param theR Cylinder radius.
2765         #  @param theH Cylinder height.
2766         #  @param theName Object name; when specified, this parameter is used
2767         #         for result publication in the study. Otherwise, if automatic
2768         #         publication is switched on, default value is used for result name.
2769         #
2770         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2771         #
2772         #  @ref tui_creation_cylinder "Example"
2773         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2774             """
2775             Create a cylinder with given base point, axis, radius and height.
2776
2777             Parameters:
2778                 thePnt Central point of cylinder base.
2779                 theAxis Cylinder axis.
2780                 theR Cylinder radius.
2781                 theH Cylinder height.
2782                 theName Object name; when specified, this parameter is used
2783                         for result publication in the study. Otherwise, if automatic
2784                         publication is switched on, default value is used for result name.
2785
2786             Returns: 
2787                 New GEOM.GEOM_Object, containing the created cylinder.
2788             """
2789             # Example: see GEOM_TestAll.py
2790             theR,theH,Parameters = ParseParameters(theR, theH)
2791             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2792             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2793             anObj.SetParameters(Parameters)
2794             self._autoPublish(anObj, theName, "cylinder")
2795             return anObj
2796
2797         ## Create a cylinder with given radius and height at
2798         #  the origin of coordinate system. Axis of the cylinder
2799         #  will be collinear to the OZ axis of the coordinate system.
2800         #  @param theR Cylinder radius.
2801         #  @param theH Cylinder height.
2802         #  @param theName Object name; when specified, this parameter is used
2803         #         for result publication in the study. Otherwise, if automatic
2804         #         publication is switched on, default value is used for result name.
2805         #
2806         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2807         #
2808         #  @ref tui_creation_cylinder "Example"
2809         def MakeCylinderRH(self, theR, theH, theName=None):
2810             """
2811             Create a cylinder with given radius and height at
2812             the origin of coordinate system. Axis of the cylinder
2813             will be collinear to the OZ axis of the coordinate system.
2814
2815             Parameters:
2816                 theR Cylinder radius.
2817                 theH Cylinder height.
2818                 theName Object name; when specified, this parameter is used
2819                         for result publication in the study. Otherwise, if automatic
2820                         publication is switched on, default value is used for result name.
2821
2822             Returns:    
2823                 New GEOM.GEOM_Object, containing the created cylinder.
2824             """
2825             # Example: see GEOM_TestAll.py
2826             theR,theH,Parameters = ParseParameters(theR, theH)
2827             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2828             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2829             anObj.SetParameters(Parameters)
2830             self._autoPublish(anObj, theName, "cylinder")
2831             return anObj
2832
2833         ## Create a sphere with given center and radius.
2834         #  @param thePnt Sphere center.
2835         #  @param theR Sphere radius.
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 sphere.
2841         #
2842         #  @ref tui_creation_sphere "Example"
2843         def MakeSpherePntR(self, thePnt, theR, theName=None):
2844             """
2845             Create a sphere with given center and radius.
2846
2847             Parameters:
2848                 thePnt Sphere center.
2849                 theR Sphere radius.
2850                 theName Object name; when specified, this parameter is used
2851                         for result publication in the study. Otherwise, if automatic
2852                         publication is switched on, default value is used for result name.
2853
2854             Returns:    
2855                 New GEOM.GEOM_Object, containing the created sphere.            
2856             """
2857             # Example: see GEOM_TestAll.py
2858             theR,Parameters = ParseParameters(theR)
2859             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2860             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2861             anObj.SetParameters(Parameters)
2862             self._autoPublish(anObj, theName, "sphere")
2863             return anObj
2864
2865         ## Create a sphere with given center and radius.
2866         #  @param x,y,z Coordinates of sphere center.
2867         #  @param theR Sphere radius.
2868         #  @param theName Object name; when specified, this parameter is used
2869         #         for result publication in the study. Otherwise, if automatic
2870         #         publication is switched on, default value is used for result name.
2871         #
2872         #  @return New GEOM.GEOM_Object, containing the created sphere.
2873         #
2874         #  @ref tui_creation_sphere "Example"
2875         def MakeSphere(self, x, y, z, theR, theName=None):
2876             """
2877             Create a sphere with given center and radius.
2878
2879             Parameters: 
2880                 x,y,z Coordinates of sphere center.
2881                 theR Sphere radius.
2882                 theName Object name; when specified, this parameter is used
2883                         for result publication in the study. Otherwise, if automatic
2884                         publication is switched on, default value is used for result name.
2885
2886             Returns:
2887                 New GEOM.GEOM_Object, containing the created sphere.
2888             """
2889             # Example: see GEOM_TestAll.py
2890             point = self.MakeVertex(x, y, z)
2891             # note: auto-publishing is done in self.MakeSpherePntR()
2892             anObj = self.MakeSpherePntR(point, theR, theName)
2893             return anObj
2894
2895         ## Create a sphere with given radius at the origin of coordinate system.
2896         #  @param theR Sphere radius.
2897         #  @param theName Object name; when specified, this parameter is used
2898         #         for result publication in the study. Otherwise, if automatic
2899         #         publication is switched on, default value is used for result name.
2900         #
2901         #  @return New GEOM.GEOM_Object, containing the created sphere.
2902         #
2903         #  @ref tui_creation_sphere "Example"
2904         def MakeSphereR(self, theR, theName=None):
2905             """
2906             Create a sphere with given radius at the origin of coordinate system.
2907
2908             Parameters: 
2909                 theR Sphere radius.
2910                 theName Object name; when specified, this parameter is used
2911                         for result publication in the study. Otherwise, if automatic
2912                         publication is switched on, default value is used for result name.
2913
2914             Returns:
2915                 New GEOM.GEOM_Object, containing the created sphere.            
2916             """
2917             # Example: see GEOM_TestAll.py
2918             theR,Parameters = ParseParameters(theR)
2919             anObj = self.PrimOp.MakeSphereR(theR)
2920             RaiseIfFailed("MakeSphereR", self.PrimOp)
2921             anObj.SetParameters(Parameters)
2922             self._autoPublish(anObj, theName, "sphere")
2923             return anObj
2924
2925         ## Create a cone with given base point, axis, height and radiuses.
2926         #  @param thePnt Central point of the first cone base.
2927         #  @param theAxis Cone axis.
2928         #  @param theR1 Radius of the first cone base.
2929         #  @param theR2 Radius of the second cone base.
2930         #    \note If both radiuses are non-zero, the cone will be truncated.
2931         #    \note If the radiuses are equal, a cylinder will be created instead.
2932         #  @param theH Cone height.
2933         #  @param theName Object name; when specified, this parameter is used
2934         #         for result publication in the study. Otherwise, if automatic
2935         #         publication is switched on, default value is used for result name.
2936         #
2937         #  @return New GEOM.GEOM_Object, containing the created cone.
2938         #
2939         #  @ref tui_creation_cone "Example"
2940         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2941             """
2942             Create a cone with given base point, axis, height and radiuses.
2943
2944             Parameters: 
2945                 thePnt Central point of the first cone base.
2946                 theAxis Cone axis.
2947                 theR1 Radius of the first cone base.
2948                 theR2 Radius of the second cone base.
2949                 theH Cone height.
2950                 theName Object name; when specified, this parameter is used
2951                         for result publication in the study. Otherwise, if automatic
2952                         publication is switched on, default value is used for result name.
2953
2954             Note:
2955                 If both radiuses are non-zero, the cone will be truncated.
2956                 If the radiuses are equal, a cylinder will be created instead.
2957
2958             Returns:
2959                 New GEOM.GEOM_Object, containing the created cone.
2960             """
2961             # Example: see GEOM_TestAll.py
2962             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2963             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2964             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2965             anObj.SetParameters(Parameters)
2966             self._autoPublish(anObj, theName, "cone")
2967             return anObj
2968
2969         ## Create a cone with given height and radiuses at
2970         #  the origin of coordinate system. Axis of the cone will
2971         #  be collinear to the OZ axis of the coordinate system.
2972         #  @param theR1 Radius of the first cone base.
2973         #  @param theR2 Radius of the second cone base.
2974         #    \note If both radiuses are non-zero, the cone will be truncated.
2975         #    \note If the radiuses are equal, a cylinder will be created instead.
2976         #  @param theH Cone height.
2977         #  @param theName Object name; when specified, this parameter is used
2978         #         for result publication in the study. Otherwise, if automatic
2979         #         publication is switched on, default value is used for result name.
2980         #
2981         #  @return New GEOM.GEOM_Object, containing the created cone.
2982         #
2983         #  @ref tui_creation_cone "Example"
2984         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
2985             """
2986             Create a cone with given height and radiuses at
2987             the origin of coordinate system. Axis of the cone will
2988             be collinear to the OZ axis of the coordinate system.
2989
2990             Parameters: 
2991                 theR1 Radius of the first cone base.
2992                 theR2 Radius of the second cone base.
2993                 theH Cone height.
2994                 theName Object name; when specified, this parameter is used
2995                         for result publication in the study. Otherwise, if automatic
2996                         publication is switched on, default value is used for result name.
2997
2998             Note:
2999                 If both radiuses are non-zero, the cone will be truncated.
3000                 If the radiuses are equal, a cylinder will be created instead.
3001
3002             Returns:
3003                 New GEOM.GEOM_Object, containing the created cone.
3004             """
3005             # Example: see GEOM_TestAll.py
3006             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3007             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3008             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3009             anObj.SetParameters(Parameters)
3010             self._autoPublish(anObj, theName, "cone")
3011             return anObj
3012
3013         ## Create a torus with given center, normal vector and radiuses.
3014         #  @param thePnt Torus central point.
3015         #  @param theVec Torus axis of symmetry.
3016         #  @param theRMajor Torus major radius.
3017         #  @param theRMinor Torus minor radius.
3018         #  @param theName Object name; when specified, this parameter is used
3019         #         for result publication in the study. Otherwise, if automatic
3020         #         publication is switched on, default value is used for result name.
3021         #
3022         #  @return New GEOM.GEOM_Object, containing the created torus.
3023         #
3024         #  @ref tui_creation_torus "Example"
3025         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3026             """
3027             Create a torus with given center, normal vector and radiuses.
3028
3029             Parameters: 
3030                 thePnt Torus central point.
3031                 theVec Torus axis of symmetry.
3032                 theRMajor Torus major radius.
3033                 theRMinor Torus minor radius.
3034                 theName Object name; when specified, this parameter is used
3035                         for result publication in the study. Otherwise, if automatic
3036                         publication is switched on, default value is used for result name.
3037
3038            Returns:
3039                 New GEOM.GEOM_Object, containing the created torus.
3040             """
3041             # Example: see GEOM_TestAll.py
3042             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3043             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3044             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3045             anObj.SetParameters(Parameters)
3046             self._autoPublish(anObj, theName, "torus")
3047             return anObj
3048
3049         ## Create a torus with given radiuses at the origin of coordinate system.
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 MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3060             """
3061            Create a torus with given radiuses at the origin of coordinate system.
3062
3063            Parameters: 
3064                 theRMajor Torus major radius.
3065                 theRMinor Torus minor radius.
3066                 theName Object name; when specified, this parameter is used
3067                         for result publication in the study. Otherwise, if automatic
3068                         publication is switched on, default value is used for result name.
3069
3070            Returns:
3071                 New GEOM.GEOM_Object, containing the created torus.            
3072             """
3073             # Example: see GEOM_TestAll.py
3074             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3075             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3076             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3077             anObj.SetParameters(Parameters)
3078             self._autoPublish(anObj, theName, "torus")
3079             return anObj
3080
3081         # end of l3_3d_primitives
3082         ## @}
3083
3084         ## @addtogroup l3_complex
3085         ## @{
3086
3087         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3088         #  @param theBase Base shape to be extruded.
3089         #  @param thePoint1 First end of extrusion vector.
3090         #  @param thePoint2 Second end of extrusion vector.
3091         #  @param theScaleFactor Use it to make prism with scaled second base.
3092         #                        Nagative value means not scaled second base.
3093         #  @param theName Object name; when specified, this parameter is used
3094         #         for result publication in the study. Otherwise, if automatic
3095         #         publication is switched on, default value is used for result name.
3096         #
3097         #  @return New GEOM.GEOM_Object, containing the created prism.
3098         #
3099         #  @ref tui_creation_prism "Example"
3100         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3101             """
3102             Create a shape by extrusion of the base shape along a vector, defined by two points.
3103
3104             Parameters: 
3105                 theBase Base shape to be extruded.
3106                 thePoint1 First end of extrusion vector.
3107                 thePoint2 Second end of extrusion vector.
3108                 theScaleFactor Use it to make prism with scaled second base.
3109                                Nagative value means not scaled second base.
3110                 theName Object name; when specified, this parameter is used
3111                         for result publication in the study. Otherwise, if automatic
3112                         publication is switched on, default value is used for result name.
3113
3114             Returns:
3115                 New GEOM.GEOM_Object, containing the created prism.
3116             """
3117             # Example: see GEOM_TestAll.py
3118             anObj = None
3119             Parameters = ""
3120             if theScaleFactor > 0:
3121                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3122                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3123             else:
3124                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3125             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3126             anObj.SetParameters(Parameters)
3127             self._autoPublish(anObj, theName, "prism")
3128             return anObj
3129
3130         ## Create a shape by extrusion of the base shape along a
3131         #  vector, defined by two points, in 2 Ways (forward/backward).
3132         #  @param theBase Base shape to be extruded.
3133         #  @param thePoint1 First end of extrusion vector.
3134         #  @param thePoint2 Second end of extrusion vector.
3135         #  @param theName Object name; when specified, this parameter is used
3136         #         for result publication in the study. Otherwise, if automatic
3137         #         publication is switched on, default value is used for result name.
3138         #
3139         #  @return New GEOM.GEOM_Object, containing the created prism.
3140         #
3141         #  @ref tui_creation_prism "Example"
3142         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3143             """
3144             Create a shape by extrusion of the base shape along a
3145             vector, defined by two points, in 2 Ways (forward/backward).
3146
3147             Parameters: 
3148                 theBase Base shape to be extruded.
3149                 thePoint1 First end of extrusion vector.
3150                 thePoint2 Second end of extrusion vector.
3151                 theName Object name; when specified, this parameter is used
3152                         for result publication in the study. Otherwise, if automatic
3153                         publication is switched on, default value is used for result name.
3154
3155             Returns:
3156                 New GEOM.GEOM_Object, containing the created prism.
3157             """
3158             # Example: see GEOM_TestAll.py
3159             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3160             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3161             self._autoPublish(anObj, theName, "prism")
3162             return anObj
3163
3164         ## Create a shape by extrusion of the base shape along the vector,
3165         #  i.e. all the space, transfixed by the base shape during its translation
3166         #  along the vector on the given distance.
3167         #  @param theBase Base shape to be extruded.
3168         #  @param theVec Direction of extrusion.
3169         #  @param theH Prism dimension along theVec.
3170         #  @param theScaleFactor Use it to make prism with scaled second base.
3171         #                        Negative value means not scaled second base.
3172         #  @param theName Object name; when specified, this parameter is used
3173         #         for result publication in the study. Otherwise, if automatic
3174         #         publication is switched on, default value is used for result name.
3175         #
3176         #  @return New GEOM.GEOM_Object, containing the created prism.
3177         #
3178         #  @ref tui_creation_prism "Example"
3179         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3180             """
3181             Create a shape by extrusion of the base shape along the vector,
3182             i.e. all the space, transfixed by the base shape during its translation
3183             along the vector on the given distance.
3184
3185             Parameters: 
3186                 theBase Base shape to be extruded.
3187                 theVec Direction of extrusion.
3188                 theH Prism dimension along theVec.
3189                 theScaleFactor Use it to make prism with scaled second base.
3190                                Negative value means not scaled second base.
3191                 theName Object name; when specified, this parameter is used
3192                         for result publication in the study. Otherwise, if automatic
3193                         publication is switched on, default value is used for result name.
3194
3195             Returns:
3196                 New GEOM.GEOM_Object, containing the created prism.
3197             """
3198             # Example: see GEOM_TestAll.py
3199             anObj = None
3200             Parameters = ""
3201             if theScaleFactor > 0:
3202                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3203                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3204             else:
3205                 theH,Parameters = ParseParameters(theH)
3206                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3207             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3208             anObj.SetParameters(Parameters)
3209             self._autoPublish(anObj, theName, "prism")
3210             return anObj
3211
3212         ## Create a shape by extrusion of the base shape along the vector,
3213         #  i.e. all the space, transfixed by the base shape during its translation
3214         #  along the vector on the given distance in 2 Ways (forward/backward).
3215         #  @param theBase Base shape to be extruded.
3216         #  @param theVec Direction of extrusion.
3217         #  @param theH Prism dimension along theVec in forward direction.
3218         #  @param theName Object name; when specified, this parameter is used
3219         #         for result publication in the study. Otherwise, if automatic
3220         #         publication is switched on, default value is used for result name.
3221         #
3222         #  @return New GEOM.GEOM_Object, containing the created prism.
3223         #
3224         #  @ref tui_creation_prism "Example"
3225         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3226             """
3227             Create a shape by extrusion of the base shape along the vector,
3228             i.e. all the space, transfixed by the base shape during its translation
3229             along the vector on the given distance in 2 Ways (forward/backward).
3230
3231             Parameters:
3232                 theBase Base shape to be extruded.
3233                 theVec Direction of extrusion.
3234                 theH Prism dimension along theVec in forward direction.
3235                 theName Object name; when specified, this parameter is used
3236                         for result publication in the study. Otherwise, if automatic
3237                         publication is switched on, default value is used for result name.
3238
3239             Returns:
3240                 New GEOM.GEOM_Object, containing the created prism.
3241             """
3242             # Example: see GEOM_TestAll.py
3243             theH,Parameters = ParseParameters(theH)
3244             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3245             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3246             anObj.SetParameters(Parameters)
3247             self._autoPublish(anObj, theName, "prism")
3248             return anObj
3249
3250         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3251         #  @param theBase Base shape to be extruded.
3252         #  @param theDX, theDY, theDZ Directions of extrusion.
3253         #  @param theScaleFactor Use it to make prism with scaled second base.
3254         #                        Nagative value means not scaled second base.
3255         #  @param theName Object name; when specified, this parameter is used
3256         #         for result publication in the study. Otherwise, if automatic
3257         #         publication is switched on, default value is used for result name.
3258         #
3259         #  @return New GEOM.GEOM_Object, containing the created prism.
3260         #
3261         #  @ref tui_creation_prism "Example"
3262         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3263             """
3264             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3265
3266             Parameters:
3267                 theBase Base shape to be extruded.
3268                 theDX, theDY, theDZ Directions of extrusion.
3269                 theScaleFactor Use it to make prism with scaled second base.
3270                                Nagative value means not scaled second base.
3271                 theName Object name; when specified, this parameter is used
3272                         for result publication in the study. Otherwise, if automatic
3273                         publication is switched on, default value is used for result name.
3274
3275             Returns: 
3276                 New GEOM.GEOM_Object, containing the created prism.
3277             """
3278             # Example: see GEOM_TestAll.py
3279             anObj = None
3280             Parameters = ""
3281             if theScaleFactor > 0:
3282                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3283                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3284             else:
3285                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3286                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3287             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3288             anObj.SetParameters(Parameters)
3289             self._autoPublish(anObj, theName, "prism")
3290             return anObj
3291
3292         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3293         #  i.e. all the space, transfixed by the base shape during its translation
3294         #  along the vector on the given distance in 2 Ways (forward/backward).
3295         #  @param theBase Base shape to be extruded.
3296         #  @param theDX, theDY, theDZ Directions of extrusion.
3297         #  @param theName Object name; when specified, this parameter is used
3298         #         for result publication in the study. Otherwise, if automatic
3299         #         publication is switched on, default value is used for result name.
3300         #
3301         #  @return New GEOM.GEOM_Object, containing the created prism.
3302         #
3303         #  @ref tui_creation_prism "Example"
3304         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3305             """
3306             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3307             i.e. all the space, transfixed by the base shape during its translation
3308             along the vector on the given distance in 2 Ways (forward/backward).
3309
3310             Parameters:
3311                 theBase Base shape to be extruded.
3312                 theDX, theDY, theDZ Directions of extrusion.
3313                 theName Object name; when specified, this parameter is used
3314                         for result publication in the study. Otherwise, if automatic
3315                         publication is switched on, default value is used for result name.
3316
3317             Returns:
3318                 New GEOM.GEOM_Object, containing the created prism.
3319             """
3320             # Example: see GEOM_TestAll.py
3321             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3322             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3323             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3324             anObj.SetParameters(Parameters)
3325             self._autoPublish(anObj, theName, "prism")
3326             return anObj
3327
3328         ## Create a shape by revolution of the base shape around the axis
3329         #  on the given angle, i.e. all the space, transfixed by the base
3330         #  shape during its rotation around the axis on the given angle.
3331         #  @param theBase Base shape to be rotated.
3332         #  @param theAxis Rotation axis.
3333         #  @param theAngle Rotation angle in radians.
3334         #  @param theName Object name; when specified, this parameter is used
3335         #         for result publication in the study. Otherwise, if automatic
3336         #         publication is switched on, default value is used for result name.
3337         #
3338         #  @return New GEOM.GEOM_Object, containing the created revolution.
3339         #
3340         #  @ref tui_creation_revolution "Example"
3341         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3342             """
3343             Create a shape by revolution of the base shape around the axis
3344             on the given angle, i.e. all the space, transfixed by the base
3345             shape during its rotation around the axis on the given angle.
3346
3347             Parameters:
3348                 theBase Base shape to be rotated.
3349                 theAxis Rotation axis.
3350                 theAngle Rotation angle in radians.
3351                 theName Object name; when specified, this parameter is used
3352                         for result publication in the study. Otherwise, if automatic
3353                         publication is switched on, default value is used for result name.
3354
3355             Returns: 
3356                 New GEOM.GEOM_Object, containing the created revolution.
3357             """
3358             # Example: see GEOM_TestAll.py
3359             theAngle,Parameters = ParseParameters(theAngle)
3360             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3361             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3362             anObj.SetParameters(Parameters)
3363             self._autoPublish(anObj, theName, "revolution")
3364             return anObj
3365
3366         ## Create a shape by revolution of the base shape around the axis
3367         #  on the given angle, i.e. all the space, transfixed by the base
3368         #  shape during its rotation around the axis on the given angle in
3369         #  both directions (forward/backward)
3370         #  @param theBase Base shape to be rotated.
3371         #  @param theAxis Rotation axis.
3372         #  @param theAngle Rotation angle in radians.
3373         #  @param theName Object name; when specified, this parameter is used
3374         #         for result publication in the study. Otherwise, if automatic
3375         #         publication is switched on, default value is used for result name.
3376         #
3377         #  @return New GEOM.GEOM_Object, containing the created revolution.
3378         #
3379         #  @ref tui_creation_revolution "Example"
3380         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3381             """
3382             Create a shape by revolution of the base shape around the axis
3383             on the given angle, i.e. all the space, transfixed by the base
3384             shape during its rotation around the axis on the given angle in
3385             both directions (forward/backward).
3386
3387             Parameters:
3388                 theBase Base shape to be rotated.
3389                 theAxis Rotation axis.
3390                 theAngle Rotation angle in radians.
3391                 theName Object name; when specified, this parameter is used
3392                         for result publication in the study. Otherwise, if automatic
3393                         publication is switched on, default value is used for result name.
3394
3395             Returns: 
3396                 New GEOM.GEOM_Object, containing the created revolution.
3397             """
3398             theAngle,Parameters = ParseParameters(theAngle)
3399             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3400             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3401             anObj.SetParameters(Parameters)
3402             self._autoPublish(anObj, theName, "revolution")
3403             return anObj
3404
3405         ## Create a filling from the given compound of contours.
3406         #  @param theShape the compound of contours
3407         #  @param theMinDeg a minimal degree of BSpline surface to create
3408         #  @param theMaxDeg a maximal degree of BSpline surface to create
3409         #  @param theTol2D a 2d tolerance to be reached
3410         #  @param theTol3D a 3d tolerance to be reached
3411         #  @param theNbIter a number of iteration of approximation algorithm
3412         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3413         #  @param isApprox if True, BSpline curves are generated in the process
3414         #                  of surface construction. By default it is False, that means
3415         #                  the surface is created using given curves. The usage of
3416         #                  Approximation makes the algorithm work slower, but allows
3417         #                  building the surface for rather complex cases.
3418         #  @param theName Object name; when specified, this parameter is used
3419         #         for result publication in the study. Otherwise, if automatic
3420         #         publication is switched on, default value is used for result name.
3421         #
3422         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3423         #
3424         #  @ref tui_creation_filling "Example"
3425         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3426                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3427             """
3428             Create a filling from the given compound of contours.
3429
3430             Parameters:
3431                 theShape the compound of contours
3432                 theMinDeg a minimal degree of BSpline surface to create
3433                 theMaxDeg a maximal degree of BSpline surface to create
3434                 theTol2D a 2d tolerance to be reached
3435                 theTol3D a 3d tolerance to be reached
3436                 theNbIter a number of iteration of approximation algorithm
3437                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3438                 isApprox if True, BSpline curves are generated in the process
3439                          of surface construction. By default it is False, that means
3440                          the surface is created using given curves. The usage of
3441                          Approximation makes the algorithm work slower, but allows
3442                          building the surface for rather complex cases
3443                 theName Object name; when specified, this parameter is used
3444                         for result publication in the study. Otherwise, if automatic
3445                         publication is switched on, default value is used for result name.
3446
3447             Returns: 
3448                 New GEOM.GEOM_Object, containing the created filling surface.
3449
3450             Example of usage:
3451                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3452             """
3453             # Example: see GEOM_TestAll.py
3454             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3455             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3456                                             theTol2D, theTol3D, theNbIter,
3457                                             theMethod, isApprox)
3458             RaiseIfFailed("MakeFilling", self.PrimOp)
3459             anObj.SetParameters(Parameters)
3460             self._autoPublish(anObj, theName, "filling")
3461             return anObj
3462
3463
3464         ## Create a filling from the given compound of contours.
3465         #  This method corresponds to MakeFilling with isApprox=True
3466         #  @param theShape the compound of contours
3467         #  @param theMinDeg a minimal degree of BSpline surface to create
3468         #  @param theMaxDeg a maximal degree of BSpline surface to create
3469         #  @param theTol3D a 3d tolerance to be reached
3470         #  @param theName Object name; when specified, this parameter is used
3471         #         for result publication in the study. Otherwise, if automatic
3472         #         publication is switched on, default value is used for result name.
3473         #
3474         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3475         #
3476         #  @ref tui_creation_filling "Example"
3477         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3478             """
3479             Create a filling from the given compound of contours.
3480             This method corresponds to MakeFilling with isApprox=True
3481
3482             Parameters:
3483                 theShape the compound of contours
3484                 theMinDeg a minimal degree of BSpline surface to create
3485                 theMaxDeg a maximal degree of BSpline surface to create
3486                 theTol3D a 3d tolerance to be reached
3487                 theName Object name; when specified, this parameter is used
3488                         for result publication in the study. Otherwise, if automatic
3489                         publication is switched on, default value is used for result name.
3490
3491             Returns: 
3492                 New GEOM.GEOM_Object, containing the created filling surface.
3493
3494             Example of usage:
3495                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3496             """
3497             # Example: see GEOM_TestAll.py
3498             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3499             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3500                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3501             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3502             anObj.SetParameters(Parameters)
3503             self._autoPublish(anObj, theName, "filling")
3504             return anObj
3505
3506         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3507         #  @param theSeqSections - set of specified sections.
3508         #  @param theModeSolid - mode defining building solid or shell
3509         #  @param thePreci - precision 3D used for smoothing
3510         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3511         #  @param theName Object name; when specified, this parameter is used
3512         #         for result publication in the study. Otherwise, if automatic
3513         #         publication is switched on, default value is used for result name.
3514         #
3515         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3516         #
3517         #  @ref swig_todo "Example"
3518         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3519             """
3520             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3521
3522             Parameters:
3523                 theSeqSections - set of specified sections.
3524                 theModeSolid - mode defining building solid or shell
3525                 thePreci - precision 3D used for smoothing
3526                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3527                 theName Object name; when specified, this parameter is used
3528                         for result publication in the study. Otherwise, if automatic
3529                         publication is switched on, default value is used for result name.
3530
3531             Returns:
3532                 New GEOM.GEOM_Object, containing the created shell or solid.
3533             """
3534             # Example: see GEOM_TestAll.py
3535             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3536             RaiseIfFailed("MakeThruSections", self.PrimOp)
3537             self._autoPublish(anObj, theName, "filling")
3538             return anObj
3539
3540         ## Create a shape by extrusion of the base shape along
3541         #  the path shape. The path shape can be a wire or an edge.
3542         #  @param theBase Base shape to be extruded.
3543         #  @param thePath Path shape to extrude the base shape along it.
3544         #  @param theName Object name; when specified, this parameter is used
3545         #         for result publication in the study. Otherwise, if automatic
3546         #         publication is switched on, default value is used for result name.
3547         #
3548         #  @return New GEOM.GEOM_Object, containing the created pipe.
3549         #
3550         #  @ref tui_creation_pipe "Example"
3551         def MakePipe(self, theBase, thePath, theName=None):
3552             """
3553             Create a shape by extrusion of the base shape along
3554             the path shape. The path shape can be a wire or an edge.
3555
3556             Parameters:
3557                 theBase Base shape to be extruded.
3558                 thePath Path shape to extrude the base shape along it.
3559                 theName Object name; when specified, this parameter is used
3560                         for result publication in the study. Otherwise, if automatic
3561                         publication is switched on, default value is used for result name.
3562
3563             Returns:
3564                 New GEOM.GEOM_Object, containing the created pipe.
3565             """
3566             # Example: see GEOM_TestAll.py
3567             anObj = self.PrimOp.MakePipe(theBase, thePath)
3568             RaiseIfFailed("MakePipe", self.PrimOp)
3569             self._autoPublish(anObj, theName, "pipe")
3570             return anObj
3571
3572         ## Create a shape by extrusion of the profile shape along
3573         #  the path shape. The path shape can be a wire or an edge.
3574         #  the several profiles can be specified in the several locations of path.
3575         #  @param theSeqBases - list of  Bases shape to be extruded.
3576         #  @param theLocations - list of locations on the path corresponding
3577         #                        specified list of the Bases shapes. Number of locations
3578         #                        should be equal to number of bases or list of locations can be empty.
3579         #  @param thePath - Path shape to extrude the base shape along it.
3580         #  @param theWithContact - the mode defining that the section is translated to be in
3581         #                          contact with the spine.
3582         #  @param theWithCorrection - defining that the section is rotated to be
3583         #                             orthogonal to the spine tangent in the correspondent point
3584         #  @param theName Object name; when specified, this parameter is used
3585         #         for result publication in the study. Otherwise, if automatic
3586         #         publication is switched on, default value is used for result name.
3587         #
3588         #  @return New GEOM.GEOM_Object, containing the created pipe.
3589         #
3590         #  @ref tui_creation_pipe_with_diff_sec "Example"
3591         def MakePipeWithDifferentSections(self, theSeqBases,
3592                                           theLocations, thePath,
3593                                           theWithContact, theWithCorrection, theName=None):
3594             """
3595             Create a shape by extrusion of the profile shape along
3596             the path shape. The path shape can be a wire or an edge.
3597             the several profiles can be specified in the several locations of path.
3598
3599             Parameters:
3600                 theSeqBases - list of  Bases shape to be extruded.
3601                 theLocations - list of locations on the path corresponding
3602                                specified list of the Bases shapes. Number of locations
3603                                should be equal to number of bases or list of locations can be empty.
3604                 thePath - Path shape to extrude the base shape along it.
3605                 theWithContact - the mode defining that the section is translated to be in
3606                                  contact with the spine(0/1)
3607                 theWithCorrection - defining that the section is rotated to be
3608                                     orthogonal to the spine tangent in the correspondent point (0/1)
3609                 theName Object name; when specified, this parameter is used
3610                         for result publication in the study. Otherwise, if automatic
3611                         publication is switched on, default value is used for result name.
3612
3613             Returns:
3614                 New GEOM.GEOM_Object, containing the created pipe.
3615             """
3616             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3617                                                               theLocations, thePath,
3618                                                               theWithContact, theWithCorrection)
3619             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3620             self._autoPublish(anObj, theName, "pipe")
3621             return anObj
3622
3623         ## Create a shape by extrusion of the profile shape along
3624         #  the path shape. The path shape can be a wire or a edge.
3625         #  the several profiles can be specified in the several locations of path.
3626         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3627         #                       shell or face. If number of faces in neighbour sections
3628         #                       aren't coincided result solid between such sections will
3629         #                       be created using external boundaries of this shells.
3630         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3631         #                          This list is used for searching correspondences between
3632         #                          faces in the sections. Size of this list must be equal
3633         #                          to size of list of base shapes.
3634         #  @param theLocations - list of locations on the path corresponding
3635         #                        specified list of the Bases shapes. Number of locations
3636         #                        should be equal to number of bases. First and last
3637         #                        locations must be coincided with first and last vertexes
3638         #                        of path correspondingly.
3639         #  @param thePath - Path shape to extrude the base shape along it.
3640         #  @param theWithContact - the mode defining that the section is translated to be in
3641         #                          contact with the spine.
3642         #  @param theWithCorrection - defining that the section is rotated to be
3643         #                             orthogonal to the spine tangent in the correspondent point
3644         #  @param theName Object name; when specified, this parameter is used
3645         #         for result publication in the study. Otherwise, if automatic
3646         #         publication is switched on, default value is used for result name.
3647         #
3648         #  @return New GEOM.GEOM_Object, containing the created solids.
3649         #
3650         #  @ref tui_creation_pipe_with_shell_sec "Example"
3651         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3652                                       theLocations, thePath,
3653                                       theWithContact, theWithCorrection, theName=None):
3654             """
3655             Create a shape by extrusion of the profile shape along
3656             the path shape. The path shape can be a wire or a edge.
3657             the several profiles can be specified in the several locations of path.
3658
3659             Parameters:
3660                 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                 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                 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                 thePath - Path shape to extrude the base shape along it.
3674                 theWithContact - the mode defining that the section is translated to be in
3675                                  contact with the spine (0/1)
3676                 theWithCorrection - defining that the section is rotated to be
3677                                     orthogonal to the spine tangent in the correspondent point (0/1)
3678                 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             Returns:                           
3683                 New GEOM.GEOM_Object, containing the created solids.
3684             """
3685             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3686                                                           theLocations, thePath,
3687                                                           theWithContact, theWithCorrection)
3688             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3689             self._autoPublish(anObj, theName, "pipe")
3690             return anObj
3691
3692         ## Create a shape by extrusion of the profile shape along
3693         #  the path shape. This function is used only for debug pipe
3694         #  functionality - it is a version of function MakePipeWithShellSections()
3695         #  which give a possibility to recieve information about
3696         #  creating pipe between each pair of sections step by step.
3697         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3698                                              theLocations, thePath,
3699                                              theWithContact, theWithCorrection, theName=None):
3700             """
3701             Create a shape by extrusion of the profile shape along
3702             the path shape. This function is used only for debug pipe
3703             functionality - it is a version of previous function
3704             geompy.MakePipeWithShellSections() which give a possibility to
3705             recieve information about creating pipe between each pair of
3706             sections step by step.
3707             """
3708             res = []
3709             nbsect = len(theSeqBases)
3710             nbsubsect = len(theSeqSubBases)
3711             #print "nbsect = ",nbsect
3712             for i in range(1,nbsect):
3713                 #print "  i = ",i
3714                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3715                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3716                 tmpSeqSubBases = []
3717                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3718                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3719                                                               tmpLocations, thePath,
3720                                                               theWithContact, theWithCorrection)
3721                 if self.PrimOp.IsDone() == 0:
3722                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3723                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3724                     break
3725                 else:
3726                     print "Pipe between ",i," and ",i+1," sections is OK"
3727                     res.append(anObj)
3728                     pass
3729                 pass
3730
3731             resc = self.MakeCompound(res)
3732             #resc = self.MakeSewing(res, 0.001)
3733             #print "resc: ",resc
3734             self._autoPublish(resc, theName, "pipe")
3735             return resc
3736
3737         ## Create solids between given sections
3738         #  @param theSeqBases - list of sections (shell or face).
3739         #  @param theLocations - list of corresponding vertexes
3740         #  @param theName Object name; when specified, this parameter is used
3741         #         for result publication in the study. Otherwise, if automatic
3742         #         publication is switched on, default value is used for result name.
3743         #
3744         #  @return New GEOM.GEOM_Object, containing the created solids.
3745         #
3746         #  @ref tui_creation_pipe_without_path "Example"
3747         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3748             """
3749             Create solids between given sections
3750
3751             Parameters:
3752                 theSeqBases - list of sections (shell or face).
3753                 theLocations - list of corresponding vertexes
3754                 theName Object name; when specified, this parameter is used
3755                         for result publication in the study. Otherwise, if automatic
3756                         publication is switched on, default value is used for result name.
3757
3758             Returns:
3759                 New GEOM.GEOM_Object, containing the created solids.
3760             """
3761             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3762             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3763             self._autoPublish(anObj, theName, "pipe")
3764             return anObj
3765
3766         ## Create a shape by extrusion of the base shape along
3767         #  the path shape with constant bi-normal direction along the given vector.
3768         #  The path shape can be a wire or an edge.
3769         #  @param theBase Base shape to be extruded.
3770         #  @param thePath Path shape to extrude the base shape along it.
3771         #  @param theVec Vector defines a constant binormal direction to keep the
3772         #                same angle beetween the direction and the sections
3773         #                along the sweep surface.
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 pipe.
3779         #
3780         #  @ref tui_creation_pipe "Example"
3781         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3782             """
3783             Create a shape by extrusion of the base shape along
3784             the path shape with constant bi-normal direction along the given vector.
3785             The path shape can be a wire or an edge.
3786
3787             Parameters:
3788                 theBase Base shape to be extruded.
3789                 thePath Path shape to extrude the base shape along it.
3790                 theVec Vector defines a constant binormal direction to keep the
3791                        same angle beetween the direction and the sections
3792                        along the sweep surface.
3793                 theName Object name; when specified, this parameter is used
3794                         for result publication in the study. Otherwise, if automatic
3795                         publication is switched on, default value is used for result name.
3796
3797             Returns:              
3798                 New GEOM.GEOM_Object, containing the created pipe.
3799             """
3800             # Example: see GEOM_TestAll.py
3801             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3802             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3803             self._autoPublish(anObj, theName, "pipe")
3804             return anObj
3805               
3806         ## Makes a thick solid from a face or a shell
3807         #  @param theShape Face or Shell to be thicken
3808         #  @param theThickness Thickness of the resulting solid
3809         #  @param theName Object name; when specified, this parameter is used
3810         #         for result publication in the study. Otherwise, if automatic
3811         #         publication is switched on, default value is used for result name.
3812         #
3813         #  @return New GEOM.GEOM_Object, containing the created solid
3814         #
3815         def MakeThickSolid(self, theShape, theThickness, theName=None):
3816             """
3817             Make a thick solid from a face or a shell
3818
3819             Parameters:
3820                  theShape Face or Shell to be thicken
3821                  theThickness Thickness of the resulting solid
3822                  theName Object name; when specified, this parameter is used
3823                  for result publication in the study. Otherwise, if automatic
3824                  publication is switched on, default value is used for result name.
3825                  
3826             Returns:
3827                 New GEOM.GEOM_Object, containing the created solid
3828             """
3829             # Example: see GEOM_TestAll.py
3830             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3831             RaiseIfFailed("MakeThickening", self.PrimOp)
3832             self._autoPublish(anObj, theName, "pipe")
3833             return anObj
3834             
3835
3836         ## Modifies a face or a shell to make it a thick solid
3837         #  @param theShape Face or Shell to be thicken
3838         #  @param theThickness Thickness of the resulting solid
3839         #
3840         #  @return The modified shape
3841         #
3842         def Thicken(self, theShape, theThickness):
3843             """
3844             Modifies a face or a shell to make it a thick solid
3845
3846             Parameters:
3847                 theBase Base shape to be extruded.
3848                 thePath Path shape to extrude the base shape along it.
3849                 theName Object name; when specified, this parameter is used
3850                         for result publication in the study. Otherwise, if automatic
3851                         publication is switched on, default value is used for result name.
3852
3853             Returns:
3854                 The modified shape
3855             """
3856             # Example: see GEOM_TestAll.py
3857             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3858             RaiseIfFailed("MakeThickening", self.PrimOp)
3859             return anObj
3860
3861         ## Build a middle path of a pipe-like shape.
3862         #  The path shape can be a wire or an edge.
3863         #  @param theShape It can be closed or unclosed pipe-like shell
3864         #                  or a pipe-like solid.
3865         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3866         #                            should be wires or faces of theShape.
3867         #  @param theName Object name; when specified, this parameter is used
3868         #         for result publication in the study. Otherwise, if automatic
3869         #         publication is switched on, default value is used for result name.
3870         #
3871         #  @note It is not assumed that exact or approximate copy of theShape
3872         #        can be obtained by applying existing Pipe operation on the
3873         #        resulting "Path" wire taking theBase1 as the base - it is not
3874         #        always possible; though in some particular cases it might work
3875         #        it is not guaranteed. Thus, RestorePath function should not be
3876         #        considered as an exact reverse operation of the Pipe.
3877         #
3878         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3879         #                                source pipe's "path".
3880         #
3881         #  @ref tui_creation_pipe_path "Example"
3882         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3883             """
3884             Build a middle path of a pipe-like shape.
3885             The path shape can be a wire or an edge.
3886
3887             Parameters:
3888                 theShape It can be closed or unclosed pipe-like shell
3889                          or a pipe-like solid.
3890                 theBase1, theBase2 Two bases of the supposed pipe. This
3891                                    should be wires or faces of theShape.
3892                 theName Object name; when specified, this parameter is used
3893                         for result publication in the study. Otherwise, if automatic
3894                         publication is switched on, default value is used for result name.
3895
3896             Returns:
3897                 New GEOM_Object, containing an edge or wire that represent
3898                                  source pipe's path.
3899             """
3900             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3901             RaiseIfFailed("RestorePath", self.PrimOp)
3902             self._autoPublish(anObj, theName, "path")
3903             return anObj
3904
3905         ## Build a middle path of a pipe-like shape.
3906         #  The path shape can be a wire or an edge.
3907         #  @param theShape It can be closed or unclosed pipe-like shell
3908         #                  or a pipe-like solid.
3909         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3910         #                                should be lists of edges of theShape.
3911         #  @param theName Object name; when specified, this parameter is used
3912         #         for result publication in the study. Otherwise, if automatic
3913         #         publication is switched on, default value is used for result name.
3914         #
3915         #  @note It is not assumed that exact or approximate copy of theShape
3916         #        can be obtained by applying existing Pipe operation on the
3917         #        resulting "Path" wire taking theBase1 as the base - it is not
3918         #        always possible; though in some particular cases it might work
3919         #        it is not guaranteed. Thus, RestorePath function should not be
3920         #        considered as an exact reverse operation of the Pipe.
3921         #
3922         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3923         #                                source pipe's "path".
3924         #
3925         #  @ref tui_creation_pipe_path "Example"
3926         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3927             """
3928             Build a middle path of a pipe-like shape.
3929             The path shape can be a wire or an edge.
3930
3931             Parameters:
3932                 theShape It can be closed or unclosed pipe-like shell
3933                          or a pipe-like solid.
3934                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3935                                        should be lists of edges of theShape.
3936                 theName Object name; when specified, this parameter is used
3937                         for result publication in the study. Otherwise, if automatic
3938                         publication is switched on, default value is used for result name.
3939
3940             Returns:
3941                 New GEOM_Object, containing an edge or wire that represent
3942                                  source pipe's path.
3943             """
3944             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3945             RaiseIfFailed("RestorePath", self.PrimOp)
3946             self._autoPublish(anObj, theName, "path")
3947             return anObj
3948
3949         # end of l3_complex
3950         ## @}
3951
3952         ## @addtogroup l3_advanced
3953         ## @{
3954
3955         ## Create a linear edge with specified ends.
3956         #  @param thePnt1 Point for the first end of edge.
3957         #  @param thePnt2 Point for the second end of edge.
3958         #  @param theName Object name; when specified, this parameter is used
3959         #         for result publication in the study. Otherwise, if automatic
3960         #         publication is switched on, default value is used for result name.
3961         #
3962         #  @return New GEOM.GEOM_Object, containing the created edge.
3963         #
3964         #  @ref tui_creation_edge "Example"
3965         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3966             """
3967             Create a linear edge with specified ends.
3968
3969             Parameters:
3970                 thePnt1 Point for the first end of edge.
3971                 thePnt2 Point for the second end of edge.
3972                 theName Object name; when specified, this parameter is used
3973                         for result publication in the study. Otherwise, if automatic
3974                         publication is switched on, default value is used for result name.
3975
3976             Returns:           
3977                 New GEOM.GEOM_Object, containing the created edge.
3978             """
3979             # Example: see GEOM_TestAll.py
3980             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
3981             RaiseIfFailed("MakeEdge", self.ShapesOp)
3982             self._autoPublish(anObj, theName, "edge")
3983             return anObj
3984
3985         ## Create a new edge, corresponding to the given length on the given curve.
3986         #  @param theRefCurve The referenced curve (edge).
3987         #  @param theLength Length on the referenced curve. It can be negative.
3988         #  @param theStartPoint Any point can be selected for it, the new edge will begin
3989         #                       at the end of \a theRefCurve, close to the selected point.
3990         #                       If None, start from the first point of \a theRefCurve.
3991         #  @param theName Object name; when specified, this parameter is used
3992         #         for result publication in the study. Otherwise, if automatic
3993         #         publication is switched on, default value is used for result name.
3994         #
3995         #  @return New GEOM.GEOM_Object, containing the created edge.
3996         #
3997         #  @ref tui_creation_edge "Example"
3998         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
3999             """
4000             Create a new edge, corresponding to the given length on the given curve.
4001
4002             Parameters:
4003                 theRefCurve The referenced curve (edge).
4004                 theLength Length on the referenced curve. It can be negative.
4005                 theStartPoint Any point can be selected for it, the new edge will begin
4006                               at the end of theRefCurve, close to the selected point.
4007                               If None, start from the first point of theRefCurve.
4008                 theName Object name; when specified, this parameter is used
4009                         for result publication in the study. Otherwise, if automatic
4010                         publication is switched on, default value is used for result name.
4011
4012             Returns:              
4013                 New GEOM.GEOM_Object, containing the created edge.
4014             """
4015             # Example: see GEOM_TestAll.py
4016             theLength, Parameters = ParseParameters(theLength)
4017             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4018             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4019             anObj.SetParameters(Parameters)
4020             self._autoPublish(anObj, theName, "edge")
4021             return anObj
4022
4023         ## Create an edge from specified wire.
4024         #  @param theWire source Wire
4025         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4026         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4027         #  @param theName Object name; when specified, this parameter is used
4028         #         for result publication in the study. Otherwise, if automatic
4029         #         publication is switched on, default value is used for result name.
4030         #
4031         #  @return New GEOM.GEOM_Object, containing the created edge.
4032         #
4033         #  @ref tui_creation_edge "Example"
4034         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4035             """
4036             Create an edge from specified wire.
4037
4038             Parameters:
4039                 theWire source Wire
4040                 theLinearTolerance linear tolerance value (default = 1e-07)
4041                 theAngularTolerance angular tolerance value (default = 1e-12)
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             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4051             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4052             self._autoPublish(anObj, theName, "edge")
4053             return anObj
4054
4055         ## Create a wire from the set of edges and wires.
4056         #  @param theEdgesAndWires List of edges and/or wires.
4057         #  @param theTolerance Maximum distance between vertices, that will be merged.
4058         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4059         #  @param theName Object name; when specified, this parameter is used
4060         #         for result publication in the study. Otherwise, if automatic
4061         #         publication is switched on, default value is used for result name.
4062         #
4063         #  @return New GEOM.GEOM_Object, containing the created wire.
4064         #
4065         #  @ref tui_creation_wire "Example"
4066         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4067             """
4068             Create a wire from the set of edges and wires.
4069
4070             Parameters:
4071                 theEdgesAndWires List of edges and/or wires.
4072                 theTolerance Maximum distance between vertices, that will be merged.
4073                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4074                 theName Object name; when specified, this parameter is used
4075                         for result publication in the study. Otherwise, if automatic
4076                         publication is switched on, default value is used for result name.
4077
4078             Returns:                    
4079                 New GEOM.GEOM_Object, containing the created wire.
4080             """
4081             # Example: see GEOM_TestAll.py
4082             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4083             RaiseIfFailed("MakeWire", self.ShapesOp)
4084             self._autoPublish(anObj, theName, "wire")
4085             return anObj
4086
4087         ## Create a face on the given wire.
4088         #  @param theWire closed Wire or Edge to build the face on.
4089         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4090         #                        If the tolerance of the obtained planar face is less
4091         #                        than 1e-06, this face will be returned, otherwise the
4092         #                        algorithm tries to build any suitable face on the given
4093         #                        wire and prints a warning message.
4094         #  @param theName Object name; when specified, this parameter is used
4095         #         for result publication in the study. Otherwise, if automatic
4096         #         publication is switched on, default value is used for result name.
4097         #
4098         #  @return New GEOM.GEOM_Object, containing the created face.
4099         #
4100         #  @ref tui_creation_face "Example"
4101         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4102             """
4103             Create a face on the given wire.
4104
4105             Parameters:
4106                 theWire closed Wire or Edge to build the face on.
4107                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4108                                If the tolerance of the obtained planar face is less
4109                                than 1e-06, this face will be returned, otherwise the
4110                                algorithm tries to build any suitable face on the given
4111                                wire and prints a warning message.
4112                 theName Object name; when specified, this parameter is used
4113                         for result publication in the study. Otherwise, if automatic
4114                         publication is switched on, default value is used for result name.
4115
4116             Returns:
4117                 New GEOM.GEOM_Object, containing the created face.
4118             """
4119             # Example: see GEOM_TestAll.py
4120             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4121             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4122                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4123             else:
4124                 RaiseIfFailed("MakeFace", self.ShapesOp)
4125             self._autoPublish(anObj, theName, "face")
4126             return anObj
4127
4128         ## Create a face on the given wires set.
4129         #  @param theWires List of closed wires or edges to build the face on.
4130         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4131         #                        If the tolerance of the obtained planar face is less
4132         #                        than 1e-06, this face will be returned, otherwise the
4133         #                        algorithm tries to build any suitable face on the given
4134         #                        wire and prints a warning message.
4135         #  @param theName Object name; when specified, this parameter is used
4136         #         for result publication in the study. Otherwise, if automatic
4137         #         publication is switched on, default value is used for result name.
4138         #
4139         #  @return New GEOM.GEOM_Object, containing the created face.
4140         #
4141         #  @ref tui_creation_face "Example"
4142         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4143             """
4144             Create a face on the given wires set.
4145
4146             Parameters:
4147                 theWires List of closed wires or edges to build the face on.
4148                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4149                                If the tolerance of the obtained planar face is less
4150                                than 1e-06, this face will be returned, otherwise the
4151                                algorithm tries to build any suitable face on the given
4152                                wire and prints a warning message.
4153                 theName Object name; when specified, this parameter is used
4154                         for result publication in the study. Otherwise, if automatic
4155                         publication is switched on, default value is used for result name.
4156
4157             Returns: 
4158                 New GEOM.GEOM_Object, containing the created face.
4159             """
4160             # Example: see GEOM_TestAll.py
4161             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4162             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4163                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4164             else:
4165                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4166             self._autoPublish(anObj, theName, "face")
4167             return anObj
4168
4169         ## See MakeFaceWires() method for details.
4170         #
4171         #  @ref tui_creation_face "Example 1"
4172         #  \n @ref swig_MakeFaces  "Example 2"
4173         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4174             """
4175             See geompy.MakeFaceWires() method for details.
4176             """
4177             # Example: see GEOM_TestOthers.py
4178             # note: auto-publishing is done in self.MakeFaceWires()
4179             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4180             return anObj
4181
4182         ## Create a shell from the set of faces and shells.
4183         #  @param theFacesAndShells List of faces and/or shells.
4184         #  @param theName Object name; when specified, this parameter is used
4185         #         for result publication in the study. Otherwise, if automatic
4186         #         publication is switched on, default value is used for result name.
4187         #
4188         #  @return New GEOM.GEOM_Object, containing the created shell.
4189         #
4190         #  @ref tui_creation_shell "Example"
4191         def MakeShell(self, theFacesAndShells, theName=None):
4192             """
4193             Create a shell from the set of faces and shells.
4194
4195             Parameters:
4196                 theFacesAndShells List of faces and/or shells.
4197                 theName Object name; when specified, this parameter is used
4198                         for result publication in the study. Otherwise, if automatic
4199                         publication is switched on, default value is used for result name.
4200
4201             Returns:
4202                 New GEOM.GEOM_Object, containing the created shell.
4203             """
4204             # Example: see GEOM_TestAll.py
4205             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4206             RaiseIfFailed("MakeShell", self.ShapesOp)
4207             self._autoPublish(anObj, theName, "shell")
4208             return anObj
4209
4210         ## Create a solid, bounded by the given shells.
4211         #  @param theShells Sequence of bounding shells.
4212         #  @param theName Object name; when specified, this parameter is used
4213         #         for result publication in the study. Otherwise, if automatic
4214         #         publication is switched on, default value is used for result name.
4215         #
4216         #  @return New GEOM.GEOM_Object, containing the created solid.
4217         #
4218         #  @ref tui_creation_solid "Example"
4219         def MakeSolid(self, theShells, theName=None):
4220             """
4221             Create a solid, bounded by the given shells.
4222
4223             Parameters:
4224                 theShells Sequence of bounding shells.
4225                 theName Object name; when specified, this parameter is used
4226                         for result publication in the study. Otherwise, if automatic
4227                         publication is switched on, default value is used for result name.
4228
4229             Returns:
4230                 New GEOM.GEOM_Object, containing the created solid.
4231             """
4232             # Example: see GEOM_TestAll.py
4233             if len(theShells) == 1:
4234                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4235                 #if len(descr) > 0:
4236                 #    raise RuntimeError, "MakeSolidShells : " + descr
4237                 if descr == "WRN_SHAPE_UNCLOSED":
4238                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4239             anObj = self.ShapesOp.MakeSolidShells(theShells)
4240             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4241             self._autoPublish(anObj, theName, "solid")
4242             return anObj
4243
4244         ## Create a compound of the given shapes.
4245         #  @param theShapes List of shapes to put in compound.
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 compound.
4251         #
4252         #  @ref tui_creation_compound "Example"
4253         def MakeCompound(self, theShapes, theName=None):
4254             """
4255             Create a compound of the given shapes.
4256
4257             Parameters:
4258                 theShapes List of shapes to put in compound.
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 compound.
4265             """
4266             # Example: see GEOM_TestAll.py
4267             anObj = self.ShapesOp.MakeCompound(theShapes)
4268             RaiseIfFailed("MakeCompound", self.ShapesOp)
4269             self._autoPublish(anObj, theName, "compound")
4270             return anObj
4271
4272         # end of l3_advanced
4273         ## @}
4274
4275         ## @addtogroup l2_measure
4276         ## @{
4277
4278         ## Gives quantity of faces in the given shape.
4279         #  @param theShape Shape to count faces of.
4280         #  @return Quantity of faces.
4281         #
4282         #  @ref swig_NumberOf "Example"
4283         def NumberOfFaces(self, theShape):
4284             """
4285             Gives quantity of faces in the given shape.
4286
4287             Parameters:
4288                 theShape Shape to count faces of.
4289
4290             Returns:    
4291                 Quantity of faces.
4292             """
4293             # Example: see GEOM_TestOthers.py
4294             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4295             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4296             return nb_faces
4297
4298         ## Gives quantity of edges in the given shape.
4299         #  @param theShape Shape to count edges of.
4300         #  @return Quantity of edges.
4301         #
4302         #  @ref swig_NumberOf "Example"
4303         def NumberOfEdges(self, theShape):
4304             """
4305             Gives quantity of edges in the given shape.
4306
4307             Parameters:
4308                 theShape Shape to count edges of.
4309
4310             Returns:    
4311                 Quantity of edges.
4312             """
4313             # Example: see GEOM_TestOthers.py
4314             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4315             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4316             return nb_edges
4317
4318         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4319         #  @param theShape Shape to count sub-shapes of.
4320         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4321         #  @return Quantity of sub-shapes of given type.
4322         #
4323         #  @ref swig_NumberOf "Example"
4324         def NumberOfSubShapes(self, theShape, theShapeType):
4325             """
4326             Gives quantity of sub-shapes of type theShapeType in the given shape.
4327
4328             Parameters:
4329                 theShape Shape to count sub-shapes of.
4330                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4331
4332             Returns:
4333                 Quantity of sub-shapes of given type.
4334             """
4335             # Example: see GEOM_TestOthers.py
4336             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4337             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4338             return nb_ss
4339
4340         ## Gives quantity of solids in the given shape.
4341         #  @param theShape Shape to count solids in.
4342         #  @return Quantity of solids.
4343         #
4344         #  @ref swig_NumberOf "Example"
4345         def NumberOfSolids(self, theShape):
4346             """
4347             Gives quantity of solids in the given shape.
4348
4349             Parameters:
4350                 theShape Shape to count solids in.
4351
4352             Returns:
4353                 Quantity of solids.
4354             """
4355             # Example: see GEOM_TestOthers.py
4356             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4357             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4358             return nb_solids
4359
4360         # end of l2_measure
4361         ## @}
4362
4363         ## @addtogroup l3_healing
4364         ## @{
4365
4366         ## Reverses an orientation the given shape.
4367         #  @param theShape Shape to be reversed.
4368         #  @param theName Object name; when specified, this parameter is used
4369         #         for result publication in the study. Otherwise, if automatic
4370         #         publication is switched on, default value is used for result name.
4371         #
4372         #  @return The reversed copy of theShape.
4373         #
4374         #  @ref swig_ChangeOrientation "Example"
4375         def ChangeOrientation(self, theShape, theName=None):
4376             """
4377             Reverses an orientation the given shape.
4378
4379             Parameters:
4380                 theShape Shape to be reversed.
4381                 theName Object name; when specified, this parameter is used
4382                         for result publication in the study. Otherwise, if automatic
4383                         publication is switched on, default value is used for result name.
4384
4385             Returns:   
4386                 The reversed copy of theShape.
4387             """
4388             # Example: see GEOM_TestAll.py
4389             anObj = self.ShapesOp.ChangeOrientation(theShape)
4390             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4391             self._autoPublish(anObj, theName, "reversed")
4392             return anObj
4393
4394         ## See ChangeOrientation() method for details.
4395         #
4396         #  @ref swig_OrientationChange "Example"
4397         def OrientationChange(self, theShape, theName=None):
4398             """
4399             See geompy.ChangeOrientation method for details.
4400             """
4401             # Example: see GEOM_TestOthers.py
4402             # note: auto-publishing is done in self.ChangeOrientation()
4403             anObj = self.ChangeOrientation(theShape, theName)
4404             return anObj
4405
4406         # end of l3_healing
4407         ## @}
4408
4409         ## @addtogroup l4_obtain
4410         ## @{
4411
4412         ## Retrieve all free faces from the given shape.
4413         #  Free face is a face, which is not shared between two shells of the shape.
4414         #  @param theShape Shape to find free faces in.
4415         #  @return List of IDs of all free faces, contained in theShape.
4416         #
4417         #  @ref tui_measurement_tools_page "Example"
4418         def GetFreeFacesIDs(self,theShape):
4419             """
4420             Retrieve all free faces from the given shape.
4421             Free face is a face, which is not shared between two shells of the shape.
4422
4423             Parameters:
4424                 theShape Shape to find free faces in.
4425
4426             Returns:
4427                 List of IDs of all free faces, contained in theShape.
4428             """
4429             # Example: see GEOM_TestOthers.py
4430             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4431             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4432             return anIDs
4433
4434         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4435         #  @param theShape1 Shape to find sub-shapes in.
4436         #  @param theShape2 Shape to find shared sub-shapes with.
4437         #  @param theShapeType Type of sub-shapes to be retrieved.
4438         #  @param theName Object name; when specified, this parameter is used
4439         #         for result publication in the study. Otherwise, if automatic
4440         #         publication is switched on, default value is used for result name.
4441         #
4442         #  @return List of sub-shapes of theShape1, shared with theShape2.
4443         #
4444         #  @ref swig_GetSharedShapes "Example"
4445         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4446             """
4447             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4448
4449             Parameters:
4450                 theShape1 Shape to find sub-shapes in.
4451                 theShape2 Shape to find shared sub-shapes with.
4452                 theShapeType Type of sub-shapes to be retrieved.
4453                 theName Object name; when specified, this parameter is used
4454                         for result publication in the study. Otherwise, if automatic
4455                         publication is switched on, default value is used for result name.
4456
4457             Returns:
4458                 List of sub-shapes of theShape1, shared with theShape2.
4459             """
4460             # Example: see GEOM_TestOthers.py
4461             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4462             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4463             self._autoPublish(aList, theName, "shared")
4464             return aList
4465
4466         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4467         #  @param theShapes Shapes to find common sub-shapes of.
4468         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4469         #  @param theName Object name; when specified, this parameter is used
4470         #         for result publication in the study. Otherwise, if automatic
4471         #         publication is switched on, default value is used for result name.
4472         #
4473         #  @return List of objects, that are sub-shapes of all given shapes.
4474         #
4475         #  @ref swig_GetSharedShapes "Example"
4476         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4477             """
4478             Get all sub-shapes, shared by all shapes in the list theShapes.
4479
4480             Parameters:
4481                 theShapes Shapes to find common sub-shapes of.
4482                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4483                 theName Object name; when specified, this parameter is used
4484                         for result publication in the study. Otherwise, if automatic
4485                         publication is switched on, default value is used for result name.
4486
4487             Returns:    
4488                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4489             """
4490             # Example: see GEOM_TestOthers.py
4491             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4492             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4493             self._autoPublish(aList, theName, "shared")
4494             return aList
4495
4496         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4497         #  situated relatively the specified plane by the certain way,
4498         #  defined through <VAR>theState</VAR> parameter.
4499         #  @param theShape Shape to find sub-shapes of.
4500         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4501         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4502         #                direction and location of the plane to find shapes on.
4503         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4504         #  @param theName Object name; when specified, this parameter is used
4505         #         for result publication in the study. Otherwise, if automatic
4506         #         publication is switched on, default value is used for result name.
4507         #
4508         #  @return List of all found sub-shapes.
4509         #
4510         #  @ref swig_GetShapesOnPlane "Example"
4511         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4512             """
4513             Find in theShape all sub-shapes of type theShapeType,
4514             situated relatively the specified plane by the certain way,
4515             defined through theState parameter.
4516
4517             Parameters:
4518                 theShape Shape to find sub-shapes of.
4519                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4520                 theAx1 Vector (or line, or linear edge), specifying normal
4521                        direction and location of the plane to find shapes on.
4522                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4523                 theName Object name; when specified, this parameter is used
4524                         for result publication in the study. Otherwise, if automatic
4525                         publication is switched on, default value is used for result name.
4526
4527             Returns:
4528                 List of all found sub-shapes.
4529             """
4530             # Example: see GEOM_TestOthers.py
4531             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4532             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4533             self._autoPublish(aList, theName, "shapeOnPlane")
4534             return aList
4535
4536         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4537         #  situated relatively the specified plane by the certain way,
4538         #  defined through <VAR>theState</VAR> parameter.
4539         #  @param theShape Shape to find sub-shapes of.
4540         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4541         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4542         #                direction and location of the plane to find shapes on.
4543         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4544         #
4545         #  @return List of all found sub-shapes indices.
4546         #
4547         #  @ref swig_GetShapesOnPlaneIDs "Example"
4548         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4549             """
4550             Find in theShape all sub-shapes of type theShapeType,
4551             situated relatively the specified plane by the certain way,
4552             defined through theState parameter.
4553
4554             Parameters:
4555                 theShape Shape to find sub-shapes of.
4556                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4557                 theAx1 Vector (or line, or linear edge), specifying normal
4558                        direction and location of the plane to find shapes on.
4559                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4560
4561             Returns:
4562                 List of all found sub-shapes indices.
4563             """
4564             # Example: see GEOM_TestOthers.py
4565             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4566             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4567             return aList
4568
4569         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4570         #  situated relatively the specified plane by the certain way,
4571         #  defined through <VAR>theState</VAR> parameter.
4572         #  @param theShape Shape to find sub-shapes of.
4573         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4574         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4575         #                direction of the plane to find shapes on.
4576         #  @param thePnt Point specifying location of the plane to find shapes on.
4577         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4578         #  @param theName Object name; when specified, this parameter is used
4579         #         for result publication in the study. Otherwise, if automatic
4580         #         publication is switched on, default value is used for result name.
4581         #
4582         #  @return List of all found sub-shapes.
4583         #
4584         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4585         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4586             """
4587             Find in theShape all sub-shapes of type theShapeType,
4588             situated relatively the specified plane by the certain way,
4589             defined through theState parameter.
4590
4591             Parameters:
4592                 theShape Shape to find sub-shapes of.
4593                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4594                 theAx1 Vector (or line, or linear edge), specifying normal
4595                        direction and location of the plane to find shapes on.
4596                 thePnt Point specifying location of the plane to find shapes on.
4597                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4598                 theName Object name; when specified, this parameter is used
4599                         for result publication in the study. Otherwise, if automatic
4600                         publication is switched on, default value is used for result name.
4601
4602             Returns:
4603                 List of all found sub-shapes.
4604             """
4605             # Example: see GEOM_TestOthers.py
4606             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4607                                                                theAx1, thePnt, theState)
4608             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4609             self._autoPublish(aList, theName, "shapeOnPlane")
4610             return aList
4611
4612         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4613         #  situated relatively the specified plane by the certain way,
4614         #  defined through <VAR>theState</VAR> parameter.
4615         #  @param theShape Shape to find sub-shapes of.
4616         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4617         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4618         #                direction of the plane to find shapes on.
4619         #  @param thePnt Point specifying location of the plane to find shapes on.
4620         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4621         #
4622         #  @return List of all found sub-shapes indices.
4623         #
4624         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4625         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4626             """
4627             Find in theShape all sub-shapes of type theShapeType,
4628             situated relatively the specified plane by the certain way,
4629             defined through theState parameter.
4630
4631             Parameters:
4632                 theShape Shape to find sub-shapes of.
4633                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4634                 theAx1 Vector (or line, or linear edge), specifying normal
4635                        direction and location of the plane to find shapes on.
4636                 thePnt Point specifying location of the plane to find shapes on.
4637                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4638
4639             Returns:
4640                 List of all found sub-shapes indices.
4641             """
4642             # Example: see GEOM_TestOthers.py
4643             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4644                                                                   theAx1, thePnt, theState)
4645             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4646             return aList
4647
4648         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4649         #  the specified cylinder by the certain way, defined through \a theState parameter.
4650         #  @param theShape Shape to find sub-shapes of.
4651         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4652         #  @param theAxis Vector (or line, or linear edge), specifying
4653         #                 axis of the cylinder to find shapes on.
4654         #  @param theRadius Radius of the cylinder to find shapes on.
4655         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4656         #  @param theName Object name; when specified, this parameter is used
4657         #         for result publication in the study. Otherwise, if automatic
4658         #         publication is switched on, default value is used for result name.
4659         #
4660         #  @return List of all found sub-shapes.
4661         #
4662         #  @ref swig_GetShapesOnCylinder "Example"
4663         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4664             """
4665             Find in theShape all sub-shapes of type theShapeType, situated relatively
4666             the specified cylinder by the certain way, defined through theState parameter.
4667
4668             Parameters:
4669                 theShape Shape to find sub-shapes of.
4670                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4671                 theAxis Vector (or line, or linear edge), specifying
4672                         axis of the cylinder to find shapes on.
4673                 theRadius Radius of the cylinder to find shapes on.
4674                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4675                 theName Object name; when specified, this parameter is used
4676                         for result publication in the study. Otherwise, if automatic
4677                         publication is switched on, default value is used for result name.
4678
4679             Returns:
4680                 List of all found sub-shapes.
4681             """
4682             # Example: see GEOM_TestOthers.py
4683             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4684             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4685             self._autoPublish(aList, theName, "shapeOnCylinder")
4686             return aList
4687
4688         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4689         #  the specified cylinder by the certain way, defined through \a theState parameter.
4690         #  @param theShape Shape to find sub-shapes of.
4691         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4692         #  @param theAxis Vector (or line, or linear edge), specifying
4693         #                 axis of the cylinder to find shapes on.
4694         #  @param theRadius Radius of the cylinder to find shapes on.
4695         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4696         #
4697         #  @return List of all found sub-shapes indices.
4698         #
4699         #  @ref swig_GetShapesOnCylinderIDs "Example"
4700         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4701             """
4702             Find in theShape all sub-shapes of type theShapeType, situated relatively
4703             the specified cylinder by the certain way, defined through theState parameter.
4704
4705             Parameters:
4706                 theShape Shape to find sub-shapes of.
4707                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4708                 theAxis Vector (or line, or linear edge), specifying
4709                         axis of the cylinder to find shapes on.
4710                 theRadius Radius of the cylinder to find shapes on.
4711                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4712
4713             Returns:
4714                 List of all found sub-shapes indices.
4715             """
4716             # Example: see GEOM_TestOthers.py
4717             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4718             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4719             return aList
4720
4721         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4722         #  the specified cylinder by the certain way, defined through \a theState parameter.
4723         #  @param theShape Shape to find sub-shapes of.
4724         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4725         #  @param theAxis Vector (or line, or linear edge), specifying
4726         #                 axis of the cylinder to find shapes on.
4727         #  @param thePnt Point specifying location of the bottom of the cylinder.
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         #  @param theName Object name; when specified, this parameter is used
4731         #         for result publication in the study. Otherwise, if automatic
4732         #         publication is switched on, default value is used for result name.
4733         #
4734         #  @return List of all found sub-shapes.
4735         #
4736         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4737         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4738             """
4739             Find in theShape all sub-shapes of type theShapeType, situated relatively
4740             the specified cylinder by the certain way, defined through theState parameter.
4741
4742             Parameters:
4743                 theShape Shape to find sub-shapes of.
4744                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4745                 theAxis Vector (or line, or linear edge), specifying
4746                         axis of the cylinder to find shapes on.
4747                 theRadius Radius of the cylinder to find shapes on.
4748                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4749                 theName Object name; when specified, this parameter is used
4750                         for result publication in the study. Otherwise, if automatic
4751                         publication is switched on, default value is used for result name.
4752
4753             Returns:
4754                 List of all found sub-shapes.
4755             """
4756             # Example: see GEOM_TestOthers.py
4757             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4758             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4759             self._autoPublish(aList, theName, "shapeOnCylinder")
4760             return aList
4761
4762         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4763         #  the specified cylinder by the certain way, defined through \a theState parameter.
4764         #  @param theShape Shape to find sub-shapes of.
4765         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4766         #  @param theAxis Vector (or line, or linear edge), specifying
4767         #                 axis of the cylinder to find shapes on.
4768         #  @param thePnt Point specifying location of the bottom of the cylinder.
4769         #  @param theRadius Radius of the cylinder to find shapes on.
4770         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4771         #
4772         #  @return List of all found sub-shapes indices
4773         #
4774         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4775         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4776             """
4777             Find in theShape all sub-shapes of type theShapeType, situated relatively
4778             the specified cylinder by the certain way, defined through theState parameter.
4779
4780             Parameters:
4781                 theShape Shape to find sub-shapes of.
4782                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4783                 theAxis Vector (or line, or linear edge), specifying
4784                         axis of the cylinder to find shapes on.
4785                 theRadius Radius of the cylinder to find shapes on.
4786                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4787
4788             Returns:
4789                 List of all found sub-shapes indices.            
4790             """
4791             # Example: see GEOM_TestOthers.py
4792             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4793             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4794             return aList
4795
4796         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4797         #  the specified sphere 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 theCenter Point, specifying center of the sphere to find shapes on.
4801         #  @param theRadius Radius of the sphere to find shapes on.
4802         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4803         #  @param theName Object name; when specified, this parameter is used
4804         #         for result publication in the study. Otherwise, if automatic
4805         #         publication is switched on, default value is used for result name.
4806         #
4807         #  @return List of all found sub-shapes.
4808         #
4809         #  @ref swig_GetShapesOnSphere "Example"
4810         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4811             """
4812             Find in theShape all sub-shapes of type theShapeType, situated relatively
4813             the specified sphere by the certain way, defined through theState parameter.
4814
4815             Parameters:
4816                 theShape Shape to find sub-shapes of.
4817                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4818                 theCenter Point, specifying center of the sphere to find shapes on.
4819                 theRadius Radius of the sphere to find shapes on.
4820                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4821                 theName Object name; when specified, this parameter is used
4822                         for result publication in the study. Otherwise, if automatic
4823                         publication is switched on, default value is used for result name.
4824
4825             Returns:
4826                 List of all found sub-shapes.
4827             """
4828             # Example: see GEOM_TestOthers.py
4829             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4830             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4831             self._autoPublish(aList, theName, "shapeOnSphere")
4832             return aList
4833
4834         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4835         #  the specified sphere by the certain way, defined through \a theState parameter.
4836         #  @param theShape Shape to find sub-shapes of.
4837         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4838         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4839         #  @param theRadius Radius of the sphere to find shapes on.
4840         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4841         #
4842         #  @return List of all found sub-shapes indices.
4843         #
4844         #  @ref swig_GetShapesOnSphereIDs "Example"
4845         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4846             """
4847             Find in theShape all sub-shapes of type theShapeType, situated relatively
4848             the specified sphere by the certain way, defined through theState parameter.
4849
4850             Parameters:
4851                 theShape Shape to find sub-shapes of.
4852                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4853                 theCenter Point, specifying center of the sphere to find shapes on.
4854                 theRadius Radius of the sphere to find shapes on.
4855                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4856
4857             Returns:
4858                 List of all found sub-shapes indices.
4859             """
4860             # Example: see GEOM_TestOthers.py
4861             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4862             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4863             return aList
4864
4865         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4866         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4867         #  @param theShape Shape to find sub-shapes of.
4868         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4869         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4870         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4871         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4872         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4873         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4874         #  @param theName Object name; when specified, this parameter is used
4875         #         for result publication in the study. Otherwise, if automatic
4876         #         publication is switched on, default value is used for result name.
4877         #
4878         #  @return List of all found sub-shapes.
4879         #
4880         #  @ref swig_GetShapesOnQuadrangle "Example"
4881         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4882                                   theTopLeftPoint, theTopRigthPoint,
4883                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4884             """
4885             Find in theShape all sub-shapes of type theShapeType, situated relatively
4886             the specified quadrangle by the certain way, defined through theState parameter.
4887
4888             Parameters:
4889                 theShape Shape to find sub-shapes of.
4890                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4891                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4892                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4893                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4894                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4895                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4896                 theName Object name; when specified, this parameter is used
4897                         for result publication in the study. Otherwise, if automatic
4898                         publication is switched on, default value is used for result name.
4899
4900             Returns:
4901                 List of all found sub-shapes.
4902             """
4903             # Example: see GEOM_TestOthers.py
4904             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4905                                                         theTopLeftPoint, theTopRigthPoint,
4906                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4907             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4908             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4909             return aList
4910
4911         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4912         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4913         #  @param theShape Shape to find sub-shapes of.
4914         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4915         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4916         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4917         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4918         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4919         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4920         #
4921         #  @return List of all found sub-shapes indices.
4922         #
4923         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4924         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4925                                      theTopLeftPoint, theTopRigthPoint,
4926                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4927             """
4928             Find in theShape all sub-shapes of type theShapeType, situated relatively
4929             the specified quadrangle by the certain way, defined through theState parameter.
4930
4931             Parameters:
4932                 theShape Shape to find sub-shapes of.
4933                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4934                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4935                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4936                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4937                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4938                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4939
4940             Returns:
4941                 List of all found sub-shapes indices.
4942             """
4943
4944             # Example: see GEOM_TestOthers.py
4945             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4946                                                            theTopLeftPoint, theTopRigthPoint,
4947                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4948             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4949             return aList
4950
4951         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4952         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4953         #  @param theBox Shape for relative comparing.
4954         #  @param theShape Shape to find sub-shapes of.
4955         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4956         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4957         #  @param theName Object name; when specified, this parameter is used
4958         #         for result publication in the study. Otherwise, if automatic
4959         #         publication is switched on, default value is used for result name.
4960         #
4961         #  @return List of all found sub-shapes.
4962         #
4963         #  @ref swig_GetShapesOnBox "Example"
4964         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4965             """
4966             Find in theShape all sub-shapes of type theShapeType, situated relatively
4967             the specified theBox by the certain way, defined through theState parameter.
4968
4969             Parameters:
4970                 theBox Shape for relative comparing.
4971                 theShape Shape to find sub-shapes of.
4972                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4973                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4974                 theName Object name; when specified, this parameter is used
4975                         for result publication in the study. Otherwise, if automatic
4976                         publication is switched on, default value is used for result name.
4977
4978             Returns:
4979                 List of all found sub-shapes.
4980             """
4981             # Example: see GEOM_TestOthers.py
4982             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
4983             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
4984             self._autoPublish(aList, theName, "shapeOnBox")
4985             return aList
4986
4987         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4988         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4989         #  @param theBox Shape for relative comparing.
4990         #  @param theShape Shape to find sub-shapes of.
4991         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4992         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4993         #
4994         #  @return List of all found sub-shapes indices.
4995         #
4996         #  @ref swig_GetShapesOnBoxIDs "Example"
4997         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
4998             """
4999             Find in theShape all sub-shapes of type theShapeType, situated relatively
5000             the specified theBox by the certain way, defined through theState parameter.
5001
5002             Parameters:
5003                 theBox Shape for relative comparing.
5004                 theShape Shape to find sub-shapes of.
5005                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5006                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5007
5008             Returns:
5009                 List of all found sub-shapes indices.
5010             """
5011             # Example: see GEOM_TestOthers.py
5012             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5013             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5014             return aList
5015
5016         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5017         #  situated relatively the specified \a theCheckShape by the
5018         #  certain way, defined through \a theState parameter.
5019         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5020         #  @param theShape Shape to find sub-shapes of.
5021         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5022         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5023         #  @param theName Object name; when specified, this parameter is used
5024         #         for result publication in the study. Otherwise, if automatic
5025         #         publication is switched on, default value is used for result name.
5026         #
5027         #  @return List of all found sub-shapes.
5028         #
5029         #  @ref swig_GetShapesOnShape "Example"
5030         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5031             """
5032             Find in theShape all sub-shapes of type theShapeType,
5033             situated relatively the specified theCheckShape by the
5034             certain way, defined through theState parameter.
5035
5036             Parameters:
5037                 theCheckShape Shape for relative comparing. It must be a solid.
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                 theName Object name; when specified, this parameter is used
5042                         for result publication in the study. Otherwise, if automatic
5043                         publication is switched on, default value is used for result name.
5044
5045             Returns:
5046                 List of all found sub-shapes.
5047             """
5048             # Example: see GEOM_TestOthers.py
5049             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5050                                                    theShapeType, theState)
5051             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5052             self._autoPublish(aList, theName, "shapeOnShape")
5053             return aList
5054
5055         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5056         #  situated relatively the specified \a theCheckShape by the
5057         #  certain way, defined through \a theState parameter.
5058         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5059         #  @param theShape Shape to find sub-shapes of.
5060         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5061         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5062         #  @param theName Object name; when specified, this parameter is used
5063         #         for result publication in the study. Otherwise, if automatic
5064         #         publication is switched on, default value is used for result name.
5065         #
5066         #  @return All found sub-shapes as compound.
5067         #
5068         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5069         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5070             """
5071             Find in theShape all sub-shapes of type theShapeType,
5072             situated relatively the specified theCheckShape by the
5073             certain way, defined through theState parameter.
5074
5075             Parameters:
5076                 theCheckShape Shape for relative comparing. It must be a solid.
5077                 theShape Shape to find sub-shapes of.
5078                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5079                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5080                 theName Object name; when specified, this parameter is used
5081                         for result publication in the study. Otherwise, if automatic
5082                         publication is switched on, default value is used for result name.
5083
5084             Returns:
5085                 All found sub-shapes as compound.
5086             """
5087             # Example: see GEOM_TestOthers.py
5088             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5089                                                              theShapeType, theState)
5090             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5091             self._autoPublish(anObj, theName, "shapeOnShape")
5092             return anObj
5093
5094         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5095         #  situated relatively the specified \a theCheckShape by the
5096         #  certain way, defined through \a theState parameter.
5097         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5098         #  @param theShape Shape to find sub-shapes of.
5099         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5100         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5101         #
5102         #  @return List of all found sub-shapes indices.
5103         #
5104         #  @ref swig_GetShapesOnShapeIDs "Example"
5105         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5106             """
5107             Find in theShape all sub-shapes of type theShapeType,
5108             situated relatively the specified theCheckShape by the
5109             certain way, defined through theState parameter.
5110
5111             Parameters:
5112                 theCheckShape Shape for relative comparing. It must be a solid.
5113                 theShape Shape to find sub-shapes of.
5114                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5115                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5116
5117             Returns:
5118                 List of all found sub-shapes indices.
5119             """
5120             # Example: see GEOM_TestOthers.py
5121             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5122                                                       theShapeType, theState)
5123             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5124             return aList
5125
5126         ## Get sub-shape(s) of theShapeWhere, which are
5127         #  coincident with \a theShapeWhat or could be a part of it.
5128         #  @param theShapeWhere Shape to find sub-shapes of.
5129         #  @param theShapeWhat Shape, specifying what to find.
5130         #  @param isNewImplementation implementation of GetInPlace functionality
5131         #             (default = False, old alghorithm based on shape properties)
5132         #  @param theName Object name; when specified, this parameter is used
5133         #         for result publication in the study. Otherwise, if automatic
5134         #         publication is switched on, default value is used for result name.
5135         #
5136         #  @return Group of all found sub-shapes or a single found sub-shape.
5137         #
5138         #  @note This function has a restriction on argument shapes.
5139         #        If \a theShapeWhere has curved parts with significantly
5140         #        outstanding centres (i.e. the mass centre of a part is closer to
5141         #        \a theShapeWhat than to the part), such parts will not be found.
5142         #        @image html get_in_place_lost_part.png
5143         #
5144         #  @ref swig_GetInPlace "Example"
5145         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5146             """
5147             Get sub-shape(s) of theShapeWhere, which are
5148             coincident with  theShapeWhat or could be a part of it.
5149
5150             Parameters:
5151                 theShapeWhere Shape to find sub-shapes of.
5152                 theShapeWhat Shape, specifying what to find.
5153                 isNewImplementation Implementation of GetInPlace functionality
5154                                     (default = False, old alghorithm based on shape properties)
5155                 theName Object name; when specified, this parameter is used
5156                         for result publication in the study. Otherwise, if automatic
5157                         publication is switched on, default value is used for result name.
5158
5159             Returns:
5160                 Group of all found sub-shapes or a single found sub-shape.
5161
5162                 
5163             Note:
5164                 This function has a restriction on argument shapes.
5165                 If theShapeWhere has curved parts with significantly
5166                 outstanding centres (i.e. the mass centre of a part is closer to
5167                 theShapeWhat than to the part), such parts will not be found.
5168             """
5169             # Example: see GEOM_TestOthers.py
5170             anObj = None
5171             if isNewImplementation:
5172                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5173             else:
5174                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5175                 pass
5176             RaiseIfFailed("GetInPlace", self.ShapesOp)
5177             self._autoPublish(anObj, theName, "inplace")
5178             return anObj
5179
5180         ## Get sub-shape(s) of \a theShapeWhere, which are
5181         #  coincident with \a theShapeWhat or could be a part of it.
5182         #
5183         #  Implementation of this method is based on a saved history of an operation,
5184         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5185         #  arguments (an argument shape or a sub-shape of an argument shape).
5186         #  The operation could be the Partition or one of boolean operations,
5187         #  performed on simple shapes (not on compounds).
5188         #
5189         #  @param theShapeWhere Shape to find sub-shapes of.
5190         #  @param theShapeWhat Shape, specifying what to find (must be in the
5191         #                      building history of the ShapeWhere).
5192         #  @param theName Object name; when specified, this parameter is used
5193         #         for result publication in the study. Otherwise, if automatic
5194         #         publication is switched on, default value is used for result name.
5195         #
5196         #  @return Group of all found sub-shapes or a single found sub-shape.
5197         #
5198         #  @ref swig_GetInPlace "Example"
5199         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5200             """
5201             Implementation of this method is based on a saved history of an operation,
5202             produced theShapeWhere. The theShapeWhat must be among this operation's
5203             arguments (an argument shape or a sub-shape of an argument shape).
5204             The operation could be the Partition or one of boolean operations,
5205             performed on simple shapes (not on compounds).
5206
5207             Parameters:
5208                 theShapeWhere Shape to find sub-shapes of.
5209                 theShapeWhat Shape, specifying what to find (must be in the
5210                                 building history of the ShapeWhere).
5211                 theName Object name; when specified, this parameter is used
5212                         for result publication in the study. Otherwise, if automatic
5213                         publication is switched on, default value is used for result name.
5214
5215             Returns:
5216                 Group of all found sub-shapes or a single found sub-shape.
5217             """
5218             # Example: see GEOM_TestOthers.py
5219             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5220             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5221             self._autoPublish(anObj, theName, "inplace")
5222             return anObj
5223
5224         ## Get sub-shape of theShapeWhere, which is
5225         #  equal to \a theShapeWhat.
5226         #  @param theShapeWhere Shape to find sub-shape of.
5227         #  @param theShapeWhat Shape, specifying what to find.
5228         #  @param theName Object name; when specified, this parameter is used
5229         #         for result publication in the study. Otherwise, if automatic
5230         #         publication is switched on, default value is used for result name.
5231         #
5232         #  @return New GEOM.GEOM_Object for found sub-shape.
5233         #
5234         #  @ref swig_GetSame "Example"
5235         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5236             """
5237             Get sub-shape of theShapeWhere, which is
5238             equal to theShapeWhat.
5239
5240             Parameters:
5241                 theShapeWhere Shape to find sub-shape of.
5242                 theShapeWhat Shape, specifying what to find.
5243                 theName Object name; when specified, this parameter is used
5244                         for result publication in the study. Otherwise, if automatic
5245                         publication is switched on, default value is used for result name.
5246
5247             Returns:
5248                 New GEOM.GEOM_Object for found sub-shape.
5249             """
5250             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5251             RaiseIfFailed("GetSame", self.ShapesOp)
5252             self._autoPublish(anObj, theName, "sameShape")
5253             return anObj
5254
5255
5256         ## Get sub-shape indices of theShapeWhere, which is
5257         #  equal to \a theShapeWhat.
5258         #  @param theShapeWhere Shape to find sub-shape of.
5259         #  @param theShapeWhat Shape, specifying what to find.
5260         #  @return List of all found sub-shapes indices. 
5261         #
5262         #  @ref swig_GetSame "Example"
5263         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5264             """
5265             Get sub-shape indices of theShapeWhere, which is
5266             equal to theShapeWhat.
5267
5268             Parameters:
5269                 theShapeWhere Shape to find sub-shape of.
5270                 theShapeWhat Shape, specifying what to find.
5271
5272             Returns:
5273                 List of all found sub-shapes indices.
5274             """
5275             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5276             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5277             return anObj
5278
5279
5280         # end of l4_obtain
5281         ## @}
5282
5283         ## @addtogroup l4_access
5284         ## @{
5285
5286         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5287         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5288         #  @param aShape Shape to get sub-shape of.
5289         #  @param ListOfID List of sub-shapes indices.
5290         #  @param theName Object name; when specified, this parameter is used
5291         #         for result publication in the study. Otherwise, if automatic
5292         #         publication is switched on, default value is used for result name.
5293         #
5294         #  @return Found sub-shape.
5295         #
5296         #  @ref swig_all_decompose "Example"
5297         def GetSubShape(self, aShape, ListOfID, theName=None):
5298             """
5299             Obtain a composite sub-shape of aShape, composed from sub-shapes
5300             of aShape, selected by their unique IDs inside aShape
5301
5302             Parameters:
5303                 aShape Shape to get sub-shape of.
5304                 ListOfID List of sub-shapes indices.
5305                 theName Object name; when specified, this parameter is used
5306                         for result publication in the study. Otherwise, if automatic
5307                         publication is switched on, default value is used for result name.
5308
5309             Returns:
5310                 Found sub-shape.
5311             """
5312             # Example: see GEOM_TestAll.py
5313             anObj = self.AddSubShape(aShape,ListOfID)
5314             self._autoPublish(anObj, theName, "subshape")
5315             return anObj
5316
5317         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5318         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5319         #  @param aShape Shape to get sub-shape of.
5320         #  @param aSubShape Sub-shapes of aShape.
5321         #  @return ID of found sub-shape.
5322         #
5323         #  @ref swig_all_decompose "Example"
5324         def GetSubShapeID(self, aShape, aSubShape):
5325             """
5326             Obtain unique ID of sub-shape aSubShape inside aShape
5327             of aShape, selected by their unique IDs inside aShape
5328
5329             Parameters:
5330                aShape Shape to get sub-shape of.
5331                aSubShape Sub-shapes of aShape.
5332
5333             Returns:
5334                ID of found sub-shape.
5335             """
5336             # Example: see GEOM_TestAll.py
5337             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5338             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5339             return anID
5340             
5341         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5342         #  This function is provided for performance purpose. The complexity is O(n) with n
5343         #  the number of subobjects of aShape
5344         #  @param aShape Shape to get sub-shape of.
5345         #  @param aSubShapes Sub-shapes of aShape.
5346         #  @return list of IDs of found sub-shapes.
5347         #
5348         #  @ref swig_all_decompose "Example"
5349         def GetSubShapesIDs(self, aShape, aSubShapes):
5350             """
5351             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5352             This function is provided for performance purpose. The complexity is O(n) with n
5353             the number of subobjects of aShape
5354
5355             Parameters:
5356                aShape Shape to get sub-shape of.
5357                aSubShapes Sub-shapes of aShape.
5358
5359             Returns:
5360                List of IDs of found sub-shape.
5361             """
5362             # Example: see GEOM_TestAll.py
5363             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5364             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5365             return anIDs
5366
5367         # end of l4_access
5368         ## @}
5369
5370         ## @addtogroup l4_decompose
5371         ## @{
5372
5373         ## Get all sub-shapes and groups of \a theShape,
5374         #  that were created already by any other methods.
5375         #  @param theShape Any shape.
5376         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5377         #                       returned, else all found sub-shapes and groups.
5378         #  @return List of existing sub-objects of \a theShape.
5379         #
5380         #  @ref swig_all_decompose "Example"
5381         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5382             """
5383             Get all sub-shapes and groups of theShape,
5384             that were created already by any other methods.
5385
5386             Parameters:
5387                 theShape Any shape.
5388                 theGroupsOnly If this parameter is TRUE, only groups will be
5389                                  returned, else all found sub-shapes and groups.
5390
5391             Returns:
5392                 List of existing sub-objects of theShape.
5393             """
5394             # Example: see GEOM_TestAll.py
5395             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5396             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5397             return ListObj
5398
5399         ## Get all groups of \a theShape,
5400         #  that were created already by any other methods.
5401         #  @param theShape Any shape.
5402         #  @return List of existing groups of \a theShape.
5403         #
5404         #  @ref swig_all_decompose "Example"
5405         def GetGroups(self, theShape):
5406             """
5407             Get all groups of theShape,
5408             that were created already by any other methods.
5409
5410             Parameters:
5411                 theShape Any shape.
5412
5413             Returns:
5414                 List of existing groups of theShape.
5415             """
5416             # Example: see GEOM_TestAll.py
5417             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5418             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5419             return ListObj
5420
5421         ## Explode a shape on sub-shapes of a given type.
5422         #  If the shape itself matches the type, it is also returned.
5423         #  @param aShape Shape to be exploded.
5424         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5425         #  @param theName Object name; when specified, this parameter is used
5426         #         for result publication in the study. Otherwise, if automatic
5427         #         publication is switched on, default value is used for result name.
5428         #
5429         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5430         #
5431         #  @ref swig_all_decompose "Example"
5432         def SubShapeAll(self, aShape, aType, theName=None):
5433             """
5434             Explode a shape on sub-shapes of a given type.
5435             If the shape itself matches the type, it is also returned.
5436
5437             Parameters:
5438                 aShape Shape to be exploded.
5439                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5440                 theName Object name; when specified, this parameter is used
5441                         for result publication in the study. Otherwise, if automatic
5442                         publication is switched on, default value is used for result name.
5443
5444             Returns:
5445                 List of sub-shapes of type theShapeType, contained in theShape.
5446             """
5447             # Example: see GEOM_TestAll.py
5448             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5449             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5450             self._autoPublish(ListObj, theName, "subshape")
5451             return ListObj
5452
5453         ## Explode a shape on sub-shapes of a given type.
5454         #  @param aShape Shape to be exploded.
5455         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5456         #  @return List of IDs of sub-shapes.
5457         #
5458         #  @ref swig_all_decompose "Example"
5459         def SubShapeAllIDs(self, aShape, aType):
5460             """
5461             Explode a shape on sub-shapes of a given type.
5462
5463             Parameters:
5464                 aShape Shape to be exploded (see geompy.ShapeType)
5465                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5466
5467             Returns:
5468                 List of IDs of sub-shapes.
5469             """
5470             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5471             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5472             return ListObj
5473
5474         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5475         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
5476         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5477         #  @param aShape Shape to get sub-shape of.
5478         #  @param ListOfInd List of sub-shapes indices.
5479         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5480         #  @param theName Object name; when specified, this parameter is used
5481         #         for result publication in the study. Otherwise, if automatic
5482         #         publication is switched on, default value is used for result name.
5483         #
5484         #  @return A compound of sub-shapes of aShape.
5485         #
5486         #  @ref swig_all_decompose "Example"
5487         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5488             """
5489             Obtain a compound of sub-shapes of aShape,
5490             selected by they indices in list of all sub-shapes of type aType.
5491             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5492             
5493             Parameters:
5494                 aShape Shape to get sub-shape of.
5495                 ListOfID List of sub-shapes indices.
5496                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5497                 theName Object name; when specified, this parameter is used
5498                         for result publication in the study. Otherwise, if automatic
5499                         publication is switched on, default value is used for result name.
5500
5501             Returns:
5502                 A compound of sub-shapes of aShape.
5503             """
5504             # Example: see GEOM_TestAll.py
5505             ListOfIDs = []
5506             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5507             for ind in ListOfInd:
5508                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5509             # note: auto-publishing is done in self.GetSubShape()
5510             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5511             return anObj
5512
5513         ## Explode a shape on sub-shapes of a given type.
5514         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5515         #  If the shape itself matches the type, it is also returned.
5516         #  @param aShape Shape to be exploded.
5517         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5518         #  @param theName Object name; when specified, this parameter is used
5519         #         for result publication in the study. Otherwise, if automatic
5520         #         publication is switched on, default value is used for result name.
5521         #
5522         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5523         #
5524         #  @ref swig_SubShapeAllSorted "Example"
5525         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5526             """
5527             Explode a shape on sub-shapes of a given type.
5528             Sub-shapes will be sorted by coordinates of their gravity centers.
5529             If the shape itself matches the type, it is also returned.
5530
5531             Parameters: 
5532                 aShape Shape to be exploded.
5533                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5534                 theName Object name; when specified, this parameter is used
5535                         for result publication in the study. Otherwise, if automatic
5536                         publication is switched on, default value is used for result name.
5537
5538             Returns: 
5539                 List of sub-shapes of type theShapeType, contained in theShape.
5540             """
5541             # Example: see GEOM_TestAll.py
5542             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5543             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5544             self._autoPublish(ListObj, theName, "subshape")
5545             return ListObj
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         #  @param aShape Shape to be exploded.
5550         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5551         #  @return List of IDs of sub-shapes.
5552         #
5553         #  @ref swig_all_decompose "Example"
5554         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5555             """
5556             Explode a shape on sub-shapes of a given type.
5557             Sub-shapes will be sorted by coordinates of their gravity centers.
5558
5559             Parameters: 
5560                 aShape Shape to be exploded.
5561                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5562
5563             Returns: 
5564                 List of IDs of sub-shapes.
5565             """
5566             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5567             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5568             return ListIDs
5569
5570         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5571         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5572         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5573         #  @param aShape Shape to get sub-shape of.
5574         #  @param ListOfInd List of sub-shapes indices.
5575         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5576         #  @param theName Object name; when specified, this parameter is used
5577         #         for result publication in the study. Otherwise, if automatic
5578         #         publication is switched on, default value is used for result name.
5579         #
5580         #  @return A compound of sub-shapes of aShape.
5581         #
5582         #  @ref swig_all_decompose "Example"
5583         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5584             """
5585             Obtain a compound of sub-shapes of aShape,
5586             selected by they indices in sorted list of all sub-shapes of type aType.
5587             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5588
5589             Parameters:
5590                 aShape Shape to get sub-shape of.
5591                 ListOfID List of sub-shapes indices.
5592                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5593                 theName Object name; when specified, this parameter is used
5594                         for result publication in the study. Otherwise, if automatic
5595                         publication is switched on, default value is used for result name.
5596
5597             Returns:
5598                 A compound of sub-shapes of aShape.
5599             """
5600             # Example: see GEOM_TestAll.py
5601             ListOfIDs = []
5602             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5603             for ind in ListOfInd:
5604                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5605             # note: auto-publishing is done in self.GetSubShape()
5606             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5607             return anObj
5608
5609         ## Extract shapes (excluding the main shape) of given type.
5610         #  @param aShape The shape.
5611         #  @param aType  The shape type (see ShapeType())
5612         #  @param isSorted Boolean flag to switch sorting on/off.
5613         #  @param theName Object name; when specified, this parameter is used
5614         #         for result publication in the study. Otherwise, if automatic
5615         #         publication is switched on, default value is used for result name.
5616         #
5617         #  @return List of sub-shapes of type aType, contained in aShape.
5618         #
5619         #  @ref swig_FilletChamfer "Example"
5620         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5621             """
5622             Extract shapes (excluding the main shape) of given type.
5623
5624             Parameters:
5625                 aShape The shape.
5626                 aType  The shape type (see geompy.ShapeType)
5627                 isSorted Boolean flag to switch sorting on/off.
5628                 theName Object name; when specified, this parameter is used
5629                         for result publication in the study. Otherwise, if automatic
5630                         publication is switched on, default value is used for result name.
5631
5632             Returns:     
5633                 List of sub-shapes of type aType, contained in aShape.
5634             """
5635             # Example: see GEOM_TestAll.py
5636             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5637             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5638             self._autoPublish(ListObj, theName, "subshape")
5639             return ListObj
5640
5641         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5642         #  @param aShape Main shape.
5643         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5644         #  @param theName Object name; when specified, this parameter is used
5645         #         for result publication in the study. Otherwise, if automatic
5646         #         publication is switched on, default value is used for result name.
5647         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5648         #
5649         #  @ref swig_all_decompose "Example"
5650         def SubShapes(self, aShape, anIDs, theName=None):
5651             """
5652             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5653
5654             Parameters:
5655                 aShape Main shape.
5656                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5657                 theName Object name; when specified, this parameter is used
5658                         for result publication in the study. Otherwise, if automatic
5659                         publication is switched on, default value is used for result name.
5660
5661             Returns:      
5662                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5663             """
5664             # Example: see GEOM_TestAll.py
5665             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5666             RaiseIfFailed("SubShapes", self.ShapesOp)
5667             self._autoPublish(ListObj, theName, "subshape")
5668             return ListObj
5669
5670         # end of l4_decompose
5671         ## @}
5672
5673         ## @addtogroup l4_decompose_d
5674         ## @{
5675
5676         ## Deprecated method
5677         #  It works like SubShapeAllSortedCentres(), but wrongly
5678         #  defines centres of faces, shells and solids.
5679         def SubShapeAllSorted(self, aShape, aType, theName=None):
5680             """
5681             Deprecated method
5682             It works like geompy.SubShapeAllSortedCentres, but wrongly
5683             defines centres of faces, shells and solids.
5684             """
5685             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5686             RaiseIfFailed("MakeExplode", self.ShapesOp)
5687             self._autoPublish(ListObj, theName, "subshape")
5688             return ListObj
5689
5690         ## Deprecated method
5691         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5692         #  defines centres of faces, shells and solids.
5693         def SubShapeAllSortedIDs(self, aShape, aType):
5694             """
5695             Deprecated method
5696             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5697             defines centres of faces, shells and solids.
5698             """
5699             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5700             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5701             return ListIDs
5702
5703         ## Deprecated method
5704         #  It works like SubShapeSortedCentres(), but has a bug
5705         #  (wrongly defines centres of faces, shells and solids).
5706         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5707             """
5708             Deprecated method
5709             It works like geompy.SubShapeSortedCentres, but has a bug
5710             (wrongly defines centres of faces, shells and solids).
5711             """
5712             ListOfIDs = []
5713             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5714             for ind in ListOfInd:
5715                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5716             # note: auto-publishing is done in self.GetSubShape()
5717             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5718             return anObj
5719
5720         # end of l4_decompose_d
5721         ## @}
5722
5723         ## @addtogroup l3_healing
5724         ## @{
5725
5726         ## Apply a sequence of Shape Healing operators to the given object.
5727         #  @param theShape Shape to be processed.
5728         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5729         #  @param theParameters List of names of parameters
5730         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5731         #  @param theValues List of values of parameters, in the same order
5732         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5733         #  @param theName Object name; when specified, this parameter is used
5734         #         for result publication in the study. Otherwise, if automatic
5735         #         publication is switched on, default value is used for result name.
5736         #
5737         #  <b> Operators and Parameters: </b> \n
5738         #
5739         #  * \b FixShape - corrects invalid shapes. \n
5740         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5741         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5742         #
5743         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5744         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5745         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5746         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5747         #
5748         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5749         #    surfaces in segments using a certain angle. \n
5750         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5751         #    if Angle=180, four if Angle=90, etc). \n
5752         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5753         #
5754         #  * \b SplitClosedFaces - splits closed faces in segments.
5755         #    The number of segments depends on the number of splitting points.\n
5756         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5757         #
5758         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5759         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5760         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5761         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5762         #   This and the previous parameters can take the following values:\n
5763         #   \b Parametric \b Continuity \n
5764         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5765         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5766         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5767         #    ruling out sharp edges).\n
5768         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5769         #       are of the same magnitude).\n
5770         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5771         #    or surfaces (d/du C(u)) are the same at junction. \n
5772         #   \b Geometric \b Continuity \n
5773         #   \b G1: first derivatives are proportional at junction.\n
5774         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5775         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5776         #   \b G2: first and second derivatives are proportional at junction.
5777         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5778         #    continuity requires that the underlying parameterization was continuous as well.
5779         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5780         #
5781         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5782         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5783         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5784         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5785         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5786         #       with the specified parameters.\n
5787         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5788         #       with the specified parameters.\n
5789         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5790         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5791         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5792         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5793         #
5794         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5795         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5796         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5797         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5798         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5799         #
5800         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5801         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5802         #
5803         #
5804         #  @return New GEOM.GEOM_Object, containing processed shape.
5805         #
5806         #  \n @ref tui_shape_processing "Example"
5807         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5808             """
5809             Apply a sequence of Shape Healing operators to the given object.
5810
5811             Parameters:
5812                 theShape Shape to be processed.
5813                 theValues List of values of parameters, in the same order
5814                           as parameters are listed in theParameters list.
5815                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5816                 theParameters List of names of parameters
5817                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5818                 theName Object name; when specified, this parameter is used
5819                         for result publication in the study. Otherwise, if automatic
5820                         publication is switched on, default value is used for result name.
5821
5822                 Operators and Parameters:
5823
5824                  * FixShape - corrects invalid shapes.
5825                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5826                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5827                  * FixFaceSize - removes small faces, such as spots and strips.
5828                      * FixFaceSize.Tolerance - defines minimum possible face size.
5829                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5830                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5831                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5832                                 in segments using a certain angle.
5833                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5834                                           if Angle=180, four if Angle=90, etc).
5835                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5836                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5837                                       splitting points.
5838                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5839                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5840                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5841                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5842                      * SplitContinuity.CurveContinuity - required continuity for curves.
5843                        This and the previous parameters can take the following values:
5844                        
5845                        Parametric Continuity:
5846                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5847                                                    coincidental. The curves or surfaces may still meet at an angle,
5848                                                    giving rise to a sharp corner or edge).
5849                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5850                                                    are parallel, ruling out sharp edges).
5851                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5852                                                   or surfaces are of the same magnitude).
5853                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5854                           curves or surfaces (d/du C(u)) are the same at junction.
5855                           
5856                        Geometric Continuity:
5857                        G1: first derivatives are proportional at junction.
5858                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5859                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5860                        G2: first and second derivatives are proportional at junction. As the names imply,
5861                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5862                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5863                            geometric continuity of order n, but not vice-versa.
5864                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5865                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5866                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5867                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5868                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5869                                                         the specified parameters.
5870                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5871                                                         the specified parameters.
5872                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5873                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5874                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5875                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5876                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5877                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5878                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5879                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5880                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5881                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5882                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5883
5884             Returns:
5885                 New GEOM.GEOM_Object, containing processed shape.
5886
5887             Note: For more information look through SALOME Geometry User's Guide->
5888                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5889             """
5890             # Example: see GEOM_TestHealing.py
5891             theValues,Parameters = ParseList(theValues)
5892             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5893             # To avoid script failure in case of good argument shape
5894             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5895                 return theShape
5896             RaiseIfFailed("ProcessShape", self.HealOp)
5897             for string in (theOperators + theParameters):
5898                 Parameters = ":" + Parameters
5899                 pass
5900             anObj.SetParameters(Parameters)
5901             self._autoPublish(anObj, theName, "healed")
5902             return anObj
5903
5904         ## Remove faces from the given object (shape).
5905         #  @param theObject Shape to be processed.
5906         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5907         #                  removes ALL faces of the given object.
5908         #  @param theName Object name; when specified, this parameter is used
5909         #         for result publication in the study. Otherwise, if automatic
5910         #         publication is switched on, default value is used for result name.
5911         #
5912         #  @return New GEOM.GEOM_Object, containing processed shape.
5913         #
5914         #  @ref tui_suppress_faces "Example"
5915         def SuppressFaces(self, theObject, theFaces, theName=None):
5916             """
5917             Remove faces from the given object (shape).
5918
5919             Parameters:
5920                 theObject Shape to be processed.
5921                 theFaces Indices of faces to be removed, if EMPTY then the method
5922                          removes ALL faces of the given object.
5923                 theName Object name; when specified, this parameter is used
5924                         for result publication in the study. Otherwise, if automatic
5925                         publication is switched on, default value is used for result name.
5926
5927             Returns:
5928                 New GEOM.GEOM_Object, containing processed shape.
5929             """
5930             # Example: see GEOM_TestHealing.py
5931             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5932             RaiseIfFailed("SuppressFaces", self.HealOp)
5933             self._autoPublish(anObj, theName, "suppressFaces")
5934             return anObj
5935
5936         ## Sewing of some shapes into single shape.
5937         #  @param ListShape Shapes to be processed.
5938         #  @param theTolerance Required tolerance value.
5939         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5940         #  @param theName Object name; when specified, this parameter is used
5941         #         for result publication in the study. Otherwise, if automatic
5942         #         publication is switched on, default value is used for result name.
5943         #
5944         #  @return New GEOM.GEOM_Object, containing processed shape.
5945         #
5946         #  @ref tui_sewing "Example"
5947         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5948             """
5949             Sewing of some shapes into single shape.
5950
5951             Parameters:
5952                 ListShape Shapes to be processed.
5953                 theTolerance Required tolerance value.
5954                 AllowNonManifold Flag that allows non-manifold sewing.
5955                 theName Object name; when specified, this parameter is used
5956                         for result publication in the study. Otherwise, if automatic
5957                         publication is switched on, default value is used for result name.
5958
5959             Returns:
5960                 New GEOM.GEOM_Object, containing processed shape.
5961             """
5962             # Example: see GEOM_TestHealing.py
5963             comp = self.MakeCompound(ListShape)
5964             # note: auto-publishing is done in self.Sew()
5965             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
5966             return anObj
5967
5968         ## Sewing of the given object.
5969         #  @param theObject Shape to be processed.
5970         #  @param theTolerance Required tolerance value.
5971         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5972         #  @param theName Object name; when specified, this parameter is used
5973         #         for result publication in the study. Otherwise, if automatic
5974         #         publication is switched on, default value is used for result name.
5975         #
5976         #  @return New GEOM.GEOM_Object, containing processed shape.
5977         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
5978             """
5979             Sewing of the given object.
5980
5981             Parameters:
5982                 theObject Shape to be processed.
5983                 theTolerance Required tolerance value.
5984                 AllowNonManifold Flag that allows non-manifold sewing.
5985                 theName Object name; when specified, this parameter is used
5986                         for result publication in the study. Otherwise, if automatic
5987                         publication is switched on, default value is used for result name.
5988
5989             Returns:
5990                 New GEOM.GEOM_Object, containing processed shape.
5991             """
5992             # Example: see MakeSewing() above
5993             theTolerance,Parameters = ParseParameters(theTolerance)
5994             if AllowNonManifold:
5995                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
5996             else:
5997                 anObj = self.HealOp.Sew(theObject, theTolerance)
5998             RaiseIfFailed("Sew", self.HealOp)
5999             anObj.SetParameters(Parameters)
6000             self._autoPublish(anObj, theName, "sewed")
6001             return anObj
6002
6003         ## Rebuild the topology of theCompound of solids by removing
6004         #  of the faces that are shared by several solids.
6005         #  @param theCompound Shape to be processed.
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         #
6012         #  @ref tui_remove_webs "Example"
6013         def RemoveInternalFaces (self, theCompound, theName=None):
6014             """
6015             Rebuild the topology of theCompound of solids by removing
6016             of the faces that are shared by several solids.
6017
6018             Parameters:
6019                 theCompound Shape to be processed.
6020                 theName Object name; when specified, this parameter is used
6021                         for result publication in the study. Otherwise, if automatic
6022                         publication is switched on, default value is used for result name.
6023
6024             Returns:
6025                 New GEOM.GEOM_Object, containing processed shape.
6026             """
6027             # Example: see GEOM_TestHealing.py
6028             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6029             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6030             self._autoPublish(anObj, theName, "removeWebs")
6031             return anObj
6032
6033         ## Remove internal wires and edges from the given object (face).
6034         #  @param theObject Shape to be processed.
6035         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6036         #                  removes ALL internal wires of the given object.
6037         #  @param theName Object name; when specified, this parameter is used
6038         #         for result publication in the study. Otherwise, if automatic
6039         #         publication is switched on, default value is used for result name.
6040         #
6041         #  @return New GEOM.GEOM_Object, containing processed shape.
6042         #
6043         #  @ref tui_suppress_internal_wires "Example"
6044         def SuppressInternalWires(self, theObject, theWires, theName=None):
6045             """
6046             Remove internal wires and edges from the given object (face).
6047
6048             Parameters:
6049                 theObject Shape to be processed.
6050                 theWires Indices of wires to be removed, if EMPTY then the method
6051                          removes ALL internal wires of the given object.
6052                 theName Object name; when specified, this parameter is used
6053                         for result publication in the study. Otherwise, if automatic
6054                         publication is switched on, default value is used for result name.
6055
6056             Returns:                
6057                 New GEOM.GEOM_Object, containing processed shape.
6058             """
6059             # Example: see GEOM_TestHealing.py
6060             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6061             RaiseIfFailed("RemoveIntWires", self.HealOp)
6062             self._autoPublish(anObj, theName, "suppressWires")
6063             return anObj
6064
6065         ## Remove internal closed contours (holes) from the given object.
6066         #  @param theObject Shape to be processed.
6067         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6068         #                  removes ALL internal holes of the given object
6069         #  @param theName Object name; when specified, this parameter is used
6070         #         for result publication in the study. Otherwise, if automatic
6071         #         publication is switched on, default value is used for result name.
6072         #
6073         #  @return New GEOM.GEOM_Object, containing processed shape.
6074         #
6075         #  @ref tui_suppress_holes "Example"
6076         def SuppressHoles(self, theObject, theWires, theName=None):
6077             """
6078             Remove internal closed contours (holes) from the given object.
6079
6080             Parameters:
6081                 theObject Shape to be processed.
6082                 theWires Indices of wires to be removed, if EMPTY then the method
6083                          removes ALL internal holes of the given object
6084                 theName Object name; when specified, this parameter is used
6085                         for result publication in the study. Otherwise, if automatic
6086                         publication is switched on, default value is used for result name.
6087
6088             Returns:    
6089                 New GEOM.GEOM_Object, containing processed shape.
6090             """
6091             # Example: see GEOM_TestHealing.py
6092             anObj = self.HealOp.FillHoles(theObject, theWires)
6093             RaiseIfFailed("FillHoles", self.HealOp)
6094             self._autoPublish(anObj, theName, "suppressHoles")
6095             return anObj
6096
6097         ## Close an open wire.
6098         #  @param theObject Shape to be processed.
6099         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6100         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6101         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6102         #                        If False : closure by creation of an edge between ends.
6103         #  @param theName Object name; when specified, this parameter is used
6104         #         for result publication in the study. Otherwise, if automatic
6105         #         publication is switched on, default value is used for result name.
6106         #
6107         #  @return New GEOM.GEOM_Object, containing processed shape.
6108         #
6109         #  @ref tui_close_contour "Example"
6110         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6111             """
6112             Close an open wire.
6113
6114             Parameters: 
6115                 theObject Shape to be processed.
6116                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6117                          if [ ], then theObject itself is a wire.
6118                 isCommonVertex If True  : closure by creation of a common vertex,
6119                                If False : closure by creation of an edge between ends.
6120                 theName Object name; when specified, this parameter is used
6121                         for result publication in the study. Otherwise, if automatic
6122                         publication is switched on, default value is used for result name.
6123
6124             Returns:                      
6125                 New GEOM.GEOM_Object, containing processed shape. 
6126             """
6127             # Example: see GEOM_TestHealing.py
6128             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6129             RaiseIfFailed("CloseContour", self.HealOp)
6130             self._autoPublish(anObj, theName, "closeContour")
6131             return anObj
6132
6133         ## Addition of a point to a given edge object.
6134         #  @param theObject Shape to be processed.
6135         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6136         #                      if -1, then theObject itself is the edge.
6137         #  @param theValue Value of parameter on edge or length parameter,
6138         #                  depending on \a isByParameter.
6139         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6140         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6141         #  @param theName Object name; when specified, this parameter is used
6142         #         for result publication in the study. Otherwise, if automatic
6143         #         publication is switched on, default value is used for result name.
6144         #
6145         #  @return New GEOM.GEOM_Object, containing processed shape.
6146         #
6147         #  @ref tui_add_point_on_edge "Example"
6148         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6149             """
6150             Addition of a point to a given edge object.
6151
6152             Parameters: 
6153                 theObject Shape to be processed.
6154                 theEdgeIndex Index of edge to be divided within theObject's shape,
6155                              if -1, then theObject itself is the edge.
6156                 theValue Value of parameter on edge or length parameter,
6157                          depending on isByParameter.
6158                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6159                               if FALSE : theValue is treated as a length parameter [0..1]
6160                 theName Object name; when specified, this parameter is used
6161                         for result publication in the study. Otherwise, if automatic
6162                         publication is switched on, default value is used for result name.
6163
6164             Returns:  
6165                 New GEOM.GEOM_Object, containing processed shape.
6166             """
6167             # Example: see GEOM_TestHealing.py
6168             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6169             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6170             RaiseIfFailed("DivideEdge", self.HealOp)
6171             anObj.SetParameters(Parameters)
6172             self._autoPublish(anObj, theName, "divideEdge")
6173             return anObj
6174
6175         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6176         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6177         #  @param theVertices A list of vertices to suppress. If the list
6178         #                     is empty, all vertices in a wire will be assumed.
6179         #  @param theName Object name; when specified, this parameter is used
6180         #         for result publication in the study. Otherwise, if automatic
6181         #         publication is switched on, default value is used for result name.
6182         #
6183         #  @return New GEOM.GEOM_Object with modified wire.
6184         #
6185         #  @ref tui_fuse_collinear_edges "Example"
6186         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6187             """
6188             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6189
6190             Parameters: 
6191                 theWire Wire to minimize the number of C1 continuous edges in.
6192                 theVertices A list of vertices to suppress. If the list
6193                             is empty, all vertices in a wire will be assumed.
6194                 theName Object name; when specified, this parameter is used
6195                         for result publication in the study. Otherwise, if automatic
6196                         publication is switched on, default value is used for result name.
6197
6198             Returns:  
6199                 New GEOM.GEOM_Object with modified wire.
6200             """
6201             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6202             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6203             self._autoPublish(anObj, theName, "fuseEdges")
6204             return anObj
6205
6206         ## Change orientation of the given object. Updates given shape.
6207         #  @param theObject Shape to be processed.
6208         #  @return Updated <var>theObject</var>
6209         #
6210         #  @ref swig_todo "Example"
6211         def ChangeOrientationShell(self,theObject):
6212             """
6213             Change orientation of the given object. Updates given shape.
6214
6215             Parameters: 
6216                 theObject Shape to be processed.
6217
6218             Returns:  
6219                 Updated theObject
6220             """
6221             theObject = self.HealOp.ChangeOrientation(theObject)
6222             RaiseIfFailed("ChangeOrientation", self.HealOp)
6223             pass
6224
6225         ## Change orientation of the given object.
6226         #  @param theObject Shape to be processed.
6227         #  @param theName Object name; when specified, this parameter is used
6228         #         for result publication in the study. Otherwise, if automatic
6229         #         publication is switched on, default value is used for result name.
6230         #
6231         #  @return New GEOM.GEOM_Object, containing processed shape.
6232         #
6233         #  @ref swig_todo "Example"
6234         def ChangeOrientationShellCopy(self, theObject, theName=None):
6235             """
6236             Change orientation of the given object.
6237
6238             Parameters:
6239                 theObject Shape to be processed.
6240                 theName Object name; when specified, this parameter is used
6241                         for result publication in the study. Otherwise, if automatic
6242                         publication is switched on, default value is used for result name.
6243
6244             Returns:   
6245                 New GEOM.GEOM_Object, containing processed shape.
6246             """
6247             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6248             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6249             self._autoPublish(anObj, theName, "reversed")
6250             return anObj
6251
6252         ## Try to limit tolerance of the given object by value \a theTolerance.
6253         #  @param theObject Shape to be processed.
6254         #  @param theTolerance Required tolerance value.
6255         #  @param theName Object name; when specified, this parameter is used
6256         #         for result publication in the study. Otherwise, if automatic
6257         #         publication is switched on, default value is used for result name.
6258         #
6259         #  @return New GEOM.GEOM_Object, containing processed shape.
6260         #
6261         #  @ref tui_limit_tolerance "Example"
6262         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6263             """
6264             Try to limit tolerance of the given object by value theTolerance.
6265
6266             Parameters:
6267                 theObject Shape to be processed.
6268                 theTolerance Required tolerance value.
6269                 theName Object name; when specified, this parameter is used
6270                         for result publication in the study. Otherwise, if automatic
6271                         publication is switched on, default value is used for result name.
6272
6273             Returns:   
6274                 New GEOM.GEOM_Object, containing processed shape.
6275             """
6276             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6277             RaiseIfFailed("LimitTolerance", self.HealOp)
6278             self._autoPublish(anObj, theName, "limitTolerance")
6279             return anObj
6280
6281         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6282         #  that constitute a free boundary of the given shape.
6283         #  @param theObject Shape to get free boundary of.
6284         #  @param theName Object name; when specified, this parameter is used
6285         #         for result publication in the study. Otherwise, if automatic
6286         #         publication is switched on, default value is used for result name.
6287         #
6288         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6289         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6290         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6291         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6292         #
6293         #  @ref tui_measurement_tools_page "Example"
6294         def GetFreeBoundary(self, theObject, theName=None):
6295             """
6296             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6297             that constitute a free boundary of the given shape.
6298
6299             Parameters:
6300                 theObject Shape to get free boundary of.
6301                 theName Object name; when specified, this parameter is used
6302                         for result publication in the study. Otherwise, if automatic
6303                         publication is switched on, default value is used for result name.
6304
6305             Returns: 
6306                 [status, theClosedWires, theOpenWires]
6307                  status: FALSE, if an error(s) occured during the method execution.
6308                  theClosedWires: Closed wires on the free boundary of the given shape.
6309                  theOpenWires: Open wires on the free boundary of the given shape.
6310             """
6311             # Example: see GEOM_TestHealing.py
6312             anObj = self.HealOp.GetFreeBoundary(theObject)
6313             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6314             self._autoPublish(anObj[1], theName, "closedWire")
6315             self._autoPublish(anObj[2], theName, "openWire")
6316             return anObj
6317
6318         ## Replace coincident faces in theShape by one face.
6319         #  @param theShape Initial shape.
6320         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6321         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6322         #                         otherwise all initial shapes.
6323         #  @param theName Object name; when specified, this parameter is used
6324         #         for result publication in the study. Otherwise, if automatic
6325         #         publication is switched on, default value is used for result name.
6326         #
6327         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6328         #
6329         #  @ref tui_glue_faces "Example"
6330         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6331             """
6332             Replace coincident faces in theShape by one face.
6333
6334             Parameters:
6335                 theShape Initial shape.
6336                 theTolerance Maximum distance between faces, which can be considered as coincident.
6337                 doKeepNonSolids If FALSE, only solids will present in the result,
6338                                 otherwise all initial shapes.
6339                 theName Object name; when specified, this parameter is used
6340                         for result publication in the study. Otherwise, if automatic
6341                         publication is switched on, default value is used for result name.
6342
6343             Returns:
6344                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6345             """
6346             # Example: see GEOM_Spanner.py
6347             theTolerance,Parameters = ParseParameters(theTolerance)
6348             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6349             if anObj is None:
6350                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6351             anObj.SetParameters(Parameters)
6352             self._autoPublish(anObj, theName, "glueFaces")
6353             return anObj
6354
6355         ## Find coincident faces in theShape for possible gluing.
6356         #  @param theShape Initial shape.
6357         #  @param theTolerance Maximum distance between faces,
6358         #                      which can be considered as coincident.
6359         #  @param theName Object name; when specified, this parameter is used
6360         #         for result publication in the study. Otherwise, if automatic
6361         #         publication is switched on, default value is used for result name.
6362         #
6363         #  @return GEOM.ListOfGO
6364         #
6365         #  @ref tui_glue_faces "Example"
6366         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6367             """
6368             Find coincident faces in theShape for possible gluing.
6369
6370             Parameters:
6371                 theShape Initial shape.
6372                 theTolerance Maximum distance between faces,
6373                              which can be considered as coincident.
6374                 theName Object name; when specified, this parameter is used
6375                         for result publication in the study. Otherwise, if automatic
6376                         publication is switched on, default value is used for result name.
6377
6378             Returns:                    
6379                 GEOM.ListOfGO
6380             """
6381             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6382             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6383             self._autoPublish(anObj, theName, "facesToGlue")
6384             return anObj
6385
6386         ## Replace coincident faces in theShape by one face
6387         #  in compliance with given list of faces
6388         #  @param theShape Initial shape.
6389         #  @param theTolerance Maximum distance between faces,
6390         #                      which can be considered as coincident.
6391         #  @param theFaces List of faces for gluing.
6392         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6393         #                         otherwise all initial shapes.
6394         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6395         #                        will be glued, otherwise only the edges,
6396         #                        belonging to <VAR>theFaces</VAR>.
6397         #  @param theName Object name; when specified, this parameter is used
6398         #         for result publication in the study. Otherwise, if automatic
6399         #         publication is switched on, default value is used for result name.
6400         #
6401         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6402         #          without some faces.
6403         #
6404         #  @ref tui_glue_faces "Example"
6405         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6406                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6407             """
6408             Replace coincident faces in theShape by one face
6409             in compliance with given list of faces
6410
6411             Parameters:
6412                 theShape Initial shape.
6413                 theTolerance Maximum distance between faces,
6414                              which can be considered as coincident.
6415                 theFaces List of faces for gluing.
6416                 doKeepNonSolids If FALSE, only solids will present in the result,
6417                                 otherwise all initial shapes.
6418                 doGlueAllEdges If TRUE, all coincident edges of theShape
6419                                will be glued, otherwise only the edges,
6420                                belonging to theFaces.
6421                 theName Object name; when specified, this parameter is used
6422                         for result publication in the study. Otherwise, if automatic
6423                         publication is switched on, default value is used for result name.
6424
6425             Returns:
6426                 New GEOM.GEOM_Object, containing a copy of theShape
6427                     without some faces.
6428             """
6429             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6430                                                       doKeepNonSolids, doGlueAllEdges)
6431             if anObj is None:
6432                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6433             self._autoPublish(anObj, theName, "glueFaces")
6434             return anObj
6435
6436         ## Replace coincident edges in theShape by one edge.
6437         #  @param theShape Initial shape.
6438         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6439         #  @param theName Object name; when specified, this parameter is used
6440         #         for result publication in the study. Otherwise, if automatic
6441         #         publication is switched on, default value is used for result name.
6442         #
6443         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6444         #
6445         #  @ref tui_glue_edges "Example"
6446         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6447             """
6448             Replace coincident edges in theShape by one edge.
6449
6450             Parameters:
6451                 theShape Initial shape.
6452                 theTolerance Maximum distance between edges, which can be considered as coincident.
6453                 theName Object name; when specified, this parameter is used
6454                         for result publication in the study. Otherwise, if automatic
6455                         publication is switched on, default value is used for result name.
6456
6457             Returns:    
6458                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6459             """
6460             theTolerance,Parameters = ParseParameters(theTolerance)
6461             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6462             if anObj is None:
6463                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6464             anObj.SetParameters(Parameters)
6465             self._autoPublish(anObj, theName, "glueEdges")
6466             return anObj
6467
6468         ## Find coincident edges in theShape for possible gluing.
6469         #  @param theShape Initial shape.
6470         #  @param theTolerance Maximum distance between edges,
6471         #                      which can be considered as coincident.
6472         #  @param theName Object name; when specified, this parameter is used
6473         #         for result publication in the study. Otherwise, if automatic
6474         #         publication is switched on, default value is used for result name.
6475         #
6476         #  @return GEOM.ListOfGO
6477         #
6478         #  @ref tui_glue_edges "Example"
6479         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6480             """
6481             Find coincident edges in theShape for possible gluing.
6482
6483             Parameters:
6484                 theShape Initial shape.
6485                 theTolerance Maximum distance between edges,
6486                              which can be considered as coincident.
6487                 theName Object name; when specified, this parameter is used
6488                         for result publication in the study. Otherwise, if automatic
6489                         publication is switched on, default value is used for result name.
6490
6491             Returns:                         
6492                 GEOM.ListOfGO
6493             """
6494             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6495             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6496             self._autoPublish(anObj, theName, "edgesToGlue")
6497             return anObj
6498
6499         ## Replace coincident edges in theShape by one edge
6500         #  in compliance with given list of edges.
6501         #  @param theShape Initial shape.
6502         #  @param theTolerance Maximum distance between edges,
6503         #                      which can be considered as coincident.
6504         #  @param theEdges List of edges for gluing.
6505         #  @param theName Object name; when specified, this parameter is used
6506         #         for result publication in the study. Otherwise, if automatic
6507         #         publication is switched on, default value is used for result name.
6508         #
6509         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6510         #          without some edges.
6511         #
6512         #  @ref tui_glue_edges "Example"
6513         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6514             """
6515             Replace coincident edges in theShape by one edge
6516             in compliance with given list of edges.
6517
6518             Parameters:
6519                 theShape Initial shape.
6520                 theTolerance Maximum distance between edges,
6521                              which can be considered as coincident.
6522                 theEdges List of edges for gluing.
6523                 theName Object name; when specified, this parameter is used
6524                         for result publication in the study. Otherwise, if automatic
6525                         publication is switched on, default value is used for result name.
6526
6527             Returns:  
6528                 New GEOM.GEOM_Object, containing a copy of theShape
6529                 without some edges.
6530             """
6531             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6532             if anObj is None:
6533                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6534             self._autoPublish(anObj, theName, "glueEdges")
6535             return anObj
6536
6537         # end of l3_healing
6538         ## @}
6539
6540         ## @addtogroup l3_boolean Boolean Operations
6541         ## @{
6542
6543         # -----------------------------------------------------------------------------
6544         # Boolean (Common, Cut, Fuse, Section)
6545         # -----------------------------------------------------------------------------
6546
6547         ## Perform one of boolean operations on two given shapes.
6548         #  @param theShape1 First argument for boolean operation.
6549         #  @param theShape2 Second argument for boolean operation.
6550         #  @param theOperation Indicates the operation to be done:\n
6551         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6552         #  @param theName Object name; when specified, this parameter is used
6553         #         for result publication in the study. Otherwise, if automatic
6554         #         publication is switched on, default value is used for result name.
6555         #
6556         #  @return New GEOM.GEOM_Object, containing the result shape.
6557         #
6558         #  @ref tui_fuse "Example"
6559         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6560             """
6561             Perform one of boolean operations on two given shapes.
6562
6563             Parameters: 
6564                 theShape1 First argument for boolean operation.
6565                 theShape2 Second argument for boolean operation.
6566                 theOperation Indicates the operation to be done:
6567                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6568                 theName Object name; when specified, this parameter is used
6569                         for result publication in the study. Otherwise, if automatic
6570                         publication is switched on, default value is used for result name.
6571
6572             Returns:   
6573                 New GEOM.GEOM_Object, containing the result shape.
6574             """
6575             # Example: see GEOM_TestAll.py
6576             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6577             RaiseIfFailed("MakeBoolean", self.BoolOp)
6578             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6579             self._autoPublish(anObj, theName, def_names[theOperation])
6580             return anObj
6581
6582         ## Perform Common boolean operation on two given shapes.
6583         #  @param theShape1 First argument for boolean operation.
6584         #  @param theShape2 Second argument for boolean operation.
6585         #  @param theName Object name; when specified, this parameter is used
6586         #         for result publication in the study. Otherwise, if automatic
6587         #         publication is switched on, default value is used for result name.
6588         #
6589         #  @return New GEOM.GEOM_Object, containing the result shape.
6590         #
6591         #  @ref tui_common "Example 1"
6592         #  \n @ref swig_MakeCommon "Example 2"
6593         def MakeCommon(self, theShape1, theShape2, theName=None):
6594             """
6595             Perform Common boolean operation on two given shapes.
6596
6597             Parameters: 
6598                 theShape1 First argument for boolean operation.
6599                 theShape2 Second argument for boolean operation.
6600                 theName Object name; when specified, this parameter is used
6601                         for result publication in the study. Otherwise, if automatic
6602                         publication is switched on, default value is used for result name.
6603
6604             Returns:   
6605                 New GEOM.GEOM_Object, containing the result shape.
6606             """
6607             # Example: see GEOM_TestOthers.py
6608             # note: auto-publishing is done in self.MakeBoolean()
6609             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6610
6611         ## Perform Cut boolean operation on two given shapes.
6612         #  @param theShape1 First argument for boolean operation.
6613         #  @param theShape2 Second argument for boolean operation.
6614         #  @param theName Object name; when specified, this parameter is used
6615         #         for result publication in the study. Otherwise, if automatic
6616         #         publication is switched on, default value is used for result name.
6617         #
6618         #  @return New GEOM.GEOM_Object, containing the result shape.
6619         #
6620         #  @ref tui_cut "Example 1"
6621         #  \n @ref swig_MakeCommon "Example 2"
6622         def MakeCut(self, theShape1, theShape2, theName=None):
6623             """
6624             Perform Cut boolean operation on two given shapes.
6625
6626             Parameters: 
6627                 theShape1 First argument for boolean operation.
6628                 theShape2 Second argument for boolean operation.
6629                 theName Object name; when specified, this parameter is used
6630                         for result publication in the study. Otherwise, if automatic
6631                         publication is switched on, default value is used for result name.
6632
6633             Returns:   
6634                 New GEOM.GEOM_Object, containing the result shape.
6635             
6636             """
6637             # Example: see GEOM_TestOthers.py
6638             # note: auto-publishing is done in self.MakeBoolean()
6639             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6640
6641         ## Perform Fuse boolean operation on two given shapes.
6642         #  @param theShape1 First argument for boolean operation.
6643         #  @param theShape2 Second argument for boolean operation.
6644         #  @param theName Object name; when specified, this parameter is used
6645         #         for result publication in the study. Otherwise, if automatic
6646         #         publication is switched on, default value is used for result name.
6647         #
6648         #  @return New GEOM.GEOM_Object, containing the result shape.
6649         #
6650         #  @ref tui_fuse "Example 1"
6651         #  \n @ref swig_MakeCommon "Example 2"
6652         def MakeFuse(self, theShape1, theShape2, theName=None):
6653             """
6654             Perform Fuse boolean operation on two given shapes.
6655
6656             Parameters: 
6657                 theShape1 First argument for boolean operation.
6658                 theShape2 Second argument for boolean operation.
6659                 theName Object name; when specified, this parameter is used
6660                         for result publication in the study. Otherwise, if automatic
6661                         publication is switched on, default value is used for result name.
6662
6663             Returns:   
6664                 New GEOM.GEOM_Object, containing the result shape.
6665             
6666             """
6667             # Example: see GEOM_TestOthers.py
6668             # note: auto-publishing is done in self.MakeBoolean()
6669             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6670
6671         ## Perform Section boolean operation on two given shapes.
6672         #  @param theShape1 First argument for boolean operation.
6673         #  @param theShape2 Second argument for boolean operation.
6674         #  @param theName Object name; when specified, this parameter is used
6675         #         for result publication in the study. Otherwise, if automatic
6676         #         publication is switched on, default value is used for result name.
6677         #
6678         #  @return New GEOM.GEOM_Object, containing the result shape.
6679         #
6680         #  @ref tui_section "Example 1"
6681         #  \n @ref swig_MakeCommon "Example 2"
6682         def MakeSection(self, theShape1, theShape2, theName=None):
6683             """
6684             Perform Section boolean operation on two given shapes.
6685
6686             Parameters: 
6687                 theShape1 First argument for boolean operation.
6688                 theShape2 Second argument for boolean operation.
6689                 theName Object name; when specified, this parameter is used
6690                         for result publication in the study. Otherwise, if automatic
6691                         publication is switched on, default value is used for result name.
6692
6693             Returns:   
6694                 New GEOM.GEOM_Object, containing the result shape.
6695             
6696             """
6697             # Example: see GEOM_TestOthers.py
6698             # note: auto-publishing is done in self.MakeBoolean()
6699             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6700
6701         ## Perform Fuse boolean operation on the list of shapes.
6702         #  @param theShapesList Shapes to be fused.
6703         #  @param theName Object name; when specified, this parameter is used
6704         #         for result publication in the study. Otherwise, if automatic
6705         #         publication is switched on, default value is used for result name.
6706         #
6707         #  @return New GEOM.GEOM_Object, containing the result shape.
6708         #
6709         #  @ref tui_fuse "Example 1"
6710         #  \n @ref swig_MakeCommon "Example 2"
6711         def MakeFuseList(self, theShapesList, theName=None):
6712             """
6713             Perform Fuse boolean operation on the list of shapes.
6714
6715             Parameters: 
6716                 theShapesList Shapes to be fused.
6717                 theName Object name; when specified, this parameter is used
6718                         for result publication in the study. Otherwise, if automatic
6719                         publication is switched on, default value is used for result name.
6720
6721             Returns:   
6722                 New GEOM.GEOM_Object, containing the result shape.
6723             
6724             """
6725             # Example: see GEOM_TestOthers.py
6726             anObj = self.BoolOp.MakeFuseList(theShapesList)
6727             RaiseIfFailed("MakeFuseList", self.BoolOp)
6728             self._autoPublish(anObj, theName, "fuse")
6729             return anObj
6730
6731         ## Perform Common boolean operation on the list of shapes.
6732         #  @param theShapesList Shapes for Common operation.
6733         #  @param theName Object name; when specified, this parameter is used
6734         #         for result publication in the study. Otherwise, if automatic
6735         #         publication is switched on, default value is used for result name.
6736         #
6737         #  @return New GEOM.GEOM_Object, containing the result shape.
6738         #
6739         #  @ref tui_common "Example 1"
6740         #  \n @ref swig_MakeCommon "Example 2"
6741         def MakeCommonList(self, theShapesList, theName=None):
6742             """
6743             Perform Common boolean operation on the list of shapes.
6744
6745             Parameters: 
6746                 theShapesList Shapes for Common operation.
6747                 theName Object name; when specified, this parameter is used
6748                         for result publication in the study. Otherwise, if automatic
6749                         publication is switched on, default value is used for result name.
6750
6751             Returns:   
6752                 New GEOM.GEOM_Object, containing the result shape.
6753             
6754             """
6755             # Example: see GEOM_TestOthers.py
6756             anObj = self.BoolOp.MakeCommonList(theShapesList)
6757             RaiseIfFailed("MakeCommonList", self.BoolOp)
6758             self._autoPublish(anObj, theName, "common")
6759             return anObj
6760
6761         ## Perform Cut boolean operation on one object and the list of tools.
6762         #  @param theMainShape The object of the operation.
6763         #  @param theShapesList The list of tools of the operation.
6764         #  @param theName Object name; when specified, this parameter is used
6765         #         for result publication in the study. Otherwise, if automatic
6766         #         publication is switched on, default value is used for result name.
6767         #
6768         #  @return New GEOM.GEOM_Object, containing the result shape.
6769         #
6770         #  @ref tui_cut "Example 1"
6771         #  \n @ref swig_MakeCommon "Example 2"
6772         def MakeCutList(self, theMainShape, theShapesList, theName=None):
6773             """
6774             Perform Cut boolean operation on one object and the list of tools.
6775
6776             Parameters: 
6777                 theMainShape The object of the operation.
6778                 theShapesList The list of tools of the operation.
6779                 theName Object name; when specified, this parameter is used
6780                         for result publication in the study. Otherwise, if automatic
6781                         publication is switched on, default value is used for result name.
6782
6783             Returns:   
6784                 New GEOM.GEOM_Object, containing the result shape.
6785             
6786             """
6787             # Example: see GEOM_TestOthers.py
6788             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList)
6789             RaiseIfFailed("MakeCutList", self.BoolOp)
6790             self._autoPublish(anObj, theName, "cut")
6791             return anObj
6792
6793         # end of l3_boolean
6794         ## @}
6795
6796         ## @addtogroup l3_basic_op
6797         ## @{
6798
6799         ## Perform partition operation.
6800         #  @param ListShapes Shapes to be intersected.
6801         #  @param ListTools Shapes to intersect theShapes.
6802         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6803         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6804         #         type will be detected automatically.
6805         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6806         #                             target type (equal to Limit) are kept in the result,
6807         #                             else standalone shapes of lower dimension
6808         #                             are kept also (if they exist).
6809         #  @param theName Object name; when specified, this parameter is used
6810         #         for result publication in the study. Otherwise, if automatic
6811         #         publication is switched on, default value is used for result name.
6812         #
6813         #  @note Each compound from ListShapes and ListTools will be exploded
6814         #        in order to avoid possible intersection between shapes from this compound.
6815         #
6816         #  After implementation new version of PartitionAlgo (October 2006)
6817         #  other parameters are ignored by current functionality. They are kept
6818         #  in this function only for support old versions.
6819         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6820         #         Each shape from theKeepInside must belong to theShapes also.
6821         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6822         #         Each shape from theRemoveInside must belong to theShapes also.
6823         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6824         #      @param ListMaterials Material indices for each shape. Make sence,
6825         #         only if theRemoveWebs is TRUE.
6826         #
6827         #  @return New GEOM.GEOM_Object, containing the result shapes.
6828         #
6829         #  @ref tui_partition "Example"
6830         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6831                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6832                           KeepNonlimitShapes=0, theName=None):
6833             """
6834             Perform partition operation.
6835
6836             Parameters: 
6837                 ListShapes Shapes to be intersected.
6838                 ListTools Shapes to intersect theShapes.
6839                 Limit Type of resulting shapes (see geompy.ShapeType)
6840                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6841                       type will be detected automatically.
6842                 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                 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             Note:
6850                     Each compound from ListShapes and ListTools will be exploded
6851                     in order to avoid possible intersection between shapes from
6852                     this compound.
6853                     
6854             After implementation new version of PartitionAlgo (October 2006) other
6855             parameters are ignored by current functionality. They are kept in this
6856             function only for support old versions.
6857             
6858             Ignored parameters:
6859                 ListKeepInside Shapes, outside which the results will be deleted.
6860                                Each shape from theKeepInside must belong to theShapes also.
6861                 ListRemoveInside Shapes, inside which the results will be deleted.
6862                                  Each shape from theRemoveInside must belong to theShapes also.
6863                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6864                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6865
6866             Returns:   
6867                 New GEOM.GEOM_Object, containing the result shapes.
6868             """
6869             # Example: see GEOM_TestAll.py
6870             if Limit == self.ShapeType["AUTO"]:
6871                 # automatic detection of the most appropriate shape limit type
6872                 lim = GEOM.SHAPE
6873                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6874                 Limit = EnumToLong(lim)
6875                 pass
6876             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6877                                               ListKeepInside, ListRemoveInside,
6878                                               Limit, RemoveWebs, ListMaterials,
6879                                               KeepNonlimitShapes);
6880             RaiseIfFailed("MakePartition", self.BoolOp)
6881             self._autoPublish(anObj, theName, "partition")
6882             return anObj
6883
6884         ## Perform partition operation.
6885         #  This method may be useful if it is needed to make a partition for
6886         #  compound contains nonintersected shapes. Performance will be better
6887         #  since intersection between shapes from compound is not performed.
6888         #
6889         #  Description of all parameters as in previous method MakePartition()
6890         #
6891         #  @note Passed compounds (via ListShapes or via ListTools)
6892         #           have to consist of nonintersecting shapes.
6893         #
6894         #  @return New GEOM.GEOM_Object, containing the result shapes.
6895         #
6896         #  @ref swig_todo "Example"
6897         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6898                                                  ListKeepInside=[], ListRemoveInside=[],
6899                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6900                                                  ListMaterials=[], KeepNonlimitShapes=0,
6901                                                  theName=None):
6902             """
6903             Perform partition operation.
6904             This method may be useful if it is needed to make a partition for
6905             compound contains nonintersected shapes. Performance will be better
6906             since intersection between shapes from compound is not performed.
6907
6908             Parameters: 
6909                 Description of all parameters as in method geompy.MakePartition
6910         
6911             NOTE:
6912                 Passed compounds (via ListShapes or via ListTools)
6913                 have to consist of nonintersecting shapes.
6914
6915             Returns:   
6916                 New GEOM.GEOM_Object, containing the result shapes.
6917             """
6918             if Limit == self.ShapeType["AUTO"]:
6919                 # automatic detection of the most appropriate shape limit type
6920                 lim = GEOM.SHAPE
6921                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6922                 Limit = EnumToLong(lim)
6923                 pass
6924             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6925                                                                      ListKeepInside, ListRemoveInside,
6926                                                                      Limit, RemoveWebs, ListMaterials,
6927                                                                      KeepNonlimitShapes);
6928             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6929             self._autoPublish(anObj, theName, "partition")
6930             return anObj
6931
6932         ## See method MakePartition() for more information.
6933         #
6934         #  @ref tui_partition "Example 1"
6935         #  \n @ref swig_Partition "Example 2"
6936         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6937                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6938                       KeepNonlimitShapes=0, theName=None):
6939             """
6940             See method geompy.MakePartition for more information.
6941             """
6942             # Example: see GEOM_TestOthers.py
6943             # note: auto-publishing is done in self.MakePartition()
6944             anObj = self.MakePartition(ListShapes, ListTools,
6945                                        ListKeepInside, ListRemoveInside,
6946                                        Limit, RemoveWebs, ListMaterials,
6947                                        KeepNonlimitShapes, theName);
6948             return anObj
6949
6950         ## Perform partition of the Shape with the Plane
6951         #  @param theShape Shape to be intersected.
6952         #  @param thePlane Tool shape, to intersect theShape.
6953         #  @param theName Object name; when specified, this parameter is used
6954         #         for result publication in the study. Otherwise, if automatic
6955         #         publication is switched on, default value is used for result name.
6956         #
6957         #  @return New GEOM.GEOM_Object, containing the result shape.
6958         #
6959         #  @ref tui_partition "Example"
6960         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6961             """
6962             Perform partition of the Shape with the Plane
6963
6964             Parameters: 
6965                 theShape Shape to be intersected.
6966                 thePlane Tool shape, to intersect theShape.
6967                 theName Object name; when specified, this parameter is used
6968                         for result publication in the study. Otherwise, if automatic
6969                         publication is switched on, default value is used for result name.
6970
6971             Returns:  
6972                 New GEOM.GEOM_Object, containing the result shape.
6973             """
6974             # Example: see GEOM_TestAll.py
6975             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
6976             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
6977             self._autoPublish(anObj, theName, "partition")
6978             return anObj
6979
6980         # end of l3_basic_op
6981         ## @}
6982
6983         ## @addtogroup l3_transform
6984         ## @{
6985
6986         ## Translate the given object along the vector, specified
6987         #  by its end points.
6988         #  @param theObject The object to be translated.
6989         #  @param thePoint1 Start point of translation vector.
6990         #  @param thePoint2 End point of translation vector.
6991         #  @param theCopy Flag used to translate object itself or create a copy.
6992         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6993         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6994         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
6995             """
6996             Translate the given object along the vector, specified by its end points.
6997
6998             Parameters: 
6999                 theObject The object to be translated.
7000                 thePoint1 Start point of translation vector.
7001                 thePoint2 End point of translation vector.
7002                 theCopy Flag used to translate object itself or create a copy.
7003
7004             Returns: 
7005                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7006                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7007             """
7008             if theCopy:
7009                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7010             else:
7011                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7012             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7013             return anObj
7014
7015         ## Translate the given object along the vector, specified
7016         #  by its end points, creating its copy before the translation.
7017         #  @param theObject The object to be translated.
7018         #  @param thePoint1 Start point of translation vector.
7019         #  @param thePoint2 End point of translation vector.
7020         #  @param theName Object name; when specified, this parameter is used
7021         #         for result publication in the study. Otherwise, if automatic
7022         #         publication is switched on, default value is used for result name.
7023         #
7024         #  @return New GEOM.GEOM_Object, containing the translated object.
7025         #
7026         #  @ref tui_translation "Example 1"
7027         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7028         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7029             """
7030             Translate the given object along the vector, specified
7031             by its end points, creating its copy before the translation.
7032
7033             Parameters: 
7034                 theObject The object to be translated.
7035                 thePoint1 Start point of translation vector.
7036                 thePoint2 End point of translation vector.
7037                 theName Object name; when specified, this parameter is used
7038                         for result publication in the study. Otherwise, if automatic
7039                         publication is switched on, default value is used for result name.
7040
7041             Returns:  
7042                 New GEOM.GEOM_Object, containing the translated object.
7043             """
7044             # Example: see GEOM_TestAll.py
7045             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7046             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7047             self._autoPublish(anObj, theName, "translated")
7048             return anObj
7049
7050         ## Translate the given object along the vector, specified by its components.
7051         #  @param theObject The object to be translated.
7052         #  @param theDX,theDY,theDZ Components of translation vector.
7053         #  @param theCopy Flag used to translate object itself or create a copy.
7054         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7055         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7056         #
7057         #  @ref tui_translation "Example"
7058         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7059             """
7060             Translate the given object along the vector, specified by its components.
7061
7062             Parameters: 
7063                 theObject The object to be translated.
7064                 theDX,theDY,theDZ Components of translation vector.
7065                 theCopy Flag used to translate object itself or create a copy.
7066
7067             Returns: 
7068                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7069                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7070             """
7071             # Example: see GEOM_TestAll.py
7072             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7073             if theCopy:
7074                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7075             else:
7076                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7077             anObj.SetParameters(Parameters)
7078             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7079             return anObj
7080
7081         ## Translate the given object along the vector, specified
7082         #  by its components, creating its copy before the translation.
7083         #  @param theObject The object to be translated.
7084         #  @param theDX,theDY,theDZ Components of translation vector.
7085         #  @param theName Object name; when specified, this parameter is used
7086         #         for result publication in the study. Otherwise, if automatic
7087         #         publication is switched on, default value is used for result name.
7088         #
7089         #  @return New GEOM.GEOM_Object, containing the translated object.
7090         #
7091         #  @ref tui_translation "Example"
7092         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7093             """
7094             Translate the given object along the vector, specified
7095             by its components, creating its copy before the translation.
7096
7097             Parameters: 
7098                 theObject The object to be translated.
7099                 theDX,theDY,theDZ Components of translation vector.
7100                 theName Object name; when specified, this parameter is used
7101                         for result publication in the study. Otherwise, if automatic
7102                         publication is switched on, default value is used for result name.
7103
7104             Returns: 
7105                 New GEOM.GEOM_Object, containing the translated object.
7106             """
7107             # Example: see GEOM_TestAll.py
7108             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7109             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7110             anObj.SetParameters(Parameters)
7111             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7112             self._autoPublish(anObj, theName, "translated")
7113             return anObj
7114
7115         ## Translate the given object along the given vector.
7116         #  @param theObject The object to be translated.
7117         #  @param theVector The translation vector.
7118         #  @param theCopy Flag used to translate object itself or create a copy.
7119         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7120         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7121         def TranslateVector(self, theObject, theVector, theCopy=False):
7122             """
7123             Translate the given object along the given vector.
7124
7125             Parameters: 
7126                 theObject The object to be translated.
7127                 theVector The translation vector.
7128                 theCopy Flag used to translate object itself or create a copy.
7129
7130             Returns: 
7131                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7132                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7133             """
7134             if theCopy:
7135                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7136             else:
7137                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7138             RaiseIfFailed("TranslateVector", self.TrsfOp)
7139             return anObj
7140
7141         ## Translate the given object along the given vector,
7142         #  creating its copy before the translation.
7143         #  @param theObject The object to be translated.
7144         #  @param theVector The translation vector.
7145         #  @param theName Object name; when specified, this parameter is used
7146         #         for result publication in the study. Otherwise, if automatic
7147         #         publication is switched on, default value is used for result name.
7148         #
7149         #  @return New GEOM.GEOM_Object, containing the translated object.
7150         #
7151         #  @ref tui_translation "Example"
7152         def MakeTranslationVector(self, theObject, theVector, theName=None):
7153             """
7154             Translate the given object along the given vector,
7155             creating its copy before the translation.
7156
7157             Parameters: 
7158                 theObject The object to be translated.
7159                 theVector The translation vector.
7160                 theName Object name; when specified, this parameter is used
7161                         for result publication in the study. Otherwise, if automatic
7162                         publication is switched on, default value is used for result name.
7163
7164             Returns: 
7165                 New GEOM.GEOM_Object, containing the translated object.
7166             """
7167             # Example: see GEOM_TestAll.py
7168             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7169             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7170             self._autoPublish(anObj, theName, "translated")
7171             return anObj
7172
7173         ## Translate the given object along the given vector on given distance.
7174         #  @param theObject The object to be translated.
7175         #  @param theVector The translation vector.
7176         #  @param theDistance The translation distance.
7177         #  @param theCopy Flag used to translate object itself or create a copy.
7178         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7179         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7180         #
7181         #  @ref tui_translation "Example"
7182         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7183             """
7184             Translate the given object along the given vector on given distance.
7185
7186             Parameters: 
7187                 theObject The object to be translated.
7188                 theVector The translation vector.
7189                 theDistance The translation distance.
7190                 theCopy Flag used to translate object itself or create a copy.
7191
7192             Returns: 
7193                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7194                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7195             """
7196             # Example: see GEOM_TestAll.py
7197             theDistance,Parameters = ParseParameters(theDistance)
7198             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7199             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7200             anObj.SetParameters(Parameters)
7201             return anObj
7202
7203         ## Translate the given object along the given vector on given distance,
7204         #  creating its copy before the translation.
7205         #  @param theObject The object to be translated.
7206         #  @param theVector The translation vector.
7207         #  @param theDistance The translation distance.
7208         #  @param theName Object name; when specified, this parameter is used
7209         #         for result publication in the study. Otherwise, if automatic
7210         #         publication is switched on, default value is used for result name.
7211         #
7212         #  @return New GEOM.GEOM_Object, containing the translated object.
7213         #
7214         #  @ref tui_translation "Example"
7215         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7216             """
7217             Translate the given object along the given vector on given distance,
7218             creating its copy before the translation.
7219
7220             Parameters:
7221                 theObject The object to be translated.
7222                 theVector The translation vector.
7223                 theDistance The translation distance.
7224                 theName Object name; when specified, this parameter is used
7225                         for result publication in the study. Otherwise, if automatic
7226                         publication is switched on, default value is used for result name.
7227
7228             Returns: 
7229                 New GEOM.GEOM_Object, containing the translated object.
7230             """
7231             # Example: see GEOM_TestAll.py
7232             theDistance,Parameters = ParseParameters(theDistance)
7233             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7234             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7235             anObj.SetParameters(Parameters)
7236             self._autoPublish(anObj, theName, "translated")
7237             return anObj
7238
7239         ## Rotate the given object around the given axis on the given angle.
7240         #  @param theObject The object to be rotated.
7241         #  @param theAxis Rotation axis.
7242         #  @param theAngle Rotation angle in radians.
7243         #  @param theCopy Flag used to rotate object itself or create a copy.
7244         #
7245         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7246         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7247         #
7248         #  @ref tui_rotation "Example"
7249         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7250             """
7251             Rotate the given object around the given axis on the given angle.
7252
7253             Parameters:
7254                 theObject The object to be rotated.
7255                 theAxis Rotation axis.
7256                 theAngle Rotation angle in radians.
7257                 theCopy Flag used to rotate object itself or create a copy.
7258
7259             Returns:
7260                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7261                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7262             """
7263             # Example: see GEOM_TestAll.py
7264             flag = False
7265             if isinstance(theAngle,str):
7266                 flag = True
7267             theAngle, Parameters = ParseParameters(theAngle)
7268             if flag:
7269                 theAngle = theAngle*math.pi/180.0
7270             if theCopy:
7271                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7272             else:
7273                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7274             RaiseIfFailed("Rotate", self.TrsfOp)
7275             anObj.SetParameters(Parameters)
7276             return anObj
7277
7278         ## Rotate the given object around the given axis
7279         #  on the given angle, creating its copy before the rotatation.
7280         #  @param theObject The object to be rotated.
7281         #  @param theAxis Rotation axis.
7282         #  @param theAngle Rotation angle in radians.
7283         #  @param theName Object name; when specified, this parameter is used
7284         #         for result publication in the study. Otherwise, if automatic
7285         #         publication is switched on, default value is used for result name.
7286         #
7287         #  @return New GEOM.GEOM_Object, containing the rotated object.
7288         #
7289         #  @ref tui_rotation "Example"
7290         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7291             """
7292             Rotate the given object around the given axis
7293             on the given angle, creating its copy before the rotatation.
7294
7295             Parameters:
7296                 theObject The object to be rotated.
7297                 theAxis Rotation axis.
7298                 theAngle Rotation angle in radians.
7299                 theName Object name; when specified, this parameter is used
7300                         for result publication in the study. Otherwise, if automatic
7301                         publication is switched on, default value is used for result name.
7302
7303             Returns:
7304                 New GEOM.GEOM_Object, containing the rotated object.
7305             """
7306             # Example: see GEOM_TestAll.py
7307             flag = False
7308             if isinstance(theAngle,str):
7309                 flag = True
7310             theAngle, Parameters = ParseParameters(theAngle)
7311             if flag:
7312                 theAngle = theAngle*math.pi/180.0
7313             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7314             RaiseIfFailed("RotateCopy", self.TrsfOp)
7315             anObj.SetParameters(Parameters)
7316             self._autoPublish(anObj, theName, "rotated")
7317             return anObj
7318
7319         ## Rotate given object around vector perpendicular to plane
7320         #  containing three points.
7321         #  @param theObject The object to be rotated.
7322         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7323         #  containing the three points.
7324         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7325         #  @param theCopy Flag used to rotate object itself or create a copy.
7326         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7327         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7328         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7329             """
7330             Rotate given object around vector perpendicular to plane
7331             containing three points.
7332
7333             Parameters:
7334                 theObject The object to be rotated.
7335                 theCentPoint central point  the axis is the vector perpendicular to the plane
7336                              containing the three points.
7337                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7338                 theCopy Flag used to rotate object itself or create a copy.
7339
7340             Returns:
7341                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7342                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7343             """
7344             if theCopy:
7345                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7346             else:
7347                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7348             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7349             return anObj
7350
7351         ## Rotate given object around vector perpendicular to plane
7352         #  containing three points, creating its copy before the rotatation.
7353         #  @param theObject The object to be rotated.
7354         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7355         #  containing the three points.
7356         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7357         #  @param theName Object name; when specified, this parameter is used
7358         #         for result publication in the study. Otherwise, if automatic
7359         #         publication is switched on, default value is used for result name.
7360         #
7361         #  @return New GEOM.GEOM_Object, containing the rotated object.
7362         #
7363         #  @ref tui_rotation "Example"
7364         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7365             """
7366             Rotate given object around vector perpendicular to plane
7367             containing three points, creating its copy before the rotatation.
7368
7369             Parameters:
7370                 theObject The object to be rotated.
7371                 theCentPoint central point  the axis is the vector perpendicular to the plane
7372                              containing the three points.
7373                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7374                 theName Object name; when specified, this parameter is used
7375                         for result publication in the study. Otherwise, if automatic
7376                         publication is switched on, default value is used for result name.
7377
7378             Returns:
7379                 New GEOM.GEOM_Object, containing the rotated object.
7380             """
7381             # Example: see GEOM_TestAll.py
7382             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7383             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7384             self._autoPublish(anObj, theName, "rotated")
7385             return anObj
7386
7387         ## Scale the given object by the specified factor.
7388         #  @param theObject The object to be scaled.
7389         #  @param thePoint Center point for scaling.
7390         #                  Passing None for it means scaling relatively the origin of global CS.
7391         #  @param theFactor Scaling factor value.
7392         #  @param theCopy Flag used to scale object itself or create a copy.
7393         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7394         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7395         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7396             """
7397             Scale the given object by the specified factor.
7398
7399             Parameters:
7400                 theObject The object to be scaled.
7401                 thePoint Center point for scaling.
7402                          Passing None for it means scaling relatively the origin of global CS.
7403                 theFactor Scaling factor value.
7404                 theCopy Flag used to scale object itself or create a copy.
7405
7406             Returns:    
7407                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7408                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7409             """
7410             # Example: see GEOM_TestAll.py
7411             theFactor, Parameters = ParseParameters(theFactor)
7412             if theCopy:
7413                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7414             else:
7415                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7416             RaiseIfFailed("Scale", self.TrsfOp)
7417             anObj.SetParameters(Parameters)
7418             return anObj
7419
7420         ## Scale the given object by the factor, creating its copy before the scaling.
7421         #  @param theObject The object to be scaled.
7422         #  @param thePoint Center point for scaling.
7423         #                  Passing None for it means scaling relatively the origin of global CS.
7424         #  @param theFactor Scaling factor value.
7425         #  @param theName Object name; when specified, this parameter is used
7426         #         for result publication in the study. Otherwise, if automatic
7427         #         publication is switched on, default value is used for result name.
7428         #
7429         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7430         #
7431         #  @ref tui_scale "Example"
7432         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7433             """
7434             Scale the given object by the factor, creating its copy before the scaling.
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                 theName Object name; when specified, this parameter is used
7442                         for result publication in the study. Otherwise, if automatic
7443                         publication is switched on, default value is used for result name.
7444
7445             Returns:    
7446                 New GEOM.GEOM_Object, containing the scaled shape.
7447             """
7448             # Example: see GEOM_TestAll.py
7449             theFactor, Parameters = ParseParameters(theFactor)
7450             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7451             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7452             anObj.SetParameters(Parameters)
7453             self._autoPublish(anObj, theName, "scaled")
7454             return anObj
7455
7456         ## Scale the given object by different factors along coordinate axes.
7457         #  @param theObject The object to be scaled.
7458         #  @param thePoint Center point for scaling.
7459         #                  Passing None for it means scaling relatively the origin of global CS.
7460         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7461         #  @param theCopy Flag used to scale object itself or create a copy.
7462         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7463         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7464         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7465             """
7466             Scale the given object by different factors along coordinate axes.
7467
7468             Parameters:
7469                 theObject The object to be scaled.
7470                 thePoint Center point for scaling.
7471                             Passing None for it means scaling relatively the origin of global CS.
7472                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7473                 theCopy Flag used to scale object itself or create a copy.
7474
7475             Returns:    
7476                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7477                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7478             """
7479             # Example: see GEOM_TestAll.py
7480             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7481             if theCopy:
7482                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7483                                                             theFactorX, theFactorY, theFactorZ)
7484             else:
7485                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7486                                                         theFactorX, theFactorY, theFactorZ)
7487             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7488             anObj.SetParameters(Parameters)
7489             return anObj
7490
7491         ## Scale the given object by different factors along coordinate axes,
7492         #  creating its copy before the scaling.
7493         #  @param theObject The object to be scaled.
7494         #  @param thePoint Center point for scaling.
7495         #                  Passing None for it means scaling relatively the origin of global CS.
7496         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7497         #  @param theName Object name; when specified, this parameter is used
7498         #         for result publication in the study. Otherwise, if automatic
7499         #         publication is switched on, default value is used for result name.
7500         #
7501         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7502         #
7503         #  @ref swig_scale "Example"
7504         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7505             """
7506             Scale the given object by different factors along coordinate axes,
7507             creating its copy before the scaling.
7508
7509             Parameters:
7510                 theObject The object to be scaled.
7511                 thePoint Center point for scaling.
7512                             Passing None for it means scaling relatively the origin of global CS.
7513                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7514                 theName Object name; when specified, this parameter is used
7515                         for result publication in the study. Otherwise, if automatic
7516                         publication is switched on, default value is used for result name.
7517
7518             Returns:
7519                 New GEOM.GEOM_Object, containing the scaled shape.
7520             """
7521             # Example: see GEOM_TestAll.py
7522             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7523             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7524                                                         theFactorX, theFactorY, theFactorZ)
7525             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7526             anObj.SetParameters(Parameters)
7527             self._autoPublish(anObj, theName, "scaled")
7528             return anObj
7529
7530         ## Mirror an object relatively the given plane.
7531         #  @param theObject The object to be mirrored.
7532         #  @param thePlane Plane of symmetry.
7533         #  @param theCopy Flag used to mirror object itself or create a copy.
7534         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7535         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7536         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7537             """
7538             Mirror an object relatively the given plane.
7539
7540             Parameters:
7541                 theObject The object to be mirrored.
7542                 thePlane Plane of symmetry.
7543                 theCopy Flag used to mirror object itself or create a copy.
7544
7545             Returns:
7546                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7547                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7548             """
7549             if theCopy:
7550                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7551             else:
7552                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7553             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7554             return anObj
7555
7556         ## Create an object, symmetrical
7557         #  to the given one relatively the given plane.
7558         #  @param theObject The object to be mirrored.
7559         #  @param thePlane Plane of symmetry.
7560         #  @param theName Object name; when specified, this parameter is used
7561         #         for result publication in the study. Otherwise, if automatic
7562         #         publication is switched on, default value is used for result name.
7563         #
7564         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7565         #
7566         #  @ref tui_mirror "Example"
7567         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7568             """
7569             Create an object, symmetrical to the given one relatively the given plane.
7570
7571             Parameters:
7572                 theObject The object to be mirrored.
7573                 thePlane Plane of symmetry.
7574                 theName Object name; when specified, this parameter is used
7575                         for result publication in the study. Otherwise, if automatic
7576                         publication is switched on, default value is used for result name.
7577
7578             Returns:
7579                 New GEOM.GEOM_Object, containing the mirrored shape.
7580             """
7581             # Example: see GEOM_TestAll.py
7582             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7583             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7584             self._autoPublish(anObj, theName, "mirrored")
7585             return anObj
7586
7587         ## Mirror an object relatively the given axis.
7588         #  @param theObject The object to be mirrored.
7589         #  @param theAxis Axis of symmetry.
7590         #  @param theCopy Flag used to mirror object itself or create a copy.
7591         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7592         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7593         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7594             """
7595             Mirror an object relatively the given axis.
7596
7597             Parameters:
7598                 theObject The object to be mirrored.
7599                 theAxis Axis of symmetry.
7600                 theCopy Flag used to mirror object itself or create a copy.
7601
7602             Returns:
7603                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7604                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7605             """
7606             if theCopy:
7607                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7608             else:
7609                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7610             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7611             return anObj
7612
7613         ## Create an object, symmetrical
7614         #  to the given one relatively the given axis.
7615         #  @param theObject The object to be mirrored.
7616         #  @param theAxis Axis of symmetry.
7617         #  @param theName Object name; when specified, this parameter is used
7618         #         for result publication in the study. Otherwise, if automatic
7619         #         publication is switched on, default value is used for result name.
7620         #
7621         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7622         #
7623         #  @ref tui_mirror "Example"
7624         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7625             """
7626             Create an object, symmetrical to the given one relatively the given axis.
7627
7628             Parameters:
7629                 theObject The object to be mirrored.
7630                 theAxis Axis of symmetry.
7631                 theName Object name; when specified, this parameter is used
7632                         for result publication in the study. Otherwise, if automatic
7633                         publication is switched on, default value is used for result name.
7634
7635             Returns: 
7636                 New GEOM.GEOM_Object, containing the mirrored shape.
7637             """
7638             # Example: see GEOM_TestAll.py
7639             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7640             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7641             self._autoPublish(anObj, theName, "mirrored")
7642             return anObj
7643
7644         ## Mirror an object relatively the given point.
7645         #  @param theObject The object to be mirrored.
7646         #  @param thePoint Point of symmetry.
7647         #  @param theCopy Flag used to mirror object itself or create a copy.
7648         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7649         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7650         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7651             """
7652             Mirror an object relatively the given point.
7653
7654             Parameters:
7655                 theObject The object to be mirrored.
7656                 thePoint Point of symmetry.
7657                 theCopy Flag used to mirror object itself or create a copy.
7658
7659             Returns:
7660                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7661                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7662             """
7663             # Example: see GEOM_TestAll.py
7664             if theCopy:
7665                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7666             else:
7667                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7668             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7669             return anObj
7670
7671         ## Create an object, symmetrical
7672         #  to the given one relatively the given point.
7673         #  @param theObject The object to be mirrored.
7674         #  @param thePoint Point of symmetry.
7675         #  @param theName Object name; when specified, this parameter is used
7676         #         for result publication in the study. Otherwise, if automatic
7677         #         publication is switched on, default value is used for result name.
7678         #
7679         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7680         #
7681         #  @ref tui_mirror "Example"
7682         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7683             """
7684             Create an object, symmetrical
7685             to the given one relatively the given point.
7686
7687             Parameters:
7688                 theObject The object to be mirrored.
7689                 thePoint Point of symmetry.
7690                 theName Object name; when specified, this parameter is used
7691                         for result publication in the study. Otherwise, if automatic
7692                         publication is switched on, default value is used for result name.
7693
7694             Returns:  
7695                 New GEOM.GEOM_Object, containing the mirrored shape.
7696             """
7697             # Example: see GEOM_TestAll.py
7698             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7699             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7700             self._autoPublish(anObj, theName, "mirrored")
7701             return anObj
7702
7703         ## Modify the location of the given object.
7704         #  @param theObject The object to be displaced.
7705         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7706         #                     If \a theStartLCS is NULL, displacement
7707         #                     will be performed from global CS.\n
7708         #                     If \a theObject itself is used as \a theStartLCS,
7709         #                     its location will be changed to \a theEndLCS.
7710         #  @param theEndLCS Coordinate system to perform displacement to it.
7711         #  @param theCopy Flag used to displace object itself or create a copy.
7712         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7713         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7714         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7715             """
7716             Modify the Location of the given object by LCS, creating its copy before the setting.
7717
7718             Parameters:
7719                 theObject The object to be displaced.
7720                 theStartLCS Coordinate system to perform displacement from it.
7721                             If theStartLCS is NULL, displacement
7722                             will be performed from global CS.
7723                             If theObject itself is used as theStartLCS,
7724                             its location will be changed to theEndLCS.
7725                 theEndLCS Coordinate system to perform displacement to it.
7726                 theCopy Flag used to displace object itself or create a copy.
7727
7728             Returns:
7729                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7730                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7731             """
7732             # Example: see GEOM_TestAll.py
7733             if theCopy:
7734                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7735             else:
7736                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7737             RaiseIfFailed("Displace", self.TrsfOp)
7738             return anObj
7739
7740         ## Modify the Location of the given object by LCS,
7741         #  creating its copy before the setting.
7742         #  @param theObject The object to be displaced.
7743         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7744         #                     If \a theStartLCS is NULL, displacement
7745         #                     will be performed from global CS.\n
7746         #                     If \a theObject itself is used as \a theStartLCS,
7747         #                     its location will be changed to \a theEndLCS.
7748         #  @param theEndLCS Coordinate system to perform displacement to it.
7749         #  @param theName Object name; when specified, this parameter is used
7750         #         for result publication in the study. Otherwise, if automatic
7751         #         publication is switched on, default value is used for result name.
7752         #
7753         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7754         #
7755         #  @ref tui_modify_location "Example"
7756         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7757             """
7758             Modify the Location of the given object by LCS, creating its copy before the setting.
7759
7760             Parameters:
7761                 theObject The object to be displaced.
7762                 theStartLCS Coordinate system to perform displacement from it.
7763                             If theStartLCS is NULL, displacement
7764                             will be performed from global CS.
7765                             If theObject itself is used as theStartLCS,
7766                             its location will be changed to theEndLCS.
7767                 theEndLCS Coordinate system to perform displacement to it.
7768                 theName Object name; when specified, this parameter is used
7769                         for result publication in the study. Otherwise, if automatic
7770                         publication is switched on, default value is used for result name.
7771
7772             Returns:  
7773                 New GEOM.GEOM_Object, containing the displaced shape.
7774
7775             Example of usage:
7776                 # create local coordinate systems
7777                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7778                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7779                 # modify the location of the given object
7780                 position = geompy.MakePosition(cylinder, cs1, cs2)
7781             """
7782             # Example: see GEOM_TestAll.py
7783             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7784             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7785             self._autoPublish(anObj, theName, "displaced")
7786             return anObj
7787
7788         ## Modify the Location of the given object by Path.
7789         #  @param  theObject The object to be displaced.
7790         #  @param  thePath Wire or Edge along that the object will be translated.
7791         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7792         #  @param  theCopy is to create a copy objects if true.
7793         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7794         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7795         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7796         #
7797         #  @ref tui_modify_location "Example"
7798         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7799             """
7800             Modify the Location of the given object by Path.
7801
7802             Parameters:
7803                  theObject The object to be displaced.
7804                  thePath Wire or Edge along that the object will be translated.
7805                  theDistance progress of Path (0 = start location, 1 = end of path location).
7806                  theCopy is to create a copy objects if true.
7807                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7808
7809             Returns:  
7810                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7811                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7812
7813             Example of usage:
7814                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7815             """
7816             # Example: see GEOM_TestAll.py
7817             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7818             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7819             return anObj
7820
7821         ## Modify the Location of the given object by Path, creating its copy before the operation.
7822         #  @param theObject The object to be displaced.
7823         #  @param thePath Wire or Edge along that the object will be translated.
7824         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7825         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7826         #  @param theName Object name; when specified, this parameter is used
7827         #         for result publication in the study. Otherwise, if automatic
7828         #         publication is switched on, default value is used for result name.
7829         #
7830         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7831         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7832             """
7833             Modify the Location of the given object by Path, creating its copy before the operation.
7834
7835             Parameters:
7836                  theObject The object to be displaced.
7837                  thePath Wire or Edge along that the object will be translated.
7838                  theDistance progress of Path (0 = start location, 1 = end of path location).
7839                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7840                  theName Object name; when specified, this parameter is used
7841                          for result publication in the study. Otherwise, if automatic
7842                          publication is switched on, default value is used for result name.
7843
7844             Returns:  
7845                 New GEOM.GEOM_Object, containing the displaced shape.
7846             """
7847             # Example: see GEOM_TestAll.py
7848             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7849             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7850             self._autoPublish(anObj, theName, "displaced")
7851             return anObj
7852
7853         ## Offset given shape.
7854         #  @param theObject The base object for the offset.
7855         #  @param theOffset Offset value.
7856         #  @param theCopy Flag used to offset object itself or create a copy.
7857         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7858         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7859         def Offset(self, theObject, theOffset, theCopy=False):
7860             """
7861             Offset given shape.
7862
7863             Parameters:
7864                 theObject The base object for the offset.
7865                 theOffset Offset value.
7866                 theCopy Flag used to offset object itself or create a copy.
7867
7868             Returns: 
7869                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7870                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7871             """
7872             theOffset, Parameters = ParseParameters(theOffset)
7873             if theCopy:
7874                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7875             else:
7876                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7877             RaiseIfFailed("Offset", self.TrsfOp)
7878             anObj.SetParameters(Parameters)
7879             return anObj
7880
7881         ## Create new object as offset of the given one.
7882         #  @param theObject The base object for the offset.
7883         #  @param theOffset Offset value.
7884         #  @param theName Object name; when specified, this parameter is used
7885         #         for result publication in the study. Otherwise, if automatic
7886         #         publication is switched on, default value is used for result name.
7887         #
7888         #  @return New GEOM.GEOM_Object, containing the offset object.
7889         #
7890         #  @ref tui_offset "Example"
7891         def MakeOffset(self, theObject, theOffset, theName=None):
7892             """
7893             Create new object as offset of the given one.
7894
7895             Parameters:
7896                 theObject The base object for the offset.
7897                 theOffset Offset value.
7898                 theName Object name; when specified, this parameter is used
7899                         for result publication in the study. Otherwise, if automatic
7900                         publication is switched on, default value is used for result name.
7901
7902             Returns:  
7903                 New GEOM.GEOM_Object, containing the offset object.
7904
7905             Example of usage:
7906                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7907                  # create a new object as offset of the given object
7908                  offset = geompy.MakeOffset(box, 70.)
7909             """
7910             # Example: see GEOM_TestAll.py
7911             theOffset, Parameters = ParseParameters(theOffset)
7912             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7913             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7914             anObj.SetParameters(Parameters)
7915             self._autoPublish(anObj, theName, "offset")
7916             return anObj
7917
7918         ## Create new object as projection of the given one on a 2D surface.
7919         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7920         #  @param theTarget The target object. It can be planar or cylindrical face.
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 projection.
7926         #
7927         #  @ref tui_projection "Example"
7928         def MakeProjection(self, theSource, theTarget, theName=None):
7929             """
7930             Create new object as projection of the given one on a 2D surface.
7931
7932             Parameters:
7933                 theSource The source object for the projection. It can be a point, edge or wire.
7934                 theTarget The target object. It can be planar or cylindrical face.
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 projection.
7941             """
7942             # Example: see GEOM_TestAll.py
7943             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7944             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7945             self._autoPublish(anObj, theName, "projection")
7946             return anObj
7947
7948         # -----------------------------------------------------------------------------
7949         # Patterns
7950         # -----------------------------------------------------------------------------
7951
7952         ## Translate the given object along the given vector a given number times
7953         #  @param theObject The object to be translated.
7954         #  @param theVector Direction of the translation. DX if None.
7955         #  @param theStep Distance to translate on.
7956         #  @param theNbTimes Quantity of translations to be done.
7957         #  @param theName Object name; when specified, this parameter is used
7958         #         for result publication in the study. Otherwise, if automatic
7959         #         publication is switched on, default value is used for result name.
7960         #
7961         #  @return New GEOM.GEOM_Object, containing compound of all
7962         #          the shapes, obtained after each translation.
7963         #
7964         #  @ref tui_multi_translation "Example"
7965         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7966             """
7967             Translate the given object along the given vector a given number times
7968
7969             Parameters:
7970                 theObject The object to be translated.
7971                 theVector Direction of the translation. DX if None.
7972                 theStep Distance to translate on.
7973                 theNbTimes Quantity of translations to be done.
7974                 theName Object name; when specified, this parameter is used
7975                         for result publication in the study. Otherwise, if automatic
7976                         publication is switched on, default value is used for result name.
7977
7978             Returns:     
7979                 New GEOM.GEOM_Object, containing compound of all
7980                 the shapes, obtained after each translation.
7981
7982             Example of usage:
7983                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
7984             """
7985             # Example: see GEOM_TestAll.py
7986             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
7987             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
7988             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
7989             anObj.SetParameters(Parameters)
7990             self._autoPublish(anObj, theName, "multitranslation")
7991             return anObj
7992
7993         ## Conseqently apply two specified translations to theObject specified number of times.
7994         #  @param theObject The object to be translated.
7995         #  @param theVector1 Direction of the first translation. DX if None.
7996         #  @param theStep1 Step of the first translation.
7997         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
7998         #  @param theVector2 Direction of the second translation. DY if None.
7999         #  @param theStep2 Step of the second translation.
8000         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8001         #  @param theName Object name; when specified, this parameter is used
8002         #         for result publication in the study. Otherwise, if automatic
8003         #         publication is switched on, default value is used for result name.
8004         #
8005         #  @return New GEOM.GEOM_Object, containing compound of all
8006         #          the shapes, obtained after each translation.
8007         #
8008         #  @ref tui_multi_translation "Example"
8009         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8010                                    theVector2, theStep2, theNbTimes2, theName=None):
8011             """
8012             Conseqently apply two specified translations to theObject specified number of times.
8013
8014             Parameters:
8015                 theObject The object to be translated.
8016                 theVector1 Direction of the first translation. DX if None.
8017                 theStep1 Step of the first translation.
8018                 theNbTimes1 Quantity of translations to be done along theVector1.
8019                 theVector2 Direction of the second translation. DY if None.
8020                 theStep2 Step of the second translation.
8021                 theNbTimes2 Quantity of translations to be done along theVector2.
8022                 theName Object name; when specified, this parameter is used
8023                         for result publication in the study. Otherwise, if automatic
8024                         publication is switched on, default value is used for result name.
8025
8026             Returns:
8027                 New GEOM.GEOM_Object, containing compound of all
8028                 the shapes, obtained after each translation.
8029
8030             Example of usage:
8031                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8032             """
8033             # Example: see GEOM_TestAll.py
8034             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8035             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8036                                                  theVector2, theStep2, theNbTimes2)
8037             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8038             anObj.SetParameters(Parameters)
8039             self._autoPublish(anObj, theName, "multitranslation")
8040             return anObj
8041
8042         ## Rotate the given object around the given axis a given number times.
8043         #  Rotation angle will be 2*PI/theNbTimes.
8044         #  @param theObject The object to be rotated.
8045         #  @param theAxis The rotation axis. DZ if None.
8046         #  @param theNbTimes Quantity of rotations to be done.
8047         #  @param theName Object name; when specified, this parameter is used
8048         #         for result publication in the study. Otherwise, if automatic
8049         #         publication is switched on, default value is used for result name.
8050         #
8051         #  @return New GEOM.GEOM_Object, containing compound of all the
8052         #          shapes, obtained after each rotation.
8053         #
8054         #  @ref tui_multi_rotation "Example"
8055         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8056             """
8057             Rotate the given object around the given axis a given number times.
8058             Rotation angle will be 2*PI/theNbTimes.
8059
8060             Parameters:
8061                 theObject The object to be rotated.
8062                 theAxis The rotation axis. DZ if None.
8063                 theNbTimes Quantity of rotations to be done.
8064                 theName Object name; when specified, this parameter is used
8065                         for result publication in the study. Otherwise, if automatic
8066                         publication is switched on, default value is used for result name.
8067
8068             Returns:     
8069                 New GEOM.GEOM_Object, containing compound of all the
8070                 shapes, obtained after each rotation.
8071
8072             Example of usage:
8073                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8074             """
8075             # Example: see GEOM_TestAll.py
8076             theNbTimes, Parameters = ParseParameters(theNbTimes)
8077             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8078             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8079             anObj.SetParameters(Parameters)
8080             self._autoPublish(anObj, theName, "multirotation")
8081             return anObj
8082
8083         ## Rotate the given object around the given axis
8084         #  a given number times on the given angle.
8085         #  @param theObject The object to be rotated.
8086         #  @param theAxis The rotation axis. DZ if None.
8087         #  @param theAngleStep Rotation angle in radians.
8088         #  @param theNbTimes Quantity of rotations to be done.
8089         #  @param theName Object name; when specified, this parameter is used
8090         #         for result publication in the study. Otherwise, if automatic
8091         #         publication is switched on, default value is used for result name.
8092         #
8093         #  @return New GEOM.GEOM_Object, containing compound of all the
8094         #          shapes, obtained after each rotation.
8095         #
8096         #  @ref tui_multi_rotation "Example"
8097         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8098             """
8099             Rotate the given object around the given axis
8100             a given number times on the given angle.
8101
8102             Parameters:
8103                 theObject The object to be rotated.
8104                 theAxis The rotation axis. DZ if None.
8105                 theAngleStep Rotation angle in radians.
8106                 theNbTimes Quantity of rotations to be done.
8107                 theName Object name; when specified, this parameter is used
8108                         for result publication in the study. Otherwise, if automatic
8109                         publication is switched on, default value is used for result name.
8110
8111             Returns:     
8112                 New GEOM.GEOM_Object, containing compound of all the
8113                 shapes, obtained after each rotation.
8114
8115             Example of usage:
8116                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8117             """
8118             # Example: see GEOM_TestAll.py
8119             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8120             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8121             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8122             anObj.SetParameters(Parameters)
8123             self._autoPublish(anObj, theName, "multirotation")
8124             return anObj
8125
8126         ## Rotate the given object around the given axis a given
8127         #  number times and multi-translate each rotation result.
8128         #  Rotation angle will be 2*PI/theNbTimes1.
8129         #  Translation direction passes through center of gravity
8130         #  of rotated shape and its projection on the rotation axis.
8131         #  @param theObject The object to be rotated.
8132         #  @param theAxis Rotation axis. DZ if None.
8133         #  @param theNbTimes1 Quantity of rotations to be done.
8134         #  @param theRadialStep Translation distance.
8135         #  @param theNbTimes2 Quantity of translations to be done.
8136         #  @param theName Object name; when specified, this parameter is used
8137         #         for result publication in the study. Otherwise, if automatic
8138         #         publication is switched on, default value is used for result name.
8139         #
8140         #  @return New GEOM.GEOM_Object, containing compound of all the
8141         #          shapes, obtained after each transformation.
8142         #
8143         #  @ref tui_multi_rotation "Example"
8144         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8145             """
8146             Rotate the given object around the
8147             given axis on the given angle a given number
8148             times and multi-translate each rotation result.
8149             Translation direction passes through center of gravity
8150             of rotated shape and its projection on the rotation axis.
8151
8152             Parameters:
8153                 theObject The object to be rotated.
8154                 theAxis Rotation axis. DZ if None.
8155                 theNbTimes1 Quantity of rotations to be done.
8156                 theRadialStep Translation distance.
8157                 theNbTimes2 Quantity of translations to be done.
8158                 theName Object name; when specified, this parameter is used
8159                         for result publication in the study. Otherwise, if automatic
8160                         publication is switched on, default value is used for result name.
8161
8162             Returns:    
8163                 New GEOM.GEOM_Object, containing compound of all the
8164                 shapes, obtained after each transformation.
8165
8166             Example of usage:
8167                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8168             """
8169             # Example: see GEOM_TestAll.py
8170             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8171             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8172             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8173             anObj.SetParameters(Parameters)
8174             self._autoPublish(anObj, theName, "multirotation")
8175             return anObj
8176
8177         ## Rotate the given object around the
8178         #  given axis on the given angle a given number
8179         #  times and multi-translate each rotation result.
8180         #  Translation direction passes through center of gravity
8181         #  of rotated shape and its projection on the rotation axis.
8182         #  @param theObject The object to be rotated.
8183         #  @param theAxis Rotation axis. DZ if None.
8184         #  @param theAngleStep Rotation angle in radians.
8185         #  @param theNbTimes1 Quantity of rotations to be done.
8186         #  @param theRadialStep Translation distance.
8187         #  @param theNbTimes2 Quantity of translations to be done.
8188         #  @param theName Object name; when specified, this parameter is used
8189         #         for result publication in the study. Otherwise, if automatic
8190         #         publication is switched on, default value is used for result name.
8191         #
8192         #  @return New GEOM.GEOM_Object, containing compound of all the
8193         #          shapes, obtained after each transformation.
8194         #
8195         #  @ref tui_multi_rotation "Example"
8196         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8197             """
8198             Rotate the given object around the
8199             given axis on the given angle a given number
8200             times and multi-translate each rotation result.
8201             Translation direction passes through center of gravity
8202             of rotated shape and its projection on the rotation axis.
8203
8204             Parameters:
8205                 theObject The object to be rotated.
8206                 theAxis Rotation axis. DZ if None.
8207                 theAngleStep Rotation angle in radians.
8208                 theNbTimes1 Quantity of rotations to be done.
8209                 theRadialStep Translation distance.
8210                 theNbTimes2 Quantity of translations to be done.
8211                 theName Object name; when specified, this parameter is used
8212                         for result publication in the study. Otherwise, if automatic
8213                         publication is switched on, default value is used for result name.
8214
8215             Returns:    
8216                 New GEOM.GEOM_Object, containing compound of all the
8217                 shapes, obtained after each transformation.
8218
8219             Example of usage:
8220                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8221             """
8222             # Example: see GEOM_TestAll.py
8223             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8224             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8225             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8226             anObj.SetParameters(Parameters)
8227             self._autoPublish(anObj, theName, "multirotation")
8228             return anObj
8229
8230         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8231         #
8232         #  @ref swig_MakeMultiRotation "Example"
8233         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8234             """
8235             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8236
8237             Example of usage:
8238                 pz = geompy.MakeVertex(0, 0, 100)
8239                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8240                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8241             """
8242             # Example: see GEOM_TestOthers.py
8243             aVec = self.MakeLine(aPoint,aDir)
8244             # note: auto-publishing is done in self.MultiRotate1D()
8245             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8246             return anObj
8247
8248         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8249         #
8250         #  @ref swig_MakeMultiRotation "Example"
8251         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8252             """
8253             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8254
8255             Example of usage:
8256                 pz = geompy.MakeVertex(0, 0, 100)
8257                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8258                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8259             """
8260             # Example: see GEOM_TestOthers.py
8261             aVec = self.MakeLine(aPoint,aDir)
8262             # note: auto-publishing is done in self.MultiRotate1D()
8263             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8264             return anObj
8265
8266         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8267         #
8268         #  @ref swig_MakeMultiRotation "Example"
8269         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8270             """
8271             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8272             
8273             Example of usage:
8274                 pz = geompy.MakeVertex(0, 0, 100)
8275                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8276                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8277             """
8278             # Example: see GEOM_TestOthers.py
8279             aVec = self.MakeLine(aPoint,aDir)
8280             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8281             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8282             return anObj
8283
8284         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8285         #
8286         #  @ref swig_MakeMultiRotation "Example"
8287         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8288             """
8289             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8290             
8291             Example of usage:
8292                 pz = geompy.MakeVertex(0, 0, 100)
8293                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8294                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8295             """
8296             # Example: see GEOM_TestOthers.py
8297             aVec = self.MakeLine(aPoint,aDir)
8298             # note: auto-publishing is done in self.MultiRotate2D()
8299             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8300             return anObj
8301
8302         # end of l3_transform
8303         ## @}
8304
8305         ## @addtogroup l3_transform_d
8306         ## @{
8307
8308         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8309         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8310             """
8311             Deprecated method. Use MultiRotate1DNbTimes instead.
8312             """
8313             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8314             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8315
8316         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8317         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8318         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8319             """
8320             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8321             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8322
8323             Example of usage:
8324                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8325             """
8326             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8327             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8328             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8329             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8330             anObj.SetParameters(Parameters)
8331             self._autoPublish(anObj, theName, "multirotation")
8332             return anObj
8333
8334         ## The same, as MultiRotate1D(), but axis is given by direction and point
8335         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8336         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8337             """
8338             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8339             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8340
8341             Example of usage:
8342                 pz = geompy.MakeVertex(0, 0, 100)
8343                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8344                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8345             """
8346             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8347             aVec = self.MakeLine(aPoint,aDir)
8348             # note: auto-publishing is done in self.MultiRotate1D()
8349             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8350             return anObj
8351
8352         ## The same, as MultiRotate2D(), but axis is given by direction and point
8353         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8354         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8355             """
8356             The same, as MultiRotate2D(), but axis is given by direction and point
8357             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8358             
8359             Example of usage:
8360                 pz = geompy.MakeVertex(0, 0, 100)
8361                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8362                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8363             """
8364             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8365             aVec = self.MakeLine(aPoint,aDir)
8366             # note: auto-publishing is done in self.MultiRotate2D()
8367             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8368             return anObj
8369
8370         # end of l3_transform_d
8371         ## @}
8372
8373         ## @addtogroup l3_local
8374         ## @{
8375
8376         ## Perform a fillet on all edges of the given shape.
8377         #  @param theShape Shape, to perform fillet on.
8378         #  @param theR Fillet radius.
8379         #  @param theName Object name; when specified, this parameter is used
8380         #         for result publication in the study. Otherwise, if automatic
8381         #         publication is switched on, default value is used for result name.
8382         #
8383         #  @return New GEOM.GEOM_Object, containing the result shape.
8384         #
8385         #  @ref tui_fillet "Example 1"
8386         #  \n @ref swig_MakeFilletAll "Example 2"
8387         def MakeFilletAll(self, theShape, theR, theName=None):
8388             """
8389             Perform a fillet on all edges of the given shape.
8390
8391             Parameters:
8392                 theShape Shape, to perform fillet on.
8393                 theR Fillet radius.
8394                 theName Object name; when specified, this parameter is used
8395                         for result publication in the study. Otherwise, if automatic
8396                         publication is switched on, default value is used for result name.
8397
8398             Returns: 
8399                 New GEOM.GEOM_Object, containing the result shape.
8400
8401             Example of usage: 
8402                filletall = geompy.MakeFilletAll(prism, 10.)
8403             """
8404             # Example: see GEOM_TestOthers.py
8405             theR,Parameters = ParseParameters(theR)
8406             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8407             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8408             anObj.SetParameters(Parameters)
8409             self._autoPublish(anObj, theName, "fillet")
8410             return anObj
8411
8412         ## Perform a fillet on the specified edges/faces of the given shape
8413         #  @param theShape Shape, to perform fillet on.
8414         #  @param theR Fillet radius.
8415         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8416         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8417         #  @param theName Object name; when specified, this parameter is used
8418         #         for result publication in the study. Otherwise, if automatic
8419         #         publication is switched on, default value is used for result name.
8420         #
8421         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8422         #
8423         #  @return New GEOM.GEOM_Object, containing the result shape.
8424         #
8425         #  @ref tui_fillet "Example"
8426         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8427             """
8428             Perform a fillet on the specified edges/faces of the given shape
8429
8430             Parameters:
8431                 theShape Shape, to perform fillet on.
8432                 theR Fillet radius.
8433                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8434                 theListShapes Global indices of edges/faces to perform fillet on.
8435                 theName Object name; when specified, this parameter is used
8436                         for result publication in the study. Otherwise, if automatic
8437                         publication is switched on, default value is used for result name.
8438
8439             Note:
8440                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8441
8442             Returns: 
8443                 New GEOM.GEOM_Object, containing the result shape.
8444
8445             Example of usage:
8446                 # get the list of IDs (IDList) for the fillet
8447                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8448                 IDlist_e = []
8449                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8450                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8451                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8452                 # make a fillet on the specified edges of the given shape
8453                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8454             """
8455             # Example: see GEOM_TestAll.py
8456             theR,Parameters = ParseParameters(theR)
8457             anObj = None
8458             if theShapeType == self.ShapeType["EDGE"]:
8459                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8460                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8461             else:
8462                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8463                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8464             anObj.SetParameters(Parameters)
8465             self._autoPublish(anObj, theName, "fillet")
8466             return anObj
8467
8468         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8469         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8470             """
8471             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8472
8473             Example of usage:
8474                 # get the list of IDs (IDList) for the fillet
8475                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8476                 IDlist_e = []
8477                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8478                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8479                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8480                 # make a fillet on the specified edges of the given shape
8481                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8482             """
8483             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8484             anObj = None
8485             if theShapeType == self.ShapeType["EDGE"]:
8486                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8487                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8488             else:
8489                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8490                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8491             anObj.SetParameters(Parameters)
8492             self._autoPublish(anObj, theName, "fillet")
8493             return anObj
8494
8495         ## Perform a fillet on the specified edges of the given shape
8496         #  @param theShape  Wire Shape to perform fillet on.
8497         #  @param theR  Fillet radius.
8498         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8499         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8500         #    \note The list of vertices could be empty,
8501         #          in this case fillet will done done at all vertices in wire
8502         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8503         #         by the length of the edges, nearest to the fillet vertex.
8504         #         But sometimes the next edge is C1 continuous with the one, nearest to
8505         #         the fillet point, and such two (or more) edges can be united to allow
8506         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8507         #         thus ignoring the secant vertex (vertices).
8508         #  @param theName Object name; when specified, this parameter is used
8509         #         for result publication in the study. Otherwise, if automatic
8510         #         publication is switched on, default value is used for result name.
8511         #
8512         #  @return New GEOM.GEOM_Object, containing the result shape.
8513         #
8514         #  @ref tui_fillet2d "Example"
8515         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8516             """
8517             Perform a fillet on the specified edges of the given shape
8518
8519             Parameters:
8520                 theShape  Wire Shape to perform fillet on.
8521                 theR  Fillet radius.
8522                 theListOfVertexes Global indices of vertexes to perform fillet on.
8523                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8524                     by the length of the edges, nearest to the fillet vertex.
8525                     But sometimes the next edge is C1 continuous with the one, nearest to
8526                     the fillet point, and such two (or more) edges can be united to allow
8527                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8528                     thus ignoring the secant vertex (vertices).
8529                 theName Object name; when specified, this parameter is used
8530                         for result publication in the study. Otherwise, if automatic
8531                         publication is switched on, default value is used for result name.
8532             Note:
8533                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8534
8535                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8536
8537             Returns: 
8538                 New GEOM.GEOM_Object, containing the result shape.
8539
8540             Example of usage:  
8541                 # create wire
8542                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8543                 # make fillet at given wire vertices with giver radius
8544                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8545             """
8546             # Example: see GEOM_TestAll.py
8547             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8548             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8549             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8550             anObj.SetParameters(Parameters)
8551             self._autoPublish(anObj, theName, "fillet")
8552             return anObj
8553
8554         ## Perform a fillet at the specified vertices of the given face/shell.
8555         #  @param theShape Face or Shell shape to perform fillet on.
8556         #  @param theR Fillet radius.
8557         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8558         #  @param theName Object name; when specified, this parameter is used
8559         #         for result publication in the study. Otherwise, if automatic
8560         #         publication is switched on, default value is used for result name.
8561         #
8562         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8563         #
8564         #  @return New GEOM.GEOM_Object, containing the result shape.
8565         #
8566         #  @ref tui_fillet2d "Example"
8567         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8568             """
8569             Perform a fillet at the specified vertices of the given face/shell.
8570
8571             Parameters:
8572                 theShape  Face or Shell shape to perform fillet on.
8573                 theR  Fillet radius.
8574                 theListOfVertexes Global indices of vertexes to perform fillet on.
8575                 theName Object name; when specified, this parameter is used
8576                         for result publication in the study. Otherwise, if automatic
8577                         publication is switched on, default value is used for result name.
8578             Note:
8579                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8580
8581             Returns: 
8582                 New GEOM.GEOM_Object, containing the result shape.
8583
8584             Example of usage:
8585                 face = geompy.MakeFaceHW(100, 100, 1)
8586                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8587             """
8588             # Example: see GEOM_TestAll.py
8589             theR,Parameters = ParseParameters(theR)
8590             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8591             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8592             anObj.SetParameters(Parameters)
8593             self._autoPublish(anObj, theName, "fillet")
8594             return anObj
8595
8596         ## Perform a symmetric chamfer on all edges of the given shape.
8597         #  @param theShape Shape, to perform chamfer on.
8598         #  @param theD Chamfer size along each face.
8599         #  @param theName Object name; when specified, this parameter is used
8600         #         for result publication in the study. Otherwise, if automatic
8601         #         publication is switched on, default value is used for result name.
8602         #
8603         #  @return New GEOM.GEOM_Object, containing the result shape.
8604         #
8605         #  @ref tui_chamfer "Example 1"
8606         #  \n @ref swig_MakeChamferAll "Example 2"
8607         def MakeChamferAll(self, theShape, theD, theName=None):
8608             """
8609             Perform a symmetric chamfer on all edges of the given shape.
8610
8611             Parameters:
8612                 theShape Shape, to perform chamfer on.
8613                 theD Chamfer size along each face.
8614                 theName Object name; when specified, this parameter is used
8615                         for result publication in the study. Otherwise, if automatic
8616                         publication is switched on, default value is used for result name.
8617
8618             Returns:     
8619                 New GEOM.GEOM_Object, containing the result shape.
8620
8621             Example of usage:
8622                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8623             """
8624             # Example: see GEOM_TestOthers.py
8625             theD,Parameters = ParseParameters(theD)
8626             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8627             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8628             anObj.SetParameters(Parameters)
8629             self._autoPublish(anObj, theName, "chamfer")
8630             return anObj
8631
8632         ## Perform a chamfer on edges, common to the specified faces,
8633         #  with distance D1 on the Face1
8634         #  @param theShape Shape, to perform chamfer on.
8635         #  @param theD1 Chamfer size along \a theFace1.
8636         #  @param theD2 Chamfer size along \a theFace2.
8637         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8638         #  @param theName Object name; when specified, this parameter is used
8639         #         for result publication in the study. Otherwise, if automatic
8640         #         publication is switched on, default value is used for result name.
8641         #
8642         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8643         #
8644         #  @return New GEOM.GEOM_Object, containing the result shape.
8645         #
8646         #  @ref tui_chamfer "Example"
8647         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8648             """
8649             Perform a chamfer on edges, common to the specified faces,
8650             with distance D1 on the Face1
8651
8652             Parameters:
8653                 theShape Shape, to perform chamfer on.
8654                 theD1 Chamfer size along theFace1.
8655                 theD2 Chamfer size along theFace2.
8656                 theFace1,theFace2 Global indices of two faces of theShape.
8657                 theName Object name; when specified, this parameter is used
8658                         for result publication in the study. Otherwise, if automatic
8659                         publication is switched on, default value is used for result name.
8660
8661             Note:
8662                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8663
8664             Returns:      
8665                 New GEOM.GEOM_Object, containing the result shape.
8666
8667             Example of usage:
8668                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8669                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8670                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8671                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8672             """
8673             # Example: see GEOM_TestAll.py
8674             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8675             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8676             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8677             anObj.SetParameters(Parameters)
8678             self._autoPublish(anObj, theName, "chamfer")
8679             return anObj
8680
8681         ## Perform a chamfer on edges
8682         #  @param theShape Shape, to perform chamfer on.
8683         #  @param theD Chamfer length
8684         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8685         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8686         #  @param theName Object name; when specified, this parameter is used
8687         #         for result publication in the study. Otherwise, if automatic
8688         #         publication is switched on, default value is used for result name.
8689         #
8690         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8691         #
8692         #  @return New GEOM.GEOM_Object, containing the result shape.
8693         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8694             """
8695             Perform a chamfer on edges
8696
8697             Parameters:
8698                 theShape Shape, to perform chamfer on.
8699                 theD1 Chamfer size along theFace1.
8700                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8701                 theFace1,theFace2 Global indices of two faces of theShape.
8702                 theName Object name; when specified, this parameter is used
8703                         for result publication in the study. Otherwise, if automatic
8704                         publication is switched on, default value is used for result name.
8705
8706             Note:
8707                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8708
8709             Returns:      
8710                 New GEOM.GEOM_Object, containing the result shape.
8711
8712             Example of usage:
8713                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8714                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8715                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8716                 ang = 30
8717                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8718             """
8719             flag = False
8720             if isinstance(theAngle,str):
8721                 flag = True
8722             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8723             if flag:
8724                 theAngle = theAngle*math.pi/180.0
8725             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8726             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8727             anObj.SetParameters(Parameters)
8728             self._autoPublish(anObj, theName, "chamfer")
8729             return anObj
8730
8731         ## Perform a chamfer on all edges of the specified faces,
8732         #  with distance D1 on the first specified face (if several for one edge)
8733         #  @param theShape Shape, to perform chamfer on.
8734         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8735         #               connected to the edge, are in \a theFaces, \a theD1
8736         #               will be get along face, which is nearer to \a theFaces beginning.
8737         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8738         #  @param theFaces Sequence of global indices of faces of \a theShape.
8739         #  @param 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 Global index of sub-shape can be obtained, using method GetSubShapeID().
8744         #
8745         #  @return New GEOM.GEOM_Object, containing the result shape.
8746         #
8747         #  @ref tui_chamfer "Example"
8748         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8749             """
8750             Perform a chamfer on all edges of the specified faces,
8751             with distance D1 on the first specified face (if several for one edge)
8752
8753             Parameters:
8754                 theShape Shape, to perform chamfer on.
8755                 theD1 Chamfer size along face from  theFaces. If both faces,
8756                       connected to the edge, are in theFaces, theD1
8757                       will be get along face, which is nearer to theFaces beginning.
8758                 theD2 Chamfer size along another of two faces, connected to the edge.
8759                 theFaces Sequence of global indices of faces of theShape.
8760                 theName Object name; when specified, this parameter is used
8761                         for result publication in the study. Otherwise, if automatic
8762                         publication is switched on, default value is used for result name.
8763                 
8764             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8765
8766             Returns:  
8767                 New GEOM.GEOM_Object, containing the result shape.
8768             """
8769             # Example: see GEOM_TestAll.py
8770             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8771             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8772             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8773             anObj.SetParameters(Parameters)
8774             self._autoPublish(anObj, theName, "chamfer")
8775             return anObj
8776
8777         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8778         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8779         #
8780         #  @ref swig_FilletChamfer "Example"
8781         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8782             """
8783             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8784             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8785             """
8786             flag = False
8787             if isinstance(theAngle,str):
8788                 flag = True
8789             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8790             if flag:
8791                 theAngle = theAngle*math.pi/180.0
8792             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8793             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8794             anObj.SetParameters(Parameters)
8795             self._autoPublish(anObj, theName, "chamfer")
8796             return anObj
8797
8798         ## Perform a chamfer on edges,
8799         #  with distance D1 on the first specified face (if several for one edge)
8800         #  @param theShape Shape, to perform chamfer on.
8801         #  @param theD1,theD2 Chamfer size
8802         #  @param theEdges Sequence of edges of \a theShape.
8803         #  @param theName Object name; when specified, this parameter is used
8804         #         for result publication in the study. Otherwise, if automatic
8805         #         publication is switched on, default value is used for result name.
8806         #
8807         #  @return New GEOM.GEOM_Object, containing the result shape.
8808         #
8809         #  @ref swig_FilletChamfer "Example"
8810         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8811             """
8812             Perform a chamfer on edges,
8813             with distance D1 on the first specified face (if several for one edge)
8814             
8815             Parameters:
8816                 theShape Shape, to perform chamfer on.
8817                 theD1,theD2 Chamfer size
8818                 theEdges Sequence of edges of theShape.
8819                 theName Object name; when specified, this parameter is used
8820                         for result publication in the study. Otherwise, if automatic
8821                         publication is switched on, default value is used for result name.
8822
8823             Returns:
8824                 New GEOM.GEOM_Object, containing the result shape.
8825             """
8826             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8827             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8828             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8829             anObj.SetParameters(Parameters)
8830             self._autoPublish(anObj, theName, "chamfer")
8831             return anObj
8832
8833         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8834         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8835         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8836             """
8837             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8838             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8839             """
8840             flag = False
8841             if isinstance(theAngle,str):
8842                 flag = True
8843             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8844             if flag:
8845                 theAngle = theAngle*math.pi/180.0
8846             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8847             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8848             anObj.SetParameters(Parameters)
8849             self._autoPublish(anObj, theName, "chamfer")
8850             return anObj
8851
8852         ## @sa MakeChamferEdge(), MakeChamferFaces()
8853         #
8854         #  @ref swig_MakeChamfer "Example"
8855         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8856             """
8857             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8858             """
8859             # Example: see GEOM_TestOthers.py
8860             anObj = None
8861             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8862             if aShapeType == self.ShapeType["EDGE"]:
8863                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8864             else:
8865                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8866             return anObj
8867             
8868         ## Remove material from a solid by extrusion of the base shape on the given distance.
8869         #  @param theInit Shape to remove material from. It must be a solid or 
8870         #  a compound made of a single solid.
8871         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8872         #  @param theH Prism dimension along the normal to theBase
8873         #  @param theAngle Draft angle in degrees.
8874         #  @param theName Object name; when specified, this parameter is used
8875         #         for result publication in the study. Otherwise, if automatic
8876         #         publication is switched on, default value is used for result name.
8877         #
8878         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8879         #
8880         #  @ref tui_creation_prism "Example"
8881         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8882             """
8883             Add material to a solid by extrusion of the base shape on the given distance.
8884
8885             Parameters:
8886                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8887                 theBase Closed edge or wire defining the base shape to be extruded.
8888                 theH Prism dimension along the normal  to theBase
8889                 theAngle Draft angle in degrees.
8890                 theName Object name; when specified, this parameter is used
8891                         for result publication in the study. Otherwise, if automatic
8892                         publication is switched on, default value is used for result name.
8893
8894             Returns:
8895                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8896             """
8897             # Example: see GEOM_TestAll.py
8898             #theH,Parameters = ParseParameters(theH)
8899             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8900             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8901             #anObj.SetParameters(Parameters)
8902             self._autoPublish(anObj, theName, "extrudedCut")
8903             return anObj   
8904             
8905         ## Add material to a solid by extrusion of the base shape on the given distance.
8906         #  @param theInit Shape to add material to. 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 added material 
8916         #
8917         #  @ref tui_creation_prism "Example"
8918         def MakeExtrudedBoss(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 add material to. 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 added material.
8933             """
8934             # Example: see GEOM_TestAll.py
8935             #theH,Parameters = ParseParameters(theH)
8936             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8937             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8938             #anObj.SetParameters(Parameters)
8939             self._autoPublish(anObj, theName, "extrudedBoss")
8940             return anObj   
8941
8942         # end of l3_local
8943         ## @}
8944
8945         ## @addtogroup l3_basic_op
8946         ## @{
8947
8948         ## Perform an Archimde operation on the given shape with given parameters.
8949         #  The object presenting the resulting face is returned.
8950         #  @param theShape Shape to be put in water.
8951         #  @param theWeight Weight og the shape.
8952         #  @param theWaterDensity Density of the water.
8953         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8954         #  @param theName Object name; when specified, this parameter is used
8955         #         for result publication in the study. Otherwise, if automatic
8956         #         publication is switched on, default value is used for result name.
8957         #
8958         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8959         #          by a plane, corresponding to water level.
8960         #
8961         #  @ref tui_archimede "Example"
8962         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8963             """
8964             Perform an Archimde operation on the given shape with given parameters.
8965             The object presenting the resulting face is returned.
8966
8967             Parameters: 
8968                 theShape Shape to be put in water.
8969                 theWeight Weight og the shape.
8970                 theWaterDensity Density of the water.
8971                 theMeshDeflection Deflection of the mesh, using to compute the section.
8972                 theName Object name; when specified, this parameter is used
8973                         for result publication in the study. Otherwise, if automatic
8974                         publication is switched on, default value is used for result name.
8975
8976             Returns: 
8977                 New GEOM.GEOM_Object, containing a section of theShape
8978                 by a plane, corresponding to water level.
8979             """
8980             # Example: see GEOM_TestAll.py
8981             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
8982               theWeight,theWaterDensity,theMeshDeflection)
8983             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
8984             RaiseIfFailed("MakeArchimede", self.LocalOp)
8985             anObj.SetParameters(Parameters)
8986             self._autoPublish(anObj, theName, "archimede")
8987             return anObj
8988
8989         # end of l3_basic_op
8990         ## @}
8991
8992         ## @addtogroup l2_measure
8993         ## @{
8994
8995         ## Get point coordinates
8996         #  @return [x, y, z]
8997         #
8998         #  @ref tui_measurement_tools_page "Example"
8999         def PointCoordinates(self,Point):
9000             """
9001             Get point coordinates
9002
9003             Returns:
9004                 [x, y, z]
9005             """
9006             # Example: see GEOM_TestMeasures.py
9007             aTuple = self.MeasuOp.PointCoordinates(Point)
9008             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9009             return aTuple 
9010         
9011         ## Get vector coordinates
9012         #  @return [x, y, z]
9013         #
9014         #  @ref tui_measurement_tools_page "Example"
9015         def VectorCoordinates(self,Vector):
9016             """
9017             Get vector coordinates
9018
9019             Returns:
9020                 [x, y, z]
9021             """
9022
9023             p1=self.GetFirstVertex(Vector)
9024             p2=self.GetLastVertex(Vector)
9025             
9026             X1=self.PointCoordinates(p1)
9027             X2=self.PointCoordinates(p2)
9028
9029             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9030
9031
9032         ## Compute cross product
9033         #  @return vector w=u^v
9034         #
9035         #  @ref tui_measurement_tools_page "Example"
9036         def CrossProduct(self, Vector1, Vector2):
9037             """ 
9038             Compute cross product
9039             
9040             Returns: vector w=u^v
9041             """
9042             u=self.VectorCoordinates(Vector1)
9043             v=self.VectorCoordinates(Vector2)
9044             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])
9045             
9046             return w
9047         
9048         ## Compute cross product
9049         #  @return dot product  p=u.v
9050         #
9051         #  @ref tui_measurement_tools_page "Example"
9052         def DotProduct(self, Vector1, Vector2):
9053             """ 
9054             Compute cross product
9055             
9056             Returns: dot product  p=u.v
9057             """
9058             u=self.VectorCoordinates(Vector1)
9059             v=self.VectorCoordinates(Vector2)
9060             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9061             
9062             return p
9063
9064
9065         ## Get summarized length of all wires,
9066         #  area of surface and volume of the given shape.
9067         #  @param theShape Shape to define properties of.
9068         #  @return [theLength, theSurfArea, theVolume]\n
9069         #  theLength:   Summarized length of all wires of the given shape.\n
9070         #  theSurfArea: Area of surface of the given shape.\n
9071         #  theVolume:   Volume of the given shape.
9072         #
9073         #  @ref tui_measurement_tools_page "Example"
9074         def BasicProperties(self,theShape):
9075             """
9076             Get summarized length of all wires,
9077             area of surface and volume of the given shape.
9078
9079             Parameters: 
9080                 theShape Shape to define properties of.
9081
9082             Returns:
9083                 [theLength, theSurfArea, theVolume]
9084                  theLength:   Summarized length of all wires of the given shape.
9085                  theSurfArea: Area of surface of the given shape.
9086                  theVolume:   Volume of the given shape.
9087             """
9088             # Example: see GEOM_TestMeasures.py
9089             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9090             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9091             return aTuple
9092
9093         ## Get parameters of bounding box of the given shape
9094         #  @param theShape Shape to obtain bounding box of.
9095         #  @param precise TRUE for precise computation; FALSE for fast one.
9096         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9097         #  Xmin,Xmax: Limits of shape along OX axis.
9098         #  Ymin,Ymax: Limits of shape along OY axis.
9099         #  Zmin,Zmax: Limits of shape along OZ axis.
9100         #
9101         #  @ref tui_measurement_tools_page "Example"
9102         def BoundingBox (self, theShape, precise=False):
9103             """
9104             Get parameters of bounding box of the given shape
9105
9106             Parameters: 
9107                 theShape Shape to obtain bounding box of.
9108                 precise TRUE for precise computation; FALSE for fast one.
9109
9110             Returns:
9111                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9112                  Xmin,Xmax: Limits of shape along OX axis.
9113                  Ymin,Ymax: Limits of shape along OY axis.
9114                  Zmin,Zmax: Limits of shape along OZ axis.
9115             """
9116             # Example: see GEOM_TestMeasures.py
9117             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9118             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9119             return aTuple
9120
9121         ## Get bounding box of the given shape
9122         #  @param theShape Shape to obtain bounding box of.
9123         #  @param precise TRUE for precise computation; FALSE for fast one.
9124         #  @param theName Object name; when specified, this parameter is used
9125         #         for result publication in the study. Otherwise, if automatic
9126         #         publication is switched on, default value is used for result name.
9127         #
9128         #  @return New GEOM.GEOM_Object, containing the created box.
9129         #
9130         #  @ref tui_measurement_tools_page "Example"
9131         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9132             """
9133             Get bounding box of the given shape
9134
9135             Parameters: 
9136                 theShape Shape to obtain bounding box of.
9137                 precise TRUE for precise computation; FALSE for fast one.
9138                 theName Object name; when specified, this parameter is used
9139                         for result publication in the study. Otherwise, if automatic
9140                         publication is switched on, default value is used for result name.
9141
9142             Returns:
9143                 New GEOM.GEOM_Object, containing the created box.
9144             """
9145             # Example: see GEOM_TestMeasures.py
9146             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9147             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9148             self._autoPublish(anObj, theName, "bndbox")
9149             return anObj
9150
9151         ## Get inertia matrix and moments of inertia of theShape.
9152         #  @param theShape Shape to calculate inertia of.
9153         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9154         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9155         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9156         #
9157         #  @ref tui_measurement_tools_page "Example"
9158         def Inertia(self,theShape):
9159             """
9160             Get inertia matrix and moments of inertia of theShape.
9161
9162             Parameters: 
9163                 theShape Shape to calculate inertia of.
9164
9165             Returns:
9166                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9167                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9168                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9169             """
9170             # Example: see GEOM_TestMeasures.py
9171             aTuple = self.MeasuOp.GetInertia(theShape)
9172             RaiseIfFailed("GetInertia", self.MeasuOp)
9173             return aTuple
9174
9175         ## Get if coords are included in the shape (ST_IN or ST_ON)
9176         #  @param theShape Shape
9177         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9178         #  @param tolerance to be used (default is 1.0e-7)
9179         #  @return list_of_boolean = [res1, res2, ...]
9180         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9181             """
9182             Get if coords are included in the shape (ST_IN or ST_ON)
9183             
9184             Parameters: 
9185                 theShape Shape
9186                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9187                 tolerance to be used (default is 1.0e-7)
9188
9189             Returns:
9190                 list_of_boolean = [res1, res2, ...]
9191             """
9192             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9193
9194         ## Get minimal distance between the given shapes.
9195         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9196         #  @return Value of the minimal distance between the given shapes.
9197         #
9198         #  @ref tui_measurement_tools_page "Example"
9199         def MinDistance(self, theShape1, theShape2):
9200             """
9201             Get minimal distance between the given shapes.
9202             
9203             Parameters: 
9204                 theShape1,theShape2 Shapes to find minimal distance between.
9205
9206             Returns:    
9207                 Value of the minimal distance between the given shapes.
9208             """
9209             # Example: see GEOM_TestMeasures.py
9210             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9211             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9212             return aTuple[0]
9213
9214         ## Get minimal distance between the given shapes.
9215         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9216         #  @return Value of the minimal distance between the given shapes, in form of list
9217         #          [Distance, DX, DY, DZ].
9218         #
9219         #  @ref swig_all_measure "Example"
9220         def MinDistanceComponents(self, theShape1, theShape2):
9221             """
9222             Get minimal distance between the given shapes.
9223
9224             Parameters: 
9225                 theShape1,theShape2 Shapes to find minimal distance between.
9226
9227             Returns:  
9228                 Value of the minimal distance between the given shapes, in form of list
9229                 [Distance, DX, DY, DZ]
9230             """
9231             # Example: see GEOM_TestMeasures.py
9232             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9233             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9234             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9235             return aRes
9236
9237         ## Get closest points of the given shapes.
9238         #  @param theShape1,theShape2 Shapes to find closest points of.
9239         #  @return The number of found solutions (-1 in case of infinite number of
9240         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9241         #
9242         #  @ref tui_measurement_tools_page "Example"
9243         def ClosestPoints (self, theShape1, theShape2):
9244             """
9245             Get closest points of the given shapes.
9246
9247             Parameters: 
9248                 theShape1,theShape2 Shapes to find closest points of.
9249
9250             Returns:    
9251                 The number of found solutions (-1 in case of infinite number of
9252                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9253             """
9254             # Example: see GEOM_TestMeasures.py
9255             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9256             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9257             return aTuple
9258
9259         ## Get angle between the given shapes in degrees.
9260         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9261         #  @note If both arguments are vectors, the angle is computed in accordance
9262         #        with their orientations, otherwise the minimum angle is computed.
9263         #  @return Value of the angle between the given shapes in degrees.
9264         #
9265         #  @ref tui_measurement_tools_page "Example"
9266         def GetAngle(self, theShape1, theShape2):
9267             """
9268             Get angle between the given shapes in degrees.
9269
9270             Parameters: 
9271                 theShape1,theShape2 Lines or linear edges to find angle between.
9272
9273             Note:
9274                 If both arguments are vectors, the angle is computed in accordance
9275                 with their orientations, otherwise the minimum angle is computed.
9276
9277             Returns:  
9278                 Value of the angle between the given shapes in degrees.
9279             """
9280             # Example: see GEOM_TestMeasures.py
9281             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9282             RaiseIfFailed("GetAngle", self.MeasuOp)
9283             return anAngle
9284
9285         ## Get angle between the given shapes in radians.
9286         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9287         #  @note If both arguments are vectors, the angle is computed in accordance
9288         #        with their orientations, otherwise the minimum angle is computed.
9289         #  @return Value of the angle between the given shapes in radians.
9290         #
9291         #  @ref tui_measurement_tools_page "Example"
9292         def GetAngleRadians(self, theShape1, theShape2):
9293             """
9294             Get angle between the given shapes in radians.
9295
9296             Parameters: 
9297                 theShape1,theShape2 Lines or linear edges to find angle between.
9298
9299                 
9300             Note:
9301                 If both arguments are vectors, the angle is computed in accordance
9302                 with their orientations, otherwise the minimum angle is computed.
9303
9304             Returns:  
9305                 Value of the angle between the given shapes in radians.
9306             """
9307             # Example: see GEOM_TestMeasures.py
9308             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9309             RaiseIfFailed("GetAngle", self.MeasuOp)
9310             return anAngle
9311
9312         ## Get angle between the given vectors in degrees.
9313         #  @param theShape1,theShape2 Vectors to find angle between.
9314         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9315         #                 if False, the opposite vector to the normal vector is used.
9316         #  @return Value of the angle between the given vectors in degrees.
9317         #
9318         #  @ref tui_measurement_tools_page "Example"
9319         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9320             """
9321             Get angle between the given vectors in degrees.
9322
9323             Parameters: 
9324                 theShape1,theShape2 Vectors to find angle between.
9325                 theFlag If True, the normal vector is defined by the two vectors cross,
9326                         if False, the opposite vector to the normal vector is used.
9327
9328             Returns:  
9329                 Value of the angle between the given vectors in degrees.
9330             """
9331             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9332             if not theFlag:
9333                 anAngle = 360. - anAngle
9334             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9335             return anAngle
9336
9337         ## The same as GetAngleVectors, but the result is in radians.
9338         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9339             """
9340             Get angle between the given vectors in radians.
9341
9342             Parameters: 
9343                 theShape1,theShape2 Vectors to find angle between.
9344                 theFlag If True, the normal vector is defined by the two vectors cross,
9345                         if False, the opposite vector to the normal vector is used.
9346
9347             Returns:  
9348                 Value of the angle between the given vectors in radians.
9349             """
9350             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9351             return anAngle
9352
9353         ## @name Curve Curvature Measurement
9354         #  Methods for receiving radius of curvature of curves
9355         #  in the given point
9356         ## @{
9357
9358         ## Measure curvature of a curve at a point, set by parameter.
9359         #  @param theCurve a curve.
9360         #  @param theParam parameter.
9361         #  @return radius of curvature of \a theCurve.
9362         #
9363         #  @ref swig_todo "Example"
9364         def CurveCurvatureByParam(self, theCurve, theParam):
9365             """
9366             Measure curvature of a curve at a point, set by parameter.
9367
9368             Parameters: 
9369                 theCurve a curve.
9370                 theParam parameter.
9371
9372             Returns: 
9373                 radius of curvature of theCurve.
9374             """
9375             # Example: see GEOM_TestMeasures.py
9376             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9377             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9378             return aCurv
9379
9380         ## Measure curvature of a curve at a point.
9381         #  @param theCurve a curve.
9382         #  @param thePoint given point.
9383         #  @return radius of curvature of \a theCurve.
9384         #
9385         #  @ref swig_todo "Example"
9386         def CurveCurvatureByPoint(self, theCurve, thePoint):
9387             """
9388             Measure curvature of a curve at a point.
9389
9390             Parameters: 
9391                 theCurve a curve.
9392                 thePoint given point.
9393
9394             Returns: 
9395                 radius of curvature of theCurve.           
9396             """
9397             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9398             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9399             return aCurv
9400         ## @}
9401
9402         ## @name Surface Curvature Measurement
9403         #  Methods for receiving max and min radius of curvature of surfaces
9404         #  in the given point
9405         ## @{
9406
9407         ## Measure max radius of curvature of surface.
9408         #  @param theSurf the given surface.
9409         #  @param theUParam Value of U-parameter on the referenced surface.
9410         #  @param theVParam Value of V-parameter on the referenced surface.
9411         #  @return max radius of curvature of theSurf.
9412         #
9413         ## @ref swig_todo "Example"
9414         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9415             """
9416             Measure max radius of curvature of surface.
9417
9418             Parameters: 
9419                 theSurf the given surface.
9420                 theUParam Value of U-parameter on the referenced surface.
9421                 theVParam Value of V-parameter on the referenced surface.
9422                 
9423             Returns:     
9424                 max radius of curvature of theSurf.
9425             """
9426             # Example: see GEOM_TestMeasures.py
9427             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9428             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9429             return aSurf
9430
9431         ## Measure max radius of curvature of surface in the given point
9432         #  @param theSurf the given surface.
9433         #  @param thePoint given point.
9434         #  @return max radius of curvature of theSurf.
9435         #
9436         ## @ref swig_todo "Example"
9437         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9438             """
9439             Measure max radius of curvature of surface in the given point.
9440
9441             Parameters: 
9442                 theSurf the given surface.
9443                 thePoint given point.
9444                 
9445             Returns:     
9446                 max radius of curvature of theSurf.          
9447             """
9448             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9449             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9450             return aSurf
9451
9452         ## Measure min radius of curvature of surface.
9453         #  @param theSurf the given surface.
9454         #  @param theUParam Value of U-parameter on the referenced surface.
9455         #  @param theVParam Value of V-parameter on the referenced surface.
9456         #  @return min radius of curvature of theSurf.
9457         #   
9458         ## @ref swig_todo "Example"
9459         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9460             """
9461             Measure min radius of curvature of surface.
9462
9463             Parameters: 
9464                 theSurf the given surface.
9465                 theUParam Value of U-parameter on the referenced surface.
9466                 theVParam Value of V-parameter on the referenced surface.
9467                 
9468             Returns:     
9469                 Min radius of curvature of theSurf.
9470             """
9471             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9472             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9473             return aSurf
9474
9475         ## Measure min radius of curvature of surface in the given point
9476         #  @param theSurf the given surface.
9477         #  @param thePoint given point.
9478         #  @return min radius of curvature of theSurf.
9479         #
9480         ## @ref swig_todo "Example"
9481         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9482             """
9483             Measure min radius of curvature of surface in the given point.
9484
9485             Parameters: 
9486                 theSurf the given surface.
9487                 thePoint given point.
9488                 
9489             Returns:     
9490                 Min radius of curvature of theSurf.          
9491             """
9492             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9493             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9494             return aSurf
9495         ## @}
9496
9497         ## Get min and max tolerances of sub-shapes of theShape
9498         #  @param theShape Shape, to get tolerances of.
9499         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9500         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9501         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9502         #  VertMin,VertMax: Min and max tolerances of the vertices.
9503         #
9504         #  @ref tui_measurement_tools_page "Example"
9505         def Tolerance(self,theShape):
9506             """
9507             Get min and max tolerances of sub-shapes of theShape
9508
9509             Parameters: 
9510                 theShape Shape, to get tolerances of.
9511
9512             Returns:    
9513                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9514                  FaceMin,FaceMax: Min and max tolerances of the faces.
9515                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9516                  VertMin,VertMax: Min and max tolerances of the vertices.
9517             """
9518             # Example: see GEOM_TestMeasures.py
9519             aTuple = self.MeasuOp.GetTolerance(theShape)
9520             RaiseIfFailed("GetTolerance", self.MeasuOp)
9521             return aTuple
9522
9523         ## Obtain description of the given shape (number of sub-shapes of each type)
9524         #  @param theShape Shape to be described.
9525         #  @return Description of the given shape.
9526         #
9527         #  @ref tui_measurement_tools_page "Example"
9528         def WhatIs(self,theShape):
9529             """
9530             Obtain description of the given shape (number of sub-shapes of each type)
9531
9532             Parameters:
9533                 theShape Shape to be described.
9534
9535             Returns:
9536                 Description of the given shape.
9537             """
9538             # Example: see GEOM_TestMeasures.py
9539             aDescr = self.MeasuOp.WhatIs(theShape)
9540             RaiseIfFailed("WhatIs", self.MeasuOp)
9541             return aDescr
9542
9543         ## Obtain quantity of shapes of the given type in \a theShape.
9544         #  If \a theShape is of type \a theType, it is also counted.
9545         #  @param theShape Shape to be described.
9546         #  @param theType the given ShapeType().
9547         #  @return Quantity of shapes of type \a theType in \a theShape.
9548         #
9549         #  @ref tui_measurement_tools_page "Example"
9550         def NbShapes (self, theShape, theType):
9551             """
9552             Obtain quantity of shapes of the given type in theShape.
9553             If theShape is of type theType, it is also counted.
9554
9555             Parameters:
9556                 theShape Shape to be described.
9557                 theType the given geompy.ShapeType
9558
9559             Returns:
9560                 Quantity of shapes of type theType in theShape.
9561             """
9562             # Example: see GEOM_TestMeasures.py
9563             listSh = self.SubShapeAllIDs(theShape, theType)
9564             Nb = len(listSh)
9565             t       = EnumToLong(theShape.GetShapeType())
9566             theType = EnumToLong(theType)
9567             if t == theType:
9568                 Nb = Nb + 1
9569                 pass
9570             return Nb
9571
9572         ## Obtain quantity of shapes of each type in \a theShape.
9573         #  The \a theShape is also counted.
9574         #  @param theShape Shape to be described.
9575         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9576         #
9577         #  @ref tui_measurement_tools_page "Example"
9578         def ShapeInfo (self, theShape):
9579             """
9580             Obtain quantity of shapes of each type in theShape.
9581             The theShape is also counted.
9582
9583             Parameters:
9584                 theShape Shape to be described.
9585
9586             Returns:
9587                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9588             """
9589             # Example: see GEOM_TestMeasures.py
9590             aDict = {}
9591             for typeSh in self.ShapeType:
9592                 if typeSh in ( "AUTO", "SHAPE" ): continue
9593                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9594                 Nb = len(listSh)
9595                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9596                     Nb = Nb + 1
9597                     pass
9598                 aDict[typeSh] = Nb
9599                 pass
9600             return aDict
9601
9602         def GetCreationInformation(self, theShape):
9603             info = theShape.GetCreationInformation()
9604             # operationName
9605             opName = info.operationName
9606             if not opName: opName = "no info available"
9607             res = "Operation: " + opName
9608             # parameters
9609             for parVal in info.params:
9610                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9611             return res
9612
9613         ## Get a point, situated at the centre of mass of theShape.
9614         #  @param theShape Shape to define centre of mass of.
9615         #  @param theName Object name; when specified, this parameter is used
9616         #         for result publication in the study. Otherwise, if automatic
9617         #         publication is switched on, default value is used for result name.
9618         #
9619         #  @return New GEOM.GEOM_Object, containing the created point.
9620         #
9621         #  @ref tui_measurement_tools_page "Example"
9622         def MakeCDG(self, theShape, theName=None):
9623             """
9624             Get a point, situated at the centre of mass of theShape.
9625
9626             Parameters:
9627                 theShape Shape to define centre of mass of.
9628                 theName Object name; when specified, this parameter is used
9629                         for result publication in the study. Otherwise, if automatic
9630                         publication is switched on, default value is used for result name.
9631
9632             Returns:
9633                 New GEOM.GEOM_Object, containing the created point.
9634             """
9635             # Example: see GEOM_TestMeasures.py
9636             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9637             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9638             self._autoPublish(anObj, theName, "centerOfMass")
9639             return anObj
9640
9641         ## Get a vertex sub-shape by index depended with orientation.
9642         #  @param theShape Shape to find sub-shape.
9643         #  @param theIndex Index to find vertex by this index (starting from zero)
9644         #  @param theName Object name; when specified, this parameter is used
9645         #         for result publication in the study. Otherwise, if automatic
9646         #         publication is switched on, default value is used for result name.
9647         #
9648         #  @return New GEOM.GEOM_Object, containing the created vertex.
9649         #
9650         #  @ref tui_measurement_tools_page "Example"
9651         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9652             """
9653             Get a vertex sub-shape by index depended with orientation.
9654
9655             Parameters:
9656                 theShape Shape to find sub-shape.
9657                 theIndex Index to find vertex by this index (starting from zero)
9658                 theName Object name; when specified, this parameter is used
9659                         for result publication in the study. Otherwise, if automatic
9660                         publication is switched on, default value is used for result name.
9661
9662             Returns:
9663                 New GEOM.GEOM_Object, containing the created vertex.
9664             """
9665             # Example: see GEOM_TestMeasures.py
9666             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9667             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9668             self._autoPublish(anObj, theName, "vertex")
9669             return anObj
9670
9671         ## Get the first vertex of wire/edge depended orientation.
9672         #  @param theShape Shape to find first vertex.
9673         #  @param theName Object name; when specified, this parameter is used
9674         #         for result publication in the study. Otherwise, if automatic
9675         #         publication is switched on, default value is used for result name.
9676         #
9677         #  @return New GEOM.GEOM_Object, containing the created vertex.
9678         #
9679         #  @ref tui_measurement_tools_page "Example"
9680         def GetFirstVertex(self, theShape, theName=None):
9681             """
9682             Get the first vertex of wire/edge depended orientation.
9683
9684             Parameters:
9685                 theShape Shape to find first vertex.
9686                 theName Object name; when specified, this parameter is used
9687                         for result publication in the study. Otherwise, if automatic
9688                         publication is switched on, default value is used for result name.
9689
9690             Returns:    
9691                 New GEOM.GEOM_Object, containing the created vertex.
9692             """
9693             # Example: see GEOM_TestMeasures.py
9694             # note: auto-publishing is done in self.GetVertexByIndex()
9695             anObj = self.GetVertexByIndex(theShape, 0, theName)
9696             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9697             return anObj
9698
9699         ## Get the last vertex of wire/edge depended orientation.
9700         #  @param theShape Shape to find last vertex.
9701         #  @param theName Object name; when specified, this parameter is used
9702         #         for result publication in the study. Otherwise, if automatic
9703         #         publication is switched on, default value is used for result name.
9704         #
9705         #  @return New GEOM.GEOM_Object, containing the created vertex.
9706         #
9707         #  @ref tui_measurement_tools_page "Example"
9708         def GetLastVertex(self, theShape, theName=None):
9709             """
9710             Get the last vertex of wire/edge depended orientation.
9711
9712             Parameters: 
9713                 theShape Shape to find last vertex.
9714                 theName Object name; when specified, this parameter is used
9715                         for result publication in the study. Otherwise, if automatic
9716                         publication is switched on, default value is used for result name.
9717
9718             Returns:   
9719                 New GEOM.GEOM_Object, containing the created vertex.
9720             """
9721             # Example: see GEOM_TestMeasures.py
9722             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9723             # note: auto-publishing is done in self.GetVertexByIndex()
9724             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9725             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9726             return anObj
9727
9728         ## Get a normale to the given face. If the point is not given,
9729         #  the normale is calculated at the center of mass.
9730         #  @param theFace Face to define normale of.
9731         #  @param theOptionalPoint Point to compute the normale at.
9732         #  @param theName Object name; when specified, this parameter is used
9733         #         for result publication in the study. Otherwise, if automatic
9734         #         publication is switched on, default value is used for result name.
9735         #
9736         #  @return New GEOM.GEOM_Object, containing the created vector.
9737         #
9738         #  @ref swig_todo "Example"
9739         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9740             """
9741             Get a normale to the given face. If the point is not given,
9742             the normale is calculated at the center of mass.
9743             
9744             Parameters: 
9745                 theFace Face to define normale of.
9746                 theOptionalPoint Point to compute the normale at.
9747                 theName Object name; when specified, this parameter is used
9748                         for result publication in the study. Otherwise, if automatic
9749                         publication is switched on, default value is used for result name.
9750
9751             Returns:   
9752                 New GEOM.GEOM_Object, containing the created vector.
9753             """
9754             # Example: see GEOM_TestMeasures.py
9755             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9756             RaiseIfFailed("GetNormal", self.MeasuOp)
9757             self._autoPublish(anObj, theName, "normal")
9758             return anObj
9759
9760         ## Check a topology of the given shape.
9761         #  @param theShape Shape to check validity of.
9762         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9763         #                        if TRUE, the shape's geometry will be checked also.
9764         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9765         #                        of problem is printed.
9766         #                        if TRUE and if theShape is invalid, the description 
9767         #                        of problem is also returned.
9768         #  @return TRUE, if the shape "seems to be valid".
9769         #
9770         #  @ref tui_measurement_tools_page "Example"
9771         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9772             """
9773             Check a topology of the given shape.
9774
9775             Parameters: 
9776                 theShape Shape to check validity of.
9777                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9778                                if TRUE, the shape's geometry will be checked also.
9779                 theReturnStatus If FALSE and if theShape is invalid, a description
9780                                 of problem is printed.
9781                                 if TRUE and if theShape is invalid, the description 
9782                                 of problem is returned.
9783
9784             Returns:   
9785                 TRUE, if the shape "seems to be valid".
9786                 If theShape is invalid, prints a description of problem.
9787                 This description can also be returned.
9788             """
9789             # Example: see GEOM_TestMeasures.py
9790             if theIsCheckGeom:
9791                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9792                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9793             else:
9794                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9795                 RaiseIfFailed("CheckShape", self.MeasuOp)
9796             if IsValid == 0:
9797                 if theReturnStatus == 0:
9798                     print Status
9799             if theReturnStatus == 1:
9800               return (IsValid, Status)
9801             return IsValid
9802
9803         ## Detect self-intersections in the given shape.
9804         #  @param theShape Shape to check.
9805         #  @return TRUE, if the shape contains no self-intersections.
9806         #
9807         #  @ref tui_measurement_tools_page "Example"
9808         def CheckSelfIntersections(self, theShape):
9809             """
9810             Detect self-intersections in the given shape.
9811
9812             Parameters: 
9813                 theShape Shape to check.
9814
9815             Returns:   
9816                 TRUE, if the shape contains no self-intersections.
9817             """
9818             # Example: see GEOM_TestMeasures.py
9819             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9820             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9821             return IsValid
9822
9823         ## Get position (LCS) of theShape.
9824         #
9825         #  Origin of the LCS is situated at the shape's center of mass.
9826         #  Axes of the LCS are obtained from shape's location or,
9827         #  if the shape is a planar face, from position of its plane.
9828         #
9829         #  @param theShape Shape to calculate position of.
9830         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9831         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9832         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9833         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9834         #
9835         #  @ref swig_todo "Example"
9836         def GetPosition(self,theShape):
9837             """
9838             Get position (LCS) of theShape.
9839             Origin of the LCS is situated at the shape's center of mass.
9840             Axes of the LCS are obtained from shape's location or,
9841             if the shape is a planar face, from position of its plane.
9842
9843             Parameters: 
9844                 theShape Shape to calculate position of.
9845
9846             Returns:  
9847                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9848                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9849                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9850                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9851             """
9852             # Example: see GEOM_TestMeasures.py
9853             aTuple = self.MeasuOp.GetPosition(theShape)
9854             RaiseIfFailed("GetPosition", self.MeasuOp)
9855             return aTuple
9856
9857         ## Get kind of theShape.
9858         #
9859         #  @param theShape Shape to get a kind of.
9860         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9861         #          and a list of parameters, describing the shape.
9862         #  @note  Concrete meaning of each value, returned via \a theIntegers
9863         #         or \a theDoubles list depends on the kind() of the shape.
9864         #
9865         #  @ref swig_todo "Example"
9866         def KindOfShape(self,theShape):
9867             """
9868             Get kind of theShape.
9869          
9870             Parameters: 
9871                 theShape Shape to get a kind of.
9872
9873             Returns:
9874                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9875                     and a list of parameters, describing the shape.
9876             Note:
9877                 Concrete meaning of each value, returned via theIntegers
9878                 or theDoubles list depends on the geompy.kind of the shape
9879             """
9880             # Example: see GEOM_TestMeasures.py
9881             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9882             RaiseIfFailed("KindOfShape", self.MeasuOp)
9883
9884             aKind  = aRoughTuple[0]
9885             anInts = aRoughTuple[1]
9886             aDbls  = aRoughTuple[2]
9887
9888             # Now there is no exception from this rule:
9889             aKindTuple = [aKind] + aDbls + anInts
9890
9891             # If they are we will regroup parameters for such kind of shape.
9892             # For example:
9893             #if aKind == kind.SOME_KIND:
9894             #    #  SOME_KIND     int int double int double double
9895             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9896
9897             return aKindTuple
9898
9899         # end of l2_measure
9900         ## @}
9901
9902         ## @addtogroup l2_import_export
9903         ## @{
9904
9905         ## Import a shape from the BREP or IGES or STEP file
9906         #  (depends on given format) with given name.
9907         #  @param theFileName The file, containing the shape.
9908         #  @param theFormatName Specify format for the file reading.
9909         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9910         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9911         #            format 'STEP_SCALE' is used instead of 'STEP',
9912         #            length unit will be set to 'meter' and result model will be scaled.
9913         #  @param theName Object name; when specified, this parameter is used
9914         #         for result publication in the study. Otherwise, if automatic
9915         #         publication is switched on, default value is used for result name.
9916         #
9917         #  @return New GEOM.GEOM_Object, containing the imported shape.
9918         #
9919         #  @ref swig_Import_Export "Example"
9920         def ImportFile(self, theFileName, theFormatName, theName=None):
9921             """
9922             Import a shape from the BREP or IGES or STEP file
9923             (depends on given format) with given name.
9924
9925             Parameters: 
9926                 theFileName The file, containing the shape.
9927                 theFormatName Specify format for the file reading.
9928                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9929                     If format 'IGES_SCALE' is used instead of 'IGES' or
9930                        format 'STEP_SCALE' is used instead of 'STEP',
9931                        length unit will be set to 'meter' and result model will be scaled.
9932                 theName Object name; when specified, this parameter is used
9933                         for result publication in the study. Otherwise, if automatic
9934                         publication is switched on, default value is used for result name.
9935
9936             Returns:
9937                 New GEOM.GEOM_Object, containing the imported shape.
9938             """
9939             # Example: see GEOM_TestOthers.py
9940             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9941             RaiseIfFailed("ImportFile", self.InsertOp)
9942             self._autoPublish(anObj, theName, "imported")
9943             return anObj
9944
9945         ## Deprecated analog of ImportFile()
9946         def Import(self, theFileName, theFormatName, theName=None):
9947             """
9948             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9949             """
9950             print "WARNING: Function Import is deprecated, use ImportFile instead"
9951             # note: auto-publishing is done in self.ImportFile()
9952             return self.ImportFile(theFileName, theFormatName, theName)
9953
9954         ## Shortcut to ImportFile() for BREP format.
9955         #  Import a shape from the BREP file with given name.
9956         #  @param theFileName The file, containing the shape.
9957         #  @param theName Object name; when specified, this parameter is used
9958         #         for result publication in the study. Otherwise, if automatic
9959         #         publication is switched on, default value is used for result name.
9960         #
9961         #  @return New GEOM.GEOM_Object, containing the imported shape.
9962         #
9963         #  @ref swig_Import_Export "Example"
9964         def ImportBREP(self, theFileName, theName=None):
9965             """
9966             geompy.ImportFile(...) function for BREP format
9967             Import a shape from the BREP file with given name.
9968
9969             Parameters: 
9970                 theFileName The file, containing the shape.
9971                 theName Object name; when specified, this parameter is used
9972                         for result publication in the study. Otherwise, if automatic
9973                         publication is switched on, default value is used for result name.
9974
9975             Returns:
9976                 New GEOM.GEOM_Object, containing the imported shape.
9977             """
9978             # Example: see GEOM_TestOthers.py
9979             # note: auto-publishing is done in self.ImportFile()
9980             return self.ImportFile(theFileName, "BREP", theName)
9981
9982         ## Shortcut to ImportFile() for IGES format
9983         #  Import a shape from the IGES file with given name.
9984         #  @param theFileName The file, containing the shape.
9985         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9986         #                     and result model will be scaled, if its units are not meters.
9987         #                     If False (default), file length units will be taken into account.
9988         #  @param theName Object name; when specified, this parameter is used
9989         #         for result publication in the study. Otherwise, if automatic
9990         #         publication is switched on, default value is used for result name.
9991         #
9992         #  @return New GEOM.GEOM_Object, containing the imported shape.
9993         #
9994         #  @ref swig_Import_Export "Example"
9995         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
9996             """
9997             geompy.ImportFile(...) function for IGES format
9998
9999             Parameters:
10000                 theFileName The file, containing the shape.
10001                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10002                             and result model will be scaled, if its units are not meters.
10003                             If False (default), file length units will be taken into account.
10004                 theName Object name; when specified, this parameter is used
10005                         for result publication in the study. Otherwise, if automatic
10006                         publication is switched on, default value is used for result name.
10007
10008             Returns:
10009                 New GEOM.GEOM_Object, containing the imported shape.
10010             """
10011             # Example: see GEOM_TestOthers.py
10012             # note: auto-publishing is done in self.ImportFile()
10013             if ignoreUnits:
10014                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10015             return self.ImportFile(theFileName, "IGES", theName)
10016
10017         ## Return length unit from given IGES file
10018         #  @param theFileName The file, containing the shape.
10019         #  @return String, containing the units name.
10020         #
10021         #  @ref swig_Import_Export "Example"
10022         def GetIGESUnit(self, theFileName):
10023             """
10024             Return length units from given IGES file
10025
10026             Parameters:
10027                 theFileName The file, containing the shape.
10028
10029             Returns:
10030                 String, containing the units name.
10031             """
10032             # Example: see GEOM_TestOthers.py
10033             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10034             return aUnitName
10035
10036         ## Shortcut to ImportFile() for STEP format
10037         #  Import a shape from the STEP file with given name.
10038         #  @param theFileName The file, containing the shape.
10039         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10040         #                     and result model will be scaled, if its units are not meters.
10041         #                     If False (default), file length units will be taken into account.
10042         #  @param theName Object name; when specified, this parameter is used
10043         #         for result publication in the study. Otherwise, if automatic
10044         #         publication is switched on, default value is used for result name.
10045         #
10046         #  @return New GEOM.GEOM_Object, containing the imported shape.
10047         #
10048         #  @ref swig_Import_Export "Example"
10049         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10050             """
10051             geompy.ImportFile(...) function for STEP format
10052
10053             Parameters:
10054                 theFileName The file, containing the shape.
10055                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10056                             and result model will be scaled, if its units are not meters.
10057                             If False (default), file length units will be taken into account.
10058                 theName Object name; when specified, this parameter is used
10059                         for result publication in the study. Otherwise, if automatic
10060                         publication is switched on, default value is used for result name.
10061
10062             Returns:
10063                 New GEOM.GEOM_Object, containing the imported shape.
10064             """
10065             # Example: see GEOM_TestOthers.py
10066             # note: auto-publishing is done in self.ImportFile()
10067             if ignoreUnits:
10068                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10069             return self.ImportFile(theFileName, "STEP", theName)
10070
10071         ## Return length unit from given IGES or STEP file
10072         #  @param theFileName The file, containing the shape.
10073         #  @return String, containing the units name.
10074         #
10075         #  @ref swig_Import_Export "Example"
10076         def GetSTEPUnit(self, theFileName):
10077             """
10078             Return length units from given STEP file
10079
10080             Parameters:
10081                 theFileName The file, containing the shape.
10082
10083             Returns:
10084                 String, containing the units name.
10085             """
10086             # Example: see GEOM_TestOthers.py
10087             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10088             return aUnitName
10089
10090         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10091         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10092         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10093         #  @param theStream The BRep binary stream.
10094         #  @param theName Object name; when specified, this parameter is used
10095         #         for result publication in the study. Otherwise, if automatic
10096         #         publication is switched on, default value is used for result name.
10097         #
10098         #  @return New GEOM_Object, containing the shape, read from theStream.
10099         #
10100         #  @ref swig_Import_Export "Example"
10101         def RestoreShape (self, theStream, theName=None):
10102             """
10103             Read a shape from the binary stream, containing its bounding representation (BRep).
10104
10105             Note:
10106                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10107
10108             Parameters: 
10109                 theStream The BRep binary stream.
10110                 theName Object name; when specified, this parameter is used
10111                         for result publication in the study. Otherwise, if automatic
10112                         publication is switched on, default value is used for result name.
10113
10114             Returns:
10115                 New GEOM_Object, containing the shape, read from theStream.
10116             """
10117             # Example: see GEOM_TestOthers.py
10118             anObj = self.InsertOp.RestoreShape(theStream)
10119             RaiseIfFailed("RestoreShape", self.InsertOp)
10120             self._autoPublish(anObj, theName, "restored")
10121             return anObj
10122
10123         ## Export the given shape into a file with given name.
10124         #  @param theObject Shape to be stored in the file.
10125         #  @param theFileName Name of the file to store the given shape in.
10126         #  @param theFormatName Specify format for the shape storage.
10127         #         Available formats can be obtained with
10128         #         geompy.InsertOp.ExportTranslators()[0] method.
10129         #
10130         #  @ref swig_Import_Export "Example"
10131         def Export(self, theObject, theFileName, theFormatName):
10132             """
10133             Export the given shape into a file with given name.
10134
10135             Parameters: 
10136                 theObject Shape to be stored in the file.
10137                 theFileName Name of the file to store the given shape in.
10138                 theFormatName Specify format for the shape storage.
10139                               Available formats can be obtained with
10140                               geompy.InsertOp.ExportTranslators()[0] method.
10141             """
10142             # Example: see GEOM_TestOthers.py
10143             self.InsertOp.Export(theObject, theFileName, theFormatName)
10144             if self.InsertOp.IsDone() == 0:
10145                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10146                 pass
10147             pass
10148
10149         ## Shortcut to Export() for BREP format
10150         #
10151         #  @ref swig_Import_Export "Example"
10152         def ExportBREP(self,theObject, theFileName):
10153             """
10154             geompy.Export(...) function for BREP format
10155             """
10156             # Example: see GEOM_TestOthers.py
10157             return self.Export(theObject, theFileName, "BREP")
10158
10159         ## Shortcut to Export() for IGES format
10160         #
10161         #  @ref swig_Import_Export "Example"
10162         def ExportIGES(self,theObject, theFileName):
10163             """
10164             geompy.Export(...) function for IGES format
10165             """
10166             # Example: see GEOM_TestOthers.py
10167             return self.Export(theObject, theFileName, "IGES")
10168
10169         ## Shortcut to Export() for STEP format
10170         #
10171         #  @ref swig_Import_Export "Example"
10172         def ExportSTEP(self,theObject, theFileName):
10173             """
10174             geompy.Export(...) function for STEP format
10175             """
10176             # Example: see GEOM_TestOthers.py
10177             return self.Export(theObject, theFileName, "STEP")
10178
10179         # end of l2_import_export
10180         ## @}
10181
10182         ## @addtogroup l3_blocks
10183         ## @{
10184
10185         ## Create a quadrangle face from four edges. Order of Edges is not
10186         #  important. It is  not necessary that edges share the same vertex.
10187         #  @param E1,E2,E3,E4 Edges for the face bound.
10188         #  @param theName Object name; when specified, this parameter is used
10189         #         for result publication in the study. Otherwise, if automatic
10190         #         publication is switched on, default value is used for result name.
10191         #
10192         #  @return New GEOM.GEOM_Object, containing the created face.
10193         #
10194         #  @ref tui_building_by_blocks_page "Example"
10195         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10196             """
10197             Create a quadrangle face from four edges. Order of Edges is not
10198             important. It is  not necessary that edges share the same vertex.
10199
10200             Parameters: 
10201                 E1,E2,E3,E4 Edges for the face bound.
10202                 theName Object name; when specified, this parameter is used
10203                         for result publication in the study. Otherwise, if automatic
10204                         publication is switched on, default value is used for result name.
10205
10206             Returns: 
10207                 New GEOM.GEOM_Object, containing the created face.
10208
10209             Example of usage:               
10210                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10211             """
10212             # Example: see GEOM_Spanner.py
10213             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10214             RaiseIfFailed("MakeQuad", self.BlocksOp)
10215             self._autoPublish(anObj, theName, "quad")
10216             return anObj
10217
10218         ## Create a quadrangle face on two edges.
10219         #  The missing edges will be built by creating the shortest ones.
10220         #  @param E1,E2 Two opposite edges for the face.
10221         #  @param theName Object name; when specified, this parameter is used
10222         #         for result publication in the study. Otherwise, if automatic
10223         #         publication is switched on, default value is used for result name.
10224         #
10225         #  @return New GEOM.GEOM_Object, containing the created face.
10226         #
10227         #  @ref tui_building_by_blocks_page "Example"
10228         def MakeQuad2Edges(self, E1, E2, theName=None):
10229             """
10230             Create a quadrangle face on two edges.
10231             The missing edges will be built by creating the shortest ones.
10232
10233             Parameters: 
10234                 E1,E2 Two opposite edges for the face.
10235                 theName Object name; when specified, this parameter is used
10236                         for result publication in the study. Otherwise, if automatic
10237                         publication is switched on, default value is used for result name.
10238
10239             Returns: 
10240                 New GEOM.GEOM_Object, containing the created face.
10241             
10242             Example of usage:
10243                 # create vertices
10244                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10245                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10246                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10247                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10248                 # create edges
10249                 edge1 = geompy.MakeEdge(p1, p2)
10250                 edge2 = geompy.MakeEdge(p3, p4)
10251                 # create a quadrangle face from two edges
10252                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10253             """
10254             # Example: see GEOM_Spanner.py
10255             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10256             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10257             self._autoPublish(anObj, theName, "quad")
10258             return anObj
10259
10260         ## Create a quadrangle face with specified corners.
10261         #  The missing edges will be built by creating the shortest ones.
10262         #  @param V1,V2,V3,V4 Corner vertices for the face.
10263         #  @param theName Object name; when specified, this parameter is used
10264         #         for result publication in the study. Otherwise, if automatic
10265         #         publication is switched on, default value is used for result name.
10266         #
10267         #  @return New GEOM.GEOM_Object, containing the created face.
10268         #
10269         #  @ref tui_building_by_blocks_page "Example 1"
10270         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10271         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10272             """
10273             Create a quadrangle face with specified corners.
10274             The missing edges will be built by creating the shortest ones.
10275
10276             Parameters: 
10277                 V1,V2,V3,V4 Corner vertices for the face.
10278                 theName Object name; when specified, this parameter is used
10279                         for result publication in the study. Otherwise, if automatic
10280                         publication is switched on, default value is used for result name.
10281
10282             Returns: 
10283                 New GEOM.GEOM_Object, containing the created face.
10284
10285             Example of usage:
10286                 # create vertices
10287                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10288                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10289                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10290                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10291                 # create a quadrangle from four points in its corners
10292                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10293             """
10294             # Example: see GEOM_Spanner.py
10295             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10296             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10297             self._autoPublish(anObj, theName, "quad")
10298             return anObj
10299
10300         ## Create a hexahedral solid, bounded by the six given faces. Order of
10301         #  faces is not important. It is  not necessary that Faces share the same edge.
10302         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10303         #  @param theName Object name; when specified, this parameter is used
10304         #         for result publication in the study. Otherwise, if automatic
10305         #         publication is switched on, default value is used for result name.
10306         #
10307         #  @return New GEOM.GEOM_Object, containing the created solid.
10308         #
10309         #  @ref tui_building_by_blocks_page "Example 1"
10310         #  \n @ref swig_MakeHexa "Example 2"
10311         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10312             """
10313             Create a hexahedral solid, bounded by the six given faces. Order of
10314             faces is not important. It is  not necessary that Faces share the same edge.
10315
10316             Parameters: 
10317                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10318                 theName Object name; when specified, this parameter is used
10319                         for result publication in the study. Otherwise, if automatic
10320                         publication is switched on, default value is used for result name.
10321
10322             Returns:    
10323                 New GEOM.GEOM_Object, containing the created solid.
10324
10325             Example of usage:
10326                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10327             """
10328             # Example: see GEOM_Spanner.py
10329             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10330             RaiseIfFailed("MakeHexa", self.BlocksOp)
10331             self._autoPublish(anObj, theName, "hexa")
10332             return anObj
10333
10334         ## Create a hexahedral solid between two given faces.
10335         #  The missing faces will be built by creating the smallest ones.
10336         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10337         #  @param theName Object name; when specified, this parameter is used
10338         #         for result publication in the study. Otherwise, if automatic
10339         #         publication is switched on, default value is used for result name.
10340         #
10341         #  @return New GEOM.GEOM_Object, containing the created solid.
10342         #
10343         #  @ref tui_building_by_blocks_page "Example 1"
10344         #  \n @ref swig_MakeHexa2Faces "Example 2"
10345         def MakeHexa2Faces(self, F1, F2, theName=None):
10346             """
10347             Create a hexahedral solid between two given faces.
10348             The missing faces will be built by creating the smallest ones.
10349
10350             Parameters: 
10351                 F1,F2 Two opposite faces for the hexahedral solid.
10352                 theName Object name; when specified, this parameter is used
10353                         for result publication in the study. Otherwise, if automatic
10354                         publication is switched on, default value is used for result name.
10355
10356             Returns:
10357                 New GEOM.GEOM_Object, containing the created solid.
10358
10359             Example of usage:
10360                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10361             """
10362             # Example: see GEOM_Spanner.py
10363             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10364             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10365             self._autoPublish(anObj, theName, "hexa")
10366             return anObj
10367
10368         # end of l3_blocks
10369         ## @}
10370
10371         ## @addtogroup l3_blocks_op
10372         ## @{
10373
10374         ## Get a vertex, found in the given shape by its coordinates.
10375         #  @param theShape Block or a compound of blocks.
10376         #  @param theX,theY,theZ Coordinates of the sought vertex.
10377         #  @param theEpsilon Maximum allowed distance between the resulting
10378         #                    vertex and point with the given coordinates.
10379         #  @param theName Object name; when specified, this parameter is used
10380         #         for result publication in the study. Otherwise, if automatic
10381         #         publication is switched on, default value is used for result name.
10382         #
10383         #  @return New GEOM.GEOM_Object, containing the found vertex.
10384         #
10385         #  @ref swig_GetPoint "Example"
10386         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10387             """
10388             Get a vertex, found in the given shape by its coordinates.
10389
10390             Parameters: 
10391                 theShape Block or a compound of blocks.
10392                 theX,theY,theZ Coordinates of the sought vertex.
10393                 theEpsilon Maximum allowed distance between the resulting
10394                            vertex and point with the given coordinates.
10395                 theName Object name; when specified, this parameter is used
10396                         for result publication in the study. Otherwise, if automatic
10397                         publication is switched on, default value is used for result name.
10398
10399             Returns:                  
10400                 New GEOM.GEOM_Object, containing the found vertex.
10401
10402             Example of usage:
10403                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10404             """
10405             # Example: see GEOM_TestOthers.py
10406             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10407             RaiseIfFailed("GetPoint", self.BlocksOp)
10408             self._autoPublish(anObj, theName, "vertex")
10409             return anObj
10410
10411         ## Find a vertex of the given shape, which has minimal distance to the given point.
10412         #  @param theShape Any shape.
10413         #  @param thePoint Point, close to the desired vertex.
10414         #  @param theName Object name; when specified, this parameter is used
10415         #         for result publication in the study. Otherwise, if automatic
10416         #         publication is switched on, default value is used for result name.
10417         #
10418         #  @return New GEOM.GEOM_Object, containing the found vertex.
10419         #
10420         #  @ref swig_GetVertexNearPoint "Example"
10421         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10422             """
10423             Find a vertex of the given shape, which has minimal distance to the given point.
10424
10425             Parameters: 
10426                 theShape Any shape.
10427                 thePoint Point, close to the desired vertex.
10428                 theName Object name; when specified, this parameter is used
10429                         for result publication in the study. Otherwise, if automatic
10430                         publication is switched on, default value is used for result name.
10431
10432             Returns:
10433                 New GEOM.GEOM_Object, containing the found vertex.
10434
10435             Example of usage:
10436                 pmidle = geompy.MakeVertex(50, 0, 50)
10437                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10438             """
10439             # Example: see GEOM_TestOthers.py
10440             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10441             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10442             self._autoPublish(anObj, theName, "vertex")
10443             return anObj
10444
10445         ## Get an edge, found in the given shape by two given vertices.
10446         #  @param theShape Block or a compound of blocks.
10447         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10448         #  @param theName Object name; when specified, this parameter is used
10449         #         for result publication in the study. Otherwise, if automatic
10450         #         publication is switched on, default value is used for result name.
10451         #
10452         #  @return New GEOM.GEOM_Object, containing the found edge.
10453         #
10454         #  @ref swig_GetEdge "Example"
10455         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10456             """
10457             Get an edge, found in the given shape by two given vertices.
10458
10459             Parameters: 
10460                 theShape Block or a compound of blocks.
10461                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10462                 theName Object name; when specified, this parameter is used
10463                         for result publication in the study. Otherwise, if automatic
10464                         publication is switched on, default value is used for result name.
10465
10466             Returns:
10467                 New GEOM.GEOM_Object, containing the found edge.
10468             """
10469             # Example: see GEOM_Spanner.py
10470             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10471             RaiseIfFailed("GetEdge", self.BlocksOp)
10472             self._autoPublish(anObj, theName, "edge")
10473             return anObj
10474
10475         ## Find an edge of the given shape, which has minimal distance to the given point.
10476         #  @param theShape Block or a compound of blocks.
10477         #  @param thePoint Point, close to the desired edge.
10478         #  @param theName Object name; when specified, this parameter is used
10479         #         for result publication in the study. Otherwise, if automatic
10480         #         publication is switched on, default value is used for result name.
10481         #
10482         #  @return New GEOM.GEOM_Object, containing the found edge.
10483         #
10484         #  @ref swig_GetEdgeNearPoint "Example"
10485         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10486             """
10487             Find an edge of the given shape, which has minimal distance to the given point.
10488
10489             Parameters: 
10490                 theShape Block or a compound of blocks.
10491                 thePoint Point, close to the desired edge.
10492                 theName Object name; when specified, this parameter is used
10493                         for result publication in the study. Otherwise, if automatic
10494                         publication is switched on, default value is used for result name.
10495
10496             Returns:
10497                 New GEOM.GEOM_Object, containing the found edge.
10498             """
10499             # Example: see GEOM_TestOthers.py
10500             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10501             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10502             self._autoPublish(anObj, theName, "edge")
10503             return anObj
10504
10505         ## Returns a face, found in the given shape by four given corner vertices.
10506         #  @param theShape Block or a compound of blocks.
10507         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10508         #  @param theName Object name; when specified, this parameter is used
10509         #         for result publication in the study. Otherwise, if automatic
10510         #         publication is switched on, default value is used for result name.
10511         #
10512         #  @return New GEOM.GEOM_Object, containing the found face.
10513         #
10514         #  @ref swig_todo "Example"
10515         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10516             """
10517             Returns a face, found in the given shape by four given corner vertices.
10518
10519             Parameters:
10520                 theShape Block or a compound of blocks.
10521                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10522                 theName Object name; when specified, this parameter is used
10523                         for result publication in the study. Otherwise, if automatic
10524                         publication is switched on, default value is used for result name.
10525
10526             Returns:
10527                 New GEOM.GEOM_Object, containing the found face.
10528             """
10529             # Example: see GEOM_Spanner.py
10530             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10531             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10532             self._autoPublish(anObj, theName, "face")
10533             return anObj
10534
10535         ## Get a face of block, found in the given shape by two given edges.
10536         #  @param theShape Block or a compound of blocks.
10537         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10538         #  @param theName Object name; when specified, this parameter is used
10539         #         for result publication in the study. Otherwise, if automatic
10540         #         publication is switched on, default value is used for result name.
10541         #
10542         #  @return New GEOM.GEOM_Object, containing the found face.
10543         #
10544         #  @ref swig_todo "Example"
10545         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10546             """
10547             Get a face of block, found in the given shape by two given edges.
10548
10549             Parameters:
10550                 theShape Block or a compound of blocks.
10551                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10552                 theName Object name; when specified, this parameter is used
10553                         for result publication in the study. Otherwise, if automatic
10554                         publication is switched on, default value is used for result name.
10555
10556             Returns:
10557                 New GEOM.GEOM_Object, containing the found face.
10558             """
10559             # Example: see GEOM_Spanner.py
10560             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10561             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10562             self._autoPublish(anObj, theName, "face")
10563             return anObj
10564
10565         ## Find a face, opposite to the given one in the given block.
10566         #  @param theBlock Must be a hexahedral solid.
10567         #  @param theFace Face of \a theBlock, opposite to the desired face.
10568         #  @param theName Object name; when specified, this parameter is used
10569         #         for result publication in the study. Otherwise, if automatic
10570         #         publication is switched on, default value is used for result name.
10571         #
10572         #  @return New GEOM.GEOM_Object, containing the found face.
10573         #
10574         #  @ref swig_GetOppositeFace "Example"
10575         def GetOppositeFace(self, theBlock, theFace, theName=None):
10576             """
10577             Find a face, opposite to the given one in the given block.
10578
10579             Parameters:
10580                 theBlock Must be a hexahedral solid.
10581                 theFace Face of theBlock, opposite to the desired face.
10582                 theName Object name; when specified, this parameter is used
10583                         for result publication in the study. Otherwise, if automatic
10584                         publication is switched on, default value is used for result name.
10585
10586             Returns: 
10587                 New GEOM.GEOM_Object, containing the found face.
10588             """
10589             # Example: see GEOM_Spanner.py
10590             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10591             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10592             self._autoPublish(anObj, theName, "face")
10593             return anObj
10594
10595         ## Find a face of the given shape, which has minimal distance to the given point.
10596         #  @param theShape Block or a compound of blocks.
10597         #  @param thePoint Point, close to the desired face.
10598         #  @param theName Object name; when specified, this parameter is used
10599         #         for result publication in the study. Otherwise, if automatic
10600         #         publication is switched on, default value is used for result name.
10601         #
10602         #  @return New GEOM.GEOM_Object, containing the found face.
10603         #
10604         #  @ref swig_GetFaceNearPoint "Example"
10605         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10606             """
10607             Find a face of the given shape, which has minimal distance to the given point.
10608
10609             Parameters:
10610                 theShape Block or a compound of blocks.
10611                 thePoint Point, close to the desired face.
10612                 theName Object name; when specified, this parameter is used
10613                         for result publication in the study. Otherwise, if automatic
10614                         publication is switched on, default value is used for result name.
10615
10616             Returns:
10617                 New GEOM.GEOM_Object, containing the found face.
10618             """
10619             # Example: see GEOM_Spanner.py
10620             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10621             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10622             self._autoPublish(anObj, theName, "face")
10623             return anObj
10624
10625         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10626         #  @param theBlock Block or a compound of blocks.
10627         #  @param theVector Vector, close to the normale of the desired face.
10628         #  @param theName Object name; when specified, this parameter is used
10629         #         for result publication in the study. Otherwise, if automatic
10630         #         publication is switched on, default value is used for result name.
10631         #
10632         #  @return New GEOM.GEOM_Object, containing the found face.
10633         #
10634         #  @ref swig_todo "Example"
10635         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10636             """
10637             Find a face of block, whose outside normale has minimal angle with the given vector.
10638
10639             Parameters:
10640                 theBlock Block or a compound of blocks.
10641                 theVector Vector, close to the normale of the desired face.
10642                 theName Object name; when specified, this parameter is used
10643                         for result publication in the study. Otherwise, if automatic
10644                         publication is switched on, default value is used for result name.
10645
10646             Returns:
10647                 New GEOM.GEOM_Object, containing the found face.
10648             """
10649             # Example: see GEOM_Spanner.py
10650             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10651             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10652             self._autoPublish(anObj, theName, "face")
10653             return anObj
10654
10655         ## Find all sub-shapes of type \a theShapeType of the given shape,
10656         #  which have minimal distance to the given point.
10657         #  @param theShape Any shape.
10658         #  @param thePoint Point, close to the desired shape.
10659         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10660         #  @param theTolerance The tolerance for distances comparison. All shapes
10661         #                      with distances to the given point in interval
10662         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10663         #  @param theName Object name; when specified, this parameter is used
10664         #         for result publication in the study. Otherwise, if automatic
10665         #         publication is switched on, default value is used for result name.
10666         #
10667         #  @return New GEOM_Object, containing a group of all found shapes.
10668         #
10669         #  @ref swig_GetShapesNearPoint "Example"
10670         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10671             """
10672             Find all sub-shapes of type theShapeType of the given shape,
10673             which have minimal distance to the given point.
10674
10675             Parameters:
10676                 theShape Any shape.
10677                 thePoint Point, close to the desired shape.
10678                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10679                 theTolerance The tolerance for distances comparison. All shapes
10680                                 with distances to the given point in interval
10681                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10682                 theName Object name; when specified, this parameter is used
10683                         for result publication in the study. Otherwise, if automatic
10684                         publication is switched on, default value is used for result name.
10685
10686             Returns:
10687                 New GEOM_Object, containing a group of all found shapes.
10688             """
10689             # Example: see GEOM_TestOthers.py
10690             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10691             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10692             self._autoPublish(anObj, theName, "group")
10693             return anObj
10694
10695         # end of l3_blocks_op
10696         ## @}
10697
10698         ## @addtogroup l4_blocks_measure
10699         ## @{
10700
10701         ## Check, if the compound of blocks is given.
10702         #  To be considered as a compound of blocks, the
10703         #  given shape must satisfy the following conditions:
10704         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10705         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10706         #  - The compound should be connexe.
10707         #  - The glue between two quadrangle faces should be applied.
10708         #  @param theCompound The compound to check.
10709         #  @return TRUE, if the given shape is a compound of blocks.
10710         #  If theCompound is not valid, prints all discovered errors.
10711         #
10712         #  @ref tui_measurement_tools_page "Example 1"
10713         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10714         def CheckCompoundOfBlocks(self,theCompound):
10715             """
10716             Check, if the compound of blocks is given.
10717             To be considered as a compound of blocks, the
10718             given shape must satisfy the following conditions:
10719             - Each element of the compound should be a Block (6 faces and 12 edges).
10720             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10721             - The compound should be connexe.
10722             - The glue between two quadrangle faces should be applied.
10723
10724             Parameters:
10725                 theCompound The compound to check.
10726
10727             Returns:
10728                 TRUE, if the given shape is a compound of blocks.
10729                 If theCompound is not valid, prints all discovered errors.            
10730             """
10731             # Example: see GEOM_Spanner.py
10732             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10733             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10734             if IsValid == 0:
10735                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10736                 print Descr
10737             return IsValid
10738
10739         ## Retrieve all non blocks solids and faces from \a theShape.
10740         #  @param theShape The shape to explore.
10741         #  @param theName Object name; when specified, this parameter is used
10742         #         for result publication in the study. Otherwise, if automatic
10743         #         publication is switched on, default value is used for result name.
10744         #
10745         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10746         #          non block solids (= not 6 faces, or with 6 faces, but with the
10747         #          presence of non-quadrangular faces). The second object is a
10748         #          group of all non quadrangular faces.
10749         #
10750         #  @ref tui_measurement_tools_page "Example 1"
10751         #  \n @ref swig_GetNonBlocks "Example 2"
10752         def GetNonBlocks (self, theShape, theName=None):
10753             """
10754             Retrieve all non blocks solids and faces from theShape.
10755
10756             Parameters:
10757                 theShape The shape to explore.
10758                 theName Object name; when specified, this parameter is used
10759                         for result publication in the study. Otherwise, if automatic
10760                         publication is switched on, default value is used for result name.
10761
10762             Returns:
10763                 A tuple of two GEOM_Objects. The first object is a group of all
10764                 non block solids (= not 6 faces, or with 6 faces, but with the
10765                 presence of non-quadrangular faces). The second object is a
10766                 group of all non quadrangular faces.
10767
10768             Usage:
10769                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10770             """
10771             # Example: see GEOM_Spanner.py
10772             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10773             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10774             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10775             return aTuple
10776
10777         ## Remove all seam and degenerated edges from \a theShape.
10778         #  Unite faces and edges, sharing one surface. It means that
10779         #  this faces must have references to one C++ surface object (handle).
10780         #  @param theShape The compound or single solid to remove irregular edges from.
10781         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10782         #         do not unite faces.
10783         #  @param theName Object name; when specified, this parameter is used
10784         #         for result publication in the study. Otherwise, if automatic
10785         #         publication is switched on, default value is used for result name.
10786         #
10787         #  @return Improved shape.
10788         #
10789         #  @ref swig_RemoveExtraEdges "Example"
10790         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10791             """
10792             Remove all seam and degenerated edges from theShape.
10793             Unite faces and edges, sharing one surface. It means that
10794             this faces must have references to one C++ surface object (handle).
10795
10796             Parameters:
10797                 theShape The compound or single solid to remove irregular edges from.
10798                 doUnionFaces If True, then unite faces. If False (the default value),
10799                              do not unite faces.
10800                 theName Object name; when specified, this parameter is used
10801                         for result publication in the study. Otherwise, if automatic
10802                         publication is switched on, default value is used for result name.
10803
10804             Returns: 
10805                 Improved shape.
10806             """
10807             # Example: see GEOM_TestOthers.py
10808             nbFacesOptimum = -1 # -1 means do not unite faces
10809             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10810             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10811             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10812             self._autoPublish(anObj, theName, "removeExtraEdges")
10813             return anObj
10814
10815         ## Performs union faces of \a theShape
10816         #  Unite faces sharing one surface. It means that
10817         #  these faces must have references to one C++ surface object (handle).
10818         #  @param theShape The compound or single solid that contains faces
10819         #         to perform union.
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_UnionFaces "Example"
10827         def UnionFaces(self, theShape, theName=None):
10828             """
10829             Performs union faces of theShape.
10830             Unite faces sharing one surface. It means that
10831             these faces must have references to one C++ surface object (handle).
10832
10833             Parameters:
10834                 theShape The compound or single solid that contains faces
10835                          to perform union.
10836                 theName Object name; when specified, this parameter is used
10837                         for result publication in the study. Otherwise, if automatic
10838                         publication is switched on, default value is used for result name.
10839
10840             Returns: 
10841                 Improved shape.
10842             """
10843             # Example: see GEOM_TestOthers.py
10844             anObj = self.BlocksOp.UnionFaces(theShape)
10845             RaiseIfFailed("UnionFaces", self.BlocksOp)
10846             self._autoPublish(anObj, theName, "unionFaces")
10847             return anObj
10848
10849         ## Check, if the given shape is a blocks compound.
10850         #  Fix all detected errors.
10851         #    \note Single block can be also fixed by this method.
10852         #  @param theShape The compound to check and improve.
10853         #  @param theName Object name; when specified, this parameter is used
10854         #         for result publication in the study. Otherwise, if automatic
10855         #         publication is switched on, default value is used for result name.
10856         #
10857         #  @return Improved compound.
10858         #
10859         #  @ref swig_CheckAndImprove "Example"
10860         def CheckAndImprove(self, theShape, theName=None):
10861             """
10862             Check, if the given shape is a blocks compound.
10863             Fix all detected errors.
10864
10865             Note:
10866                 Single block can be also fixed by this method.
10867
10868             Parameters:
10869                 theShape The compound to check and improve.
10870                 theName Object name; when specified, this parameter is used
10871                         for result publication in the study. Otherwise, if automatic
10872                         publication is switched on, default value is used for result name.
10873
10874             Returns: 
10875                 Improved compound.
10876             """
10877             # Example: see GEOM_TestOthers.py
10878             anObj = self.BlocksOp.CheckAndImprove(theShape)
10879             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10880             self._autoPublish(anObj, theName, "improved")
10881             return anObj
10882
10883         # end of l4_blocks_measure
10884         ## @}
10885
10886         ## @addtogroup l3_blocks_op
10887         ## @{
10888
10889         ## Get all the blocks, contained in the given compound.
10890         #  @param theCompound The compound to explode.
10891         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10892         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10893         #  @param theName Object name; when specified, this parameter is used
10894         #         for result publication in the study. Otherwise, if automatic
10895         #         publication is switched on, default value is used for result name.
10896         #
10897         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10898         #
10899         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10900         #
10901         #  @ref tui_explode_on_blocks "Example 1"
10902         #  \n @ref swig_MakeBlockExplode "Example 2"
10903         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10904             """
10905             Get all the blocks, contained in the given compound.
10906
10907             Parameters:
10908                 theCompound The compound to explode.
10909                 theMinNbFaces If solid has lower number of faces, it is not a block.
10910                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10911                 theName Object name; when specified, this parameter is used
10912                         for result publication in the study. Otherwise, if automatic
10913                         publication is switched on, default value is used for result name.
10914
10915             Note:
10916                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10917
10918             Returns:  
10919                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10920             """
10921             # Example: see GEOM_TestOthers.py
10922             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10923             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10924             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10925             for anObj in aList:
10926                 anObj.SetParameters(Parameters)
10927                 pass
10928             self._autoPublish(aList, theName, "block")
10929             return aList
10930
10931         ## Find block, containing the given point inside its volume or on boundary.
10932         #  @param theCompound Compound, to find block in.
10933         #  @param thePoint Point, close to the desired block. If the point lays on
10934         #         boundary between some blocks, we return block with nearest center.
10935         #  @param theName Object name; when specified, this parameter is used
10936         #         for result publication in the study. Otherwise, if automatic
10937         #         publication is switched on, default value is used for result name.
10938         #
10939         #  @return New GEOM.GEOM_Object, containing the found block.
10940         #
10941         #  @ref swig_todo "Example"
10942         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10943             """
10944             Find block, containing the given point inside its volume or on boundary.
10945
10946             Parameters:
10947                 theCompound Compound, to find block in.
10948                 thePoint Point, close to the desired block. If the point lays on
10949                          boundary between some blocks, we return block with nearest center.
10950                 theName Object name; when specified, this parameter is used
10951                         for result publication in the study. Otherwise, if automatic
10952                         publication is switched on, default value is used for result name.
10953
10954             Returns:
10955                 New GEOM.GEOM_Object, containing the found block.
10956             """
10957             # Example: see GEOM_Spanner.py
10958             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10959             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10960             self._autoPublish(anObj, theName, "block")
10961             return anObj
10962
10963         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10964         #  @param theCompound Compound, to find block in.
10965         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10966         #  @param theName Object name; when specified, this parameter is used
10967         #         for result publication in the study. Otherwise, if automatic
10968         #         publication is switched on, default value is used for result name.
10969         #
10970         #  @return New GEOM.GEOM_Object, containing the found block.
10971         #
10972         #  @ref swig_GetBlockByParts "Example"
10973         def GetBlockByParts(self, theCompound, theParts, theName=None):
10974             """
10975              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10976
10977              Parameters:
10978                 theCompound Compound, to find block in.
10979                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
10980                 theName Object name; when specified, this parameter is used
10981                         for result publication in the study. Otherwise, if automatic
10982                         publication is switched on, default value is used for result name.
10983
10984             Returns: 
10985                 New GEOM_Object, containing the found block.
10986             """
10987             # Example: see GEOM_TestOthers.py
10988             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
10989             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
10990             self._autoPublish(anObj, theName, "block")
10991             return anObj
10992
10993         ## Return all blocks, containing all the elements, passed as the parts.
10994         #  @param theCompound Compound, to find blocks in.
10995         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10996         #  @param theName Object name; when specified, this parameter is used
10997         #         for result publication in the study. Otherwise, if automatic
10998         #         publication is switched on, default value is used for result name.
10999         #
11000         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11001         #
11002         #  @ref swig_todo "Example"
11003         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11004             """
11005             Return all blocks, containing all the elements, passed as the parts.
11006
11007             Parameters:
11008                 theCompound Compound, to find blocks in.
11009                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11010                 theName Object name; when specified, this parameter is used
11011                         for result publication in the study. Otherwise, if automatic
11012                         publication is switched on, default value is used for result name.
11013
11014             Returns:
11015                 List of GEOM.GEOM_Object, containing the found blocks.
11016             """
11017             # Example: see GEOM_Spanner.py
11018             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11019             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11020             self._autoPublish(aList, theName, "block")
11021             return aList
11022
11023         ## Multi-transformate block and glue the result.
11024         #  Transformation is defined so, as to superpose direction faces.
11025         #  @param Block Hexahedral solid to be multi-transformed.
11026         #  @param DirFace1 ID of First direction face.
11027         #  @param DirFace2 ID of Second direction face.
11028         #  @param NbTimes Quantity of transformations to be done.
11029         #  @param theName Object name; when specified, this parameter is used
11030         #         for result publication in the study. Otherwise, if automatic
11031         #         publication is switched on, default value is used for result name.
11032         #
11033         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11034         #
11035         #  @return New GEOM.GEOM_Object, containing the result shape.
11036         #
11037         #  @ref tui_multi_transformation "Example"
11038         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11039             """
11040             Multi-transformate block and glue the result.
11041             Transformation is defined so, as to superpose direction faces.
11042
11043             Parameters:
11044                 Block Hexahedral solid to be multi-transformed.
11045                 DirFace1 ID of First direction face.
11046                 DirFace2 ID of Second direction face.
11047                 NbTimes Quantity of transformations to be done.
11048                 theName Object name; when specified, this parameter is used
11049                         for result publication in the study. Otherwise, if automatic
11050                         publication is switched on, default value is used for result name.
11051
11052             Note:
11053                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11054
11055             Returns:
11056                 New GEOM.GEOM_Object, containing the result shape.
11057             """
11058             # Example: see GEOM_Spanner.py
11059             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11060             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11061             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11062             anObj.SetParameters(Parameters)
11063             self._autoPublish(anObj, theName, "transformed")
11064             return anObj
11065
11066         ## Multi-transformate block and glue the result.
11067         #  @param Block Hexahedral solid to be multi-transformed.
11068         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11069         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11070         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11071         #  @param theName Object name; when specified, this parameter is used
11072         #         for result publication in the study. Otherwise, if automatic
11073         #         publication is switched on, default value is used for result name.
11074         #
11075         #  @return New GEOM.GEOM_Object, containing the result shape.
11076         #
11077         #  @ref tui_multi_transformation "Example"
11078         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11079                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11080             """
11081             Multi-transformate block and glue the result.
11082
11083             Parameters:
11084                 Block Hexahedral solid to be multi-transformed.
11085                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11086                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11087                 NbTimesU,NbTimesV Quantity of transformations to be done.
11088                 theName Object name; when specified, this parameter is used
11089                         for result publication in the study. Otherwise, if automatic
11090                         publication is switched on, default value is used for result name.
11091
11092             Returns:
11093                 New GEOM.GEOM_Object, containing the result shape.
11094             """
11095             # Example: see GEOM_Spanner.py
11096             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11097               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11098             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11099                                                             DirFace1V, DirFace2V, NbTimesV)
11100             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11101             anObj.SetParameters(Parameters)
11102             self._autoPublish(anObj, theName, "transformed")
11103             return anObj
11104
11105         ## Build all possible propagation groups.
11106         #  Propagation group is a set of all edges, opposite to one (main)
11107         #  edge of this group directly or through other opposite edges.
11108         #  Notion of Opposite Edge make sence only on quadrangle face.
11109         #  @param theShape Shape to build propagation groups on.
11110         #  @param theName Object name; when specified, this parameter is used
11111         #         for result publication in the study. Otherwise, if automatic
11112         #         publication is switched on, default value is used for result name.
11113         #
11114         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11115         #
11116         #  @ref swig_Propagate "Example"
11117         def Propagate(self, theShape, theName=None):
11118             """
11119             Build all possible propagation groups.
11120             Propagation group is a set of all edges, opposite to one (main)
11121             edge of this group directly or through other opposite edges.
11122             Notion of Opposite Edge make sence only on quadrangle face.
11123
11124             Parameters:
11125                 theShape Shape to build propagation groups on.
11126                 theName Object name; when specified, this parameter is used
11127                         for result publication in the study. Otherwise, if automatic
11128                         publication is switched on, default value is used for result name.
11129
11130             Returns:
11131                 List of GEOM.GEOM_Object, each of them is a propagation group.
11132             """
11133             # Example: see GEOM_TestOthers.py
11134             listChains = self.BlocksOp.Propagate(theShape)
11135             RaiseIfFailed("Propagate", self.BlocksOp)
11136             self._autoPublish(listChains, theName, "propagate")
11137             return listChains
11138
11139         # end of l3_blocks_op
11140         ## @}
11141
11142         ## @addtogroup l3_groups
11143         ## @{
11144
11145         ## Creates a new group which will store sub-shapes of theMainShape
11146         #  @param theMainShape is a GEOM object on which the group is selected
11147         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11148         #  @param theName Object name; when specified, this parameter is used
11149         #         for result publication in the study. Otherwise, if automatic
11150         #         publication is switched on, default value is used for result name.
11151         #
11152         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11153         #
11154         #  @ref tui_working_with_groups_page "Example 1"
11155         #  \n @ref swig_CreateGroup "Example 2"
11156         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11157             """
11158             Creates a new group which will store sub-shapes of theMainShape
11159
11160             Parameters:
11161                theMainShape is a GEOM object on which the group is selected
11162                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11163                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11164                 theName Object name; when specified, this parameter is used
11165                         for result publication in the study. Otherwise, if automatic
11166                         publication is switched on, default value is used for result name.
11167
11168             Returns:
11169                a newly created GEOM group
11170
11171             Example of usage:
11172                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11173                 
11174             """
11175             # Example: see GEOM_TestOthers.py
11176             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11177             RaiseIfFailed("CreateGroup", self.GroupOp)
11178             self._autoPublish(anObj, theName, "group")
11179             return anObj
11180
11181         ## Adds a sub-object with ID theSubShapeId to the group
11182         #  @param theGroup is a GEOM group to which the new sub-shape is added
11183         #  @param theSubShapeID is a sub-shape ID in the main object.
11184         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11185         #
11186         #  @ref tui_working_with_groups_page "Example"
11187         def AddObject(self,theGroup, theSubShapeID):
11188             """
11189             Adds a sub-object with ID theSubShapeId to the group
11190
11191             Parameters:
11192                 theGroup       is a GEOM group to which the new sub-shape is added
11193                 theSubShapeID  is a sub-shape ID in the main object.
11194
11195             Note:
11196                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11197             """
11198             # Example: see GEOM_TestOthers.py
11199             self.GroupOp.AddObject(theGroup, theSubShapeID)
11200             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11201                 RaiseIfFailed("AddObject", self.GroupOp)
11202                 pass
11203             pass
11204
11205         ## Removes a sub-object with ID \a theSubShapeId from the group
11206         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11207         #  @param theSubShapeID is a sub-shape ID in the main object.
11208         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11209         #
11210         #  @ref tui_working_with_groups_page "Example"
11211         def RemoveObject(self,theGroup, theSubShapeID):
11212             """
11213             Removes a sub-object with ID theSubShapeId from the group
11214
11215             Parameters:
11216                 theGroup is a GEOM group from which the new sub-shape is removed
11217                 theSubShapeID is a sub-shape ID in the main object.
11218
11219             Note:
11220                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11221             """
11222             # Example: see GEOM_TestOthers.py
11223             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11224             RaiseIfFailed("RemoveObject", self.GroupOp)
11225             pass
11226
11227         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11228         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11229         #  @param theSubShapes is a list of sub-shapes to be added.
11230         #
11231         #  @ref tui_working_with_groups_page "Example"
11232         def UnionList (self,theGroup, theSubShapes):
11233             """
11234             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11235
11236             Parameters:
11237                 theGroup is a GEOM group to which the new sub-shapes are added.
11238                 theSubShapes is a list of sub-shapes to be added.
11239             """
11240             # Example: see GEOM_TestOthers.py
11241             self.GroupOp.UnionList(theGroup, theSubShapes)
11242             RaiseIfFailed("UnionList", self.GroupOp)
11243             pass
11244
11245         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11246         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11247         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11248         #
11249         #  @ref swig_UnionIDs "Example"
11250         def UnionIDs(self,theGroup, theSubShapes):
11251             """
11252             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11253
11254             Parameters:
11255                 theGroup is a GEOM group to which the new sub-shapes are added.
11256                 theSubShapes is a list of indices of sub-shapes to be added.
11257             """
11258             # Example: see GEOM_TestOthers.py
11259             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11260             RaiseIfFailed("UnionIDs", self.GroupOp)
11261             pass
11262
11263         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11264         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11265         #  @param theSubShapes is a list of sub-shapes to be removed.
11266         #
11267         #  @ref tui_working_with_groups_page "Example"
11268         def DifferenceList (self,theGroup, theSubShapes):
11269             """
11270             Removes from the group all the given shapes. No errors, if some shapes are not included.
11271
11272             Parameters:
11273                 theGroup is a GEOM group from which the sub-shapes are removed.
11274                 theSubShapes is a list of sub-shapes to be removed.
11275             """
11276             # Example: see GEOM_TestOthers.py
11277             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11278             RaiseIfFailed("DifferenceList", self.GroupOp)
11279             pass
11280
11281         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11282         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11283         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11284         #
11285         #  @ref swig_DifferenceIDs "Example"
11286         def DifferenceIDs(self,theGroup, theSubShapes):
11287             """
11288             Removes from the group all the given shapes. No errors, if some shapes are not included.
11289
11290             Parameters:
11291                 theGroup is a GEOM group from which the sub-shapes are removed.
11292                 theSubShapes is a list of indices of sub-shapes to be removed.
11293             """            
11294             # Example: see GEOM_TestOthers.py
11295             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11296             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11297             pass
11298
11299         ## Union of two groups.
11300         #  New group is created. It will contain all entities
11301         #  which are present in groups theGroup1 and theGroup2.
11302         #  @param theGroup1, theGroup2 are the initial GEOM groups
11303         #                              to create the united group from.
11304         #  @param theName Object name; when specified, this parameter is used
11305         #         for result publication in the study. Otherwise, if automatic
11306         #         publication is switched on, default value is used for result name.
11307         #
11308         #  @return a newly created GEOM group.
11309         #
11310         #  @ref tui_union_groups_anchor "Example"
11311         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11312             """
11313             Union of two groups.
11314             New group is created. It will contain all entities
11315             which are present in groups theGroup1 and theGroup2.
11316
11317             Parameters:
11318                 theGroup1, theGroup2 are the initial GEOM groups
11319                                      to create the united group from.
11320                 theName Object name; when specified, this parameter is used
11321                         for result publication in the study. Otherwise, if automatic
11322                         publication is switched on, default value is used for result name.
11323
11324             Returns:
11325                 a newly created GEOM group.
11326             """
11327             # Example: see GEOM_TestOthers.py
11328             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11329             RaiseIfFailed("UnionGroups", self.GroupOp)
11330             self._autoPublish(aGroup, theName, "group")
11331             return aGroup
11332
11333         ## Intersection of two groups.
11334         #  New group is created. It will contain only those entities
11335         #  which are present in both groups theGroup1 and theGroup2.
11336         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11337         #  @param theName Object name; when specified, this parameter is used
11338         #         for result publication in the study. Otherwise, if automatic
11339         #         publication is switched on, default value is used for result name.
11340         #
11341         #  @return a newly created GEOM group.
11342         #
11343         #  @ref tui_intersect_groups_anchor "Example"
11344         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11345             """
11346             Intersection of two groups.
11347             New group is created. It will contain only those entities
11348             which are present in both groups theGroup1 and theGroup2.
11349
11350             Parameters:
11351                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11352                 theName Object name; when specified, this parameter is used
11353                         for result publication in the study. Otherwise, if automatic
11354                         publication is switched on, default value is used for result name.
11355
11356             Returns:
11357                 a newly created GEOM group.
11358             """
11359             # Example: see GEOM_TestOthers.py
11360             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11361             RaiseIfFailed("IntersectGroups", self.GroupOp)
11362             self._autoPublish(aGroup, theName, "group")
11363             return aGroup
11364
11365         ## Cut of two groups.
11366         #  New group is created. It will contain entities which are
11367         #  present in group theGroup1 but are not present in group theGroup2.
11368         #  @param theGroup1 is a GEOM group to include elements of.
11369         #  @param theGroup2 is a GEOM group to exclude elements of.
11370         #  @param theName Object name; when specified, this parameter is used
11371         #         for result publication in the study. Otherwise, if automatic
11372         #         publication is switched on, default value is used for result name.
11373         #
11374         #  @return a newly created GEOM group.
11375         #
11376         #  @ref tui_cut_groups_anchor "Example"
11377         def CutGroups (self, theGroup1, theGroup2, theName=None):
11378             """
11379             Cut of two groups.
11380             New group is created. It will contain entities which are
11381             present in group theGroup1 but are not present in group theGroup2.
11382
11383             Parameters:
11384                 theGroup1 is a GEOM group to include elements of.
11385                 theGroup2 is a GEOM group to exclude elements of.
11386                 theName Object name; when specified, this parameter is used
11387                         for result publication in the study. Otherwise, if automatic
11388                         publication is switched on, default value is used for result name.
11389
11390             Returns:
11391                 a newly created GEOM group.
11392             """
11393             # Example: see GEOM_TestOthers.py
11394             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11395             RaiseIfFailed("CutGroups", self.GroupOp)
11396             self._autoPublish(aGroup, theName, "group")
11397             return aGroup
11398
11399         ## Union of list of groups.
11400         #  New group is created. It will contain all entities that are
11401         #  present in groups listed in theGList.
11402         #  @param theGList is a list of GEOM groups to create the united group from.
11403         #  @param theName Object name; when specified, this parameter is used
11404         #         for result publication in the study. Otherwise, if automatic
11405         #         publication is switched on, default value is used for result name.
11406         #
11407         #  @return a newly created GEOM group.
11408         #
11409         #  @ref tui_union_groups_anchor "Example"
11410         def UnionListOfGroups (self, theGList, theName=None):
11411             """
11412             Union of list of groups.
11413             New group is created. It will contain all entities that are
11414             present in groups listed in theGList.
11415
11416             Parameters:
11417                 theGList is a list of GEOM groups to create the united group from.
11418                 theName Object name; when specified, this parameter is used
11419                         for result publication in the study. Otherwise, if automatic
11420                         publication is switched on, default value is used for result name.
11421
11422             Returns:
11423                 a newly created GEOM group.
11424             """
11425             # Example: see GEOM_TestOthers.py
11426             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11427             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11428             self._autoPublish(aGroup, theName, "group")
11429             return aGroup
11430
11431         ## Cut of lists of groups.
11432         #  New group is created. It will contain only entities
11433         #  which are present in groups listed in theGList.
11434         #  @param theGList is a list of GEOM groups to include elements of.
11435         #  @param theName Object name; when specified, this parameter is used
11436         #         for result publication in the study. Otherwise, if automatic
11437         #         publication is switched on, default value is used for result name.
11438         #
11439         #  @return a newly created GEOM group.
11440         #
11441         #  @ref tui_intersect_groups_anchor "Example"
11442         def IntersectListOfGroups (self, theGList, theName=None):
11443             """
11444             Cut of lists of groups.
11445             New group is created. It will contain only entities
11446             which are present in groups listed in theGList.
11447
11448             Parameters:
11449                 theGList is a list of GEOM groups to include elements of.
11450                 theName Object name; when specified, this parameter is used
11451                         for result publication in the study. Otherwise, if automatic
11452                         publication is switched on, default value is used for result name.
11453
11454             Returns:
11455                 a newly created GEOM group.
11456             """
11457             # Example: see GEOM_TestOthers.py
11458             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11459             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11460             self._autoPublish(aGroup, theName, "group")
11461             return aGroup
11462
11463         ## Cut of lists of groups.
11464         #  New group is created. It will contain only entities
11465         #  which are present in groups listed in theGList1 but 
11466         #  are not present in groups from theGList2.
11467         #  @param theGList1 is a list of GEOM groups to include elements of.
11468         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11469         #  @param theName Object name; when specified, this parameter is used
11470         #         for result publication in the study. Otherwise, if automatic
11471         #         publication is switched on, default value is used for result name.
11472         #
11473         #  @return a newly created GEOM group.
11474         #
11475         #  @ref tui_cut_groups_anchor "Example"
11476         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11477             """
11478             Cut of lists of groups.
11479             New group is created. It will contain only entities
11480             which are present in groups listed in theGList1 but 
11481             are not present in groups from theGList2.
11482
11483             Parameters:
11484                 theGList1 is a list of GEOM groups to include elements of.
11485                 theGList2 is a list of GEOM groups to exclude elements of.
11486                 theName Object name; when specified, this parameter is used
11487                         for result publication in the study. Otherwise, if automatic
11488                         publication is switched on, default value is used for result name.
11489
11490             Returns:
11491                 a newly created GEOM group.
11492             """
11493             # Example: see GEOM_TestOthers.py
11494             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11495             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11496             self._autoPublish(aGroup, theName, "group")
11497             return aGroup
11498
11499         ## Returns a list of sub-objects ID stored in the group
11500         #  @param theGroup is a GEOM group for which a list of IDs is requested
11501         #
11502         #  @ref swig_GetObjectIDs "Example"
11503         def GetObjectIDs(self,theGroup):
11504             """
11505             Returns a list of sub-objects ID stored in the group
11506
11507             Parameters:
11508                 theGroup is a GEOM group for which a list of IDs is requested
11509             """
11510             # Example: see GEOM_TestOthers.py
11511             ListIDs = self.GroupOp.GetObjects(theGroup)
11512             RaiseIfFailed("GetObjects", self.GroupOp)
11513             return ListIDs
11514
11515         ## Returns a type of sub-objects stored in the group
11516         #  @param theGroup is a GEOM group which type is returned.
11517         #
11518         #  @ref swig_GetType "Example"
11519         def GetType(self,theGroup):
11520             """
11521             Returns a type of sub-objects stored in the group
11522
11523             Parameters:
11524                 theGroup is a GEOM group which type is returned.
11525             """
11526             # Example: see GEOM_TestOthers.py
11527             aType = self.GroupOp.GetType(theGroup)
11528             RaiseIfFailed("GetType", self.GroupOp)
11529             return aType
11530
11531         ## Convert a type of geom object from id to string value
11532         #  @param theId is a GEOM obect type id.
11533         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11534         #  @ref swig_GetType "Example"
11535         def ShapeIdToType(self, theId):
11536             """
11537             Convert a type of geom object from id to string value
11538
11539             Parameters:
11540                 theId is a GEOM obect type id.
11541                 
11542             Returns:
11543                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11544             """
11545             if theId == 0:
11546                 return "COPY"
11547             if theId == 1:
11548                 return "IMPORT"
11549             if theId == 2:
11550                 return "POINT"
11551             if theId == 3:
11552                 return "VECTOR"
11553             if theId == 4:
11554                 return "PLANE"
11555             if theId == 5:
11556                 return "LINE"
11557             if theId == 6:
11558                 return "TORUS"
11559             if theId == 7:
11560                 return "BOX"
11561             if theId == 8:
11562                 return "CYLINDER"
11563             if theId == 9:
11564                 return "CONE"
11565             if theId == 10:
11566                 return "SPHERE"
11567             if theId == 11:
11568                 return "PRISM"
11569             if theId == 12:
11570                 return "REVOLUTION"
11571             if theId == 13:
11572                 return "BOOLEAN"
11573             if theId == 14:
11574                 return "PARTITION"
11575             if theId == 15:
11576                 return "POLYLINE"
11577             if theId == 16:
11578                 return "CIRCLE"
11579             if theId == 17:
11580                 return "SPLINE"
11581             if theId == 18:
11582                 return "ELLIPSE"
11583             if theId == 19:
11584                 return "CIRC_ARC"
11585             if theId == 20:
11586                 return "FILLET"
11587             if theId == 21:
11588                 return "CHAMFER"
11589             if theId == 22:
11590                 return "EDGE"
11591             if theId == 23:
11592                 return "WIRE"
11593             if theId == 24:
11594                 return "FACE"
11595             if theId == 25:
11596                 return "SHELL"
11597             if theId == 26:
11598                 return "SOLID"
11599             if theId == 27:
11600                 return "COMPOUND"
11601             if theId == 28:
11602                 return "SUBSHAPE"
11603             if theId == 29:
11604                 return "PIPE"
11605             if theId == 30:
11606                 return "ARCHIMEDE"
11607             if theId == 31:
11608                 return "FILLING"
11609             if theId == 32:
11610                 return "EXPLODE"
11611             if theId == 33:
11612                 return "GLUED"
11613             if theId == 34:
11614                 return "SKETCHER"
11615             if theId == 35:
11616                 return "CDG"
11617             if theId == 36:
11618                 return "FREE_BOUNDS"
11619             if theId == 37:
11620                 return "GROUP"
11621             if theId == 38:
11622                 return "BLOCK"
11623             if theId == 39:
11624                 return "MARKER"
11625             if theId == 40:
11626                 return "THRUSECTIONS"
11627             if theId == 41:
11628                 return "COMPOUNDFILTER"
11629             if theId == 42:
11630                 return "SHAPES_ON_SHAPE"
11631             if theId == 43:
11632                 return "ELLIPSE_ARC"
11633             if theId == 44:
11634                 return "3DSKETCHER"
11635             if theId == 45:
11636                 return "FILLET_2D"
11637             if theId == 46:
11638                 return "FILLET_1D"
11639             if theId == 201:
11640                 return "PIPETSHAPE"
11641             return "Shape Id not exist."
11642
11643         ## Returns a main shape associated with the group
11644         #  @param theGroup is a GEOM group for which a main shape object is requested
11645         #  @return a GEOM object which is a main shape for theGroup
11646         #
11647         #  @ref swig_GetMainShape "Example"
11648         def GetMainShape(self,theGroup):
11649             """
11650             Returns a main shape associated with the group
11651
11652             Parameters:
11653                 theGroup is a GEOM group for which a main shape object is requested
11654
11655             Returns:
11656                 a GEOM object which is a main shape for theGroup
11657
11658             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11659             """
11660             # Example: see GEOM_TestOthers.py
11661             anObj = self.GroupOp.GetMainShape(theGroup)
11662             RaiseIfFailed("GetMainShape", self.GroupOp)
11663             return anObj
11664
11665         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11666         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11667         #  @param theShape given shape (see GEOM.GEOM_Object)
11668         #  @param min_length minimum length of edges of theShape
11669         #  @param max_length maximum length of edges of theShape
11670         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11671         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11672         #  @param theName Object name; when specified, this parameter is used
11673         #         for result publication in the study. Otherwise, if automatic
11674         #         publication is switched on, default value is used for result name.
11675         #
11676         #  @return a newly created GEOM group of edges
11677         #
11678         #  @@ref swig_todo "Example"
11679         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11680             """
11681             Create group of edges of theShape, whose length is in range [min_length, max_length].
11682             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11683
11684             Parameters:
11685                 theShape given shape
11686                 min_length minimum length of edges of theShape
11687                 max_length maximum length of edges of theShape
11688                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11689                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11690                 theName Object name; when specified, this parameter is used
11691                         for result publication in the study. Otherwise, if automatic
11692                         publication is switched on, default value is used for result name.
11693
11694              Returns:
11695                 a newly created GEOM group of edges.
11696             """
11697             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11698             edges_in_range = []
11699             for edge in edges:
11700                 Props = self.BasicProperties(edge)
11701                 if min_length <= Props[0] and Props[0] <= max_length:
11702                     if (not include_min) and (min_length == Props[0]):
11703                         skip = 1
11704                     else:
11705                         if (not include_max) and (Props[0] == max_length):
11706                             skip = 1
11707                         else:
11708                             edges_in_range.append(edge)
11709
11710             if len(edges_in_range) <= 0:
11711                 print "No edges found by given criteria"
11712                 return None
11713
11714             # note: auto-publishing is done in self.CreateGroup()
11715             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11716             self.UnionList(group_edges, edges_in_range)
11717
11718             return group_edges
11719
11720         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11721         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11722         #  @param min_length minimum length of edges of selected shape
11723         #  @param max_length maximum length of edges of selected shape
11724         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11725         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11726         #  @return a newly created GEOM group of edges
11727         #  @ref swig_todo "Example"
11728         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11729             """
11730             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11731             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11732
11733             Parameters:
11734                 min_length minimum length of edges of selected shape
11735                 max_length maximum length of edges of selected shape
11736                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11737                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11738
11739              Returns:
11740                 a newly created GEOM group of edges.
11741             """
11742             nb_selected = sg.SelectedCount()
11743             if nb_selected < 1:
11744                 print "Select a shape before calling this function, please."
11745                 return 0
11746             if nb_selected > 1:
11747                 print "Only one shape must be selected"
11748                 return 0
11749
11750             id_shape = sg.getSelected(0)
11751             shape = IDToObject( id_shape )
11752
11753             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11754
11755             left_str  = " < "
11756             right_str = " < "
11757             if include_min: left_str  = " <= "
11758             if include_max: right_str  = " <= "
11759
11760             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11761                                     + left_str + "length" + right_str + `max_length`)
11762
11763             sg.updateObjBrowser(1)
11764
11765             return group_edges
11766
11767         # end of l3_groups
11768         ## @}
11769
11770         ## @addtogroup l4_advanced
11771         ## @{
11772
11773         ## Create a T-shape object with specified caracteristics for the main
11774         #  and the incident pipes (radius, width, half-length).
11775         #  The extremities of the main pipe are located on junctions points P1 and P2.
11776         #  The extremity of the incident pipe is located on junction point P3.
11777         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11778         #  the main plane of the T-shape is XOY.
11779         #
11780         #  @param theR1 Internal radius of main pipe
11781         #  @param theW1 Width of main pipe
11782         #  @param theL1 Half-length of main pipe
11783         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11784         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11785         #  @param theL2 Half-length of incident pipe
11786         #
11787         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11788         #  @param theP1 1st junction point of main pipe
11789         #  @param theP2 2nd junction point of main pipe
11790         #  @param theP3 Junction point of incident pipe
11791         #
11792         #  @param theRL Internal radius of left thickness reduction
11793         #  @param theWL Width of left thickness reduction
11794         #  @param theLtransL Length of left transition part
11795         #  @param theLthinL Length of left thin part
11796         #
11797         #  @param theRR Internal radius of right thickness reduction
11798         #  @param theWR Width of right thickness reduction
11799         #  @param theLtransR Length of right transition part
11800         #  @param theLthinR Length of right thin part
11801         #
11802         #  @param theRI Internal radius of incident thickness reduction
11803         #  @param theWI Width of incident thickness reduction
11804         #  @param theLtransI Length of incident transition part
11805         #  @param theLthinI Length of incident thin part
11806         #
11807         #  @param theName Object name; when specified, this parameter is used
11808         #         for result publication in the study. Otherwise, if automatic
11809         #         publication is switched on, default value is used for result name.
11810         #
11811         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11812         #
11813         #  @ref tui_creation_pipetshape "Example"
11814         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11815                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11816                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11817                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11818                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11819                             theName=None):
11820             """
11821             Create a T-shape object with specified caracteristics for the main
11822             and the incident pipes (radius, width, half-length).
11823             The extremities of the main pipe are located on junctions points P1 and P2.
11824             The extremity of the incident pipe is located on junction point P3.
11825             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11826             the main plane of the T-shape is XOY.
11827
11828             Parameters:
11829                 theR1 Internal radius of main pipe
11830                 theW1 Width of main pipe
11831                 theL1 Half-length of main pipe
11832                 theR2 Internal radius of incident pipe (R2 < R1)
11833                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11834                 theL2 Half-length of incident pipe
11835                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11836                 theP1 1st junction point of main pipe
11837                 theP2 2nd junction point of main pipe
11838                 theP3 Junction point of incident pipe
11839
11840                 theRL Internal radius of left thickness reduction
11841                 theWL Width of left thickness reduction
11842                 theLtransL Length of left transition part
11843                 theLthinL Length of left thin part
11844
11845                 theRR Internal radius of right thickness reduction
11846                 theWR Width of right thickness reduction
11847                 theLtransR Length of right transition part
11848                 theLthinR Length of right thin part
11849
11850                 theRI Internal radius of incident thickness reduction
11851                 theWI Width of incident thickness reduction
11852                 theLtransI Length of incident transition part
11853                 theLthinI Length of incident thin part
11854
11855                 theName Object name; when specified, this parameter is used
11856                         for result publication in the study. Otherwise, if automatic
11857                         publication is switched on, default value is used for result name.
11858
11859             Returns:
11860                 List of GEOM_Object, containing the created shape and propagation groups.
11861
11862             Example of usage:
11863                 # create PipeTShape object
11864                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11865                 # create PipeTShape object with position
11866                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11867                 # create PipeTShape object with left thickness reduction
11868                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11869             """
11870             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)
11871             if (theP1 and theP2 and theP3):
11872                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11873                                                                 theRL, theWL, theLtransL, theLthinL,
11874                                                                 theRR, theWR, theLtransR, theLthinR,
11875                                                                 theRI, theWI, theLtransI, theLthinI,
11876                                                                 theHexMesh, theP1, theP2, theP3)
11877             else:
11878                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11879                                                     theRL, theWL, theLtransL, theLthinL,
11880                                                     theRR, theWR, theLtransR, theLthinR,
11881                                                     theRI, theWI, theLtransI, theLthinI,
11882                                                     theHexMesh)
11883             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11884             if Parameters: anObj[0].SetParameters(Parameters)
11885             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11886             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11887             return anObj
11888
11889         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11890         #  and the incident pipes (radius, width, half-length). The chamfer is
11891         #  created on the junction of the pipes.
11892         #  The extremities of the main pipe are located on junctions points P1 and P2.
11893         #  The extremity of the incident pipe is located on junction point P3.
11894         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11895         #  the main plane of the T-shape is XOY.
11896         #  @param theR1 Internal radius of main pipe
11897         #  @param theW1 Width of main pipe
11898         #  @param theL1 Half-length of main pipe
11899         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11900         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11901         #  @param theL2 Half-length of incident pipe
11902         #  @param theH Height of the chamfer.
11903         #  @param theW Width of the chamfer.
11904         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11905         #  @param theP1 1st junction point of main pipe
11906         #  @param theP2 2nd junction point of main pipe
11907         #  @param theP3 Junction point of incident pipe
11908         #
11909         #  @param theRL Internal radius of left thickness reduction
11910         #  @param theWL Width of left thickness reduction
11911         #  @param theLtransL Length of left transition part
11912         #  @param theLthinL Length of left thin part
11913         #
11914         #  @param theRR Internal radius of right thickness reduction
11915         #  @param theWR Width of right thickness reduction
11916         #  @param theLtransR Length of right transition part
11917         #  @param theLthinR Length of right thin part
11918         #
11919         #  @param theRI Internal radius of incident thickness reduction
11920         #  @param theWI Width of incident thickness reduction
11921         #  @param theLtransI Length of incident transition part
11922         #  @param theLthinI Length of incident thin part
11923         #
11924         #  @param theName Object name; when specified, this parameter is used
11925         #         for result publication in the study. Otherwise, if automatic
11926         #         publication is switched on, default value is used for result name.
11927         #
11928         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11929         #
11930         #  @ref tui_creation_pipetshape "Example"
11931         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11932                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11933                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11934                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11935                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11936                                    theName=None):
11937             """
11938             Create a T-shape object with chamfer and with specified caracteristics for the main
11939             and the incident pipes (radius, width, half-length). The chamfer is
11940             created on the junction of the pipes.
11941             The extremities of the main pipe are located on junctions points P1 and P2.
11942             The extremity of the incident pipe is located on junction point P3.
11943             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11944             the main plane of the T-shape is XOY.
11945
11946             Parameters:
11947                 theR1 Internal radius of main pipe
11948                 theW1 Width of main pipe
11949                 theL1 Half-length of main pipe
11950                 theR2 Internal radius of incident pipe (R2 < R1)
11951                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11952                 theL2 Half-length of incident pipe
11953                 theH Height of the chamfer.
11954                 theW Width of the chamfer.
11955                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11956                 theP1 1st junction point of main pipe
11957                 theP2 2nd junction point of main pipe
11958                 theP3 Junction point of incident pipe
11959
11960                 theRL Internal radius of left thickness reduction
11961                 theWL Width of left thickness reduction
11962                 theLtransL Length of left transition part
11963                 theLthinL Length of left thin part
11964
11965                 theRR Internal radius of right thickness reduction
11966                 theWR Width of right thickness reduction
11967                 theLtransR Length of right transition part
11968                 theLthinR Length of right thin part
11969
11970                 theRI Internal radius of incident thickness reduction
11971                 theWI Width of incident thickness reduction
11972                 theLtransI Length of incident transition part
11973                 theLthinI Length of incident thin part
11974
11975                 theName Object name; when specified, this parameter is used
11976                         for result publication in the study. Otherwise, if automatic
11977                         publication is switched on, default value is used for result name.
11978
11979             Returns:
11980                 List of GEOM_Object, containing the created shape and propagation groups.
11981
11982             Example of usage:
11983                 # create PipeTShape with chamfer object
11984                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
11985                 # create PipeTShape with chamfer object with position
11986                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
11987                 # create PipeTShape with chamfer object with left thickness reduction
11988                 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)
11989             """
11990             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)
11991             if (theP1 and theP2 and theP3):
11992               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11993                                                                      theRL, theWL, theLtransL, theLthinL,
11994                                                                      theRR, theWR, theLtransR, theLthinR,
11995                                                                      theRI, theWI, theLtransI, theLthinI,
11996                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
11997             else:
11998               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
11999                                                          theRL, theWL, theLtransL, theLthinL,
12000                                                          theRR, theWR, theLtransR, theLthinR,
12001                                                          theRI, theWI, theLtransI, theLthinI,
12002                                                          theH, theW, theHexMesh)
12003             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12004             if Parameters: anObj[0].SetParameters(Parameters)
12005             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12006             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12007             return anObj
12008
12009         ## Create a T-shape object with fillet and with specified caracteristics for the main
12010         #  and the incident pipes (radius, width, half-length). The fillet is
12011         #  created on the junction of the pipes.
12012         #  The extremities of the main pipe are located on junctions points P1 and P2.
12013         #  The extremity of the incident pipe is located on junction point P3.
12014         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12015         #  the main plane of the T-shape is XOY.
12016         #  @param theR1 Internal radius of main pipe
12017         #  @param theW1 Width of main pipe
12018         #  @param theL1 Half-length of main pipe
12019         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12020         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12021         #  @param theL2 Half-length of incident pipe
12022         #  @param theRF Radius of curvature of fillet.
12023         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12024         #  @param theP1 1st junction point of main pipe
12025         #  @param theP2 2nd junction point of main pipe
12026         #  @param theP3 Junction point of incident pipe
12027         #
12028         #  @param theRL Internal radius of left thickness reduction
12029         #  @param theWL Width of left thickness reduction
12030         #  @param theLtransL Length of left transition part
12031         #  @param theLthinL Length of left thin part
12032         #
12033         #  @param theRR Internal radius of right thickness reduction
12034         #  @param theWR Width of right thickness reduction
12035         #  @param theLtransR Length of right transition part
12036         #  @param theLthinR Length of right thin part
12037         #
12038         #  @param theRI Internal radius of incident thickness reduction
12039         #  @param theWI Width of incident thickness reduction
12040         #  @param theLtransI Length of incident transition part
12041         #  @param theLthinI Length of incident thin part
12042         #
12043         #  @param theName Object name; when specified, this parameter is used
12044         #         for result publication in the study. Otherwise, if automatic
12045         #         publication is switched on, default value is used for result name.
12046         #
12047         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12048         #
12049         #  @ref tui_creation_pipetshape "Example"
12050         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12051                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12052                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12053                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12054                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12055                                   theName=None):
12056             """
12057             Create a T-shape object with fillet and with specified caracteristics for the main
12058             and the incident pipes (radius, width, half-length). The fillet is
12059             created on the junction of the pipes.
12060             The extremities of the main pipe are located on junctions points P1 and P2.
12061             The extremity of the incident pipe is located on junction point P3.
12062
12063             Parameters:
12064                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12065                 the main plane of the T-shape is XOY.
12066                 theR1 Internal radius of main pipe
12067                 theW1 Width of main pipe
12068                 heL1 Half-length of main pipe
12069                 theR2 Internal radius of incident pipe (R2 < R1)
12070                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12071                 theL2 Half-length of incident pipe
12072                 theRF Radius of curvature of fillet.
12073                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12074                 theP1 1st junction point of main pipe
12075                 theP2 2nd junction point of main pipe
12076                 theP3 Junction point of incident pipe
12077
12078                 theRL Internal radius of left thickness reduction
12079                 theWL Width of left thickness reduction
12080                 theLtransL Length of left transition part
12081                 theLthinL Length of left thin part
12082
12083                 theRR Internal radius of right thickness reduction
12084                 theWR Width of right thickness reduction
12085                 theLtransR Length of right transition part
12086                 theLthinR Length of right thin part
12087
12088                 theRI Internal radius of incident thickness reduction
12089                 theWI Width of incident thickness reduction
12090                 theLtransI Length of incident transition part
12091                 theLthinI Length of incident thin part
12092
12093                 theName Object name; when specified, this parameter is used
12094                         for result publication in the study. Otherwise, if automatic
12095                         publication is switched on, default value is used for result name.
12096                 
12097             Returns:
12098                 List of GEOM_Object, containing the created shape and propagation groups.
12099                 
12100             Example of usage:
12101                 # create PipeTShape with fillet object
12102                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12103                 # create PipeTShape with fillet object with position
12104                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12105                 # create PipeTShape with fillet object with left thickness reduction
12106                 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)
12107             """
12108             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)
12109             if (theP1 and theP2 and theP3):
12110               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12111                                                                     theRL, theWL, theLtransL, theLthinL,
12112                                                                     theRR, theWR, theLtransR, theLthinR,
12113                                                                     theRI, theWI, theLtransI, theLthinI,
12114                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12115             else:
12116               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12117                                                         theRL, theWL, theLtransL, theLthinL,
12118                                                         theRR, theWR, theLtransR, theLthinR,
12119                                                         theRI, theWI, theLtransI, theLthinI,
12120                                                         theRF, theHexMesh)
12121             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12122             if Parameters: anObj[0].SetParameters(Parameters)
12123             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12124             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12125             return anObj
12126
12127         ## This function allows creating a disk already divided into blocks. It
12128         #  can be used to create divided pipes for later meshing in hexaedra.
12129         #  @param theR Radius of the disk
12130         #  @param theOrientation Orientation of the plane on which the disk will be built
12131         #         1 = XOY, 2 = OYZ, 3 = OZX
12132         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12133         #  @param theName Object name; when specified, this parameter is used
12134         #         for result publication in the study. Otherwise, if automatic
12135         #         publication is switched on, default value is used for result name.
12136         #
12137         #  @return New GEOM_Object, containing the created shape.
12138         #
12139         #  @ref tui_creation_divideddisk "Example"
12140         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12141             """
12142             Creates a disk, divided into blocks. It can be used to create divided pipes
12143             for later meshing in hexaedra.
12144
12145             Parameters:
12146                 theR Radius of the disk
12147                 theOrientation Orientation of the plane on which the disk will be built:
12148                                1 = XOY, 2 = OYZ, 3 = OZX
12149                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12150                 theName Object name; when specified, this parameter is used
12151                         for result publication in the study. Otherwise, if automatic
12152                         publication is switched on, default value is used for result name.
12153
12154             Returns:
12155                 New GEOM_Object, containing the created shape.
12156             """
12157             theR, Parameters = ParseParameters(theR)
12158             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12159             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12160             if Parameters: anObj.SetParameters(Parameters)
12161             self._autoPublish(anObj, theName, "dividedDisk")
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 theCenter Center of the disk
12167         #  @param theVector Normal vector to the plane of the created disk
12168         #  @param theRadius Radius of the disk
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 MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12178             """
12179             Creates a disk already divided into blocks. It can be used to create divided pipes
12180             for later meshing in hexaedra.
12181
12182             Parameters:
12183                 theCenter Center of the disk
12184                 theVector Normal vector to the plane of the created disk
12185                 theRadius Radius of the disk
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             theRadius, Parameters = ParseParameters(theRadius)
12195             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12196             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12197             if Parameters: anObj.SetParameters(Parameters)
12198             self._autoPublish(anObj, theName, "dividedDisk")
12199             return anObj
12200
12201         ## Builds a cylinder prepared for hexa meshes
12202         #  @param theR Radius of the cylinder
12203         #  @param theH Height of the cylinder
12204         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12205         #  @param theName Object name; when specified, this parameter is used
12206         #         for result publication in the study. Otherwise, if automatic
12207         #         publication is switched on, default value is used for result name.
12208         #
12209         #  @return New GEOM_Object, containing the created shape.
12210         #
12211         #  @ref tui_creation_dividedcylinder "Example"
12212         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12213             """
12214             Builds a cylinder prepared for hexa meshes
12215
12216             Parameters:
12217                 theR Radius of the cylinder
12218                 theH Height of the cylinder
12219                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12220                 theName Object name; when specified, this parameter is used
12221                         for result publication in the study. Otherwise, if automatic
12222                         publication is switched on, default value is used for result name.
12223
12224             Returns:
12225                 New GEOM_Object, containing the created shape.
12226             """
12227             theR, theH, Parameters = ParseParameters(theR, theH)
12228             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12229             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12230             if Parameters: anObj.SetParameters(Parameters)
12231             self._autoPublish(anObj, theName, "dividedCylinder")
12232             return anObj
12233
12234         ## Create a surface from a cloud of points
12235         #  @param thelPoints list of points
12236         #  @return New GEOM_Object, containing the created shape.
12237         #
12238         #  @ref tui_creation_smoothingsurface "Example"
12239         def MakeSmoothingSurface(self, thelPoints):
12240             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12241             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12242             return anObj
12243
12244         #@@ insert new functions before this line @@ do not remove this line @@#
12245
12246         # end of l4_advanced
12247         ## @}
12248
12249         ## Create a copy of the given object
12250         #
12251         #  @param theOriginal geometry object for copy
12252         #  @param theName Object name; when specified, this parameter is used
12253         #         for result publication in the study. Otherwise, if automatic
12254         #         publication is switched on, default value is used for result name.
12255         #
12256         #  @return New GEOM_Object, containing the copied shape.
12257         #
12258         #  @ingroup l1_geomBuilder_auxiliary
12259         #  @ref swig_MakeCopy "Example"
12260         def MakeCopy(self, theOriginal, theName=None):
12261             """
12262             Create a copy of the given object
12263
12264             Parameters:
12265                 theOriginal geometry object for copy
12266                 theName Object name; when specified, this parameter is used
12267                         for result publication in the study. Otherwise, if automatic
12268                         publication is switched on, default value is used for result name.
12269
12270             Returns:
12271                 New GEOM_Object, containing the copied shape.
12272
12273             Example of usage: Copy = geompy.MakeCopy(Box)
12274             """
12275             # Example: see GEOM_TestAll.py
12276             anObj = self.InsertOp.MakeCopy(theOriginal)
12277             RaiseIfFailed("MakeCopy", self.InsertOp)
12278             self._autoPublish(anObj, theName, "copy")
12279             return anObj
12280
12281         ## Add Path to load python scripts from
12282         #  @param Path a path to load python scripts from
12283         #  @ingroup l1_geomBuilder_auxiliary
12284         def addPath(self,Path):
12285             """
12286             Add Path to load python scripts from
12287
12288             Parameters:
12289                 Path a path to load python scripts from
12290             """
12291             if (sys.path.count(Path) < 1):
12292                 sys.path.append(Path)
12293                 pass
12294             pass
12295
12296         ## Load marker texture from the file
12297         #  @param Path a path to the texture file
12298         #  @return unique texture identifier
12299         #  @ingroup l1_geomBuilder_auxiliary
12300         def LoadTexture(self, Path):
12301             """
12302             Load marker texture from the file
12303             
12304             Parameters:
12305                 Path a path to the texture file
12306                 
12307             Returns:
12308                 unique texture identifier
12309             """
12310             # Example: see GEOM_TestAll.py
12311             ID = self.InsertOp.LoadTexture(Path)
12312             RaiseIfFailed("LoadTexture", self.InsertOp)
12313             return ID
12314
12315         ## Get internal name of the object based on its study entry
12316         #  @note This method does not provide an unique identifier of the geometry object.
12317         #  @note This is internal function of GEOM component, though it can be used outside it for 
12318         #  appropriate reason (e.g. for identification of geometry object).
12319         #  @param obj geometry object
12320         #  @return unique object identifier
12321         #  @ingroup l1_geomBuilder_auxiliary
12322         def getObjectID(self, obj):
12323             """
12324             Get internal name of the object based on its study entry.
12325             Note: this method does not provide an unique identifier of the geometry object.
12326             It is an internal function of GEOM component, though it can be used outside GEOM for 
12327             appropriate reason (e.g. for identification of geometry object).
12328
12329             Parameters:
12330                 obj geometry object
12331
12332             Returns:
12333                 unique object identifier
12334             """
12335             ID = ""
12336             entry = salome.ObjectToID(obj)
12337             if entry is not None:
12338                 lst = entry.split(":")
12339                 if len(lst) > 0:
12340                     ID = lst[-1] # -1 means last item in the list            
12341                     return "GEOM_" + ID
12342             return ID
12343                 
12344             
12345
12346         ## Add marker texture. @a Width and @a Height parameters
12347         #  specify width and height of the texture in pixels.
12348         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12349         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12350         #  parameter should be unpacked string, in which '1' symbols represent opaque
12351         #  pixels and '0' represent transparent pixels of the texture bitmap.
12352         #
12353         #  @param Width texture width in pixels
12354         #  @param Height texture height in pixels
12355         #  @param Texture texture data
12356         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12357         #  @return unique texture identifier
12358         #  @ingroup l1_geomBuilder_auxiliary
12359         def AddTexture(self, Width, Height, Texture, RowData=False):
12360             """
12361             Add marker texture. Width and Height parameters
12362             specify width and height of the texture in pixels.
12363             If RowData is True, Texture parameter should represent texture data
12364             packed into the byte array. If RowData is False (default), Texture
12365             parameter should be unpacked string, in which '1' symbols represent opaque
12366             pixels and '0' represent transparent pixels of the texture bitmap.
12367
12368             Parameters:
12369                 Width texture width in pixels
12370                 Height texture height in pixels
12371                 Texture texture data
12372                 RowData if True, Texture data are packed in the byte stream
12373
12374             Returns:
12375                 return unique texture identifier
12376             """
12377             if not RowData: Texture = PackData(Texture)
12378             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12379             RaiseIfFailed("AddTexture", self.InsertOp)
12380             return ID
12381
12382         ## Creates a new folder object. It is a container for any GEOM objects.
12383         #  @param Name name of the container
12384         #  @param Father parent object. If None, 
12385         #         folder under 'Geometry' root object will be created.
12386         #  @return a new created folder
12387         def NewFolder(self, Name, Father=None):
12388             """
12389             Create a new folder object. It is an auxiliary container for any GEOM objects.
12390             
12391             Parameters:
12392                 Name name of the container
12393                 Father parent object. If None, 
12394                 folder under 'Geometry' root object will be created.
12395             
12396             Returns:
12397                 a new created folder
12398             """
12399             if not Father: Father = self.father
12400             return self.CreateFolder(Name, Father)
12401
12402         ## Move object to the specified folder
12403         #  @param Object object to move
12404         #  @param Folder target folder
12405         def PutToFolder(self, Object, Folder):
12406             """
12407             Move object to the specified folder
12408             
12409             Parameters:
12410                 Object object to move
12411                 Folder target folder
12412             """
12413             self.MoveToFolder(Object, Folder)
12414             pass
12415
12416         ## Move list of objects to the specified folder
12417         #  @param ListOfSO list of objects to move
12418         #  @param Folder target folder
12419         def PutListToFolder(self, ListOfSO, Folder):
12420             """
12421             Move list of objects to the specified folder
12422             
12423             Parameters:
12424                 ListOfSO list of objects to move
12425                 Folder target folder
12426             """
12427             self.MoveListToFolder(ListOfSO, Folder)
12428             pass
12429
12430 import omniORB
12431 # Register the new proxy for GEOM_Gen
12432 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12433
12434 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12435 #  interface to GEOM operations.
12436 #
12437 #  Typical use is:
12438 #  \code
12439 #    import salome
12440 #    salome.salome_init()
12441 #    from salome.geom import geomBuilder
12442 #    geompy = geomBuilder.New(salome.myStudy)
12443 #  \endcode
12444 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12445 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12446 #  @return geomBuilder instance
12447 def New( study, instance=None):
12448     """
12449     Create a new geomBuilder instance.The geomBuilder class provides the Python
12450     interface to GEOM operations.
12451
12452     Typical use is:
12453         import salome
12454         salome.salome_init()
12455         from salome.geom import geomBuilder
12456         geompy = geomBuilder.New(salome.myStudy)
12457
12458     Parameters:
12459         study     SALOME study, generally obtained by salome.myStudy.
12460         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12461     Returns:
12462         geomBuilder instance
12463     """
12464     #print "New geomBuilder ", study, instance
12465     global engine
12466     global geom
12467     global doLcc
12468     engine = instance
12469     if engine is None:
12470       doLcc = True
12471     geom = geomBuilder()
12472     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12473     geom.init_geom(study)
12474     return geom