Salome HOME
Update copyrights 2014.
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  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, or (at your option) any later version.
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 ## - 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 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function 
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()" 
151 ## (by default it is created under the "Geometry" root object). 
152 ## As soon as folder is created, any published geometry object 
153 ## can be moved into it.
154 ##  
155 ## For example:
156 ## 
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box") 
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ## 
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ## 
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ## 
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object 
179 ## should be published in the study (for example, with 
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ## 
187 ## @}
188
189
190 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
191
192 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
193 ## @{
194 ##   @defgroup l2_import_export Importing/exporting geometrical objects
195 ##   @defgroup l2_creating      Creating geometrical objects
196 ##   @{
197 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
198 ##     @{
199 ##       @defgroup l4_curves        Creating Curves
200
201 ##     @}
202 ##     @defgroup l3_3d_primitives Creating 3D Primitives
203 ##     @defgroup l3_complex       Creating Complex Objects
204 ##     @defgroup l3_groups        Working with groups
205 ##     @defgroup l3_blocks        Building by blocks
206 ##     @{
207 ##       @defgroup l4_blocks_measure Check and Improve
208
209 ##     @}
210 ##     @defgroup l3_sketcher      Sketcher
211 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
212 ##     @{
213 ##       @defgroup l4_decompose     Decompose objects
214 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
215 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
216 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
217 ##       @defgroup l4_advanced      Advanced objects creation functions
218
219 ##     @}
220
221 ##   @}
222 ##   @defgroup l2_transforming  Transforming geometrical objects
223 ##   @{
224 ##     @defgroup l3_basic_op      Basic Operations
225 ##     @defgroup l3_boolean       Boolean Operations
226 ##     @defgroup l3_transform     Transformation Operations
227 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
228 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
229 ##     @defgroup l3_blocks_op     Blocks Operations
230 ##     @defgroup l3_healing       Repairing Operations
231 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
232
233 ##   @}
234 ##   @defgroup l2_measure       Using measurement tools
235 ##   @defgroup l2_field         Field on Geometry
236
237 ## @}
238
239 # initialize SALOME session in try/except block
240 # to avoid problems in some cases, e.g. when generating documentation
241 try:
242     import salome
243     salome.salome_init()
244     from salome import *
245 except:
246     pass
247
248 from salome_notebook import *
249
250 import GEOM
251 import math
252 import os
253
254 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
255
256 # service function
257 def _toListOfNames(_names, _size=-1):
258     l = []
259     import types
260     if type(_names) in [types.ListType, types.TupleType]:
261         for i in _names: l.append(i)
262     elif _names:
263         l.append(_names)
264     if l and len(l) < _size:
265         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
266     return l
267
268 ## Raise an Error, containing the Method_name, if Operation is Failed
269 ## @ingroup l1_geomBuilder_auxiliary
270 def RaiseIfFailed (Method_name, Operation):
271     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
272         Operation.AbortOperation()
273         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
274     else:
275         Operation.FinishOperation()
276         pass
277
278 ## Return list of variables value from salome notebook
279 ## @ingroup l1_geomBuilder_auxiliary
280 def ParseParameters(*parameters):
281     Result = []
282     StringResult = []
283     for parameter in parameters:
284         if isinstance(parameter, list):
285             lResults = ParseParameters(*parameter)
286             if len(lResults) > 0:
287                 Result.append(lResults[:-1])
288                 StringResult += lResults[-1].split(":")
289                 pass
290             pass
291         else:
292             if isinstance(parameter,str):
293                 if notebook.isVariable(parameter):
294                     Result.append(notebook.get(parameter))
295                 else:
296                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
297                 pass
298             else:
299                 Result.append(parameter)
300                 pass
301             StringResult.append(str(parameter))
302             pass
303         pass
304     if Result:
305         Result.append(":".join(StringResult))
306     else:
307         Result = ":".join(StringResult)
308     return Result
309
310 ## Return list of variables value from salome notebook
311 ## @ingroup l1_geomBuilder_auxiliary
312 def ParseList(list):
313     Result = []
314     StringResult = ""
315     for parameter in list:
316         if isinstance(parameter,str) and notebook.isVariable(parameter):
317             Result.append(str(notebook.get(parameter)))
318             pass
319         else:
320             Result.append(str(parameter))
321             pass
322
323         StringResult = StringResult + str(parameter)
324         StringResult = StringResult + ":"
325         pass
326     StringResult = StringResult[:len(StringResult)-1]
327     return Result, StringResult
328
329 ## Return list of variables value from salome notebook
330 ## @ingroup l1_geomBuilder_auxiliary
331 def ParseSketcherCommand(command):
332     Result = ""
333     StringResult = ""
334     sections = command.split(":")
335     for section in sections:
336         parameters = section.split(" ")
337         paramIndex = 1
338         for parameter in parameters:
339             if paramIndex > 1 and parameter.find("'") != -1:
340                 parameter = parameter.replace("'","")
341                 if notebook.isVariable(parameter):
342                     Result = Result + str(notebook.get(parameter)) + " "
343                     pass
344                 else:
345                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
346                     pass
347                 pass
348             else:
349                 Result = Result + str(parameter) + " "
350                 pass
351             if paramIndex > 1:
352                 StringResult = StringResult + parameter
353                 StringResult = StringResult + ":"
354                 pass
355             paramIndex = paramIndex + 1
356             pass
357         Result = Result[:len(Result)-1] + ":"
358         pass
359     Result = Result[:len(Result)-1]
360     return Result, StringResult
361
362 ## Helper function which can be used to pack the passed string to the byte data.
363 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
364 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
365 ## For example,
366 ## \code
367 ## val = PackData("10001110") # val = 0xAE
368 ## val = PackData("1")        # val = 0x80
369 ## \endcode
370 ## @param data unpacked data - a string containing '1' and '0' symbols
371 ## @return data packed to the byte stream
372 ## @ingroup l1_geomBuilder_auxiliary
373 def PackData(data):
374     """
375     Helper function which can be used to pack the passed string to the byte data.
376     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
377     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
378
379     Parameters:
380         data unpacked data - a string containing '1' and '0' symbols
381
382     Returns:
383         data packed to the byte stream
384         
385     Example of usage:
386         val = PackData("10001110") # val = 0xAE
387         val = PackData("1")        # val = 0x80
388     """
389     bytes = len(data)/8
390     if len(data)%8: bytes += 1
391     res = ""
392     for b in range(bytes):
393         d = data[b*8:(b+1)*8]
394         val = 0
395         for i in range(8):
396             val *= 2
397             if i < len(d):
398                 if d[i] == "1": val += 1
399                 elif d[i] != "0":
400                     raise "Invalid symbol %s" % d[i]
401                 pass
402             pass
403         res += chr(val)
404         pass
405     return res
406
407 ## Read bitmap texture from the text file.
408 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
409 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
410 ## The function returns width and height of the pixmap in pixels and byte stream representing
411 ## texture bitmap itself.
412 ##
413 ## This function can be used to read the texture to the byte stream in order to pass it to
414 ## the AddTexture() function of geomBuilder class.
415 ## For example,
416 ## \code
417 ## from salome.geom import geomBuilder
418 ## geompy = geomBuilder.New(salome.myStudy)
419 ## texture = geompy.readtexture('mytexture.dat')
420 ## texture = geompy.AddTexture(*texture)
421 ## obj.SetMarkerTexture(texture)
422 ## \endcode
423 ## @param fname texture file name
424 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
425 ## @ingroup l1_geomBuilder_auxiliary
426 def ReadTexture(fname):
427     """
428     Read bitmap texture from the text file.
429     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
430     A zero symbol ('0') represents transparent pixel of the texture bitmap.
431     The function returns width and height of the pixmap in pixels and byte stream representing
432     texture bitmap itself.
433     This function can be used to read the texture to the byte stream in order to pass it to
434     the AddTexture() function of geomBuilder class.
435     
436     Parameters:
437         fname texture file name
438
439     Returns:
440         sequence of tree values: texture's width, height in pixels and its byte stream
441     
442     Example of usage:
443         from salome.geom import geomBuilder
444         geompy = geomBuilder.New(salome.myStudy)
445         texture = geompy.readtexture('mytexture.dat')
446         texture = geompy.AddTexture(*texture)
447         obj.SetMarkerTexture(texture)
448     """
449     try:
450         f = open(fname)
451         lines = [ l.strip() for l in f.readlines()]
452         f.close()
453         maxlen = 0
454         if lines: maxlen = max([len(x) for x in lines])
455         lenbytes = maxlen/8
456         if maxlen%8: lenbytes += 1
457         bytedata=""
458         for line in lines:
459             if len(line)%8:
460                 lenline = (len(line)/8+1)*8
461                 pass
462             else:
463                 lenline = (len(line)/8)*8
464                 pass
465             for i in range(lenline/8):
466                 byte=""
467                 for j in range(8):
468                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
469                     else: byte += "0"
470                     pass
471                 bytedata += PackData(byte)
472                 pass
473             for i in range(lenline/8, lenbytes):
474                 bytedata += PackData("0")
475             pass
476         return lenbytes*8, len(lines), bytedata
477     except:
478         pass
479     return 0, 0, ""
480
481 ## Returns a long value from enumeration type
482 #  Can be used for CORBA enumerator types like GEOM.shape_type
483 #  @param theItem enumeration type
484 #  @ingroup l1_geomBuilder_auxiliary
485 def EnumToLong(theItem):
486     """
487     Returns a long value from enumeration type
488     Can be used for CORBA enumerator types like geomBuilder.ShapeType
489
490     Parameters:
491         theItem enumeration type
492     """
493     ret = theItem
494     if hasattr(theItem, "_v"): ret = theItem._v
495     return ret
496
497 ## Information about closed/unclosed state of shell or wire
498 #  @ingroup l1_geomBuilder_auxiliary
499 class info:
500     """
501     Information about closed/unclosed state of shell or wire
502     """
503     UNKNOWN  = 0
504     CLOSED   = 1
505     UNCLOSED = 2
506
507 ##! Private class used to bind calls of plugin operations to geomBuilder
508 class PluginOperation:
509   def __init__(self, operation, function):
510     self.operation = operation
511     self.function = function
512     pass
513
514   def __call__(self, *args):
515     res = self.function(self.operation, *args)
516     RaiseIfFailed(self.function.__name__, self.operation)
517     return res
518
519 # Warning: geom is a singleton
520 geom = None
521 engine = None
522 doLcc = False
523 created = False
524
525 class geomBuilder(object, GEOM._objref_GEOM_Gen):
526
527         ## Enumeration ShapeType as a dictionary. \n
528         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
529         #  @ingroup l1_geomBuilder_auxiliary
530         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
531
532         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
533         #  and a list of parameters, describing the shape.
534         #  List of parameters, describing the shape:
535         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
536         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
537         #
538         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
539         #
540         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
541         #
542         #  - SPHERE:       [xc yc zc            R]
543         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
544         #  - BOX:          [xc yc zc                      ax ay az]
545         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
546         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
547         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
548         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
549         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
550         #
551         #  - SPHERE2D:     [xc yc zc            R]
552         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
553         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
554         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
555         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
556         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
557         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
558         #  - PLANE:        [xo yo zo  dx dy dz]
559         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
560         #  - FACE:                                       [nb_edges  nb_vertices]
561         #
562         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
563         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
564         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
565         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
566         #  - LINE:         [xo yo zo  dx dy dz]
567         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
568         #  - EDGE:                                                 [nb_vertices]
569         #
570         #  - VERTEX:       [x  y  z]
571         #  @ingroup l1_geomBuilder_auxiliary
572         kind = GEOM.GEOM_IKindOfShape
573
574         def __new__(cls):
575             global engine
576             global geom
577             global doLcc
578             global created
579             #print "==== __new__ ", engine, geom, doLcc, created
580             if geom is None:
581                 # geom engine is either retrieved from engine, or created
582                 geom = engine
583                 # Following test avoids a recursive loop
584                 if doLcc:
585                     if geom is not None:
586                         # geom engine not created: existing engine found
587                         doLcc = False
588                     if doLcc and not created:
589                         doLcc = False
590                         # FindOrLoadComponent called:
591                         # 1. CORBA resolution of server
592                         # 2. the __new__ method is called again
593                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
594                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
595                         #print "====1 ",geom
596                 else:
597                     # FindOrLoadComponent not called
598                     if geom is None:
599                         # geomBuilder instance is created from lcc.FindOrLoadComponent
600                         #print "==== super ", engine, geom, doLcc, created
601                         geom = super(geomBuilder,cls).__new__(cls)
602                         #print "====2 ",geom
603                     else:
604                         # geom engine not created: existing engine found
605                         #print "==== existing ", engine, geom, doLcc, created
606                         pass
607                 #print "return geom 1 ", geom
608                 return geom
609
610             #print "return geom 2 ", geom
611             return geom
612
613         def __init__(self):
614             global created
615             #print "-------- geomBuilder __init__ --- ", created, self
616             if not created:
617               created = True
618               GEOM._objref_GEOM_Gen.__init__(self)
619               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
620               self.myBuilder = None
621               self.myStudyId = 0
622               self.father    = None
623
624               self.BasicOp  = None
625               self.CurvesOp = None
626               self.PrimOp   = None
627               self.ShapesOp = None
628               self.HealOp   = None
629               self.InsertOp = None
630               self.BoolOp   = None
631               self.TrsfOp   = None
632               self.LocalOp  = None
633               self.MeasuOp  = None
634               self.BlocksOp = None
635               self.GroupOp  = None
636               self.AdvOp    = None
637               self.FieldOp  = None
638             pass
639
640         ## Process object publication in the study, as follows:
641         #  - if @a theName is specified (not None), the object is published in the study
642         #    with this name, not taking into account "auto-publishing" option;
643         #  - if @a theName is NOT specified, the object is published in the study
644         #    (using default name, which can be customized using @a theDefaultName parameter)
645         #    only if auto-publishing is switched on.
646         #
647         #  @param theObj  object, a subject for publishing
648         #  @param theName object name for study
649         #  @param theDefaultName default name for the auto-publishing
650         #
651         #  @sa addToStudyAuto()
652         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
653             # ---
654             def _item_name(_names, _defname, _idx=-1):
655                 if not _names: _names = _defname
656                 if type(_names) in [types.ListType, types.TupleType]:
657                     if _idx >= 0:
658                         if _idx >= len(_names) or not _names[_idx]:
659                             if type(_defname) not in [types.ListType, types.TupleType]:
660                                 _name = "%s_%d"%(_defname, _idx+1)
661                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
662                                 _name = _defname[_idx]
663                             else:
664                                 _name = "%noname_%d"%(dn, _idx+1)
665                             pass
666                         else:
667                             _name = _names[_idx]
668                         pass
669                     else:
670                         # must be wrong  usage
671                         _name = _names[0]
672                     pass
673                 else:
674                     if _idx >= 0:
675                         _name = "%s_%d"%(_names, _idx+1)
676                     else:
677                         _name = _names
678                     pass
679                 return _name
680             # ---
681             def _publish( _name, _obj ):
682                 fatherObj = None
683                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
684                     fatherObj = _obj.GetShape()
685                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
686                     fatherObj = _obj.GetField()
687                 elif not _obj.IsMainShape():
688                     fatherObj = _obj.GetMainShape()
689                     pass
690                 if fatherObj and fatherObj.GetStudyEntry():
691                     self.addToStudyInFather(fatherObj, _obj, _name)
692                 else:
693                     self.addToStudy(_obj, _name)
694                     pass
695                 return
696             # ---
697             if not theObj:
698                 return # null object
699             if not theName and not self.myMaxNbSubShapesAllowed:
700                 return # nothing to do: auto-publishing is disabled
701             if not theName and not theDefaultName:
702                 return # neither theName nor theDefaultName is given
703             import types
704             if type(theObj) in [types.ListType, types.TupleType]:
705                 # list of objects is being published
706                 idx = 0
707                 for obj in theObj:
708                     if not obj: continue # bad object
709                     name = _item_name(theName, theDefaultName, idx)
710                     _publish( name, obj )
711                     idx = idx+1
712                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
713                     pass
714                 pass
715             else:
716                 # single object is published
717                 name = _item_name(theName, theDefaultName)
718                 _publish( name, theObj )
719             pass
720
721         ## @addtogroup l1_geomBuilder_auxiliary
722         ## @{
723         def init_geom(self,theStudy):
724             self.myStudy = theStudy
725             self.myStudyId = self.myStudy._get_StudyId()
726             self.myBuilder = self.myStudy.NewBuilder()
727             self.father = self.myStudy.FindComponent("GEOM")
728             if self.father is None:
729                 self.father = self.myBuilder.NewComponent("GEOM")
730                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
731                 FName = A1._narrow(SALOMEDS.AttributeName)
732                 FName.SetValue("Geometry")
733                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
734                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
735                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
736                 self.myBuilder.DefineComponentInstance(self.father,self)
737                 pass
738             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
739             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
740             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
741             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
742             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
743             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
744             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
745             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
746             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
747             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
748             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
749             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
750             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
751
752             # The below line is a right way to map all plugin functions to geomBuilder,
753             # but AdvancedOperations are already mapped, that is why this line is commented
754             # and presents here only as an axample
755             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
756
757             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
758             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
759
760             # set GEOM as root in the use case tree
761             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
762             self.myUseCaseBuilder.SetRootCurrent()
763             self.myUseCaseBuilder.Append(self.father)
764             pass
765
766         def GetPluginOperations(self, studyID, libraryName):
767             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
768             if op:
769                 # bind methods of operations to self
770                 methods = op.__class__.__dict__['__methods__']
771                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
772                 for meth_name in methods:
773                     if not meth_name in avoid_methods: # avoid basic methods
774                         function = getattr(op.__class__, meth_name)
775                         if callable(function):
776                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
777                             self.__dict__[meth_name] = PluginOperation(op, function)
778             return op
779
780         ## Enable / disable results auto-publishing
781         # 
782         #  The automatic publishing is managed in the following way:
783         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
784         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
785         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
786         #  value passed as parameter has the same effect.
787         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
788         #  maximum number of sub-shapes allowed for publishing is set to specified value.
789         #
790         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
791         #  @ingroup l1_publish_data
792         def addToStudyAuto(self, maxNbSubShapes=-1):
793             """
794             Enable / disable results auto-publishing
795
796             The automatic publishing is managed in the following way:
797             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
798             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
799             maximum number of sub-shapes allowed for publishing is unlimited; any negative
800             value passed as parameter has the same effect.
801             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
802             maximum number of sub-shapes allowed for publishing is set to this value.
803
804             Parameters:
805                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
806
807             Example of usage:
808                 geompy.addToStudyAuto()   # enable auto-publishing
809                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
810                 geompy.addToStudyAuto(0)  # disable auto-publishing
811             """
812             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
813             pass
814
815         ## Dump component to the Python script
816         #  This method overrides IDL function to allow default values for the parameters.
817         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
818             """
819             Dump component to the Python script
820             This method overrides IDL function to allow default values for the parameters.
821             """
822             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
823
824         ## Get name for sub-shape aSubObj of shape aMainObj
825         #
826         # @ref swig_SubShapeName "Example"
827         def SubShapeName(self,aSubObj, aMainObj):
828             """
829             Get name for sub-shape aSubObj of shape aMainObj
830             """
831             # Example: see GEOM_TestAll.py
832
833             #aSubId  = orb.object_to_string(aSubObj)
834             #aMainId = orb.object_to_string(aMainObj)
835             #index = gg.getIndexTopology(aSubId, aMainId)
836             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
837             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
838             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
839             return name
840
841         ## Publish in study aShape with name aName
842         #
843         #  \param aShape the shape to be published
844         #  \param aName  the name for the shape
845         #  \param doRestoreSubShapes if True, finds and publishes also
846         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
847         #         and published sub-shapes of arguments
848         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
849         #                                                  these arguments description
850         #  \return study entry of the published shape in form of string
851         #
852         #  @ingroup l1_publish_data
853         #  @ref swig_all_addtostudy "Example"
854         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
855                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
856             """
857             Publish in study aShape with name aName
858
859             Parameters:
860                 aShape the shape to be published
861                 aName  the name for the shape
862                 doRestoreSubShapes if True, finds and publishes also
863                                    sub-shapes of aShape, corresponding to its arguments
864                                    and published sub-shapes of arguments
865                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
866                                                          these arguments description
867
868             Returns:
869                 study entry of the published shape in form of string
870
871             Example of usage:
872                 id_block1 = geompy.addToStudy(Block1, "Block 1")
873             """
874             # Example: see GEOM_TestAll.py
875             try:
876                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
877                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
878                 if doRestoreSubShapes:
879                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
880                                             theFindMethod, theInheritFirstArg, True )
881             except:
882                 print "addToStudy() failed"
883                 return ""
884             return aShape.GetStudyEntry()
885
886         ## Publish in study aShape with name aName as sub-object of previously published aFather
887         #  \param aFather previously published object
888         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
889         #  \param aName  the name for the shape
890         #
891         #  \return study entry of the published shape in form of string
892         #
893         #  @ingroup l1_publish_data
894         #  @ref swig_all_addtostudyInFather "Example"
895         def addToStudyInFather(self, aFather, aShape, aName):
896             """
897             Publish in study aShape with name aName as sub-object of previously published aFather
898
899             Parameters:
900                 aFather previously published object
901                 aShape the shape to be published as sub-object of aFather
902                 aName  the name for the shape
903
904             Returns:
905                 study entry of the published shape in form of string
906             """
907             # Example: see GEOM_TestAll.py
908             try:
909                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
910                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
911             except:
912                 print "addToStudyInFather() failed"
913                 return ""
914             return aShape.GetStudyEntry()
915
916         ## Unpublish object in study
917         #
918         #  \param obj the object to be unpublished
919         def hideInStudy(self, obj):
920             """
921             Unpublish object in study
922
923             Parameters:
924                 obj the object to be unpublished
925             """
926             ior = salome.orb.object_to_string(obj)
927             aSObject = self.myStudy.FindObjectIOR(ior)
928             if aSObject is not None:
929                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
930                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
931                 drwAttribute.SetDrawable(False)
932                 pass
933
934         # end of l1_geomBuilder_auxiliary
935         ## @}
936
937         ## @addtogroup l3_restore_ss
938         ## @{
939
940         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
941         #  To be used from python scripts out of addToStudy() (non-default usage)
942         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
943         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
944         #                   If this list is empty, all operation arguments will be published
945         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
946         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
947         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
948         #                            Do not publish sub-shapes in place of arguments, but only
949         #                            in place of sub-shapes of the first argument,
950         #                            because the whole shape corresponds to the first argument.
951         #                            Mainly to be used after transformations, but it also can be
952         #                            usefull after partition with one object shape, and some other
953         #                            operations, where only the first argument has to be considered.
954         #                            If theObject has only one argument shape, this flag is automatically
955         #                            considered as True, not regarding really passed value.
956         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
957         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
958         #  \return list of published sub-shapes
959         #
960         #  @ref tui_restore_prs_params "Example"
961         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
962                               theInheritFirstArg=False, theAddPrefix=True):
963             """
964             Publish sub-shapes, standing for arguments and sub-shapes of arguments
965             To be used from python scripts out of geompy.addToStudy (non-default usage)
966
967             Parameters:
968                 theObject published GEOM.GEOM_Object, arguments of which will be published
969                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
970                           If this list is empty, all operation arguments will be published
971                 theFindMethod method to search sub-shapes, corresponding to arguments and
972                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
973                 theInheritFirstArg set properties of the first argument for theObject.
974                                    Do not publish sub-shapes in place of arguments, but only
975                                    in place of sub-shapes of the first argument,
976                                    because the whole shape corresponds to the first argument.
977                                    Mainly to be used after transformations, but it also can be
978                                    usefull after partition with one object shape, and some other
979                                    operations, where only the first argument has to be considered.
980                                    If theObject has only one argument shape, this flag is automatically
981                                    considered as True, not regarding really passed value.
982                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
983                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
984             Returns:
985                 list of published sub-shapes
986             """
987             # Example: see GEOM_TestAll.py
988             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
989                                           theFindMethod, theInheritFirstArg, theAddPrefix)
990
991         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
992         #  To be used from python scripts out of addToStudy() (non-default usage)
993         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
994         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
995         #                   If this list is empty, all operation arguments will be published
996         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
997         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
998         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
999         #                            Do not publish sub-shapes in place of arguments, but only
1000         #                            in place of sub-shapes of the first argument,
1001         #                            because the whole shape corresponds to the first argument.
1002         #                            Mainly to be used after transformations, but it also can be
1003         #                            usefull after partition with one object shape, and some other
1004         #                            operations, where only the first argument has to be considered.
1005         #                            If theObject has only one argument shape, this flag is automatically
1006         #                            considered as True, not regarding really passed value.
1007         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1008         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1009         #  \return list of published sub-shapes
1010         #
1011         #  @ref tui_restore_prs_params "Example"
1012         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1013                                    theInheritFirstArg=False, theAddPrefix=True):
1014             """
1015             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1016             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1017
1018             Parameters:
1019                 theObject published GEOM.GEOM_Object, arguments of which will be published
1020                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1021                           If this list is empty, all operation arguments will be published
1022                 theFindMethod method to search sub-shapes, corresponding to arguments and
1023                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1024                 theInheritFirstArg set properties of the first argument for theObject.
1025                                    Do not publish sub-shapes in place of arguments, but only
1026                                    in place of sub-shapes of the first argument,
1027                                    because the whole shape corresponds to the first argument.
1028                                    Mainly to be used after transformations, but it also can be
1029                                    usefull after partition with one object shape, and some other
1030                                    operations, where only the first argument has to be considered.
1031                                    If theObject has only one argument shape, this flag is automatically
1032                                    considered as True, not regarding really passed value.
1033                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1034                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1035
1036             Returns: 
1037                 list of published sub-shapes
1038             """
1039             # Example: see GEOM_TestAll.py
1040             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1041                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1042
1043         # end of l3_restore_ss
1044         ## @}
1045
1046         ## @addtogroup l3_basic_go
1047         ## @{
1048
1049         ## Create point by three coordinates.
1050         #  @param theX The X coordinate of the point.
1051         #  @param theY The Y coordinate of the point.
1052         #  @param theZ The Z coordinate of the point.
1053         #  @param theName Object name; when specified, this parameter is used
1054         #         for result publication in the study. Otherwise, if automatic
1055         #         publication is switched on, default value is used for result name.
1056         #
1057         #  @return New GEOM.GEOM_Object, containing the created point.
1058         #
1059         #  @ref tui_creation_point "Example"
1060         def MakeVertex(self, theX, theY, theZ, theName=None):
1061             """
1062             Create point by three coordinates.
1063
1064             Parameters:
1065                 theX The X coordinate of the point.
1066                 theY The Y coordinate of the point.
1067                 theZ The Z coordinate of the point.
1068                 theName Object name; when specified, this parameter is used
1069                         for result publication in the study. Otherwise, if automatic
1070                         publication is switched on, default value is used for result name.
1071                 
1072             Returns: 
1073                 New GEOM.GEOM_Object, containing the created point.
1074             """
1075             # Example: see GEOM_TestAll.py
1076             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1077             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1078             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1079             anObj.SetParameters(Parameters)
1080             self._autoPublish(anObj, theName, "vertex")
1081             return anObj
1082
1083         ## Create a point, distant from the referenced point
1084         #  on the given distances along the coordinate axes.
1085         #  @param theReference The referenced point.
1086         #  @param theX Displacement from the referenced point along OX axis.
1087         #  @param theY Displacement from the referenced point along OY axis.
1088         #  @param theZ Displacement from the referenced point along OZ axis.
1089         #  @param theName Object name; when specified, this parameter is used
1090         #         for result publication in the study. Otherwise, if automatic
1091         #         publication is switched on, default value is used for result name.
1092         #
1093         #  @return New GEOM.GEOM_Object, containing the created point.
1094         #
1095         #  @ref tui_creation_point "Example"
1096         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1097             """
1098             Create a point, distant from the referenced point
1099             on the given distances along the coordinate axes.
1100
1101             Parameters:
1102                 theReference The referenced point.
1103                 theX Displacement from the referenced point along OX axis.
1104                 theY Displacement from the referenced point along OY axis.
1105                 theZ Displacement from the referenced point along OZ axis.
1106                 theName Object name; when specified, this parameter is used
1107                         for result publication in the study. Otherwise, if automatic
1108                         publication is switched on, default value is used for result name.
1109
1110             Returns:
1111                 New GEOM.GEOM_Object, containing the created point.
1112             """
1113             # Example: see GEOM_TestAll.py
1114             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1115             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1116             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1117             anObj.SetParameters(Parameters)
1118             self._autoPublish(anObj, theName, "vertex")
1119             return anObj
1120
1121         ## Create a point, corresponding to the given parameter on the given curve.
1122         #  @param theRefCurve The referenced curve.
1123         #  @param theParameter Value of parameter on the referenced curve.
1124         #  @param theName Object name; when specified, this parameter is used
1125         #         for result publication in the study. Otherwise, if automatic
1126         #         publication is switched on, default value is used for result name.
1127         #
1128         #  @return New GEOM.GEOM_Object, containing the created point.
1129         #
1130         #  @ref tui_creation_point "Example"
1131         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1132             """
1133             Create a point, corresponding to the given parameter on the given curve.
1134
1135             Parameters:
1136                 theRefCurve The referenced curve.
1137                 theParameter Value of parameter on the referenced curve.
1138                 theName Object name; when specified, this parameter is used
1139                         for result publication in the study. Otherwise, if automatic
1140                         publication is switched on, default value is used for result name.
1141
1142             Returns:
1143                 New GEOM.GEOM_Object, containing the created point.
1144
1145             Example of usage:
1146                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1147             """
1148             # Example: see GEOM_TestAll.py
1149             theParameter, Parameters = ParseParameters(theParameter)
1150             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1151             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1152             anObj.SetParameters(Parameters)
1153             self._autoPublish(anObj, theName, "vertex")
1154             return anObj
1155
1156         ## Create a point by projection give coordinates on the given curve
1157         #  @param theRefCurve The referenced curve.
1158         #  @param theX X-coordinate in 3D space
1159         #  @param theY Y-coordinate in 3D space
1160         #  @param theZ Z-coordinate in 3D space
1161         #  @param theName Object name; when specified, this parameter is used
1162         #         for result publication in the study. Otherwise, if automatic
1163         #         publication is switched on, default value is used for result name.
1164         #
1165         #  @return New GEOM.GEOM_Object, containing the created point.
1166         #
1167         #  @ref tui_creation_point "Example"
1168         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1169             """
1170             Create a point by projection give coordinates on the given curve
1171             
1172             Parameters:
1173                 theRefCurve The referenced curve.
1174                 theX X-coordinate in 3D space
1175                 theY Y-coordinate in 3D space
1176                 theZ Z-coordinate in 3D space
1177                 theName Object name; when specified, this parameter is used
1178                         for result publication in the study. Otherwise, if automatic
1179                         publication is switched on, default value is used for result name.
1180
1181             Returns:
1182                 New GEOM.GEOM_Object, containing the created point.
1183
1184             Example of usage:
1185                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1186             """
1187             # Example: see GEOM_TestAll.py
1188             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1189             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1190             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1191             anObj.SetParameters(Parameters)
1192             self._autoPublish(anObj, theName, "vertex")
1193             return anObj
1194
1195         ## Create a point, corresponding to the given length on the given curve.
1196         #  @param theRefCurve The referenced curve.
1197         #  @param theLength Length on the referenced curve. It can be negative.
1198         #  @param theStartPoint Point allowing to choose the direction for the calculation
1199         #                       of the length. If None, start from the first point of theRefCurve.
1200         #  @param theName Object name; when specified, this parameter is used
1201         #         for result publication in the study. Otherwise, if automatic
1202         #         publication is switched on, default value is used for result name.
1203         #
1204         #  @return New GEOM.GEOM_Object, containing the created point.
1205         #
1206         #  @ref tui_creation_point "Example"
1207         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1208             """
1209             Create a point, corresponding to the given length on the given curve.
1210
1211             Parameters:
1212                 theRefCurve The referenced curve.
1213                 theLength Length on the referenced curve. It can be negative.
1214                 theStartPoint Point allowing to choose the direction for the calculation
1215                               of the length. If None, start from the first point of theRefCurve.
1216                 theName Object name; when specified, this parameter is used
1217                         for result publication in the study. Otherwise, if automatic
1218                         publication is switched on, default value is used for result name.
1219
1220             Returns:
1221                 New GEOM.GEOM_Object, containing the created point.
1222             """
1223             # Example: see GEOM_TestAll.py
1224             theLength, Parameters = ParseParameters(theLength)
1225             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1226             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1227             anObj.SetParameters(Parameters)
1228             self._autoPublish(anObj, theName, "vertex")
1229             return anObj
1230
1231         ## Create a point, corresponding to the given parameters on the
1232         #    given surface.
1233         #  @param theRefSurf The referenced surface.
1234         #  @param theUParameter Value of U-parameter on the referenced surface.
1235         #  @param theVParameter Value of V-parameter on the referenced surface.
1236         #  @param theName Object name; when specified, this parameter is used
1237         #         for result publication in the study. Otherwise, if automatic
1238         #         publication is switched on, default value is used for result name.
1239         #
1240         #  @return New GEOM.GEOM_Object, containing the created point.
1241         #
1242         #  @ref swig_MakeVertexOnSurface "Example"
1243         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1244             """
1245             Create a point, corresponding to the given parameters on the
1246             given surface.
1247
1248             Parameters:
1249                 theRefSurf The referenced surface.
1250                 theUParameter Value of U-parameter on the referenced surface.
1251                 theVParameter Value of V-parameter on the referenced surface.
1252                 theName Object name; when specified, this parameter is used
1253                         for result publication in the study. Otherwise, if automatic
1254                         publication is switched on, default value is used for result name.
1255
1256             Returns:
1257                 New GEOM.GEOM_Object, containing the created point.
1258
1259             Example of usage:
1260                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1261             """
1262             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1263             # Example: see GEOM_TestAll.py
1264             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1265             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1266             anObj.SetParameters(Parameters);
1267             self._autoPublish(anObj, theName, "vertex")
1268             return anObj
1269
1270         ## Create a point by projection give coordinates on the given surface
1271         #  @param theRefSurf The referenced surface.
1272         #  @param theX X-coordinate in 3D space
1273         #  @param theY Y-coordinate in 3D space
1274         #  @param theZ Z-coordinate in 3D space
1275         #  @param theName Object name; when specified, this parameter is used
1276         #         for result publication in the study. Otherwise, if automatic
1277         #         publication is switched on, default value is used for result name.
1278         #
1279         #  @return New GEOM.GEOM_Object, containing the created point.
1280         #
1281         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1282         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1283             """
1284             Create a point by projection give coordinates on the given surface
1285
1286             Parameters:
1287                 theRefSurf The referenced surface.
1288                 theX X-coordinate in 3D space
1289                 theY Y-coordinate in 3D space
1290                 theZ Z-coordinate in 3D space
1291                 theName Object name; when specified, this parameter is used
1292                         for result publication in the study. Otherwise, if automatic
1293                         publication is switched on, default value is used for result name.
1294
1295             Returns:
1296                 New GEOM.GEOM_Object, containing the created point.
1297
1298             Example of usage:
1299                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1300             """
1301             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1302             # Example: see GEOM_TestAll.py
1303             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1304             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1305             anObj.SetParameters(Parameters);
1306             self._autoPublish(anObj, theName, "vertex")
1307             return anObj
1308
1309         ## Create a point, which lays on the given face.
1310         #  The point will lay in arbitrary place of the face.
1311         #  The only condition on it is a non-zero distance to the face boundary.
1312         #  Such point can be used to uniquely identify the face inside any
1313         #  shape in case, when the shape does not contain overlapped faces.
1314         #  @param theFace The referenced face.
1315         #  @param theName Object name; when specified, this parameter is used
1316         #         for result publication in the study. Otherwise, if automatic
1317         #         publication is switched on, default value is used for result name.
1318         #
1319         #  @return New GEOM.GEOM_Object, containing the created point.
1320         #
1321         #  @ref swig_MakeVertexInsideFace "Example"
1322         def MakeVertexInsideFace (self, theFace, theName=None):
1323             """
1324             Create a point, which lays on the given face.
1325             The point will lay in arbitrary place of the face.
1326             The only condition on it is a non-zero distance to the face boundary.
1327             Such point can be used to uniquely identify the face inside any
1328             shape in case, when the shape does not contain overlapped faces.
1329
1330             Parameters:
1331                 theFace The referenced face.
1332                 theName Object name; when specified, this parameter is used
1333                         for result publication in the study. Otherwise, if automatic
1334                         publication is switched on, default value is used for result name.
1335
1336             Returns:
1337                 New GEOM.GEOM_Object, containing the created point.
1338
1339             Example of usage:
1340                 p_on_face = geompy.MakeVertexInsideFace(Face)
1341             """
1342             # Example: see GEOM_TestAll.py
1343             anObj = self.BasicOp.MakePointOnFace(theFace)
1344             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1345             self._autoPublish(anObj, theName, "vertex")
1346             return anObj
1347
1348         ## Create a point on intersection of two lines.
1349         #  @param theRefLine1, theRefLine2 The referenced lines.
1350         #  @param theName Object name; when specified, this parameter is used
1351         #         for result publication in the study. Otherwise, if automatic
1352         #         publication is switched on, default value is used for result name.
1353         #
1354         #  @return New GEOM.GEOM_Object, containing the created point.
1355         #
1356         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1357         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1358             """
1359             Create a point on intersection of two lines.
1360
1361             Parameters:
1362                 theRefLine1, theRefLine2 The referenced lines.
1363                 theName Object name; when specified, this parameter is used
1364                         for result publication in the study. Otherwise, if automatic
1365                         publication is switched on, default value is used for result name.
1366
1367             Returns:
1368                 New GEOM.GEOM_Object, containing the created point.
1369             """
1370             # Example: see GEOM_TestAll.py
1371             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1372             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1373             self._autoPublish(anObj, theName, "vertex")
1374             return anObj
1375
1376         ## Create a tangent, corresponding to the given parameter on the given curve.
1377         #  @param theRefCurve The referenced curve.
1378         #  @param theParameter Value of parameter on the referenced curve.
1379         #  @param theName Object name; when specified, this parameter is used
1380         #         for result publication in the study. Otherwise, if automatic
1381         #         publication is switched on, default value is used for result name.
1382         #
1383         #  @return New GEOM.GEOM_Object, containing the created tangent.
1384         #
1385         #  @ref swig_MakeTangentOnCurve "Example"
1386         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1387             """
1388             Create a tangent, corresponding to the given parameter on the given curve.
1389
1390             Parameters:
1391                 theRefCurve The referenced curve.
1392                 theParameter Value of parameter on the referenced curve.
1393                 theName Object name; when specified, this parameter is used
1394                         for result publication in the study. Otherwise, if automatic
1395                         publication is switched on, default value is used for result name.
1396
1397             Returns:
1398                 New GEOM.GEOM_Object, containing the created tangent.
1399
1400             Example of usage:
1401                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1402             """
1403             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1404             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1405             self._autoPublish(anObj, theName, "tangent")
1406             return anObj
1407
1408         ## Create a tangent plane, corresponding to the given parameter on the given face.
1409         #  @param theFace The face for which tangent plane should be built.
1410         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1411         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1412         #  @param theTrimSize the size of plane.
1413         #  @param theName Object name; when specified, this parameter is used
1414         #         for result publication in the study. Otherwise, if automatic
1415         #         publication is switched on, default value is used for result name.
1416         #
1417         #  @return New GEOM.GEOM_Object, containing the created tangent.
1418         #
1419         #  @ref swig_MakeTangentPlaneOnFace "Example"
1420         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1421             """
1422             Create a tangent plane, corresponding to the given parameter on the given face.
1423
1424             Parameters:
1425                 theFace The face for which tangent plane should be built.
1426                 theParameterV vertical value of the center point (0.0 - 1.0).
1427                 theParameterU horisontal value of the center point (0.0 - 1.0).
1428                 theTrimSize the size of plane.
1429                 theName Object name; when specified, this parameter is used
1430                         for result publication in the study. Otherwise, if automatic
1431                         publication is switched on, default value is used for result name.
1432
1433            Returns: 
1434                 New GEOM.GEOM_Object, containing the created tangent.
1435
1436            Example of usage:
1437                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1438             """
1439             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1440             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1441             self._autoPublish(anObj, theName, "tangent")
1442             return anObj
1443
1444         ## Create a vector with the given components.
1445         #  @param theDX X component of the vector.
1446         #  @param theDY Y component of the vector.
1447         #  @param theDZ Z component of the vector.
1448         #  @param theName Object name; when specified, this parameter is used
1449         #         for result publication in the study. Otherwise, if automatic
1450         #         publication is switched on, default value is used for result name.
1451         #
1452         #  @return New GEOM.GEOM_Object, containing the created vector.
1453         #
1454         #  @ref tui_creation_vector "Example"
1455         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1456             """
1457             Create a vector with the given components.
1458
1459             Parameters:
1460                 theDX X component of the vector.
1461                 theDY Y component of the vector.
1462                 theDZ Z component of the vector.
1463                 theName Object name; when specified, this parameter is used
1464                         for result publication in the study. Otherwise, if automatic
1465                         publication is switched on, default value is used for result name.
1466
1467             Returns:     
1468                 New GEOM.GEOM_Object, containing the created vector.
1469             """
1470             # Example: see GEOM_TestAll.py
1471             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1472             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1473             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1474             anObj.SetParameters(Parameters)
1475             self._autoPublish(anObj, theName, "vector")
1476             return anObj
1477
1478         ## Create a vector between two points.
1479         #  @param thePnt1 Start point for the vector.
1480         #  @param thePnt2 End point for the vector.
1481         #  @param theName Object name; when specified, this parameter is used
1482         #         for result publication in the study. Otherwise, if automatic
1483         #         publication is switched on, default value is used for result name.
1484         #
1485         #  @return New GEOM.GEOM_Object, containing the created vector.
1486         #
1487         #  @ref tui_creation_vector "Example"
1488         def MakeVector(self, thePnt1, thePnt2, theName=None):
1489             """
1490             Create a vector between two points.
1491
1492             Parameters:
1493                 thePnt1 Start point for the vector.
1494                 thePnt2 End point for the vector.
1495                 theName Object name; when specified, this parameter is used
1496                         for result publication in the study. Otherwise, if automatic
1497                         publication is switched on, default value is used for result name.
1498
1499             Returns:        
1500                 New GEOM.GEOM_Object, containing the created vector.
1501             """
1502             # Example: see GEOM_TestAll.py
1503             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1504             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1505             self._autoPublish(anObj, theName, "vector")
1506             return anObj
1507
1508         ## Create a line, passing through the given point
1509         #  and parrallel to the given direction
1510         #  @param thePnt Point. The resulting line will pass through it.
1511         #  @param theDir Direction. The resulting line will be parallel to it.
1512         #  @param theName Object name; when specified, this parameter is used
1513         #         for result publication in the study. Otherwise, if automatic
1514         #         publication is switched on, default value is used for result name.
1515         #
1516         #  @return New GEOM.GEOM_Object, containing the created line.
1517         #
1518         #  @ref tui_creation_line "Example"
1519         def MakeLine(self, thePnt, theDir, theName=None):
1520             """
1521             Create a line, passing through the given point
1522             and parrallel to the given direction
1523
1524             Parameters:
1525                 thePnt Point. The resulting line will pass through it.
1526                 theDir Direction. The resulting line will be parallel to it.
1527                 theName Object name; when specified, this parameter is used
1528                         for result publication in the study. Otherwise, if automatic
1529                         publication is switched on, default value is used for result name.
1530
1531             Returns:
1532                 New GEOM.GEOM_Object, containing the created line.
1533             """
1534             # Example: see GEOM_TestAll.py
1535             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1536             RaiseIfFailed("MakeLine", self.BasicOp)
1537             self._autoPublish(anObj, theName, "line")
1538             return anObj
1539
1540         ## Create a line, passing through the given points
1541         #  @param thePnt1 First of two points, defining the line.
1542         #  @param thePnt2 Second of two points, defining the line.
1543         #  @param theName Object name; when specified, this parameter is used
1544         #         for result publication in the study. Otherwise, if automatic
1545         #         publication is switched on, default value is used for result name.
1546         #
1547         #  @return New GEOM.GEOM_Object, containing the created line.
1548         #
1549         #  @ref tui_creation_line "Example"
1550         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1551             """
1552             Create a line, passing through the given points
1553
1554             Parameters:
1555                 thePnt1 First of two points, defining the line.
1556                 thePnt2 Second of two points, defining the line.
1557                 theName Object name; when specified, this parameter is used
1558                         for result publication in the study. Otherwise, if automatic
1559                         publication is switched on, default value is used for result name.
1560
1561             Returns:
1562                 New GEOM.GEOM_Object, containing the created line.
1563             """
1564             # Example: see GEOM_TestAll.py
1565             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1566             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1567             self._autoPublish(anObj, theName, "line")
1568             return anObj
1569
1570         ## Create a line on two faces intersection.
1571         #  @param theFace1 First of two faces, defining the line.
1572         #  @param theFace2 Second of two faces, defining the line.
1573         #  @param theName Object name; when specified, this parameter is used
1574         #         for result publication in the study. Otherwise, if automatic
1575         #         publication is switched on, default value is used for result name.
1576         #
1577         #  @return New GEOM.GEOM_Object, containing the created line.
1578         #
1579         #  @ref swig_MakeLineTwoFaces "Example"
1580         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1581             """
1582             Create a line on two faces intersection.
1583
1584             Parameters:
1585                 theFace1 First of two faces, defining the line.
1586                 theFace2 Second of two faces, defining the line.
1587                 theName Object name; when specified, this parameter is used
1588                         for result publication in the study. Otherwise, if automatic
1589                         publication is switched on, default value is used for result name.
1590
1591             Returns:
1592                 New GEOM.GEOM_Object, containing the created line.
1593             """
1594             # Example: see GEOM_TestAll.py
1595             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1596             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1597             self._autoPublish(anObj, theName, "line")
1598             return anObj
1599
1600         ## Create a plane, passing through the given point
1601         #  and normal to the given vector.
1602         #  @param thePnt Point, the plane has to pass through.
1603         #  @param theVec Vector, defining the plane normal direction.
1604         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1605         #  @param theName Object name; when specified, this parameter is used
1606         #         for result publication in the study. Otherwise, if automatic
1607         #         publication is switched on, default value is used for result name.
1608         #
1609         #  @return New GEOM.GEOM_Object, containing the created plane.
1610         #
1611         #  @ref tui_creation_plane "Example"
1612         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1613             """
1614             Create a plane, passing through the given point
1615             and normal to the given vector.
1616
1617             Parameters:
1618                 thePnt Point, the plane has to pass through.
1619                 theVec Vector, defining the plane normal direction.
1620                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1621                 theName Object name; when specified, this parameter is used
1622                         for result publication in the study. Otherwise, if automatic
1623                         publication is switched on, default value is used for result name.
1624
1625             Returns:    
1626                 New GEOM.GEOM_Object, containing the created plane.
1627             """
1628             # Example: see GEOM_TestAll.py
1629             theTrimSize, Parameters = ParseParameters(theTrimSize);
1630             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1631             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1632             anObj.SetParameters(Parameters)
1633             self._autoPublish(anObj, theName, "plane")
1634             return anObj
1635
1636         ## Create a plane, passing through the three given points
1637         #  @param thePnt1 First of three points, defining the plane.
1638         #  @param thePnt2 Second of three points, defining the plane.
1639         #  @param thePnt3 Fird of three points, defining the plane.
1640         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1641         #  @param theName Object name; when specified, this parameter is used
1642         #         for result publication in the study. Otherwise, if automatic
1643         #         publication is switched on, default value is used for result name.
1644         #
1645         #  @return New GEOM.GEOM_Object, containing the created plane.
1646         #
1647         #  @ref tui_creation_plane "Example"
1648         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1649             """
1650             Create a plane, passing through the three given points
1651
1652             Parameters:
1653                 thePnt1 First of three points, defining the plane.
1654                 thePnt2 Second of three points, defining the plane.
1655                 thePnt3 Fird of three points, defining the plane.
1656                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1657                 theName Object name; when specified, this parameter is used
1658                         for result publication in the study. Otherwise, if automatic
1659                         publication is switched on, default value is used for result name.
1660
1661             Returns:
1662                 New GEOM.GEOM_Object, containing the created plane.
1663             """
1664             # Example: see GEOM_TestAll.py
1665             theTrimSize, Parameters = ParseParameters(theTrimSize);
1666             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1667             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1668             anObj.SetParameters(Parameters)
1669             self._autoPublish(anObj, theName, "plane")
1670             return anObj
1671
1672         ## Create a plane, similar to the existing one, but with another size of representing face.
1673         #  @param theFace Referenced plane or LCS(Marker).
1674         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1675         #  @param theName Object name; when specified, this parameter is used
1676         #         for result publication in the study. Otherwise, if automatic
1677         #         publication is switched on, default value is used for result name.
1678         #
1679         #  @return New GEOM.GEOM_Object, containing the created plane.
1680         #
1681         #  @ref tui_creation_plane "Example"
1682         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1683             """
1684             Create a plane, similar to the existing one, but with another size of representing face.
1685
1686             Parameters:
1687                 theFace Referenced plane or LCS(Marker).
1688                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1689                 theName Object name; when specified, this parameter is used
1690                         for result publication in the study. Otherwise, if automatic
1691                         publication is switched on, default value is used for result name.
1692
1693             Returns:
1694                 New GEOM.GEOM_Object, containing the created plane.
1695             """
1696             # Example: see GEOM_TestAll.py
1697             theTrimSize, Parameters = ParseParameters(theTrimSize);
1698             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1699             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1700             anObj.SetParameters(Parameters)
1701             self._autoPublish(anObj, theName, "plane")
1702             return anObj
1703
1704         ## Create a plane, passing through the 2 vectors
1705         #  with center in a start point of the first vector.
1706         #  @param theVec1 Vector, defining center point and plane direction.
1707         #  @param theVec2 Vector, defining the plane normal direction.
1708         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1709         #  @param theName Object name; when specified, this parameter is used
1710         #         for result publication in the study. Otherwise, if automatic
1711         #         publication is switched on, default value is used for result name.
1712         #
1713         #  @return New GEOM.GEOM_Object, containing the created plane.
1714         #
1715         #  @ref tui_creation_plane "Example"
1716         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1717             """
1718             Create a plane, passing through the 2 vectors
1719             with center in a start point of the first vector.
1720
1721             Parameters:
1722                 theVec1 Vector, defining center point and plane direction.
1723                 theVec2 Vector, defining the plane normal direction.
1724                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1725                 theName Object name; when specified, this parameter is used
1726                         for result publication in the study. Otherwise, if automatic
1727                         publication is switched on, default value is used for result name.
1728
1729             Returns: 
1730                 New GEOM.GEOM_Object, containing the created plane.
1731             """
1732             # Example: see GEOM_TestAll.py
1733             theTrimSize, Parameters = ParseParameters(theTrimSize);
1734             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1735             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1736             anObj.SetParameters(Parameters)
1737             self._autoPublish(anObj, theName, "plane")
1738             return anObj
1739
1740         ## Create a plane, based on a Local coordinate system.
1741         #  @param theLCS  coordinate system, defining plane.
1742         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1743         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1744         #  @param theName Object name; when specified, this parameter is used
1745         #         for result publication in the study. Otherwise, if automatic
1746         #         publication is switched on, default value is used for result name.
1747         #
1748         #  @return New GEOM.GEOM_Object, containing the created plane.
1749         #
1750         #  @ref tui_creation_plane "Example"
1751         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1752             """
1753             Create a plane, based on a Local coordinate system.
1754
1755            Parameters: 
1756                 theLCS  coordinate system, defining plane.
1757                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1758                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1759                 theName Object name; when specified, this parameter is used
1760                         for result publication in the study. Otherwise, if automatic
1761                         publication is switched on, default value is used for result name.
1762
1763             Returns: 
1764                 New GEOM.GEOM_Object, containing the created plane.
1765             """
1766             # Example: see GEOM_TestAll.py
1767             theTrimSize, Parameters = ParseParameters(theTrimSize);
1768             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1769             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1770             anObj.SetParameters(Parameters)
1771             self._autoPublish(anObj, theName, "plane")
1772             return anObj
1773
1774         ## Create a local coordinate system.
1775         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1776         #  @param XDX,XDY,XDZ Three components of OX direction
1777         #  @param YDX,YDY,YDZ Three components of OY direction
1778         #  @param theName Object name; when specified, this parameter is used
1779         #         for result publication in the study. Otherwise, if automatic
1780         #         publication is switched on, default value is used for result name.
1781         #
1782         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1783         #
1784         #  @ref swig_MakeMarker "Example"
1785         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1786             """
1787             Create a local coordinate system.
1788
1789             Parameters: 
1790                 OX,OY,OZ Three coordinates of coordinate system origin.
1791                 XDX,XDY,XDZ Three components of OX direction
1792                 YDX,YDY,YDZ Three components of OY direction
1793                 theName Object name; when specified, this parameter is used
1794                         for result publication in the study. Otherwise, if automatic
1795                         publication is switched on, default value is used for result name.
1796
1797             Returns: 
1798                 New GEOM.GEOM_Object, containing the created coordinate system.
1799             """
1800             # Example: see GEOM_TestAll.py
1801             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1802             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1803             RaiseIfFailed("MakeMarker", self.BasicOp)
1804             anObj.SetParameters(Parameters)
1805             self._autoPublish(anObj, theName, "lcs")
1806             return anObj
1807
1808         ## Create a local coordinate system from shape.
1809         #  @param theShape The initial shape to detect the coordinate system.
1810         #  @param theName Object name; when specified, this parameter is used
1811         #         for result publication in the study. Otherwise, if automatic
1812         #         publication is switched on, default value is used for result name.
1813         #
1814         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1815         #
1816         #  @ref tui_creation_lcs "Example"
1817         def MakeMarkerFromShape(self, theShape, theName=None):
1818             """
1819             Create a local coordinate system from shape.
1820
1821             Parameters:
1822                 theShape The initial shape to detect the coordinate system.
1823                 theName Object name; when specified, this parameter is used
1824                         for result publication in the study. Otherwise, if automatic
1825                         publication is switched on, default value is used for result name.
1826                 
1827             Returns: 
1828                 New GEOM.GEOM_Object, containing the created coordinate system.
1829             """
1830             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1831             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1832             self._autoPublish(anObj, theName, "lcs")
1833             return anObj
1834
1835         ## Create a local coordinate system from point and two vectors.
1836         #  @param theOrigin Point of coordinate system origin.
1837         #  @param theXVec Vector of X direction
1838         #  @param theYVec Vector of Y direction
1839         #  @param theName Object name; when specified, this parameter is used
1840         #         for result publication in the study. Otherwise, if automatic
1841         #         publication is switched on, default value is used for result name.
1842         #
1843         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1844         #
1845         #  @ref tui_creation_lcs "Example"
1846         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1847             """
1848             Create a local coordinate system from point and two vectors.
1849
1850             Parameters:
1851                 theOrigin Point of coordinate system origin.
1852                 theXVec Vector of X direction
1853                 theYVec Vector of Y direction
1854                 theName Object name; when specified, this parameter is used
1855                         for result publication in the study. Otherwise, if automatic
1856                         publication is switched on, default value is used for result name.
1857
1858             Returns: 
1859                 New GEOM.GEOM_Object, containing the created coordinate system.
1860
1861             """
1862             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1863             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1864             self._autoPublish(anObj, theName, "lcs")
1865             return anObj
1866
1867         # end of l3_basic_go
1868         ## @}
1869
1870         ## @addtogroup l4_curves
1871         ## @{
1872
1873         ##  Create an arc of circle, passing through three given points.
1874         #  @param thePnt1 Start point of the arc.
1875         #  @param thePnt2 Middle point of the arc.
1876         #  @param thePnt3 End point of the arc.
1877         #  @param theName Object name; when specified, this parameter is used
1878         #         for result publication in the study. Otherwise, if automatic
1879         #         publication is switched on, default value is used for result name.
1880         #
1881         #  @return New GEOM.GEOM_Object, containing the created arc.
1882         #
1883         #  @ref swig_MakeArc "Example"
1884         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1885             """
1886             Create an arc of circle, passing through three given points.
1887
1888             Parameters:
1889                 thePnt1 Start point of the arc.
1890                 thePnt2 Middle point of the arc.
1891                 thePnt3 End point of the arc.
1892                 theName Object name; when specified, this parameter is used
1893                         for result publication in the study. Otherwise, if automatic
1894                         publication is switched on, default value is used for result name.
1895
1896             Returns: 
1897                 New GEOM.GEOM_Object, containing the created arc.
1898             """
1899             # Example: see GEOM_TestAll.py
1900             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1901             RaiseIfFailed("MakeArc", self.CurvesOp)
1902             self._autoPublish(anObj, theName, "arc")
1903             return anObj
1904
1905         ##  Create an arc of circle from a center and 2 points.
1906         #  @param thePnt1 Center of the arc
1907         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1908         #  @param thePnt3 End point of the arc (Gives also a direction)
1909         #  @param theSense Orientation of the arc
1910         #  @param theName Object name; when specified, this parameter is used
1911         #         for result publication in the study. Otherwise, if automatic
1912         #         publication is switched on, default value is used for result name.
1913         #
1914         #  @return New GEOM.GEOM_Object, containing the created arc.
1915         #
1916         #  @ref swig_MakeArc "Example"
1917         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1918             """
1919             Create an arc of circle from a center and 2 points.
1920
1921             Parameters:
1922                 thePnt1 Center of the arc
1923                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1924                 thePnt3 End point of the arc (Gives also a direction)
1925                 theSense Orientation of the arc
1926                 theName Object name; when specified, this parameter is used
1927                         for result publication in the study. Otherwise, if automatic
1928                         publication is switched on, default value is used for result name.
1929
1930             Returns:
1931                 New GEOM.GEOM_Object, containing the created arc.
1932             """
1933             # Example: see GEOM_TestAll.py
1934             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1935             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1936             self._autoPublish(anObj, theName, "arc")
1937             return anObj
1938
1939         ##  Create an arc of ellipse, of center and two points.
1940         #  @param theCenter Center of the arc.
1941         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1942         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1943         #  @param theName Object name; when specified, this parameter is used
1944         #         for result publication in the study. Otherwise, if automatic
1945         #         publication is switched on, default value is used for result name.
1946         #
1947         #  @return New GEOM.GEOM_Object, containing the created arc.
1948         #
1949         #  @ref swig_MakeArc "Example"
1950         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1951             """
1952             Create an arc of ellipse, of center and two points.
1953
1954             Parameters:
1955                 theCenter Center of the arc.
1956                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1957                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1958                 theName Object name; when specified, this parameter is used
1959                         for result publication in the study. Otherwise, if automatic
1960                         publication is switched on, default value is used for result name.
1961
1962             Returns:
1963                 New GEOM.GEOM_Object, containing the created arc.
1964             """
1965             # Example: see GEOM_TestAll.py
1966             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1967             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1968             self._autoPublish(anObj, theName, "arc")
1969             return anObj
1970
1971         ## Create a circle with given center, normal vector and radius.
1972         #  @param thePnt Circle center.
1973         #  @param theVec Vector, normal to the plane of the circle.
1974         #  @param theR Circle radius.
1975         #  @param theName Object name; when specified, this parameter is used
1976         #         for result publication in the study. Otherwise, if automatic
1977         #         publication is switched on, default value is used for result name.
1978         #
1979         #  @return New GEOM.GEOM_Object, containing the created circle.
1980         #
1981         #  @ref tui_creation_circle "Example"
1982         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1983             """
1984             Create a circle with given center, normal vector and radius.
1985
1986             Parameters:
1987                 thePnt Circle center.
1988                 theVec Vector, normal to the plane of the circle.
1989                 theR Circle radius.
1990                 theName Object name; when specified, this parameter is used
1991                         for result publication in the study. Otherwise, if automatic
1992                         publication is switched on, default value is used for result name.
1993
1994             Returns:
1995                 New GEOM.GEOM_Object, containing the created circle.
1996             """
1997             # Example: see GEOM_TestAll.py
1998             theR, Parameters = ParseParameters(theR)
1999             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2000             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2001             anObj.SetParameters(Parameters)
2002             self._autoPublish(anObj, theName, "circle")
2003             return anObj
2004
2005         ## Create a circle with given radius.
2006         #  Center of the circle will be in the origin of global
2007         #  coordinate system and normal vector will be codirected with Z axis
2008         #  @param theR Circle radius.
2009         #  @param theName Object name; when specified, this parameter is used
2010         #         for result publication in the study. Otherwise, if automatic
2011         #         publication is switched on, default value is used for result name.
2012         #
2013         #  @return New GEOM.GEOM_Object, containing the created circle.
2014         def MakeCircleR(self, theR, theName=None):
2015             """
2016             Create a circle with given radius.
2017             Center of the circle will be in the origin of global
2018             coordinate system and normal vector will be codirected with Z axis
2019
2020             Parameters:
2021                 theR Circle radius.
2022                 theName Object name; when specified, this parameter is used
2023                         for result publication in the study. Otherwise, if automatic
2024                         publication is switched on, default value is used for result name.
2025
2026             Returns:
2027                 New GEOM.GEOM_Object, containing the created circle.
2028             """
2029             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2030             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2031             self._autoPublish(anObj, theName, "circle")
2032             return anObj
2033
2034         ## Create a circle, passing through three given points
2035         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2036         #  @param theName Object name; when specified, this parameter is used
2037         #         for result publication in the study. Otherwise, if automatic
2038         #         publication is switched on, default value is used for result name.
2039         #
2040         #  @return New GEOM.GEOM_Object, containing the created circle.
2041         #
2042         #  @ref tui_creation_circle "Example"
2043         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2044             """
2045             Create a circle, passing through three given points
2046
2047             Parameters:
2048                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2049                 theName Object name; when specified, this parameter is used
2050                         for result publication in the study. Otherwise, if automatic
2051                         publication is switched on, default value is used for result name.
2052
2053             Returns:
2054                 New GEOM.GEOM_Object, containing the created circle.
2055             """
2056             # Example: see GEOM_TestAll.py
2057             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2058             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2059             self._autoPublish(anObj, theName, "circle")
2060             return anObj
2061
2062         ## Create a circle, with given point1 as center,
2063         #  passing through the point2 as radius and laying in the plane,
2064         #  defined by all three given points.
2065         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2066         #  @param theName Object name; when specified, this parameter is used
2067         #         for result publication in the study. Otherwise, if automatic
2068         #         publication is switched on, default value is used for result name.
2069         #
2070         #  @return New GEOM.GEOM_Object, containing the created circle.
2071         #
2072         #  @ref swig_MakeCircle "Example"
2073         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2074             """
2075             Create a circle, with given point1 as center,
2076             passing through the point2 as radius and laying in the plane,
2077             defined by all three given points.
2078
2079             Parameters:
2080                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2081                 theName Object name; when specified, this parameter is used
2082                         for result publication in the study. Otherwise, if automatic
2083                         publication is switched on, default value is used for result name.
2084
2085             Returns:
2086                 New GEOM.GEOM_Object, containing the created circle.
2087             """
2088             # Example: see GEOM_example6.py
2089             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2090             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2091             self._autoPublish(anObj, theName, "circle")
2092             return anObj
2093
2094         ## Create an ellipse with given center, normal vector and radiuses.
2095         #  @param thePnt Ellipse center.
2096         #  @param theVec Vector, normal to the plane of the ellipse.
2097         #  @param theRMajor Major ellipse radius.
2098         #  @param theRMinor Minor ellipse radius.
2099         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2100         #  @param theName Object name; when specified, this parameter is used
2101         #         for result publication in the study. Otherwise, if automatic
2102         #         publication is switched on, default value is used for result name.
2103         #
2104         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2105         #
2106         #  @ref tui_creation_ellipse "Example"
2107         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2108             """
2109             Create an ellipse with given center, normal vector and radiuses.
2110
2111             Parameters:
2112                 thePnt Ellipse center.
2113                 theVec Vector, normal to the plane of the ellipse.
2114                 theRMajor Major ellipse radius.
2115                 theRMinor Minor ellipse radius.
2116                 theVecMaj Vector, direction of the ellipse's main axis.
2117                 theName Object name; when specified, this parameter is used
2118                         for result publication in the study. Otherwise, if automatic
2119                         publication is switched on, default value is used for result name.
2120
2121             Returns:    
2122                 New GEOM.GEOM_Object, containing the created ellipse.
2123             """
2124             # Example: see GEOM_TestAll.py
2125             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2126             if theVecMaj is not None:
2127                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2128             else:
2129                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2130                 pass
2131             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2132             anObj.SetParameters(Parameters)
2133             self._autoPublish(anObj, theName, "ellipse")
2134             return anObj
2135
2136         ## Create an ellipse with given radiuses.
2137         #  Center of the ellipse will be in the origin of global
2138         #  coordinate system and normal vector will be codirected with Z axis
2139         #  @param theRMajor Major ellipse radius.
2140         #  @param theRMinor Minor ellipse radius.
2141         #  @param theName Object name; when specified, this parameter is used
2142         #         for result publication in the study. Otherwise, if automatic
2143         #         publication is switched on, default value is used for result name.
2144         #
2145         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2146         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2147             """
2148             Create an ellipse with given radiuses.
2149             Center of the ellipse will be in the origin of global
2150             coordinate system and normal vector will be codirected with Z axis
2151
2152             Parameters:
2153                 theRMajor Major ellipse radius.
2154                 theRMinor Minor ellipse radius.
2155                 theName Object name; when specified, this parameter is used
2156                         for result publication in the study. Otherwise, if automatic
2157                         publication is switched on, default value is used for result name.
2158
2159             Returns:
2160             New GEOM.GEOM_Object, containing the created ellipse.
2161             """
2162             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2163             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2164             self._autoPublish(anObj, theName, "ellipse")
2165             return anObj
2166
2167         ## Create a polyline on the set of points.
2168         #  @param thePoints Sequence of points for the polyline.
2169         #  @param theIsClosed If True, build a closed wire.
2170         #  @param theName Object name; when specified, this parameter is used
2171         #         for result publication in the study. Otherwise, if automatic
2172         #         publication is switched on, default value is used for result name.
2173         #
2174         #  @return New GEOM.GEOM_Object, containing the created polyline.
2175         #
2176         #  @ref tui_creation_curve "Example"
2177         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2178             """
2179             Create a polyline on the set of points.
2180
2181             Parameters:
2182                 thePoints Sequence of points for the polyline.
2183                 theIsClosed If True, build a closed wire.
2184                 theName Object name; when specified, this parameter is used
2185                         for result publication in the study. Otherwise, if automatic
2186                         publication is switched on, default value is used for result name.
2187
2188             Returns:
2189                 New GEOM.GEOM_Object, containing the created polyline.
2190             """
2191             # Example: see GEOM_TestAll.py
2192             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2193             RaiseIfFailed("MakePolyline", self.CurvesOp)
2194             self._autoPublish(anObj, theName, "polyline")
2195             return anObj
2196
2197         ## Create bezier curve on the set of points.
2198         #  @param thePoints Sequence of points for the bezier curve.
2199         #  @param theIsClosed If True, build a closed curve.
2200         #  @param theName Object name; when specified, this parameter is used
2201         #         for result publication in the study. Otherwise, if automatic
2202         #         publication is switched on, default value is used for result name.
2203         #
2204         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2205         #
2206         #  @ref tui_creation_curve "Example"
2207         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2208             """
2209             Create bezier curve on the set of points.
2210
2211             Parameters:
2212                 thePoints Sequence of points for the bezier curve.
2213                 theIsClosed If True, build a closed curve.
2214                 theName Object name; when specified, this parameter is used
2215                         for result publication in the study. Otherwise, if automatic
2216                         publication is switched on, default value is used for result name.
2217
2218             Returns:
2219                 New GEOM.GEOM_Object, containing the created bezier curve.
2220             """
2221             # Example: see GEOM_TestAll.py
2222             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2223             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2224             self._autoPublish(anObj, theName, "bezier")
2225             return anObj
2226
2227         ## Create B-Spline curve on the set of points.
2228         #  @param thePoints Sequence of points for the B-Spline curve.
2229         #  @param theIsClosed If True, build a closed curve.
2230         #  @param theDoReordering If TRUE, the algo does not follow the order of
2231         #                         \a thePoints but searches for the closest vertex.
2232         #  @param theName Object name; when specified, this parameter is used
2233         #         for result publication in the study. Otherwise, if automatic
2234         #         publication is switched on, default value is used for result name.
2235         #
2236         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2237         #
2238         #  @ref tui_creation_curve "Example"
2239         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2240             """
2241             Create B-Spline curve on the set of points.
2242
2243             Parameters:
2244                 thePoints Sequence of points for the B-Spline curve.
2245                 theIsClosed If True, build a closed curve.
2246                 theDoReordering If True, the algo does not follow the order of
2247                                 thePoints but searches for the closest vertex.
2248                 theName Object name; when specified, this parameter is used
2249                         for result publication in the study. Otherwise, if automatic
2250                         publication is switched on, default value is used for result name.
2251
2252             Returns:                     
2253                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2254             """
2255             # Example: see GEOM_TestAll.py
2256             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2257             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2258             self._autoPublish(anObj, theName, "bspline")
2259             return anObj
2260
2261         ## Create B-Spline curve on the set of points.
2262         #  @param thePoints Sequence of points for the B-Spline curve.
2263         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2264         #  @param theLastVec Vector object, defining the curve direction at its last point.
2265         #  @param theName Object name; when specified, this parameter is used
2266         #         for result publication in the study. Otherwise, if automatic
2267         #         publication is switched on, default value is used for result name.
2268         #
2269         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2270         #
2271         #  @ref tui_creation_curve "Example"
2272         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2273             """
2274             Create B-Spline curve on the set of points.
2275
2276             Parameters:
2277                 thePoints Sequence of points for the B-Spline curve.
2278                 theFirstVec Vector object, defining the curve direction at its first point.
2279                 theLastVec Vector object, defining the curve direction at its last point.
2280                 theName Object name; when specified, this parameter is used
2281                         for result publication in the study. Otherwise, if automatic
2282                         publication is switched on, default value is used for result name.
2283
2284             Returns:                     
2285                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2286             """
2287             # Example: see GEOM_TestAll.py
2288             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2289             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2290             self._autoPublish(anObj, theName, "bspline")
2291             return anObj
2292
2293         ## Creates a curve using the parametric definition of the basic points.
2294         #  @param thexExpr parametric equation of the coordinates X.
2295         #  @param theyExpr parametric equation of the coordinates Y.
2296         #  @param thezExpr parametric equation of the coordinates Z.
2297         #  @param theParamMin the minimal value of the parameter.
2298         #  @param theParamMax the maximum value of the parameter.
2299         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2300         #  @param theCurveType the type of the curve,
2301         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2302         #  @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.
2303         #  @param theName Object name; when specified, this parameter is used
2304         #         for result publication in the study. Otherwise, if automatic
2305         #         publication is switched on, default value is used for result name.
2306         #
2307         #  @return New GEOM.GEOM_Object, containing the created curve.
2308         #
2309         #  @ref tui_creation_curve "Example"
2310         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2311                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2312             """
2313             Creates a curve using the parametric definition of the basic points.
2314
2315             Parameters:
2316                 thexExpr parametric equation of the coordinates X.
2317                 theyExpr parametric equation of the coordinates Y.
2318                 thezExpr parametric equation of the coordinates Z.
2319                 theParamMin the minimal value of the parameter.
2320                 theParamMax the maximum value of the parameter.
2321                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2322                 theCurveType the type of the curve,
2323                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2324                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2325                              method is used which can lead to a bug.
2326                 theName Object name; when specified, this parameter is used
2327                         for result publication in the study. Otherwise, if automatic
2328                         publication is switched on, default value is used for result name.
2329
2330             Returns:
2331                 New GEOM.GEOM_Object, containing the created curve.
2332             """
2333             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2334             if theNewMethod:
2335               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2336             else:
2337               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2338             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2339             anObj.SetParameters(Parameters)
2340             self._autoPublish(anObj, theName, "curve")
2341             return anObj
2342
2343         ## Create an isoline curve on a face.
2344         #  @param theFace the face for which an isoline is created.
2345         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2346         #         creation.
2347         #  @param theParameter the U parameter for U-isoline or V parameter
2348         #         for V-isoline.
2349         #  @param theName Object name; when specified, this parameter is used
2350         #         for result publication in the study. Otherwise, if automatic
2351         #         publication is switched on, default value is used for result name.
2352         #
2353         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2354         #          a compound of edges.
2355         #
2356         #  @ref tui_creation_curve "Example"
2357         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2358             """
2359             Create an isoline curve on a face.
2360
2361             Parameters:
2362                 theFace the face for which an isoline is created.
2363                 IsUIsoline True for U-isoline creation; False for V-isoline
2364                            creation.
2365                 theParameter the U parameter for U-isoline or V parameter
2366                              for V-isoline.
2367                 theName Object name; when specified, this parameter is used
2368                         for result publication in the study. Otherwise, if automatic
2369                         publication is switched on, default value is used for result name.
2370
2371             Returns:
2372                 New GEOM.GEOM_Object, containing the created isoline edge or a
2373                 compound of edges.
2374             """
2375             # Example: see GEOM_TestAll.py
2376             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2377             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2378             if IsUIsoline:
2379                 self._autoPublish(anObj, theName, "U-Isoline")
2380             else:
2381                 self._autoPublish(anObj, theName, "V-Isoline")
2382             return anObj
2383
2384         # end of l4_curves
2385         ## @}
2386
2387         ## @addtogroup l3_sketcher
2388         ## @{
2389
2390         ## Create a sketcher (wire or face), following the textual description,
2391         #  passed through <VAR>theCommand</VAR> argument. \n
2392         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2393         #  Format of the description string have to be the following:
2394         #
2395         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2396         #
2397         #  Where:
2398         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2399         #  - CMD is one of
2400         #     - "R angle" : Set the direction by angle
2401         #     - "D dx dy" : Set the direction by DX & DY
2402         #     .
2403         #       \n
2404         #     - "TT x y" : Create segment by point at X & Y
2405         #     - "T dx dy" : Create segment by point with DX & DY
2406         #     - "L length" : Create segment by direction & Length
2407         #     - "IX x" : Create segment by direction & Intersect. X
2408         #     - "IY y" : Create segment by direction & Intersect. Y
2409         #     .
2410         #       \n
2411         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2412         #     - "AA x y": Create arc by point at X & Y
2413         #     - "A dx dy" : Create arc by point with DX & DY
2414         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2415         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2416         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2417         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2418         #     .
2419         #       \n
2420         #     - "WW" : Close Wire (to finish)
2421         #     - "WF" : Close Wire and build face (to finish)
2422         #     .
2423         #        \n
2424         #  - Flag1 (= reverse) is 0 or 2 ...
2425         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2426         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2427         #     .
2428         #        \n
2429         #  - Flag2 (= control tolerance) is 0 or 1 ...
2430         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2431         #     - if 1 the wire is built only if the end point is on the arc
2432         #       with a tolerance of 10^-7 on the distance else the creation fails
2433         #
2434         #  @param theCommand String, defining the sketcher in local
2435         #                    coordinates of the working plane.
2436         #  @param theWorkingPlane Nine double values, defining origin,
2437         #                         OZ and OX directions of the working plane.
2438         #  @param theName Object name; when specified, this parameter is used
2439         #         for result publication in the study. Otherwise, if automatic
2440         #         publication is switched on, default value is used for result name.
2441         #
2442         #  @return New GEOM.GEOM_Object, containing the created wire.
2443         #
2444         #  @ref tui_sketcher_page "Example"
2445         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2446             """
2447             Create a sketcher (wire or face), following the textual description, passed
2448             through theCommand argument.
2449             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2450             Format of the description string have to be the following:
2451                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2452             Where:
2453             - x1, y1 are coordinates of the first sketcher point (zero by default),
2454             - CMD is one of
2455                - "R angle" : Set the direction by angle
2456                - "D dx dy" : Set the direction by DX & DY
2457                
2458                - "TT x y" : Create segment by point at X & Y
2459                - "T dx dy" : Create segment by point with DX & DY
2460                - "L length" : Create segment by direction & Length
2461                - "IX x" : Create segment by direction & Intersect. X
2462                - "IY y" : Create segment by direction & Intersect. Y
2463
2464                - "C radius length" : Create arc by direction, radius and length(in degree)
2465                - "AA x y": Create arc by point at X & Y
2466                - "A dx dy" : Create arc by point with DX & DY
2467                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2468                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2469                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2470                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2471
2472                - "WW" : Close Wire (to finish)
2473                - "WF" : Close Wire and build face (to finish)
2474             
2475             - Flag1 (= reverse) is 0 or 2 ...
2476                - if 0 the drawn arc is the one of lower angle (< Pi)
2477                - if 2 the drawn arc ius the one of greater angle (> Pi)
2478         
2479             - Flag2 (= control tolerance) is 0 or 1 ...
2480                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2481                - if 1 the wire is built only if the end point is on the arc
2482                  with a tolerance of 10^-7 on the distance else the creation fails
2483
2484             Parameters:
2485                 theCommand String, defining the sketcher in local
2486                            coordinates of the working plane.
2487                 theWorkingPlane Nine double values, defining origin,
2488                                 OZ and OX directions of the working plane.
2489                 theName Object name; when specified, this parameter is used
2490                         for result publication in the study. Otherwise, if automatic
2491                         publication is switched on, default value is used for result name.
2492
2493             Returns:
2494                 New GEOM.GEOM_Object, containing the created wire.
2495             """
2496             # Example: see GEOM_TestAll.py
2497             theCommand,Parameters = ParseSketcherCommand(theCommand)
2498             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2499             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2500             anObj.SetParameters(Parameters)
2501             self._autoPublish(anObj, theName, "wire")
2502             return anObj
2503
2504         ## Create a sketcher (wire or face), following the textual description,
2505         #  passed through <VAR>theCommand</VAR> argument. \n
2506         #  For format of the description string see MakeSketcher() method.\n
2507         #  @param theCommand String, defining the sketcher in local
2508         #                    coordinates of the working plane.
2509         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2510         #  @param theName Object name; when specified, this parameter is used
2511         #         for result publication in the study. Otherwise, if automatic
2512         #         publication is switched on, default value is used for result name.
2513         #
2514         #  @return New GEOM.GEOM_Object, containing the created wire.
2515         #
2516         #  @ref tui_sketcher_page "Example"
2517         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2518             """
2519             Create a sketcher (wire or face), following the textual description,
2520             passed through theCommand argument.
2521             For format of the description string see geompy.MakeSketcher() method.
2522
2523             Parameters:
2524                 theCommand String, defining the sketcher in local
2525                            coordinates of the working plane.
2526                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2527                 theName Object name; when specified, this parameter is used
2528                         for result publication in the study. Otherwise, if automatic
2529                         publication is switched on, default value is used for result name.
2530
2531             Returns:
2532                 New GEOM.GEOM_Object, containing the created wire.
2533             """
2534             theCommand,Parameters = ParseSketcherCommand(theCommand)
2535             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2536             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2537             anObj.SetParameters(Parameters)
2538             self._autoPublish(anObj, theName, "wire")
2539             return anObj
2540
2541         ## Obtain a 2D sketcher interface
2542         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2543         def Sketcher2D (self):
2544             """
2545             Obtain a 2D sketcher interface.
2546
2547             Example of usage:
2548                sk = geompy.Sketcher2D()
2549                sk.addPoint(20, 20)
2550                sk.addSegmentRelative(15, 70)
2551                sk.addSegmentPerpY(50)
2552                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2553                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2554                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2555                sk.close()
2556                Sketch_1 = sk.wire(geomObj_1)
2557             """
2558             sk = Sketcher2D (self)
2559             return sk
2560         
2561         ## Create a sketcher wire, following the numerical description,
2562         #  passed through <VAR>theCoordinates</VAR> argument. \n
2563         #  @param theCoordinates double values, defining points to create a wire,
2564         #                                                      passing from it.
2565         #  @param theName Object name; when specified, this parameter is used
2566         #         for result publication in the study. Otherwise, if automatic
2567         #         publication is switched on, default value is used for result name.
2568         #
2569         #  @return New GEOM.GEOM_Object, containing the created wire.
2570         #
2571         #  @ref tui_3dsketcher_page "Example"
2572         def Make3DSketcher(self, theCoordinates, theName=None):
2573             """
2574             Create a sketcher wire, following the numerical description,
2575             passed through theCoordinates argument.
2576
2577             Parameters:
2578                 theCoordinates double values, defining points to create a wire,
2579                                passing from it.
2580                 theName Object name; when specified, this parameter is used
2581                         for result publication in the study. Otherwise, if automatic
2582                         publication is switched on, default value is used for result name.
2583
2584             Returns:
2585                 New GEOM_Object, containing the created wire.
2586             """
2587             theCoordinates,Parameters = ParseParameters(theCoordinates)
2588             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2589             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2590             anObj.SetParameters(Parameters)
2591             self._autoPublish(anObj, theName, "wire")
2592             return anObj
2593
2594         ## Obtain a 3D sketcher interface
2595         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2596         #
2597         #  @ref tui_3dsketcher_page "Example"
2598         def Sketcher3D (self):
2599             """
2600             Obtain a 3D sketcher interface.
2601
2602             Example of usage:
2603                 sk = geompy.Sketcher3D()
2604                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2605                 sk.addPointsRelative(0, 0, 130)
2606                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2607                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2608                 sk.close()
2609                 a3D_Sketcher_1 = sk.wire()
2610             """
2611             sk = Sketcher3D (self)
2612             return sk
2613
2614         # end of l3_sketcher
2615         ## @}
2616
2617         ## @addtogroup l3_3d_primitives
2618         ## @{
2619
2620         ## Create a box by coordinates of two opposite vertices.
2621         #
2622         #  @param x1,y1,z1 double values, defining first point it.
2623         #  @param x2,y2,z2 double values, defining first point it.
2624         #  @param theName Object name; when specified, this parameter is used
2625         #         for result publication in the study. Otherwise, if automatic
2626         #         publication is switched on, default value is used for result name.
2627         #
2628         #  @return New GEOM.GEOM_Object, containing the created box.
2629         #
2630         #  @ref tui_creation_box "Example"
2631         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2632             """
2633             Create a box by coordinates of two opposite vertices.
2634             
2635             Parameters:
2636                 x1,y1,z1 double values, defining first point.
2637                 x2,y2,z2 double values, defining second point.
2638                 theName Object name; when specified, this parameter is used
2639                         for result publication in the study. Otherwise, if automatic
2640                         publication is switched on, default value is used for result name.
2641                 
2642             Returns:
2643                 New GEOM.GEOM_Object, containing the created box.
2644             """
2645             # Example: see GEOM_TestAll.py
2646             pnt1 = self.MakeVertex(x1,y1,z1)
2647             pnt2 = self.MakeVertex(x2,y2,z2)
2648             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2649             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2650
2651         ## Create a box with specified dimensions along the coordinate axes
2652         #  and with edges, parallel to the coordinate axes.
2653         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2654         #  @param theDX Length of Box edges, parallel to OX axis.
2655         #  @param theDY Length of Box edges, parallel to OY axis.
2656         #  @param theDZ Length of Box edges, parallel to OZ axis.
2657         #  @param theName Object name; when specified, this parameter is used
2658         #         for result publication in the study. Otherwise, if automatic
2659         #         publication is switched on, default value is used for result name.
2660         #
2661         #  @return New GEOM.GEOM_Object, containing the created box.
2662         #
2663         #  @ref tui_creation_box "Example"
2664         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2665             """
2666             Create a box with specified dimensions along the coordinate axes
2667             and with edges, parallel to the coordinate axes.
2668             Center of the box will be at point (DX/2, DY/2, DZ/2).
2669
2670             Parameters:
2671                 theDX Length of Box edges, parallel to OX axis.
2672                 theDY Length of Box edges, parallel to OY axis.
2673                 theDZ Length of Box edges, parallel to OZ axis.
2674                 theName Object name; when specified, this parameter is used
2675                         for result publication in the study. Otherwise, if automatic
2676                         publication is switched on, default value is used for result name.
2677
2678             Returns:   
2679                 New GEOM.GEOM_Object, containing the created box.
2680             """
2681             # Example: see GEOM_TestAll.py
2682             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2683             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2684             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2685             anObj.SetParameters(Parameters)
2686             self._autoPublish(anObj, theName, "box")
2687             return anObj
2688
2689         ## Create a box with two specified opposite vertices,
2690         #  and with edges, parallel to the coordinate axes
2691         #  @param thePnt1 First of two opposite vertices.
2692         #  @param thePnt2 Second of two opposite vertices.
2693         #  @param theName Object name; when specified, this parameter is used
2694         #         for result publication in the study. Otherwise, if automatic
2695         #         publication is switched on, default value is used for result name.
2696         #
2697         #  @return New GEOM.GEOM_Object, containing the created box.
2698         #
2699         #  @ref tui_creation_box "Example"
2700         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2701             """
2702             Create a box with two specified opposite vertices,
2703             and with edges, parallel to the coordinate axes
2704
2705             Parameters:
2706                 thePnt1 First of two opposite vertices.
2707                 thePnt2 Second of two opposite vertices.
2708                 theName Object name; when specified, this parameter is used
2709                         for result publication in the study. Otherwise, if automatic
2710                         publication is switched on, default value is used for result name.
2711
2712             Returns:
2713                 New GEOM.GEOM_Object, containing the created box.
2714             """
2715             # Example: see GEOM_TestAll.py
2716             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2717             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2718             self._autoPublish(anObj, theName, "box")
2719             return anObj
2720
2721         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2722         #  @param theH height of Face.
2723         #  @param theW width of Face.
2724         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2725         #  @param theName Object name; when specified, this parameter is used
2726         #         for result publication in the study. Otherwise, if automatic
2727         #         publication is switched on, default value is used for result name.
2728         #
2729         #  @return New GEOM.GEOM_Object, containing the created face.
2730         #
2731         #  @ref tui_creation_face "Example"
2732         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2733             """
2734             Create a face with specified dimensions with edges parallel to coordinate axes.
2735
2736             Parameters:
2737                 theH height of Face.
2738                 theW width of Face.
2739                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2740                 theName Object name; when specified, this parameter is used
2741                         for result publication in the study. Otherwise, if automatic
2742                         publication is switched on, default value is used for result name.
2743
2744             Returns:
2745                 New GEOM.GEOM_Object, containing the created face.
2746             """
2747             # Example: see GEOM_TestAll.py
2748             theH,theW,Parameters = ParseParameters(theH, theW)
2749             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2750             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2751             anObj.SetParameters(Parameters)
2752             self._autoPublish(anObj, theName, "rectangle")
2753             return anObj
2754
2755         ## Create a face from another plane and two sizes,
2756         #  vertical size and horisontal size.
2757         #  @param theObj   Normale vector to the creating face or
2758         #  the face object.
2759         #  @param theH     Height (vertical size).
2760         #  @param theW     Width (horisontal size).
2761         #  @param theName Object name; when specified, this parameter is used
2762         #         for result publication in the study. Otherwise, if automatic
2763         #         publication is switched on, default value is used for result name.
2764         #
2765         #  @return New GEOM.GEOM_Object, containing the created face.
2766         #
2767         #  @ref tui_creation_face "Example"
2768         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2769             """
2770             Create a face from another plane and two sizes,
2771             vertical size and horisontal size.
2772
2773             Parameters:
2774                 theObj   Normale vector to the creating face or
2775                          the face object.
2776                 theH     Height (vertical size).
2777                 theW     Width (horisontal size).
2778                 theName Object name; when specified, this parameter is used
2779                         for result publication in the study. Otherwise, if automatic
2780                         publication is switched on, default value is used for result name.
2781
2782             Returns:
2783                 New GEOM_Object, containing the created face.
2784             """
2785             # Example: see GEOM_TestAll.py
2786             theH,theW,Parameters = ParseParameters(theH, theW)
2787             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2788             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2789             anObj.SetParameters(Parameters)
2790             self._autoPublish(anObj, theName, "rectangle")
2791             return anObj
2792
2793         ## Create a disk with given center, normal vector and radius.
2794         #  @param thePnt Disk center.
2795         #  @param theVec Vector, normal to the plane of the disk.
2796         #  @param theR Disk radius.
2797         #  @param theName Object name; when specified, this parameter is used
2798         #         for result publication in the study. Otherwise, if automatic
2799         #         publication is switched on, default value is used for result name.
2800         #
2801         #  @return New GEOM.GEOM_Object, containing the created disk.
2802         #
2803         #  @ref tui_creation_disk "Example"
2804         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2805             """
2806             Create a disk with given center, normal vector and radius.
2807
2808             Parameters:
2809                 thePnt Disk center.
2810                 theVec Vector, normal to the plane of the disk.
2811                 theR Disk radius.
2812                 theName Object name; when specified, this parameter is used
2813                         for result publication in the study. Otherwise, if automatic
2814                         publication is switched on, default value is used for result name.
2815
2816             Returns:    
2817                 New GEOM.GEOM_Object, containing the created disk.
2818             """
2819             # Example: see GEOM_TestAll.py
2820             theR,Parameters = ParseParameters(theR)
2821             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2822             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2823             anObj.SetParameters(Parameters)
2824             self._autoPublish(anObj, theName, "disk")
2825             return anObj
2826
2827         ## Create a disk, passing through three given points
2828         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2829         #  @param theName Object name; when specified, this parameter is used
2830         #         for result publication in the study. Otherwise, if automatic
2831         #         publication is switched on, default value is used for result name.
2832         #
2833         #  @return New GEOM.GEOM_Object, containing the created disk.
2834         #
2835         #  @ref tui_creation_disk "Example"
2836         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2837             """
2838             Create a disk, passing through three given points
2839
2840             Parameters:
2841                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2842                 theName Object name; when specified, this parameter is used
2843                         for result publication in the study. Otherwise, if automatic
2844                         publication is switched on, default value is used for result name.
2845
2846             Returns:    
2847                 New GEOM.GEOM_Object, containing the created disk.
2848             """
2849             # Example: see GEOM_TestAll.py
2850             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2851             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2852             self._autoPublish(anObj, theName, "disk")
2853             return anObj
2854
2855         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2856         #  @param theR Radius of Face.
2857         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2858         #  @param theName Object name; when specified, this parameter is used
2859         #         for result publication in the study. Otherwise, if automatic
2860         #         publication is switched on, default value is used for result name.
2861         #
2862         #  @return New GEOM.GEOM_Object, containing the created disk.
2863         #
2864         #  @ref tui_creation_face "Example"
2865         def MakeDiskR(self, theR, theOrientation, theName=None):
2866             """
2867             Create a disk with specified dimensions along OX-OY coordinate axes.
2868
2869             Parameters:
2870                 theR Radius of Face.
2871                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2872                 theName Object name; when specified, this parameter is used
2873                         for result publication in the study. Otherwise, if automatic
2874                         publication is switched on, default value is used for result name.
2875
2876             Returns: 
2877                 New GEOM.GEOM_Object, containing the created disk.
2878
2879             Example of usage:
2880                 Disk3 = geompy.MakeDiskR(100., 1)
2881             """
2882             # Example: see GEOM_TestAll.py
2883             theR,Parameters = ParseParameters(theR)
2884             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2885             RaiseIfFailed("MakeDiskR", self.PrimOp)
2886             anObj.SetParameters(Parameters)
2887             self._autoPublish(anObj, theName, "disk")
2888             return anObj
2889
2890         ## Create a cylinder with given base point, axis, radius and height.
2891         #  @param thePnt Central point of cylinder base.
2892         #  @param theAxis Cylinder axis.
2893         #  @param theR Cylinder radius.
2894         #  @param theH Cylinder height.
2895         #  @param theName Object name; when specified, this parameter is used
2896         #         for result publication in the study. Otherwise, if automatic
2897         #         publication is switched on, default value is used for result name.
2898         #
2899         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2900         #
2901         #  @ref tui_creation_cylinder "Example"
2902         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2903             """
2904             Create a cylinder with given base point, axis, radius and height.
2905
2906             Parameters:
2907                 thePnt Central point of cylinder base.
2908                 theAxis Cylinder axis.
2909                 theR Cylinder radius.
2910                 theH Cylinder height.
2911                 theName Object name; when specified, this parameter is used
2912                         for result publication in the study. Otherwise, if automatic
2913                         publication is switched on, default value is used for result name.
2914
2915             Returns: 
2916                 New GEOM.GEOM_Object, containing the created cylinder.
2917             """
2918             # Example: see GEOM_TestAll.py
2919             theR,theH,Parameters = ParseParameters(theR, theH)
2920             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2921             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2922             anObj.SetParameters(Parameters)
2923             self._autoPublish(anObj, theName, "cylinder")
2924             return anObj
2925
2926         ## Create a cylinder with given radius and height at
2927         #  the origin of coordinate system. Axis of the cylinder
2928         #  will be collinear to the OZ axis of the coordinate system.
2929         #  @param theR Cylinder radius.
2930         #  @param theH Cylinder height.
2931         #  @param theName Object name; when specified, this parameter is used
2932         #         for result publication in the study. Otherwise, if automatic
2933         #         publication is switched on, default value is used for result name.
2934         #
2935         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2936         #
2937         #  @ref tui_creation_cylinder "Example"
2938         def MakeCylinderRH(self, theR, theH, theName=None):
2939             """
2940             Create a cylinder with given radius and height at
2941             the origin of coordinate system. Axis of the cylinder
2942             will be collinear to the OZ axis of the coordinate system.
2943
2944             Parameters:
2945                 theR Cylinder radius.
2946                 theH Cylinder height.
2947                 theName Object name; when specified, this parameter is used
2948                         for result publication in the study. Otherwise, if automatic
2949                         publication is switched on, default value is used for result name.
2950
2951             Returns:    
2952                 New GEOM.GEOM_Object, containing the created cylinder.
2953             """
2954             # Example: see GEOM_TestAll.py
2955             theR,theH,Parameters = ParseParameters(theR, theH)
2956             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2957             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2958             anObj.SetParameters(Parameters)
2959             self._autoPublish(anObj, theName, "cylinder")
2960             return anObj
2961
2962         ## Create a sphere with given center and radius.
2963         #  @param thePnt Sphere center.
2964         #  @param theR Sphere radius.
2965         #  @param theName Object name; when specified, this parameter is used
2966         #         for result publication in the study. Otherwise, if automatic
2967         #         publication is switched on, default value is used for result name.
2968         #
2969         #  @return New GEOM.GEOM_Object, containing the created sphere.
2970         #
2971         #  @ref tui_creation_sphere "Example"
2972         def MakeSpherePntR(self, thePnt, theR, theName=None):
2973             """
2974             Create a sphere with given center and radius.
2975
2976             Parameters:
2977                 thePnt Sphere center.
2978                 theR Sphere radius.
2979                 theName Object name; when specified, this parameter is used
2980                         for result publication in the study. Otherwise, if automatic
2981                         publication is switched on, default value is used for result name.
2982
2983             Returns:    
2984                 New GEOM.GEOM_Object, containing the created sphere.            
2985             """
2986             # Example: see GEOM_TestAll.py
2987             theR,Parameters = ParseParameters(theR)
2988             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2989             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2990             anObj.SetParameters(Parameters)
2991             self._autoPublish(anObj, theName, "sphere")
2992             return anObj
2993
2994         ## Create a sphere with given center and radius.
2995         #  @param x,y,z Coordinates of sphere center.
2996         #  @param theR Sphere radius.
2997         #  @param theName Object name; when specified, this parameter is used
2998         #         for result publication in the study. Otherwise, if automatic
2999         #         publication is switched on, default value is used for result name.
3000         #
3001         #  @return New GEOM.GEOM_Object, containing the created sphere.
3002         #
3003         #  @ref tui_creation_sphere "Example"
3004         def MakeSphere(self, x, y, z, theR, theName=None):
3005             """
3006             Create a sphere with given center and radius.
3007
3008             Parameters: 
3009                 x,y,z Coordinates of sphere center.
3010                 theR Sphere radius.
3011                 theName Object name; when specified, this parameter is used
3012                         for result publication in the study. Otherwise, if automatic
3013                         publication is switched on, default value is used for result name.
3014
3015             Returns:
3016                 New GEOM.GEOM_Object, containing the created sphere.
3017             """
3018             # Example: see GEOM_TestAll.py
3019             point = self.MakeVertex(x, y, z)
3020             # note: auto-publishing is done in self.MakeSpherePntR()
3021             anObj = self.MakeSpherePntR(point, theR, theName)
3022             return anObj
3023
3024         ## Create a sphere with given radius at the origin of coordinate system.
3025         #  @param theR Sphere radius.
3026         #  @param theName Object name; when specified, this parameter is used
3027         #         for result publication in the study. Otherwise, if automatic
3028         #         publication is switched on, default value is used for result name.
3029         #
3030         #  @return New GEOM.GEOM_Object, containing the created sphere.
3031         #
3032         #  @ref tui_creation_sphere "Example"
3033         def MakeSphereR(self, theR, theName=None):
3034             """
3035             Create a sphere with given radius at the origin of coordinate system.
3036
3037             Parameters: 
3038                 theR Sphere radius.
3039                 theName Object name; when specified, this parameter is used
3040                         for result publication in the study. Otherwise, if automatic
3041                         publication is switched on, default value is used for result name.
3042
3043             Returns:
3044                 New GEOM.GEOM_Object, containing the created sphere.            
3045             """
3046             # Example: see GEOM_TestAll.py
3047             theR,Parameters = ParseParameters(theR)
3048             anObj = self.PrimOp.MakeSphereR(theR)
3049             RaiseIfFailed("MakeSphereR", self.PrimOp)
3050             anObj.SetParameters(Parameters)
3051             self._autoPublish(anObj, theName, "sphere")
3052             return anObj
3053
3054         ## Create a cone with given base point, axis, height and radiuses.
3055         #  @param thePnt Central point of the first cone base.
3056         #  @param theAxis Cone axis.
3057         #  @param theR1 Radius of the first cone base.
3058         #  @param theR2 Radius of the second cone base.
3059         #    \note If both radiuses are non-zero, the cone will be truncated.
3060         #    \note If the radiuses are equal, a cylinder will be created instead.
3061         #  @param theH Cone height.
3062         #  @param theName Object name; when specified, this parameter is used
3063         #         for result publication in the study. Otherwise, if automatic
3064         #         publication is switched on, default value is used for result name.
3065         #
3066         #  @return New GEOM.GEOM_Object, containing the created cone.
3067         #
3068         #  @ref tui_creation_cone "Example"
3069         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3070             """
3071             Create a cone with given base point, axis, height and radiuses.
3072
3073             Parameters: 
3074                 thePnt Central point of the first cone base.
3075                 theAxis Cone axis.
3076                 theR1 Radius of the first cone base.
3077                 theR2 Radius of the second cone base.
3078                 theH Cone height.
3079                 theName Object name; when specified, this parameter is used
3080                         for result publication in the study. Otherwise, if automatic
3081                         publication is switched on, default value is used for result name.
3082
3083             Note:
3084                 If both radiuses are non-zero, the cone will be truncated.
3085                 If the radiuses are equal, a cylinder will be created instead.
3086
3087             Returns:
3088                 New GEOM.GEOM_Object, containing the created cone.
3089             """
3090             # Example: see GEOM_TestAll.py
3091             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3092             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3093             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3094             anObj.SetParameters(Parameters)
3095             self._autoPublish(anObj, theName, "cone")
3096             return anObj
3097
3098         ## Create a cone with given height and radiuses at
3099         #  the origin of coordinate system. Axis of the cone will
3100         #  be collinear to the OZ axis of the coordinate system.
3101         #  @param theR1 Radius of the first cone base.
3102         #  @param theR2 Radius of the second cone base.
3103         #    \note If both radiuses are non-zero, the cone will be truncated.
3104         #    \note If the radiuses are equal, a cylinder will be created instead.
3105         #  @param theH Cone height.
3106         #  @param theName Object name; when specified, this parameter is used
3107         #         for result publication in the study. Otherwise, if automatic
3108         #         publication is switched on, default value is used for result name.
3109         #
3110         #  @return New GEOM.GEOM_Object, containing the created cone.
3111         #
3112         #  @ref tui_creation_cone "Example"
3113         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3114             """
3115             Create a cone with given height and radiuses at
3116             the origin of coordinate system. Axis of the cone will
3117             be collinear to the OZ axis of the coordinate system.
3118
3119             Parameters: 
3120                 theR1 Radius of the first cone base.
3121                 theR2 Radius of the second cone base.
3122                 theH Cone height.
3123                 theName Object name; when specified, this parameter is used
3124                         for result publication in the study. Otherwise, if automatic
3125                         publication is switched on, default value is used for result name.
3126
3127             Note:
3128                 If both radiuses are non-zero, the cone will be truncated.
3129                 If the radiuses are equal, a cylinder will be created instead.
3130
3131             Returns:
3132                 New GEOM.GEOM_Object, containing the created cone.
3133             """
3134             # Example: see GEOM_TestAll.py
3135             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3136             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3137             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3138             anObj.SetParameters(Parameters)
3139             self._autoPublish(anObj, theName, "cone")
3140             return anObj
3141
3142         ## Create a torus with given center, normal vector and radiuses.
3143         #  @param thePnt Torus central point.
3144         #  @param theVec Torus axis of symmetry.
3145         #  @param theRMajor Torus major radius.
3146         #  @param theRMinor Torus minor radius.
3147         #  @param theName Object name; when specified, this parameter is used
3148         #         for result publication in the study. Otherwise, if automatic
3149         #         publication is switched on, default value is used for result name.
3150         #
3151         #  @return New GEOM.GEOM_Object, containing the created torus.
3152         #
3153         #  @ref tui_creation_torus "Example"
3154         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3155             """
3156             Create a torus with given center, normal vector and radiuses.
3157
3158             Parameters: 
3159                 thePnt Torus central point.
3160                 theVec Torus axis of symmetry.
3161                 theRMajor Torus major radius.
3162                 theRMinor Torus minor radius.
3163                 theName Object name; when specified, this parameter is used
3164                         for result publication in the study. Otherwise, if automatic
3165                         publication is switched on, default value is used for result name.
3166
3167            Returns:
3168                 New GEOM.GEOM_Object, containing the created torus.
3169             """
3170             # Example: see GEOM_TestAll.py
3171             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3172             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3173             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3174             anObj.SetParameters(Parameters)
3175             self._autoPublish(anObj, theName, "torus")
3176             return anObj
3177
3178         ## Create a torus with given radiuses at the origin of coordinate system.
3179         #  @param theRMajor Torus major radius.
3180         #  @param theRMinor Torus minor radius.
3181         #  @param theName Object name; when specified, this parameter is used
3182         #         for result publication in the study. Otherwise, if automatic
3183         #         publication is switched on, default value is used for result name.
3184         #
3185         #  @return New GEOM.GEOM_Object, containing the created torus.
3186         #
3187         #  @ref tui_creation_torus "Example"
3188         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3189             """
3190            Create a torus with given radiuses at the origin of coordinate system.
3191
3192            Parameters: 
3193                 theRMajor Torus major radius.
3194                 theRMinor Torus minor radius.
3195                 theName Object name; when specified, this parameter is used
3196                         for result publication in the study. Otherwise, if automatic
3197                         publication is switched on, default value is used for result name.
3198
3199            Returns:
3200                 New GEOM.GEOM_Object, containing the created torus.            
3201             """
3202             # Example: see GEOM_TestAll.py
3203             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3204             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3205             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3206             anObj.SetParameters(Parameters)
3207             self._autoPublish(anObj, theName, "torus")
3208             return anObj
3209
3210         # end of l3_3d_primitives
3211         ## @}
3212
3213         ## @addtogroup l3_complex
3214         ## @{
3215
3216         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3217         #  @param theBase Base shape to be extruded.
3218         #  @param thePoint1 First end of extrusion vector.
3219         #  @param thePoint2 Second end of extrusion vector.
3220         #  @param theScaleFactor Use it to make prism with scaled second base.
3221         #                        Nagative value means not scaled second base.
3222         #  @param theName Object name; when specified, this parameter is used
3223         #         for result publication in the study. Otherwise, if automatic
3224         #         publication is switched on, default value is used for result name.
3225         #
3226         #  @return New GEOM.GEOM_Object, containing the created prism.
3227         #
3228         #  @ref tui_creation_prism "Example"
3229         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3230             """
3231             Create a shape by extrusion of the base shape along a vector, defined by two points.
3232
3233             Parameters: 
3234                 theBase Base shape to be extruded.
3235                 thePoint1 First end of extrusion vector.
3236                 thePoint2 Second end of extrusion vector.
3237                 theScaleFactor Use it to make prism with scaled second base.
3238                                Nagative value means not scaled second base.
3239                 theName Object name; when specified, this parameter is used
3240                         for result publication in the study. Otherwise, if automatic
3241                         publication is switched on, default value is used for result name.
3242
3243             Returns:
3244                 New GEOM.GEOM_Object, containing the created prism.
3245             """
3246             # Example: see GEOM_TestAll.py
3247             anObj = None
3248             Parameters = ""
3249             if theScaleFactor > 0:
3250                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3251                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3252             else:
3253                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3254             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3255             anObj.SetParameters(Parameters)
3256             self._autoPublish(anObj, theName, "prism")
3257             return anObj
3258
3259         ## Create a shape by extrusion of the base shape along a
3260         #  vector, defined by two points, in 2 Ways (forward/backward).
3261         #  @param theBase Base shape to be extruded.
3262         #  @param thePoint1 First end of extrusion vector.
3263         #  @param thePoint2 Second end of extrusion vector.
3264         #  @param theName Object name; when specified, this parameter is used
3265         #         for result publication in the study. Otherwise, if automatic
3266         #         publication is switched on, default value is used for result name.
3267         #
3268         #  @return New GEOM.GEOM_Object, containing the created prism.
3269         #
3270         #  @ref tui_creation_prism "Example"
3271         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3272             """
3273             Create a shape by extrusion of the base shape along a
3274             vector, defined by two points, in 2 Ways (forward/backward).
3275
3276             Parameters: 
3277                 theBase Base shape to be extruded.
3278                 thePoint1 First end of extrusion vector.
3279                 thePoint2 Second end of extrusion vector.
3280                 theName Object name; when specified, this parameter is used
3281                         for result publication in the study. Otherwise, if automatic
3282                         publication is switched on, default value is used for result name.
3283
3284             Returns:
3285                 New GEOM.GEOM_Object, containing the created prism.
3286             """
3287             # Example: see GEOM_TestAll.py
3288             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3289             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3290             self._autoPublish(anObj, theName, "prism")
3291             return anObj
3292
3293         ## Create a shape by extrusion of the base shape along the vector,
3294         #  i.e. all the space, transfixed by the base shape during its translation
3295         #  along the vector on the given distance.
3296         #  @param theBase Base shape to be extruded.
3297         #  @param theVec Direction of extrusion.
3298         #  @param theH Prism dimension along theVec.
3299         #  @param theScaleFactor Use it to make prism with scaled second base.
3300         #                        Negative value means not scaled second base.
3301         #  @param theName Object name; when specified, this parameter is used
3302         #         for result publication in the study. Otherwise, if automatic
3303         #         publication is switched on, default value is used for result name.
3304         #
3305         #  @return New GEOM.GEOM_Object, containing the created prism.
3306         #
3307         #  @ref tui_creation_prism "Example"
3308         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3309             """
3310             Create a shape by extrusion of the base shape along the vector,
3311             i.e. all the space, transfixed by the base shape during its translation
3312             along the vector on the given distance.
3313
3314             Parameters: 
3315                 theBase Base shape to be extruded.
3316                 theVec Direction of extrusion.
3317                 theH Prism dimension along theVec.
3318                 theScaleFactor Use it to make prism with scaled second base.
3319                                Negative value means not scaled second base.
3320                 theName Object name; when specified, this parameter is used
3321                         for result publication in the study. Otherwise, if automatic
3322                         publication is switched on, default value is used for result name.
3323
3324             Returns:
3325                 New GEOM.GEOM_Object, containing the created prism.
3326             """
3327             # Example: see GEOM_TestAll.py
3328             anObj = None
3329             Parameters = ""
3330             if theScaleFactor > 0:
3331                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3332                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3333             else:
3334                 theH,Parameters = ParseParameters(theH)
3335                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3336             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3337             anObj.SetParameters(Parameters)
3338             self._autoPublish(anObj, theName, "prism")
3339             return anObj
3340
3341         ## Create a shape by extrusion of the base shape along the vector,
3342         #  i.e. all the space, transfixed by the base shape during its translation
3343         #  along the vector on the given distance in 2 Ways (forward/backward).
3344         #  @param theBase Base shape to be extruded.
3345         #  @param theVec Direction of extrusion.
3346         #  @param theH Prism dimension along theVec in forward direction.
3347         #  @param theName Object name; when specified, this parameter is used
3348         #         for result publication in the study. Otherwise, if automatic
3349         #         publication is switched on, default value is used for result name.
3350         #
3351         #  @return New GEOM.GEOM_Object, containing the created prism.
3352         #
3353         #  @ref tui_creation_prism "Example"
3354         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3355             """
3356             Create a shape by extrusion of the base shape along the vector,
3357             i.e. all the space, transfixed by the base shape during its translation
3358             along the vector on the given distance in 2 Ways (forward/backward).
3359
3360             Parameters:
3361                 theBase Base shape to be extruded.
3362                 theVec Direction of extrusion.
3363                 theH Prism dimension along theVec in forward direction.
3364                 theName Object name; when specified, this parameter is used
3365                         for result publication in the study. Otherwise, if automatic
3366                         publication is switched on, default value is used for result name.
3367
3368             Returns:
3369                 New GEOM.GEOM_Object, containing the created prism.
3370             """
3371             # Example: see GEOM_TestAll.py
3372             theH,Parameters = ParseParameters(theH)
3373             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3374             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3375             anObj.SetParameters(Parameters)
3376             self._autoPublish(anObj, theName, "prism")
3377             return anObj
3378
3379         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3380         #  @param theBase Base shape to be extruded.
3381         #  @param theDX, theDY, theDZ Directions of extrusion.
3382         #  @param theScaleFactor Use it to make prism with scaled second base.
3383         #                        Nagative value means not scaled second base.
3384         #  @param theName Object name; when specified, this parameter is used
3385         #         for result publication in the study. Otherwise, if automatic
3386         #         publication is switched on, default value is used for result name.
3387         #
3388         #  @return New GEOM.GEOM_Object, containing the created prism.
3389         #
3390         #  @ref tui_creation_prism "Example"
3391         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3392             """
3393             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3394
3395             Parameters:
3396                 theBase Base shape to be extruded.
3397                 theDX, theDY, theDZ Directions of extrusion.
3398                 theScaleFactor Use it to make prism with scaled second base.
3399                                Nagative value means not scaled second base.
3400                 theName Object name; when specified, this parameter is used
3401                         for result publication in the study. Otherwise, if automatic
3402                         publication is switched on, default value is used for result name.
3403
3404             Returns: 
3405                 New GEOM.GEOM_Object, containing the created prism.
3406             """
3407             # Example: see GEOM_TestAll.py
3408             anObj = None
3409             Parameters = ""
3410             if theScaleFactor > 0:
3411                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3412                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3413             else:
3414                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3415                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3416             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3417             anObj.SetParameters(Parameters)
3418             self._autoPublish(anObj, theName, "prism")
3419             return anObj
3420
3421         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3422         #  i.e. all the space, transfixed by the base shape during its translation
3423         #  along the vector on the given distance in 2 Ways (forward/backward).
3424         #  @param theBase Base shape to be extruded.
3425         #  @param theDX, theDY, theDZ Directions of extrusion.
3426         #  @param theName Object name; when specified, this parameter is used
3427         #         for result publication in the study. Otherwise, if automatic
3428         #         publication is switched on, default value is used for result name.
3429         #
3430         #  @return New GEOM.GEOM_Object, containing the created prism.
3431         #
3432         #  @ref tui_creation_prism "Example"
3433         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3434             """
3435             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3436             i.e. all the space, transfixed by the base shape during its translation
3437             along the vector on the given distance in 2 Ways (forward/backward).
3438
3439             Parameters:
3440                 theBase Base shape to be extruded.
3441                 theDX, theDY, theDZ Directions of extrusion.
3442                 theName Object name; when specified, this parameter is used
3443                         for result publication in the study. Otherwise, if automatic
3444                         publication is switched on, default value is used for result name.
3445
3446             Returns:
3447                 New GEOM.GEOM_Object, containing the created prism.
3448             """
3449             # Example: see GEOM_TestAll.py
3450             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3451             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3452             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3453             anObj.SetParameters(Parameters)
3454             self._autoPublish(anObj, theName, "prism")
3455             return anObj
3456
3457         ## Create a shape by revolution of the base shape around the axis
3458         #  on the given angle, i.e. all the space, transfixed by the base
3459         #  shape during its rotation around the axis on the given angle.
3460         #  @param theBase Base shape to be rotated.
3461         #  @param theAxis Rotation axis.
3462         #  @param theAngle Rotation angle in radians.
3463         #  @param theName Object name; when specified, this parameter is used
3464         #         for result publication in the study. Otherwise, if automatic
3465         #         publication is switched on, default value is used for result name.
3466         #
3467         #  @return New GEOM.GEOM_Object, containing the created revolution.
3468         #
3469         #  @ref tui_creation_revolution "Example"
3470         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3471             """
3472             Create a shape by revolution of the base shape around the axis
3473             on the given angle, i.e. all the space, transfixed by the base
3474             shape during its rotation around the axis on the given angle.
3475
3476             Parameters:
3477                 theBase Base shape to be rotated.
3478                 theAxis Rotation axis.
3479                 theAngle Rotation angle in radians.
3480                 theName Object name; when specified, this parameter is used
3481                         for result publication in the study. Otherwise, if automatic
3482                         publication is switched on, default value is used for result name.
3483
3484             Returns: 
3485                 New GEOM.GEOM_Object, containing the created revolution.
3486             """
3487             # Example: see GEOM_TestAll.py
3488             theAngle,Parameters = ParseParameters(theAngle)
3489             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3490             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3491             anObj.SetParameters(Parameters)
3492             self._autoPublish(anObj, theName, "revolution")
3493             return anObj
3494
3495         ## Create a shape by revolution of the base shape around the axis
3496         #  on the given angle, i.e. all the space, transfixed by the base
3497         #  shape during its rotation around the axis on the given angle in
3498         #  both directions (forward/backward)
3499         #  @param theBase Base shape to be rotated.
3500         #  @param theAxis Rotation axis.
3501         #  @param theAngle Rotation angle in radians.
3502         #  @param theName Object name; when specified, this parameter is used
3503         #         for result publication in the study. Otherwise, if automatic
3504         #         publication is switched on, default value is used for result name.
3505         #
3506         #  @return New GEOM.GEOM_Object, containing the created revolution.
3507         #
3508         #  @ref tui_creation_revolution "Example"
3509         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3510             """
3511             Create a shape by revolution of the base shape around the axis
3512             on the given angle, i.e. all the space, transfixed by the base
3513             shape during its rotation around the axis on the given angle in
3514             both directions (forward/backward).
3515
3516             Parameters:
3517                 theBase Base shape to be rotated.
3518                 theAxis Rotation axis.
3519                 theAngle Rotation angle in radians.
3520                 theName Object name; when specified, this parameter is used
3521                         for result publication in the study. Otherwise, if automatic
3522                         publication is switched on, default value is used for result name.
3523
3524             Returns: 
3525                 New GEOM.GEOM_Object, containing the created revolution.
3526             """
3527             theAngle,Parameters = ParseParameters(theAngle)
3528             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3529             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3530             anObj.SetParameters(Parameters)
3531             self._autoPublish(anObj, theName, "revolution")
3532             return anObj
3533
3534         ## Create a filling from the given compound of contours.
3535         #  @param theShape the compound of contours
3536         #  @param theMinDeg a minimal degree of BSpline surface to create
3537         #  @param theMaxDeg a maximal degree of BSpline surface to create
3538         #  @param theTol2D a 2d tolerance to be reached
3539         #  @param theTol3D a 3d tolerance to be reached
3540         #  @param theNbIter a number of iteration of approximation algorithm
3541         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3542         #  @param isApprox if True, BSpline curves are generated in the process
3543         #                  of surface construction. By default it is False, that means
3544         #                  the surface is created using given curves. The usage of
3545         #                  Approximation makes the algorithm work slower, but allows
3546         #                  building the surface for rather complex cases.
3547         #  @param theName Object name; when specified, this parameter is used
3548         #         for result publication in the study. Otherwise, if automatic
3549         #         publication is switched on, default value is used for result name.
3550         #
3551         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3552         #
3553         #  @ref tui_creation_filling "Example"
3554         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3555                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3556             """
3557             Create a filling from the given compound of contours.
3558
3559             Parameters:
3560                 theShape the compound of contours
3561                 theMinDeg a minimal degree of BSpline surface to create
3562                 theMaxDeg a maximal degree of BSpline surface to create
3563                 theTol2D a 2d tolerance to be reached
3564                 theTol3D a 3d tolerance to be reached
3565                 theNbIter a number of iteration of approximation algorithm
3566                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3567                 isApprox if True, BSpline curves are generated in the process
3568                          of surface construction. By default it is False, that means
3569                          the surface is created using given curves. The usage of
3570                          Approximation makes the algorithm work slower, but allows
3571                          building the surface for rather complex cases
3572                 theName Object name; when specified, this parameter is used
3573                         for result publication in the study. Otherwise, if automatic
3574                         publication is switched on, default value is used for result name.
3575
3576             Returns: 
3577                 New GEOM.GEOM_Object, containing the created filling surface.
3578
3579             Example of usage:
3580                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3581             """
3582             # Example: see GEOM_TestAll.py
3583             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3584             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3585                                             theTol2D, theTol3D, theNbIter,
3586                                             theMethod, isApprox)
3587             RaiseIfFailed("MakeFilling", self.PrimOp)
3588             anObj.SetParameters(Parameters)
3589             self._autoPublish(anObj, theName, "filling")
3590             return anObj
3591
3592
3593         ## Create a filling from the given compound of contours.
3594         #  This method corresponds to MakeFilling with isApprox=True
3595         #  @param theShape the compound of contours
3596         #  @param theMinDeg a minimal degree of BSpline surface to create
3597         #  @param theMaxDeg a maximal degree of BSpline surface to create
3598         #  @param theTol3D a 3d tolerance to be reached
3599         #  @param theName Object name; when specified, this parameter is used
3600         #         for result publication in the study. Otherwise, if automatic
3601         #         publication is switched on, default value is used for result name.
3602         #
3603         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3604         #
3605         #  @ref tui_creation_filling "Example"
3606         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3607             """
3608             Create a filling from the given compound of contours.
3609             This method corresponds to MakeFilling with isApprox=True
3610
3611             Parameters:
3612                 theShape the compound of contours
3613                 theMinDeg a minimal degree of BSpline surface to create
3614                 theMaxDeg a maximal degree of BSpline surface to create
3615                 theTol3D a 3d tolerance to be reached
3616                 theName Object name; when specified, this parameter is used
3617                         for result publication in the study. Otherwise, if automatic
3618                         publication is switched on, default value is used for result name.
3619
3620             Returns: 
3621                 New GEOM.GEOM_Object, containing the created filling surface.
3622
3623             Example of usage:
3624                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3625             """
3626             # Example: see GEOM_TestAll.py
3627             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3628             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3629                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3630             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3631             anObj.SetParameters(Parameters)
3632             self._autoPublish(anObj, theName, "filling")
3633             return anObj
3634
3635         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3636         #  @param theSeqSections - set of specified sections.
3637         #  @param theModeSolid - mode defining building solid or shell
3638         #  @param thePreci - precision 3D used for smoothing
3639         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3640         #  @param theName Object name; when specified, this parameter is used
3641         #         for result publication in the study. Otherwise, if automatic
3642         #         publication is switched on, default value is used for result name.
3643         #
3644         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3645         #
3646         #  @ref swig_todo "Example"
3647         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3648             """
3649             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3650
3651             Parameters:
3652                 theSeqSections - set of specified sections.
3653                 theModeSolid - mode defining building solid or shell
3654                 thePreci - precision 3D used for smoothing
3655                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3656                 theName Object name; when specified, this parameter is used
3657                         for result publication in the study. Otherwise, if automatic
3658                         publication is switched on, default value is used for result name.
3659
3660             Returns:
3661                 New GEOM.GEOM_Object, containing the created shell or solid.
3662             """
3663             # Example: see GEOM_TestAll.py
3664             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3665             RaiseIfFailed("MakeThruSections", self.PrimOp)
3666             self._autoPublish(anObj, theName, "filling")
3667             return anObj
3668
3669         ## Create a shape by extrusion of the base shape along
3670         #  the path shape. The path shape can be a wire or an edge.
3671         #  @param theBase Base shape to be extruded.
3672         #  @param thePath Path shape to extrude the base shape along it.
3673         #  @param theName Object name; when specified, this parameter is used
3674         #         for result publication in the study. Otherwise, if automatic
3675         #         publication is switched on, default value is used for result name.
3676         #
3677         #  @return New GEOM.GEOM_Object, containing the created pipe.
3678         #
3679         #  @ref tui_creation_pipe "Example"
3680         def MakePipe(self, theBase, thePath, theName=None):
3681             """
3682             Create a shape by extrusion of the base shape along
3683             the path shape. The path shape can be a wire or an edge.
3684
3685             Parameters:
3686                 theBase Base shape to be extruded.
3687                 thePath Path shape to extrude the base shape along it.
3688                 theName Object name; when specified, this parameter is used
3689                         for result publication in the study. Otherwise, if automatic
3690                         publication is switched on, default value is used for result name.
3691
3692             Returns:
3693                 New GEOM.GEOM_Object, containing the created pipe.
3694             """
3695             # Example: see GEOM_TestAll.py
3696             anObj = self.PrimOp.MakePipe(theBase, thePath)
3697             RaiseIfFailed("MakePipe", self.PrimOp)
3698             self._autoPublish(anObj, theName, "pipe")
3699             return anObj
3700
3701         ## Create a shape by extrusion of the profile shape along
3702         #  the path shape. The path shape can be a wire or an edge.
3703         #  the several profiles can be specified in the several locations of path.
3704         #  @param theSeqBases - list of  Bases shape to be extruded.
3705         #  @param theLocations - list of locations on the path corresponding
3706         #                        specified list of the Bases shapes. Number of locations
3707         #                        should be equal to number of bases or list of locations can be empty.
3708         #  @param thePath - Path shape to extrude the base shape along it.
3709         #  @param theWithContact - the mode defining that the section is translated to be in
3710         #                          contact with the spine.
3711         #  @param theWithCorrection - defining that the section is rotated to be
3712         #                             orthogonal to the spine tangent in the correspondent point
3713         #  @param theName Object name; when specified, this parameter is used
3714         #         for result publication in the study. Otherwise, if automatic
3715         #         publication is switched on, default value is used for result name.
3716         #
3717         #  @return New GEOM.GEOM_Object, containing the created pipe.
3718         #
3719         #  @ref tui_creation_pipe_with_diff_sec "Example"
3720         def MakePipeWithDifferentSections(self, theSeqBases,
3721                                           theLocations, thePath,
3722                                           theWithContact, theWithCorrection, theName=None):
3723             """
3724             Create a shape by extrusion of the profile shape along
3725             the path shape. The path shape can be a wire or an edge.
3726             the several profiles can be specified in the several locations of path.
3727
3728             Parameters:
3729                 theSeqBases - list of  Bases shape to be extruded.
3730                 theLocations - list of locations on the path corresponding
3731                                specified list of the Bases shapes. Number of locations
3732                                should be equal to number of bases or list of locations can be empty.
3733                 thePath - Path shape to extrude the base shape along it.
3734                 theWithContact - the mode defining that the section is translated to be in
3735                                  contact with the spine(0/1)
3736                 theWithCorrection - defining that the section is rotated to be
3737                                     orthogonal to the spine tangent in the correspondent point (0/1)
3738                 theName Object name; when specified, this parameter is used
3739                         for result publication in the study. Otherwise, if automatic
3740                         publication is switched on, default value is used for result name.
3741
3742             Returns:
3743                 New GEOM.GEOM_Object, containing the created pipe.
3744             """
3745             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3746                                                               theLocations, thePath,
3747                                                               theWithContact, theWithCorrection)
3748             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3749             self._autoPublish(anObj, theName, "pipe")
3750             return anObj
3751
3752         ## Create a shape by extrusion of the profile shape along
3753         #  the path shape. The path shape can be a wire or a edge.
3754         #  the several profiles can be specified in the several locations of path.
3755         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3756         #                       shell or face. If number of faces in neighbour sections
3757         #                       aren't coincided result solid between such sections will
3758         #                       be created using external boundaries of this shells.
3759         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3760         #                          This list is used for searching correspondences between
3761         #                          faces in the sections. Size of this list must be equal
3762         #                          to size of list of base shapes.
3763         #  @param theLocations - list of locations on the path corresponding
3764         #                        specified list of the Bases shapes. Number of locations
3765         #                        should be equal to number of bases. First and last
3766         #                        locations must be coincided with first and last vertexes
3767         #                        of path correspondingly.
3768         #  @param thePath - Path shape to extrude the base shape along it.
3769         #  @param theWithContact - the mode defining that the section is translated to be in
3770         #                          contact with the spine.
3771         #  @param theWithCorrection - defining that the section is rotated to be
3772         #                             orthogonal to the spine tangent in the correspondent point
3773         #  @param theName Object name; when specified, this parameter is used
3774         #         for result publication in the study. Otherwise, if automatic
3775         #         publication is switched on, default value is used for result name.
3776         #
3777         #  @return New GEOM.GEOM_Object, containing the created solids.
3778         #
3779         #  @ref tui_creation_pipe_with_shell_sec "Example"
3780         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3781                                       theLocations, thePath,
3782                                       theWithContact, theWithCorrection, theName=None):
3783             """
3784             Create a shape by extrusion of the profile shape along
3785             the path shape. The path shape can be a wire or a edge.
3786             the several profiles can be specified in the several locations of path.
3787
3788             Parameters:
3789                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3790                               shell or face. If number of faces in neighbour sections
3791                               aren't coincided result solid between such sections will
3792                               be created using external boundaries of this shells.
3793                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3794                                  This list is used for searching correspondences between
3795                                  faces in the sections. Size of this list must be equal
3796                                  to size of list of base shapes.
3797                 theLocations - list of locations on the path corresponding
3798                                specified list of the Bases shapes. Number of locations
3799                                should be equal to number of bases. First and last
3800                                locations must be coincided with first and last vertexes
3801                                of path correspondingly.
3802                 thePath - Path shape to extrude the base shape along it.
3803                 theWithContact - the mode defining that the section is translated to be in
3804                                  contact with the spine (0/1)
3805                 theWithCorrection - defining that the section is rotated to be
3806                                     orthogonal to the spine tangent in the correspondent point (0/1)
3807                 theName Object name; when specified, this parameter is used
3808                         for result publication in the study. Otherwise, if automatic
3809                         publication is switched on, default value is used for result name.
3810
3811             Returns:                           
3812                 New GEOM.GEOM_Object, containing the created solids.
3813             """
3814             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3815                                                           theLocations, thePath,
3816                                                           theWithContact, theWithCorrection)
3817             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3818             self._autoPublish(anObj, theName, "pipe")
3819             return anObj
3820
3821         ## Create a shape by extrusion of the profile shape along
3822         #  the path shape. This function is used only for debug pipe
3823         #  functionality - it is a version of function MakePipeWithShellSections()
3824         #  which give a possibility to recieve information about
3825         #  creating pipe between each pair of sections step by step.
3826         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3827                                              theLocations, thePath,
3828                                              theWithContact, theWithCorrection, theName=None):
3829             """
3830             Create a shape by extrusion of the profile shape along
3831             the path shape. This function is used only for debug pipe
3832             functionality - it is a version of previous function
3833             geompy.MakePipeWithShellSections() which give a possibility to
3834             recieve information about creating pipe between each pair of
3835             sections step by step.
3836             """
3837             res = []
3838             nbsect = len(theSeqBases)
3839             nbsubsect = len(theSeqSubBases)
3840             #print "nbsect = ",nbsect
3841             for i in range(1,nbsect):
3842                 #print "  i = ",i
3843                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3844                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3845                 tmpSeqSubBases = []
3846                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3847                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3848                                                               tmpLocations, thePath,
3849                                                               theWithContact, theWithCorrection)
3850                 if self.PrimOp.IsDone() == 0:
3851                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3852                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3853                     break
3854                 else:
3855                     print "Pipe between ",i," and ",i+1," sections is OK"
3856                     res.append(anObj)
3857                     pass
3858                 pass
3859
3860             resc = self.MakeCompound(res)
3861             #resc = self.MakeSewing(res, 0.001)
3862             #print "resc: ",resc
3863             self._autoPublish(resc, theName, "pipe")
3864             return resc
3865
3866         ## Create solids between given sections
3867         #  @param theSeqBases - list of sections (shell or face).
3868         #  @param theLocations - list of corresponding vertexes
3869         #  @param theName Object name; when specified, this parameter is used
3870         #         for result publication in the study. Otherwise, if automatic
3871         #         publication is switched on, default value is used for result name.
3872         #
3873         #  @return New GEOM.GEOM_Object, containing the created solids.
3874         #
3875         #  @ref tui_creation_pipe_without_path "Example"
3876         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3877             """
3878             Create solids between given sections
3879
3880             Parameters:
3881                 theSeqBases - list of sections (shell or face).
3882                 theLocations - list of corresponding vertexes
3883                 theName Object name; when specified, this parameter is used
3884                         for result publication in the study. Otherwise, if automatic
3885                         publication is switched on, default value is used for result name.
3886
3887             Returns:
3888                 New GEOM.GEOM_Object, containing the created solids.
3889             """
3890             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3891             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3892             self._autoPublish(anObj, theName, "pipe")
3893             return anObj
3894
3895         ## Create a shape by extrusion of the base shape along
3896         #  the path shape with constant bi-normal direction along the given vector.
3897         #  The path shape can be a wire or an edge.
3898         #  @param theBase Base shape to be extruded.
3899         #  @param thePath Path shape to extrude the base shape along it.
3900         #  @param theVec Vector defines a constant binormal direction to keep the
3901         #                same angle beetween the direction and the sections
3902         #                along the sweep surface.
3903         #  @param theName Object name; when specified, this parameter is used
3904         #         for result publication in the study. Otherwise, if automatic
3905         #         publication is switched on, default value is used for result name.
3906         #
3907         #  @return New GEOM.GEOM_Object, containing the created pipe.
3908         #
3909         #  @ref tui_creation_pipe "Example"
3910         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3911             """
3912             Create a shape by extrusion of the base shape along
3913             the path shape with constant bi-normal direction along the given vector.
3914             The path shape can be a wire or an edge.
3915
3916             Parameters:
3917                 theBase Base shape to be extruded.
3918                 thePath Path shape to extrude the base shape along it.
3919                 theVec Vector defines a constant binormal direction to keep the
3920                        same angle beetween the direction and the sections
3921                        along the sweep surface.
3922                 theName Object name; when specified, this parameter is used
3923                         for result publication in the study. Otherwise, if automatic
3924                         publication is switched on, default value is used for result name.
3925
3926             Returns:              
3927                 New GEOM.GEOM_Object, containing the created pipe.
3928             """
3929             # Example: see GEOM_TestAll.py
3930             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3931             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3932             self._autoPublish(anObj, theName, "pipe")
3933             return anObj
3934               
3935         ## Makes a thick solid from a face or a shell
3936         #  @param theShape Face or Shell to be thicken
3937         #  @param theThickness Thickness of the resulting solid
3938         #  @param theName Object name; when specified, this parameter is used
3939         #         for result publication in the study. Otherwise, if automatic
3940         #         publication is switched on, default value is used for result name.
3941         #
3942         #  @return New GEOM.GEOM_Object, containing the created solid
3943         #
3944         def MakeThickSolid(self, theShape, theThickness, theName=None):
3945             """
3946             Make a thick solid from a face or a shell
3947
3948             Parameters:
3949                  theShape Face or Shell to be thicken
3950                  theThickness Thickness of the resulting solid
3951                  theName Object name; when specified, this parameter is used
3952                  for result publication in the study. Otherwise, if automatic
3953                  publication is switched on, default value is used for result name.
3954                  
3955             Returns:
3956                 New GEOM.GEOM_Object, containing the created solid
3957             """
3958             # Example: see GEOM_TestAll.py
3959             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3960             RaiseIfFailed("MakeThickening", self.PrimOp)
3961             self._autoPublish(anObj, theName, "pipe")
3962             return anObj
3963             
3964
3965         ## Modifies a face or a shell to make it a thick solid
3966         #  @param theShape Face or Shell to be thicken
3967         #  @param theThickness Thickness of the resulting solid
3968         #
3969         #  @return The modified shape
3970         #
3971         def Thicken(self, theShape, theThickness):
3972             """
3973             Modifies a face or a shell to make it a thick solid
3974
3975             Parameters:
3976                 theBase Base shape to be extruded.
3977                 thePath Path shape to extrude the base shape along it.
3978                 theName Object name; when specified, this parameter is used
3979                         for result publication in the study. Otherwise, if automatic
3980                         publication is switched on, default value is used for result name.
3981
3982             Returns:
3983                 The modified shape
3984             """
3985             # Example: see GEOM_TestAll.py
3986             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3987             RaiseIfFailed("MakeThickening", self.PrimOp)
3988             return anObj
3989
3990         ## Build a middle path of a pipe-like shape.
3991         #  The path shape can be a wire or an edge.
3992         #  @param theShape It can be closed or unclosed pipe-like shell
3993         #                  or a pipe-like solid.
3994         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3995         #                            should be wires or faces of theShape.
3996         #  @param theName Object name; when specified, this parameter is used
3997         #         for result publication in the study. Otherwise, if automatic
3998         #         publication is switched on, default value is used for result name.
3999         #
4000         #  @note It is not assumed that exact or approximate copy of theShape
4001         #        can be obtained by applying existing Pipe operation on the
4002         #        resulting "Path" wire taking theBase1 as the base - it is not
4003         #        always possible; though in some particular cases it might work
4004         #        it is not guaranteed. Thus, RestorePath function should not be
4005         #        considered as an exact reverse operation of the Pipe.
4006         #
4007         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4008         #                                source pipe's "path".
4009         #
4010         #  @ref tui_creation_pipe_path "Example"
4011         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4012             """
4013             Build a middle path of a pipe-like shape.
4014             The path shape can be a wire or an edge.
4015
4016             Parameters:
4017                 theShape It can be closed or unclosed pipe-like shell
4018                          or a pipe-like solid.
4019                 theBase1, theBase2 Two bases of the supposed pipe. This
4020                                    should be wires or faces of theShape.
4021                 theName Object name; when specified, this parameter is used
4022                         for result publication in the study. Otherwise, if automatic
4023                         publication is switched on, default value is used for result name.
4024
4025             Returns:
4026                 New GEOM_Object, containing an edge or wire that represent
4027                                  source pipe's path.
4028             """
4029             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4030             RaiseIfFailed("RestorePath", self.PrimOp)
4031             self._autoPublish(anObj, theName, "path")
4032             return anObj
4033
4034         ## Build a middle path of a pipe-like shape.
4035         #  The path shape can be a wire or an edge.
4036         #  @param theShape It can be closed or unclosed pipe-like shell
4037         #                  or a pipe-like solid.
4038         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4039         #                                should be lists of edges of theShape.
4040         #  @param theName Object name; when specified, this parameter is used
4041         #         for result publication in the study. Otherwise, if automatic
4042         #         publication is switched on, default value is used for result name.
4043         #
4044         #  @note It is not assumed that exact or approximate copy of theShape
4045         #        can be obtained by applying existing Pipe operation on the
4046         #        resulting "Path" wire taking theBase1 as the base - it is not
4047         #        always possible; though in some particular cases it might work
4048         #        it is not guaranteed. Thus, RestorePath function should not be
4049         #        considered as an exact reverse operation of the Pipe.
4050         #
4051         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4052         #                                source pipe's "path".
4053         #
4054         #  @ref tui_creation_pipe_path "Example"
4055         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4056             """
4057             Build a middle path of a pipe-like shape.
4058             The path shape can be a wire or an edge.
4059
4060             Parameters:
4061                 theShape It can be closed or unclosed pipe-like shell
4062                          or a pipe-like solid.
4063                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4064                                        should be lists of edges of theShape.
4065                 theName Object name; when specified, this parameter is used
4066                         for result publication in the study. Otherwise, if automatic
4067                         publication is switched on, default value is used for result name.
4068
4069             Returns:
4070                 New GEOM_Object, containing an edge or wire that represent
4071                                  source pipe's path.
4072             """
4073             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4074             RaiseIfFailed("RestorePath", self.PrimOp)
4075             self._autoPublish(anObj, theName, "path")
4076             return anObj
4077
4078         # end of l3_complex
4079         ## @}
4080
4081         ## @addtogroup l3_advanced
4082         ## @{
4083
4084         ## Create a linear edge with specified ends.
4085         #  @param thePnt1 Point for the first end of edge.
4086         #  @param thePnt2 Point for the second end of edge.
4087         #  @param theName Object name; when specified, this parameter is used
4088         #         for result publication in the study. Otherwise, if automatic
4089         #         publication is switched on, default value is used for result name.
4090         #
4091         #  @return New GEOM.GEOM_Object, containing the created edge.
4092         #
4093         #  @ref tui_creation_edge "Example"
4094         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4095             """
4096             Create a linear edge with specified ends.
4097
4098             Parameters:
4099                 thePnt1 Point for the first end of edge.
4100                 thePnt2 Point for the second end of edge.
4101                 theName Object name; when specified, this parameter is used
4102                         for result publication in the study. Otherwise, if automatic
4103                         publication is switched on, default value is used for result name.
4104
4105             Returns:           
4106                 New GEOM.GEOM_Object, containing the created edge.
4107             """
4108             # Example: see GEOM_TestAll.py
4109             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4110             RaiseIfFailed("MakeEdge", self.ShapesOp)
4111             self._autoPublish(anObj, theName, "edge")
4112             return anObj
4113
4114         ## Create a new edge, corresponding to the given length on the given curve.
4115         #  @param theRefCurve The referenced curve (edge).
4116         #  @param theLength Length on the referenced curve. It can be negative.
4117         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4118         #                       at the end of \a theRefCurve, close to the selected point.
4119         #                       If None, start from the first point of \a theRefCurve.
4120         #  @param theName Object name; when specified, this parameter is used
4121         #         for result publication in the study. Otherwise, if automatic
4122         #         publication is switched on, default value is used for result name.
4123         #
4124         #  @return New GEOM.GEOM_Object, containing the created edge.
4125         #
4126         #  @ref tui_creation_edge "Example"
4127         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4128             """
4129             Create a new edge, corresponding to the given length on the given curve.
4130
4131             Parameters:
4132                 theRefCurve The referenced curve (edge).
4133                 theLength Length on the referenced curve. It can be negative.
4134                 theStartPoint Any point can be selected for it, the new edge will begin
4135                               at the end of theRefCurve, close to the selected point.
4136                               If None, start from the first point of theRefCurve.
4137                 theName Object name; when specified, this parameter is used
4138                         for result publication in the study. Otherwise, if automatic
4139                         publication is switched on, default value is used for result name.
4140
4141             Returns:              
4142                 New GEOM.GEOM_Object, containing the created edge.
4143             """
4144             # Example: see GEOM_TestAll.py
4145             theLength, Parameters = ParseParameters(theLength)
4146             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4147             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4148             anObj.SetParameters(Parameters)
4149             self._autoPublish(anObj, theName, "edge")
4150             return anObj
4151
4152         ## Create an edge from specified wire.
4153         #  @param theWire source Wire
4154         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4155         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4156         #  @param theName Object name; when specified, this parameter is used
4157         #         for result publication in the study. Otherwise, if automatic
4158         #         publication is switched on, default value is used for result name.
4159         #
4160         #  @return New GEOM.GEOM_Object, containing the created edge.
4161         #
4162         #  @ref tui_creation_edge "Example"
4163         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4164             """
4165             Create an edge from specified wire.
4166
4167             Parameters:
4168                 theWire source Wire
4169                 theLinearTolerance linear tolerance value (default = 1e-07)
4170                 theAngularTolerance angular tolerance value (default = 1e-12)
4171                 theName Object name; when specified, this parameter is used
4172                         for result publication in the study. Otherwise, if automatic
4173                         publication is switched on, default value is used for result name.
4174
4175             Returns:
4176                 New GEOM.GEOM_Object, containing the created edge.
4177             """
4178             # Example: see GEOM_TestAll.py
4179             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4180             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4181             self._autoPublish(anObj, theName, "edge")
4182             return anObj
4183
4184         ## Create a wire from the set of edges and wires.
4185         #  @param theEdgesAndWires List of edges and/or wires.
4186         #  @param theTolerance Maximum distance between vertices, that will be merged.
4187         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4188         #  @param theName Object name; when specified, this parameter is used
4189         #         for result publication in the study. Otherwise, if automatic
4190         #         publication is switched on, default value is used for result name.
4191         #
4192         #  @return New GEOM.GEOM_Object, containing the created wire.
4193         #
4194         #  @ref tui_creation_wire "Example"
4195         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4196             """
4197             Create a wire from the set of edges and wires.
4198
4199             Parameters:
4200                 theEdgesAndWires List of edges and/or wires.
4201                 theTolerance Maximum distance between vertices, that will be merged.
4202                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4203                 theName Object name; when specified, this parameter is used
4204                         for result publication in the study. Otherwise, if automatic
4205                         publication is switched on, default value is used for result name.
4206
4207             Returns:                    
4208                 New GEOM.GEOM_Object, containing the created wire.
4209             """
4210             # Example: see GEOM_TestAll.py
4211             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4212             RaiseIfFailed("MakeWire", self.ShapesOp)
4213             self._autoPublish(anObj, theName, "wire")
4214             return anObj
4215
4216         ## Create a face on the given wire.
4217         #  @param theWire closed Wire or Edge to build the face on.
4218         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4219         #                        If the tolerance of the obtained planar face is less
4220         #                        than 1e-06, this face will be returned, otherwise the
4221         #                        algorithm tries to build any suitable face on the given
4222         #                        wire and prints a warning message.
4223         #  @param theName Object name; when specified, this parameter is used
4224         #         for result publication in the study. Otherwise, if automatic
4225         #         publication is switched on, default value is used for result name.
4226         #
4227         #  @return New GEOM.GEOM_Object, containing the created face.
4228         #
4229         #  @ref tui_creation_face "Example"
4230         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4231             """
4232             Create a face on the given wire.
4233
4234             Parameters:
4235                 theWire closed Wire or Edge to build the face on.
4236                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4237                                If the tolerance of the obtained planar face is less
4238                                than 1e-06, this face will be returned, otherwise the
4239                                algorithm tries to build any suitable face on the given
4240                                wire and prints a warning message.
4241                 theName Object name; when specified, this parameter is used
4242                         for result publication in the study. Otherwise, if automatic
4243                         publication is switched on, default value is used for result name.
4244
4245             Returns:
4246                 New GEOM.GEOM_Object, containing the created face.
4247             """
4248             # Example: see GEOM_TestAll.py
4249             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4250             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4251                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4252             else:
4253                 RaiseIfFailed("MakeFace", self.ShapesOp)
4254             self._autoPublish(anObj, theName, "face")
4255             return anObj
4256
4257         ## Create a face on the given wires set.
4258         #  @param theWires List of closed wires or edges to build the face on.
4259         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4260         #                        If the tolerance of the obtained planar face is less
4261         #                        than 1e-06, this face will be returned, otherwise the
4262         #                        algorithm tries to build any suitable face on the given
4263         #                        wire and prints a warning message.
4264         #  @param theName Object name; when specified, this parameter is used
4265         #         for result publication in the study. Otherwise, if automatic
4266         #         publication is switched on, default value is used for result name.
4267         #
4268         #  @return New GEOM.GEOM_Object, containing the created face.
4269         #
4270         #  @ref tui_creation_face "Example"
4271         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4272             """
4273             Create a face on the given wires set.
4274
4275             Parameters:
4276                 theWires List of closed wires or edges to build the face on.
4277                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4278                                If the tolerance of the obtained planar face is less
4279                                than 1e-06, this face will be returned, otherwise the
4280                                algorithm tries to build any suitable face on the given
4281                                wire and prints a warning message.
4282                 theName Object name; when specified, this parameter is used
4283                         for result publication in the study. Otherwise, if automatic
4284                         publication is switched on, default value is used for result name.
4285
4286             Returns: 
4287                 New GEOM.GEOM_Object, containing the created face.
4288             """
4289             # Example: see GEOM_TestAll.py
4290             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4291             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4292                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4293             else:
4294                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4295             self._autoPublish(anObj, theName, "face")
4296             return anObj
4297
4298         ## See MakeFaceWires() method for details.
4299         #
4300         #  @ref tui_creation_face "Example 1"
4301         #  \n @ref swig_MakeFaces  "Example 2"
4302         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4303             """
4304             See geompy.MakeFaceWires() method for details.
4305             """
4306             # Example: see GEOM_TestOthers.py
4307             # note: auto-publishing is done in self.MakeFaceWires()
4308             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4309             return anObj
4310
4311         ## Create a shell from the set of faces and shells.
4312         #  @param theFacesAndShells List of faces and/or shells.
4313         #  @param theName Object name; when specified, this parameter is used
4314         #         for result publication in the study. Otherwise, if automatic
4315         #         publication is switched on, default value is used for result name.
4316         #
4317         #  @return New GEOM.GEOM_Object, containing the created shell.
4318         #
4319         #  @ref tui_creation_shell "Example"
4320         def MakeShell(self, theFacesAndShells, theName=None):
4321             """
4322             Create a shell from the set of faces and shells.
4323
4324             Parameters:
4325                 theFacesAndShells List of faces and/or shells.
4326                 theName Object name; when specified, this parameter is used
4327                         for result publication in the study. Otherwise, if automatic
4328                         publication is switched on, default value is used for result name.
4329
4330             Returns:
4331                 New GEOM.GEOM_Object, containing the created shell.
4332             """
4333             # Example: see GEOM_TestAll.py
4334             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4335             RaiseIfFailed("MakeShell", self.ShapesOp)
4336             self._autoPublish(anObj, theName, "shell")
4337             return anObj
4338
4339         ## Create a solid, bounded by the given shells.
4340         #  @param theShells Sequence of bounding shells.
4341         #  @param theName Object name; when specified, this parameter is used
4342         #         for result publication in the study. Otherwise, if automatic
4343         #         publication is switched on, default value is used for result name.
4344         #
4345         #  @return New GEOM.GEOM_Object, containing the created solid.
4346         #
4347         #  @ref tui_creation_solid "Example"
4348         def MakeSolid(self, theShells, theName=None):
4349             """
4350             Create a solid, bounded by the given shells.
4351
4352             Parameters:
4353                 theShells Sequence of bounding shells.
4354                 theName Object name; when specified, this parameter is used
4355                         for result publication in the study. Otherwise, if automatic
4356                         publication is switched on, default value is used for result name.
4357
4358             Returns:
4359                 New GEOM.GEOM_Object, containing the created solid.
4360             """
4361             # Example: see GEOM_TestAll.py
4362             if len(theShells) == 1:
4363                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4364                 #if len(descr) > 0:
4365                 #    raise RuntimeError, "MakeSolidShells : " + descr
4366                 if descr == "WRN_SHAPE_UNCLOSED":
4367                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4368             anObj = self.ShapesOp.MakeSolidShells(theShells)
4369             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4370             self._autoPublish(anObj, theName, "solid")
4371             return anObj
4372
4373         ## Create a compound of the given shapes.
4374         #  @param theShapes List of shapes to put in compound.
4375         #  @param theName Object name; when specified, this parameter is used
4376         #         for result publication in the study. Otherwise, if automatic
4377         #         publication is switched on, default value is used for result name.
4378         #
4379         #  @return New GEOM.GEOM_Object, containing the created compound.
4380         #
4381         #  @ref tui_creation_compound "Example"
4382         def MakeCompound(self, theShapes, theName=None):
4383             """
4384             Create a compound of the given shapes.
4385
4386             Parameters:
4387                 theShapes List of shapes to put in compound.
4388                 theName Object name; when specified, this parameter is used
4389                         for result publication in the study. Otherwise, if automatic
4390                         publication is switched on, default value is used for result name.
4391
4392             Returns:
4393                 New GEOM.GEOM_Object, containing the created compound.
4394             """
4395             # Example: see GEOM_TestAll.py
4396             self.ShapesOp.StartOperation()
4397             anObj = self.ShapesOp.MakeCompound(theShapes)
4398             RaiseIfFailed("MakeCompound", self.ShapesOp)
4399             self._autoPublish(anObj, theName, "compound")
4400             return anObj
4401
4402         # end of l3_advanced
4403         ## @}
4404
4405         ## @addtogroup l2_measure
4406         ## @{
4407
4408         ## Gives quantity of faces in the given shape.
4409         #  @param theShape Shape to count faces of.
4410         #  @return Quantity of faces.
4411         #
4412         #  @ref swig_NumberOf "Example"
4413         def NumberOfFaces(self, theShape):
4414             """
4415             Gives quantity of faces in the given shape.
4416
4417             Parameters:
4418                 theShape Shape to count faces of.
4419
4420             Returns:    
4421                 Quantity of faces.
4422             """
4423             # Example: see GEOM_TestOthers.py
4424             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4425             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4426             return nb_faces
4427
4428         ## Gives quantity of edges in the given shape.
4429         #  @param theShape Shape to count edges of.
4430         #  @return Quantity of edges.
4431         #
4432         #  @ref swig_NumberOf "Example"
4433         def NumberOfEdges(self, theShape):
4434             """
4435             Gives quantity of edges in the given shape.
4436
4437             Parameters:
4438                 theShape Shape to count edges of.
4439
4440             Returns:    
4441                 Quantity of edges.
4442             """
4443             # Example: see GEOM_TestOthers.py
4444             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4445             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4446             return nb_edges
4447
4448         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4449         #  @param theShape Shape to count sub-shapes of.
4450         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4451         #  @return Quantity of sub-shapes of given type.
4452         #
4453         #  @ref swig_NumberOf "Example"
4454         def NumberOfSubShapes(self, theShape, theShapeType):
4455             """
4456             Gives quantity of sub-shapes of type theShapeType in the given shape.
4457
4458             Parameters:
4459                 theShape Shape to count sub-shapes of.
4460                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4461
4462             Returns:
4463                 Quantity of sub-shapes of given type.
4464             """
4465             # Example: see GEOM_TestOthers.py
4466             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4467             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4468             return nb_ss
4469
4470         ## Gives quantity of solids in the given shape.
4471         #  @param theShape Shape to count solids in.
4472         #  @return Quantity of solids.
4473         #
4474         #  @ref swig_NumberOf "Example"
4475         def NumberOfSolids(self, theShape):
4476             """
4477             Gives quantity of solids in the given shape.
4478
4479             Parameters:
4480                 theShape Shape to count solids in.
4481
4482             Returns:
4483                 Quantity of solids.
4484             """
4485             # Example: see GEOM_TestOthers.py
4486             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4487             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4488             return nb_solids
4489
4490         # end of l2_measure
4491         ## @}
4492
4493         ## @addtogroup l3_healing
4494         ## @{
4495
4496         ## Reverses an orientation the given shape.
4497         #  @param theShape Shape to be reversed.
4498         #  @param theName Object name; when specified, this parameter is used
4499         #         for result publication in the study. Otherwise, if automatic
4500         #         publication is switched on, default value is used for result name.
4501         #
4502         #  @return The reversed copy of theShape.
4503         #
4504         #  @ref swig_ChangeOrientation "Example"
4505         def ChangeOrientation(self, theShape, theName=None):
4506             """
4507             Reverses an orientation the given shape.
4508
4509             Parameters:
4510                 theShape Shape to be reversed.
4511                 theName Object name; when specified, this parameter is used
4512                         for result publication in the study. Otherwise, if automatic
4513                         publication is switched on, default value is used for result name.
4514
4515             Returns:   
4516                 The reversed copy of theShape.
4517             """
4518             # Example: see GEOM_TestAll.py
4519             anObj = self.ShapesOp.ChangeOrientation(theShape)
4520             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4521             self._autoPublish(anObj, theName, "reversed")
4522             return anObj
4523
4524         ## See ChangeOrientation() method for details.
4525         #
4526         #  @ref swig_OrientationChange "Example"
4527         def OrientationChange(self, theShape, theName=None):
4528             """
4529             See geompy.ChangeOrientation method for details.
4530             """
4531             # Example: see GEOM_TestOthers.py
4532             # note: auto-publishing is done in self.ChangeOrientation()
4533             anObj = self.ChangeOrientation(theShape, theName)
4534             return anObj
4535
4536         # end of l3_healing
4537         ## @}
4538
4539         ## @addtogroup l4_obtain
4540         ## @{
4541
4542         ## Retrieve all free faces from the given shape.
4543         #  Free face is a face, which is not shared between two shells of the shape.
4544         #  @param theShape Shape to find free faces in.
4545         #  @return List of IDs of all free faces, contained in theShape.
4546         #
4547         #  @ref tui_measurement_tools_page "Example"
4548         def GetFreeFacesIDs(self,theShape):
4549             """
4550             Retrieve all free faces from the given shape.
4551             Free face is a face, which is not shared between two shells of the shape.
4552
4553             Parameters:
4554                 theShape Shape to find free faces in.
4555
4556             Returns:
4557                 List of IDs of all free faces, contained in theShape.
4558             """
4559             # Example: see GEOM_TestOthers.py
4560             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4561             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4562             return anIDs
4563
4564         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4565         #  @param theShape1 Shape to find sub-shapes in.
4566         #  @param theShape2 Shape to find shared sub-shapes with.
4567         #  @param theShapeType Type of sub-shapes to be retrieved.
4568         #  @param theName Object name; when specified, this parameter is used
4569         #         for result publication in the study. Otherwise, if automatic
4570         #         publication is switched on, default value is used for result name.
4571         #
4572         #  @return List of sub-shapes of theShape1, shared with theShape2.
4573         #
4574         #  @ref swig_GetSharedShapes "Example"
4575         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4576             """
4577             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4578
4579             Parameters:
4580                 theShape1 Shape to find sub-shapes in.
4581                 theShape2 Shape to find shared sub-shapes with.
4582                 theShapeType Type of sub-shapes to be retrieved.
4583                 theName Object name; when specified, this parameter is used
4584                         for result publication in the study. Otherwise, if automatic
4585                         publication is switched on, default value is used for result name.
4586
4587             Returns:
4588                 List of sub-shapes of theShape1, shared with theShape2.
4589             """
4590             # Example: see GEOM_TestOthers.py
4591             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4592             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4593             self._autoPublish(aList, theName, "shared")
4594             return aList
4595
4596         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4597         #  @param theShapes Shapes to find common sub-shapes of.
4598         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4599         #  @param theName Object name; when specified, this parameter is used
4600         #         for result publication in the study. Otherwise, if automatic
4601         #         publication is switched on, default value is used for result name.
4602         #
4603         #  @return List of objects, that are sub-shapes of all given shapes.
4604         #
4605         #  @ref swig_GetSharedShapes "Example"
4606         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4607             """
4608             Get all sub-shapes, shared by all shapes in the list theShapes.
4609
4610             Parameters:
4611                 theShapes Shapes to find common sub-shapes of.
4612                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4613                 theName Object name; when specified, this parameter is used
4614                         for result publication in the study. Otherwise, if automatic
4615                         publication is switched on, default value is used for result name.
4616
4617             Returns:    
4618                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4619             """
4620             # Example: see GEOM_TestOthers.py
4621             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4622             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4623             self._autoPublish(aList, theName, "shared")
4624             return aList
4625
4626         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4627         #  situated relatively the specified plane by the certain way,
4628         #  defined through <VAR>theState</VAR> parameter.
4629         #  @param theShape Shape to find sub-shapes of.
4630         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4631         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4632         #                direction and location of the plane to find shapes on.
4633         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4634         #  @param theName Object name; when specified, this parameter is used
4635         #         for result publication in the study. Otherwise, if automatic
4636         #         publication is switched on, default value is used for result name.
4637         #
4638         #  @return List of all found sub-shapes.
4639         #
4640         #  @ref swig_GetShapesOnPlane "Example"
4641         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4642             """
4643             Find in theShape all sub-shapes of type theShapeType,
4644             situated relatively the specified plane by the certain way,
4645             defined through theState parameter.
4646
4647             Parameters:
4648                 theShape Shape to find sub-shapes of.
4649                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4650                 theAx1 Vector (or line, or linear edge), specifying normal
4651                        direction and location of the plane to find shapes on.
4652                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4653                 theName Object name; when specified, this parameter is used
4654                         for result publication in the study. Otherwise, if automatic
4655                         publication is switched on, default value is used for result name.
4656
4657             Returns:
4658                 List of all found sub-shapes.
4659             """
4660             # Example: see GEOM_TestOthers.py
4661             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4662             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4663             self._autoPublish(aList, theName, "shapeOnPlane")
4664             return aList
4665
4666         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4667         #  situated relatively the specified plane by the certain way,
4668         #  defined through <VAR>theState</VAR> parameter.
4669         #  @param theShape Shape to find sub-shapes of.
4670         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4671         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4672         #                direction and location of the plane to find shapes on.
4673         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4674         #
4675         #  @return List of all found sub-shapes indices.
4676         #
4677         #  @ref swig_GetShapesOnPlaneIDs "Example"
4678         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4679             """
4680             Find in theShape all sub-shapes of type theShapeType,
4681             situated relatively the specified plane by the certain way,
4682             defined through theState parameter.
4683
4684             Parameters:
4685                 theShape Shape to find sub-shapes of.
4686                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4687                 theAx1 Vector (or line, or linear edge), specifying normal
4688                        direction and location of the plane to find shapes on.
4689                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4690
4691             Returns:
4692                 List of all found sub-shapes indices.
4693             """
4694             # Example: see GEOM_TestOthers.py
4695             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4696             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4697             return aList
4698
4699         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4700         #  situated relatively the specified plane by the certain way,
4701         #  defined through <VAR>theState</VAR> parameter.
4702         #  @param theShape Shape to find sub-shapes of.
4703         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4704         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4705         #                direction of the plane to find shapes on.
4706         #  @param thePnt Point specifying location of the plane to find shapes on.
4707         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4708         #  @param theName Object name; when specified, this parameter is used
4709         #         for result publication in the study. Otherwise, if automatic
4710         #         publication is switched on, default value is used for result name.
4711         #
4712         #  @return List of all found sub-shapes.
4713         #
4714         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4715         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4716             """
4717             Find in theShape all sub-shapes of type theShapeType,
4718             situated relatively the specified plane by the certain way,
4719             defined through theState parameter.
4720
4721             Parameters:
4722                 theShape Shape to find sub-shapes of.
4723                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4724                 theAx1 Vector (or line, or linear edge), specifying normal
4725                        direction and location of the plane to find shapes on.
4726                 thePnt Point specifying location of the plane to find shapes on.
4727                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4728                 theName Object name; when specified, this parameter is used
4729                         for result publication in the study. Otherwise, if automatic
4730                         publication is switched on, default value is used for result name.
4731
4732             Returns:
4733                 List of all found sub-shapes.
4734             """
4735             # Example: see GEOM_TestOthers.py
4736             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4737                                                                theAx1, thePnt, theState)
4738             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4739             self._autoPublish(aList, theName, "shapeOnPlane")
4740             return aList
4741
4742         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4743         #  situated relatively the specified plane by the certain way,
4744         #  defined through <VAR>theState</VAR> parameter.
4745         #  @param theShape Shape to find sub-shapes of.
4746         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4747         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4748         #                direction of the plane to find shapes on.
4749         #  @param thePnt Point specifying location of the plane to find shapes on.
4750         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4751         #
4752         #  @return List of all found sub-shapes indices.
4753         #
4754         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4755         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4756             """
4757             Find in theShape all sub-shapes of type theShapeType,
4758             situated relatively the specified plane by the certain way,
4759             defined through theState parameter.
4760
4761             Parameters:
4762                 theShape Shape to find sub-shapes of.
4763                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4764                 theAx1 Vector (or line, or linear edge), specifying normal
4765                        direction and location of the plane to find shapes on.
4766                 thePnt Point specifying location of the plane to find shapes on.
4767                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4768
4769             Returns:
4770                 List of all found sub-shapes indices.
4771             """
4772             # Example: see GEOM_TestOthers.py
4773             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4774                                                                   theAx1, thePnt, theState)
4775             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4776             return aList
4777
4778         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4779         #  the specified cylinder by the certain way, defined through \a theState parameter.
4780         #  @param theShape Shape to find sub-shapes of.
4781         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4782         #  @param theAxis Vector (or line, or linear edge), specifying
4783         #                 axis of the cylinder to find shapes on.
4784         #  @param theRadius Radius of the cylinder to find shapes on.
4785         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4786         #  @param theName Object name; when specified, this parameter is used
4787         #         for result publication in the study. Otherwise, if automatic
4788         #         publication is switched on, default value is used for result name.
4789         #
4790         #  @return List of all found sub-shapes.
4791         #
4792         #  @ref swig_GetShapesOnCylinder "Example"
4793         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4794             """
4795             Find in theShape all sub-shapes of type theShapeType, situated relatively
4796             the specified cylinder by the certain way, defined through theState parameter.
4797
4798             Parameters:
4799                 theShape Shape to find sub-shapes of.
4800                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4801                 theAxis Vector (or line, or linear edge), specifying
4802                         axis of the cylinder to find shapes on.
4803                 theRadius Radius of the cylinder to find shapes on.
4804                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4805                 theName Object name; when specified, this parameter is used
4806                         for result publication in the study. Otherwise, if automatic
4807                         publication is switched on, default value is used for result name.
4808
4809             Returns:
4810                 List of all found sub-shapes.
4811             """
4812             # Example: see GEOM_TestOthers.py
4813             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4814             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4815             self._autoPublish(aList, theName, "shapeOnCylinder")
4816             return aList
4817
4818         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4819         #  the specified cylinder by the certain way, defined through \a theState parameter.
4820         #  @param theShape Shape to find sub-shapes of.
4821         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4822         #  @param theAxis Vector (or line, or linear edge), specifying
4823         #                 axis of the cylinder to find shapes on.
4824         #  @param theRadius Radius of the cylinder to find shapes on.
4825         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4826         #
4827         #  @return List of all found sub-shapes indices.
4828         #
4829         #  @ref swig_GetShapesOnCylinderIDs "Example"
4830         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4831             """
4832             Find in theShape all sub-shapes of type theShapeType, situated relatively
4833             the specified cylinder by the certain way, defined through theState parameter.
4834
4835             Parameters:
4836                 theShape Shape to find sub-shapes of.
4837                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4838                 theAxis Vector (or line, or linear edge), specifying
4839                         axis of the cylinder to find shapes on.
4840                 theRadius Radius of the cylinder to find shapes on.
4841                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4842
4843             Returns:
4844                 List of all found sub-shapes indices.
4845             """
4846             # Example: see GEOM_TestOthers.py
4847             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4848             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4849             return aList
4850
4851         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4852         #  the specified cylinder by the certain way, defined through \a theState parameter.
4853         #  @param theShape Shape to find sub-shapes of.
4854         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4855         #  @param theAxis Vector (or line, or linear edge), specifying
4856         #                 axis of the cylinder to find shapes on.
4857         #  @param thePnt Point specifying location of the bottom of the cylinder.
4858         #  @param theRadius Radius of the cylinder to find shapes on.
4859         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4860         #  @param theName Object name; when specified, this parameter is used
4861         #         for result publication in the study. Otherwise, if automatic
4862         #         publication is switched on, default value is used for result name.
4863         #
4864         #  @return List of all found sub-shapes.
4865         #
4866         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4867         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4868             """
4869             Find in theShape all sub-shapes of type theShapeType, situated relatively
4870             the specified cylinder by the certain way, defined through theState parameter.
4871
4872             Parameters:
4873                 theShape Shape to find sub-shapes of.
4874                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4875                 theAxis Vector (or line, or linear edge), specifying
4876                         axis of the cylinder to find shapes on.
4877                 theRadius Radius of the cylinder to find shapes on.
4878                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4879                 theName Object name; when specified, this parameter is used
4880                         for result publication in the study. Otherwise, if automatic
4881                         publication is switched on, default value is used for result name.
4882
4883             Returns:
4884                 List of all found sub-shapes.
4885             """
4886             # Example: see GEOM_TestOthers.py
4887             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4888             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4889             self._autoPublish(aList, theName, "shapeOnCylinder")
4890             return aList
4891
4892         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4893         #  the specified cylinder by the certain way, defined through \a theState parameter.
4894         #  @param theShape Shape to find sub-shapes of.
4895         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4896         #  @param theAxis Vector (or line, or linear edge), specifying
4897         #                 axis of the cylinder to find shapes on.
4898         #  @param thePnt Point specifying location of the bottom of the cylinder.
4899         #  @param theRadius Radius of the cylinder to find shapes on.
4900         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4901         #
4902         #  @return List of all found sub-shapes indices
4903         #
4904         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4905         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4906             """
4907             Find in theShape all sub-shapes of type theShapeType, situated relatively
4908             the specified cylinder by the certain way, defined through theState parameter.
4909
4910             Parameters:
4911                 theShape Shape to find sub-shapes of.
4912                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4913                 theAxis Vector (or line, or linear edge), specifying
4914                         axis of the cylinder to find shapes on.
4915                 theRadius Radius of the cylinder to find shapes on.
4916                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4917
4918             Returns:
4919                 List of all found sub-shapes indices.            
4920             """
4921             # Example: see GEOM_TestOthers.py
4922             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4923             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4924             return aList
4925
4926         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4927         #  the specified sphere by the certain way, defined through \a theState parameter.
4928         #  @param theShape Shape to find sub-shapes of.
4929         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4930         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4931         #  @param theRadius Radius of the sphere to find shapes on.
4932         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4933         #  @param theName Object name; when specified, this parameter is used
4934         #         for result publication in the study. Otherwise, if automatic
4935         #         publication is switched on, default value is used for result name.
4936         #
4937         #  @return List of all found sub-shapes.
4938         #
4939         #  @ref swig_GetShapesOnSphere "Example"
4940         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4941             """
4942             Find in theShape all sub-shapes of type theShapeType, situated relatively
4943             the specified sphere by the certain way, defined through theState parameter.
4944
4945             Parameters:
4946                 theShape Shape to find sub-shapes of.
4947                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4948                 theCenter Point, specifying center of the sphere to find shapes on.
4949                 theRadius Radius of the sphere to find shapes on.
4950                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4951                 theName Object name; when specified, this parameter is used
4952                         for result publication in the study. Otherwise, if automatic
4953                         publication is switched on, default value is used for result name.
4954
4955             Returns:
4956                 List of all found sub-shapes.
4957             """
4958             # Example: see GEOM_TestOthers.py
4959             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4960             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4961             self._autoPublish(aList, theName, "shapeOnSphere")
4962             return aList
4963
4964         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4965         #  the specified sphere by the certain way, defined through \a theState parameter.
4966         #  @param theShape Shape to find sub-shapes of.
4967         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4968         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4969         #  @param theRadius Radius of the sphere to find shapes on.
4970         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4971         #
4972         #  @return List of all found sub-shapes indices.
4973         #
4974         #  @ref swig_GetShapesOnSphereIDs "Example"
4975         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4976             """
4977             Find in theShape all sub-shapes of type theShapeType, situated relatively
4978             the specified sphere by the certain way, defined through theState parameter.
4979
4980             Parameters:
4981                 theShape Shape to find sub-shapes of.
4982                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4983                 theCenter Point, specifying center of the sphere to find shapes on.
4984                 theRadius Radius of the sphere to find shapes on.
4985                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4986
4987             Returns:
4988                 List of all found sub-shapes indices.
4989             """
4990             # Example: see GEOM_TestOthers.py
4991             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4992             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4993             return aList
4994
4995         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4996         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4997         #  @param theShape Shape to find sub-shapes of.
4998         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4999         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5000         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5001         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5002         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5003         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5004         #  @param theName Object name; when specified, this parameter is used
5005         #         for result publication in the study. Otherwise, if automatic
5006         #         publication is switched on, default value is used for result name.
5007         #
5008         #  @return List of all found sub-shapes.
5009         #
5010         #  @ref swig_GetShapesOnQuadrangle "Example"
5011         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5012                                   theTopLeftPoint, theTopRigthPoint,
5013                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5014             """
5015             Find in theShape all sub-shapes of type theShapeType, situated relatively
5016             the specified quadrangle by the certain way, defined through theState parameter.
5017
5018             Parameters:
5019                 theShape Shape to find sub-shapes of.
5020                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5021                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5022                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5023                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5024                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5025                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5026                 theName Object name; when specified, this parameter is used
5027                         for result publication in the study. Otherwise, if automatic
5028                         publication is switched on, default value is used for result name.
5029
5030             Returns:
5031                 List of all found sub-shapes.
5032             """
5033             # Example: see GEOM_TestOthers.py
5034             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5035                                                         theTopLeftPoint, theTopRigthPoint,
5036                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5037             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5038             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5039             return aList
5040
5041         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5042         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5043         #  @param theShape Shape to find sub-shapes of.
5044         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5045         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5046         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5047         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5048         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5049         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5050         #
5051         #  @return List of all found sub-shapes indices.
5052         #
5053         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5054         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5055                                      theTopLeftPoint, theTopRigthPoint,
5056                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5057             """
5058             Find in theShape all sub-shapes of type theShapeType, situated relatively
5059             the specified quadrangle by the certain way, defined through theState parameter.
5060
5061             Parameters:
5062                 theShape Shape to find sub-shapes of.
5063                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5064                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5065                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5066                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5067                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5068                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5069
5070             Returns:
5071                 List of all found sub-shapes indices.
5072             """
5073
5074             # Example: see GEOM_TestOthers.py
5075             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5076                                                            theTopLeftPoint, theTopRigthPoint,
5077                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5078             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5079             return aList
5080
5081         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5082         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5083         #  @param theBox Shape for relative comparing.
5084         #  @param theShape Shape to find sub-shapes of.
5085         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5086         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5087         #  @param theName Object name; when specified, this parameter is used
5088         #         for result publication in the study. Otherwise, if automatic
5089         #         publication is switched on, default value is used for result name.
5090         #
5091         #  @return List of all found sub-shapes.
5092         #
5093         #  @ref swig_GetShapesOnBox "Example"
5094         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5095             """
5096             Find in theShape all sub-shapes of type theShapeType, situated relatively
5097             the specified theBox by the certain way, defined through theState parameter.
5098
5099             Parameters:
5100                 theBox Shape for relative comparing.
5101                 theShape Shape to find sub-shapes of.
5102                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5103                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5104                 theName Object name; when specified, this parameter is used
5105                         for result publication in the study. Otherwise, if automatic
5106                         publication is switched on, default value is used for result name.
5107
5108             Returns:
5109                 List of all found sub-shapes.
5110             """
5111             # Example: see GEOM_TestOthers.py
5112             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5113             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5114             self._autoPublish(aList, theName, "shapeOnBox")
5115             return aList
5116
5117         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5118         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5119         #  @param theBox Shape for relative comparing.
5120         #  @param theShape Shape to find sub-shapes of.
5121         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5122         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5123         #
5124         #  @return List of all found sub-shapes indices.
5125         #
5126         #  @ref swig_GetShapesOnBoxIDs "Example"
5127         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5128             """
5129             Find in theShape all sub-shapes of type theShapeType, situated relatively
5130             the specified theBox by the certain way, defined through theState parameter.
5131
5132             Parameters:
5133                 theBox Shape for relative comparing.
5134                 theShape Shape to find sub-shapes of.
5135                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5136                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5137
5138             Returns:
5139                 List of all found sub-shapes indices.
5140             """
5141             # Example: see GEOM_TestOthers.py
5142             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5143             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5144             return aList
5145
5146         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5147         #  situated relatively the specified \a theCheckShape by the
5148         #  certain way, defined through \a theState parameter.
5149         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5150         #  @param theShape Shape to find sub-shapes of.
5151         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5152         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5153         #  @param theName Object name; when specified, this parameter is used
5154         #         for result publication in the study. Otherwise, if automatic
5155         #         publication is switched on, default value is used for result name.
5156         #
5157         #  @return List of all found sub-shapes.
5158         #
5159         #  @ref swig_GetShapesOnShape "Example"
5160         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5161             """
5162             Find in theShape all sub-shapes of type theShapeType,
5163             situated relatively the specified theCheckShape by the
5164             certain way, defined through theState parameter.
5165
5166             Parameters:
5167                 theCheckShape Shape for relative comparing. It must be a solid.
5168                 theShape Shape to find sub-shapes of.
5169                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5170                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5171                 theName Object name; when specified, this parameter is used
5172                         for result publication in the study. Otherwise, if automatic
5173                         publication is switched on, default value is used for result name.
5174
5175             Returns:
5176                 List of all found sub-shapes.
5177             """
5178             # Example: see GEOM_TestOthers.py
5179             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5180                                                    theShapeType, theState)
5181             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5182             self._autoPublish(aList, theName, "shapeOnShape")
5183             return aList
5184
5185         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5186         #  situated relatively the specified \a theCheckShape by the
5187         #  certain way, defined through \a theState parameter.
5188         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5189         #  @param theShape Shape to find sub-shapes of.
5190         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5191         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
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 All found sub-shapes as compound.
5197         #
5198         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5199         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5200             """
5201             Find in theShape all sub-shapes of type theShapeType,
5202             situated relatively the specified theCheckShape by the
5203             certain way, defined through theState parameter.
5204
5205             Parameters:
5206                 theCheckShape Shape for relative comparing. It must be a solid.
5207                 theShape Shape to find sub-shapes of.
5208                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5209                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5210                 theName Object name; when specified, this parameter is used
5211                         for result publication in the study. Otherwise, if automatic
5212                         publication is switched on, default value is used for result name.
5213
5214             Returns:
5215                 All found sub-shapes as compound.
5216             """
5217             # Example: see GEOM_TestOthers.py
5218             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5219                                                              theShapeType, theState)
5220             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5221             self._autoPublish(anObj, theName, "shapeOnShape")
5222             return anObj
5223
5224         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5225         #  situated relatively the specified \a theCheckShape by the
5226         #  certain way, defined through \a theState parameter.
5227         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5228         #  @param theShape Shape to find sub-shapes of.
5229         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5230         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5231         #
5232         #  @return List of all found sub-shapes indices.
5233         #
5234         #  @ref swig_GetShapesOnShapeIDs "Example"
5235         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5236             """
5237             Find in theShape all sub-shapes of type theShapeType,
5238             situated relatively the specified theCheckShape by the
5239             certain way, defined through theState parameter.
5240
5241             Parameters:
5242                 theCheckShape Shape for relative comparing. It must be a solid.
5243                 theShape Shape to find sub-shapes of.
5244                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5245                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5246
5247             Returns:
5248                 List of all found sub-shapes indices.
5249             """
5250             # Example: see GEOM_TestOthers.py
5251             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5252                                                       theShapeType, theState)
5253             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5254             return aList
5255
5256         ## Get sub-shape(s) of theShapeWhere, which are
5257         #  coincident with \a theShapeWhat or could be a part of it.
5258         #  @param theShapeWhere Shape to find sub-shapes of.
5259         #  @param theShapeWhat Shape, specifying what to find.
5260         #  @param isNewImplementation implementation of GetInPlace functionality
5261         #             (default = False, old alghorithm based on shape properties)
5262         #  @param theName Object name; when specified, this parameter is used
5263         #         for result publication in the study. Otherwise, if automatic
5264         #         publication is switched on, default value is used for result name.
5265         #
5266         #  @return Group of all found sub-shapes or a single found sub-shape.
5267         #
5268         #  @note This function has a restriction on argument shapes.
5269         #        If \a theShapeWhere has curved parts with significantly
5270         #        outstanding centres (i.e. the mass centre of a part is closer to
5271         #        \a theShapeWhat than to the part), such parts will not be found.
5272         #        @image html get_in_place_lost_part.png
5273         #
5274         #  @ref swig_GetInPlace "Example"
5275         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5276             """
5277             Get sub-shape(s) of theShapeWhere, which are
5278             coincident with  theShapeWhat or could be a part of it.
5279
5280             Parameters:
5281                 theShapeWhere Shape to find sub-shapes of.
5282                 theShapeWhat Shape, specifying what to find.
5283                 isNewImplementation Implementation of GetInPlace functionality
5284                                     (default = False, old alghorithm based on shape properties)
5285                 theName Object name; when specified, this parameter is used
5286                         for result publication in the study. Otherwise, if automatic
5287                         publication is switched on, default value is used for result name.
5288
5289             Returns:
5290                 Group of all found sub-shapes or a single found sub-shape.
5291
5292                 
5293             Note:
5294                 This function has a restriction on argument shapes.
5295                 If theShapeWhere has curved parts with significantly
5296                 outstanding centres (i.e. the mass centre of a part is closer to
5297                 theShapeWhat than to the part), such parts will not be found.
5298             """
5299             # Example: see GEOM_TestOthers.py
5300             anObj = None
5301             if isNewImplementation:
5302                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5303             else:
5304                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5305                 pass
5306             RaiseIfFailed("GetInPlace", self.ShapesOp)
5307             self._autoPublish(anObj, theName, "inplace")
5308             return anObj
5309
5310         ## Get sub-shape(s) of \a theShapeWhere, which are
5311         #  coincident with \a theShapeWhat or could be a part of it.
5312         #
5313         #  Implementation of this method is based on a saved history of an operation,
5314         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5315         #  arguments (an argument shape or a sub-shape of an argument shape).
5316         #  The operation could be the Partition or one of boolean operations,
5317         #  performed on simple shapes (not on compounds).
5318         #
5319         #  @param theShapeWhere Shape to find sub-shapes of.
5320         #  @param theShapeWhat Shape, specifying what to find (must be in the
5321         #                      building history of the ShapeWhere).
5322         #  @param theName Object name; when specified, this parameter is used
5323         #         for result publication in the study. Otherwise, if automatic
5324         #         publication is switched on, default value is used for result name.
5325         #
5326         #  @return Group of all found sub-shapes or a single found sub-shape.
5327         #
5328         #  @ref swig_GetInPlace "Example"
5329         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5330             """
5331             Implementation of this method is based on a saved history of an operation,
5332             produced theShapeWhere. The theShapeWhat must be among this operation's
5333             arguments (an argument shape or a sub-shape of an argument shape).
5334             The operation could be the Partition or one of boolean operations,
5335             performed on simple shapes (not on compounds).
5336
5337             Parameters:
5338                 theShapeWhere Shape to find sub-shapes of.
5339                 theShapeWhat Shape, specifying what to find (must be in the
5340                                 building history of the ShapeWhere).
5341                 theName Object name; when specified, this parameter is used
5342                         for result publication in the study. Otherwise, if automatic
5343                         publication is switched on, default value is used for result name.
5344
5345             Returns:
5346                 Group of all found sub-shapes or a single found sub-shape.
5347             """
5348             # Example: see GEOM_TestOthers.py
5349             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5350             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5351             self._autoPublish(anObj, theName, "inplace")
5352             return anObj
5353
5354         ## Get sub-shape of theShapeWhere, which is
5355         #  equal to \a theShapeWhat.
5356         #  @param theShapeWhere Shape to find sub-shape of.
5357         #  @param theShapeWhat Shape, specifying what to find.
5358         #  @param theName Object name; when specified, this parameter is used
5359         #         for result publication in the study. Otherwise, if automatic
5360         #         publication is switched on, default value is used for result name.
5361         #
5362         #  @return New GEOM.GEOM_Object for found sub-shape.
5363         #
5364         #  @ref swig_GetSame "Example"
5365         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5366             """
5367             Get sub-shape of theShapeWhere, which is
5368             equal to theShapeWhat.
5369
5370             Parameters:
5371                 theShapeWhere Shape to find sub-shape of.
5372                 theShapeWhat Shape, specifying what to find.
5373                 theName Object name; when specified, this parameter is used
5374                         for result publication in the study. Otherwise, if automatic
5375                         publication is switched on, default value is used for result name.
5376
5377             Returns:
5378                 New GEOM.GEOM_Object for found sub-shape.
5379             """
5380             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5381             RaiseIfFailed("GetSame", self.ShapesOp)
5382             self._autoPublish(anObj, theName, "sameShape")
5383             return anObj
5384
5385
5386         ## Get sub-shape indices of theShapeWhere, which is
5387         #  equal to \a theShapeWhat.
5388         #  @param theShapeWhere Shape to find sub-shape of.
5389         #  @param theShapeWhat Shape, specifying what to find.
5390         #  @return List of all found sub-shapes indices. 
5391         #
5392         #  @ref swig_GetSame "Example"
5393         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5394             """
5395             Get sub-shape indices of theShapeWhere, which is
5396             equal to theShapeWhat.
5397
5398             Parameters:
5399                 theShapeWhere Shape to find sub-shape of.
5400                 theShapeWhat Shape, specifying what to find.
5401
5402             Returns:
5403                 List of all found sub-shapes indices.
5404             """
5405             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5406             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5407             return anObj
5408
5409
5410         # end of l4_obtain
5411         ## @}
5412
5413         ## @addtogroup l4_access
5414         ## @{
5415
5416         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5417         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5418         #  @param aShape Shape to get sub-shape of.
5419         #  @param ListOfID List of sub-shapes indices.
5420         #  @param theName Object name; when specified, this parameter is used
5421         #         for result publication in the study. Otherwise, if automatic
5422         #         publication is switched on, default value is used for result name.
5423         #
5424         #  @return Found sub-shape.
5425         #
5426         #  @ref swig_all_decompose "Example"
5427         def GetSubShape(self, aShape, ListOfID, theName=None):
5428             """
5429             Obtain a composite sub-shape of aShape, composed from sub-shapes
5430             of aShape, selected by their unique IDs inside aShape
5431
5432             Parameters:
5433                 aShape Shape to get sub-shape of.
5434                 ListOfID List of sub-shapes indices.
5435                 theName Object name; when specified, this parameter is used
5436                         for result publication in the study. Otherwise, if automatic
5437                         publication is switched on, default value is used for result name.
5438
5439             Returns:
5440                 Found sub-shape.
5441             """
5442             # Example: see GEOM_TestAll.py
5443             anObj = self.AddSubShape(aShape,ListOfID)
5444             self._autoPublish(anObj, theName, "subshape")
5445             return anObj
5446
5447         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5448         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5449         #  @param aShape Shape to get sub-shape of.
5450         #  @param aSubShape Sub-shapes of aShape.
5451         #  @return ID of found sub-shape.
5452         #
5453         #  @ref swig_all_decompose "Example"
5454         def GetSubShapeID(self, aShape, aSubShape):
5455             """
5456             Obtain unique ID of sub-shape aSubShape inside aShape
5457             of aShape, selected by their unique IDs inside aShape
5458
5459             Parameters:
5460                aShape Shape to get sub-shape of.
5461                aSubShape Sub-shapes of aShape.
5462
5463             Returns:
5464                ID of found sub-shape.
5465             """
5466             # Example: see GEOM_TestAll.py
5467             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5468             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5469             return anID
5470             
5471         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5472         #  This function is provided for performance purpose. The complexity is O(n) with n
5473         #  the number of subobjects of aShape
5474         #  @param aShape Shape to get sub-shape of.
5475         #  @param aSubShapes Sub-shapes of aShape.
5476         #  @return list of IDs of found sub-shapes.
5477         #
5478         #  @ref swig_all_decompose "Example"
5479         def GetSubShapesIDs(self, aShape, aSubShapes):
5480             """
5481             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5482             This function is provided for performance purpose. The complexity is O(n) with n
5483             the number of subobjects of aShape
5484
5485             Parameters:
5486                aShape Shape to get sub-shape of.
5487                aSubShapes Sub-shapes of aShape.
5488
5489             Returns:
5490                List of IDs of found sub-shape.
5491             """
5492             # Example: see GEOM_TestAll.py
5493             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5494             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5495             return anIDs
5496
5497         # end of l4_access
5498         ## @}
5499
5500         ## @addtogroup l4_decompose
5501         ## @{
5502
5503         ## Get all sub-shapes and groups of \a theShape,
5504         #  that were created already by any other methods.
5505         #  @param theShape Any shape.
5506         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5507         #                       returned, else all found sub-shapes and groups.
5508         #  @return List of existing sub-objects of \a theShape.
5509         #
5510         #  @ref swig_all_decompose "Example"
5511         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5512             """
5513             Get all sub-shapes and groups of theShape,
5514             that were created already by any other methods.
5515
5516             Parameters:
5517                 theShape Any shape.
5518                 theGroupsOnly If this parameter is TRUE, only groups will be
5519                                  returned, else all found sub-shapes and groups.
5520
5521             Returns:
5522                 List of existing sub-objects of theShape.
5523             """
5524             # Example: see GEOM_TestAll.py
5525             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5526             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5527             return ListObj
5528
5529         ## Get all groups of \a theShape,
5530         #  that were created already by any other methods.
5531         #  @param theShape Any shape.
5532         #  @return List of existing groups of \a theShape.
5533         #
5534         #  @ref swig_all_decompose "Example"
5535         def GetGroups(self, theShape):
5536             """
5537             Get all groups of theShape,
5538             that were created already by any other methods.
5539
5540             Parameters:
5541                 theShape Any shape.
5542
5543             Returns:
5544                 List of existing groups of theShape.
5545             """
5546             # Example: see GEOM_TestAll.py
5547             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5548             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5549             return ListObj
5550
5551         ## Explode a shape on sub-shapes of a given type.
5552         #  If the shape itself matches the type, it is also returned.
5553         #  @param aShape Shape to be exploded.
5554         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5555         #  @param theName Object name; when specified, this parameter is used
5556         #         for result publication in the study. Otherwise, if automatic
5557         #         publication is switched on, default value is used for result name.
5558         #
5559         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5560         #
5561         #  @ref swig_all_decompose "Example"
5562         def SubShapeAll(self, aShape, aType, theName=None):
5563             """
5564             Explode a shape on sub-shapes of a given type.
5565             If the shape itself matches the type, it is also returned.
5566
5567             Parameters:
5568                 aShape Shape to be exploded.
5569                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5570                 theName Object name; when specified, this parameter is used
5571                         for result publication in the study. Otherwise, if automatic
5572                         publication is switched on, default value is used for result name.
5573
5574             Returns:
5575                 List of sub-shapes of type theShapeType, contained in theShape.
5576             """
5577             # Example: see GEOM_TestAll.py
5578             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5579             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5580             self._autoPublish(ListObj, theName, "subshape")
5581             return ListObj
5582
5583         ## Explode a shape on sub-shapes of a given type.
5584         #  @param aShape Shape to be exploded.
5585         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5586         #  @return List of IDs of sub-shapes.
5587         #
5588         #  @ref swig_all_decompose "Example"
5589         def SubShapeAllIDs(self, aShape, aType):
5590             """
5591             Explode a shape on sub-shapes of a given type.
5592
5593             Parameters:
5594                 aShape Shape to be exploded (see geompy.ShapeType)
5595                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5596
5597             Returns:
5598                 List of IDs of sub-shapes.
5599             """
5600             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5601             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5602             return ListObj
5603
5604         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5605         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5606         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5607         #  @param aShape Shape to get sub-shape of.
5608         #  @param ListOfInd List of sub-shapes indices.
5609         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5610         #  @param theName Object name; when specified, this parameter is used
5611         #         for result publication in the study. Otherwise, if automatic
5612         #         publication is switched on, default value is used for result name.
5613         #
5614         #  @return A compound of sub-shapes of aShape.
5615         #
5616         #  @ref swig_all_decompose "Example"
5617         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5618             """
5619             Obtain a compound of sub-shapes of aShape,
5620             selected by their indices in list of all sub-shapes of type aType.
5621             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5622             
5623             Parameters:
5624                 aShape Shape to get sub-shape of.
5625                 ListOfID List of sub-shapes indices.
5626                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5627                 theName Object name; when specified, this parameter is used
5628                         for result publication in the study. Otherwise, if automatic
5629                         publication is switched on, default value is used for result name.
5630
5631             Returns:
5632                 A compound of sub-shapes of aShape.
5633             """
5634             # Example: see GEOM_TestAll.py
5635             ListOfIDs = []
5636             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5637             for ind in ListOfInd:
5638                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5639             # note: auto-publishing is done in self.GetSubShape()
5640             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5641             return anObj
5642
5643         ## Explode a shape on sub-shapes of a given type.
5644         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5645         #  If the shape itself matches the type, it is also returned.
5646         #  @param aShape Shape to be exploded.
5647         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5648         #  @param theName Object name; when specified, this parameter is used
5649         #         for result publication in the study. Otherwise, if automatic
5650         #         publication is switched on, default value is used for result name.
5651         #
5652         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5653         #
5654         #  @ref swig_SubShapeAllSorted "Example"
5655         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5656             """
5657             Explode a shape on sub-shapes of a given type.
5658             Sub-shapes will be sorted by coordinates of their gravity centers.
5659             If the shape itself matches the type, it is also returned.
5660
5661             Parameters: 
5662                 aShape Shape to be exploded.
5663                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5664                 theName Object name; when specified, this parameter is used
5665                         for result publication in the study. Otherwise, if automatic
5666                         publication is switched on, default value is used for result name.
5667
5668             Returns: 
5669                 List of sub-shapes of type theShapeType, contained in theShape.
5670             """
5671             # Example: see GEOM_TestAll.py
5672             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5673             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5674             self._autoPublish(ListObj, theName, "subshape")
5675             return ListObj
5676
5677         ## Explode a shape on sub-shapes of a given type.
5678         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5679         #  @param aShape Shape to be exploded.
5680         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5681         #  @return List of IDs of sub-shapes.
5682         #
5683         #  @ref swig_all_decompose "Example"
5684         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5685             """
5686             Explode a shape on sub-shapes of a given type.
5687             Sub-shapes will be sorted by coordinates of their gravity centers.
5688
5689             Parameters: 
5690                 aShape Shape to be exploded.
5691                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5692
5693             Returns: 
5694                 List of IDs of sub-shapes.
5695             """
5696             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5697             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5698             return ListIDs
5699
5700         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5701         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5702         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5703         #  @param aShape Shape to get sub-shape of.
5704         #  @param ListOfInd List of sub-shapes indices.
5705         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5706         #  @param theName Object name; when specified, this parameter is used
5707         #         for result publication in the study. Otherwise, if automatic
5708         #         publication is switched on, default value is used for result name.
5709         #
5710         #  @return A compound of sub-shapes of aShape.
5711         #
5712         #  @ref swig_all_decompose "Example"
5713         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5714             """
5715             Obtain a compound of sub-shapes of aShape,
5716             selected by they indices in sorted list of all sub-shapes of type aType.
5717             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5718
5719             Parameters:
5720                 aShape Shape to get sub-shape of.
5721                 ListOfID List of sub-shapes indices.
5722                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5723                 theName Object name; when specified, this parameter is used
5724                         for result publication in the study. Otherwise, if automatic
5725                         publication is switched on, default value is used for result name.
5726
5727             Returns:
5728                 A compound of sub-shapes of aShape.
5729             """
5730             # Example: see GEOM_TestAll.py
5731             ListOfIDs = []
5732             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5733             for ind in ListOfInd:
5734                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5735             # note: auto-publishing is done in self.GetSubShape()
5736             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5737             return anObj
5738
5739         ## Extract shapes (excluding the main shape) of given type.
5740         #  @param aShape The shape.
5741         #  @param aType  The shape type (see ShapeType())
5742         #  @param isSorted Boolean flag to switch sorting on/off.
5743         #  @param theName Object name; when specified, this parameter is used
5744         #         for result publication in the study. Otherwise, if automatic
5745         #         publication is switched on, default value is used for result name.
5746         #
5747         #  @return List of sub-shapes of type aType, contained in aShape.
5748         #
5749         #  @ref swig_FilletChamfer "Example"
5750         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5751             """
5752             Extract shapes (excluding the main shape) of given type.
5753
5754             Parameters:
5755                 aShape The shape.
5756                 aType  The shape type (see geompy.ShapeType)
5757                 isSorted Boolean flag to switch sorting on/off.
5758                 theName Object name; when specified, this parameter is used
5759                         for result publication in the study. Otherwise, if automatic
5760                         publication is switched on, default value is used for result name.
5761
5762             Returns:     
5763                 List of sub-shapes of type aType, contained in aShape.
5764             """
5765             # Example: see GEOM_TestAll.py
5766             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5767             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5768             self._autoPublish(ListObj, theName, "subshape")
5769             return ListObj
5770
5771         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5772         #  @param aShape Main shape.
5773         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5774         #  @param theName Object name; when specified, this parameter is used
5775         #         for result publication in the study. Otherwise, if automatic
5776         #         publication is switched on, default value is used for result name.
5777         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5778         #
5779         #  @ref swig_all_decompose "Example"
5780         def SubShapes(self, aShape, anIDs, theName=None):
5781             """
5782             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5783
5784             Parameters:
5785                 aShape Main shape.
5786                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5787                 theName Object name; when specified, this parameter is used
5788                         for result publication in the study. Otherwise, if automatic
5789                         publication is switched on, default value is used for result name.
5790
5791             Returns:      
5792                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5793             """
5794             # Example: see GEOM_TestAll.py
5795             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5796             RaiseIfFailed("SubShapes", self.ShapesOp)
5797             self._autoPublish(ListObj, theName, "subshape")
5798             return ListObj
5799
5800         # end of l4_decompose
5801         ## @}
5802
5803         ## @addtogroup l4_decompose_d
5804         ## @{
5805
5806         ## Deprecated method
5807         #  It works like SubShapeAllSortedCentres(), but wrongly
5808         #  defines centres of faces, shells and solids.
5809         def SubShapeAllSorted(self, aShape, aType, theName=None):
5810             """
5811             Deprecated method
5812             It works like geompy.SubShapeAllSortedCentres, but wrongly
5813             defines centres of faces, shells and solids.
5814             """
5815             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5816             RaiseIfFailed("MakeExplode", self.ShapesOp)
5817             self._autoPublish(ListObj, theName, "subshape")
5818             return ListObj
5819
5820         ## Deprecated method
5821         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5822         #  defines centres of faces, shells and solids.
5823         def SubShapeAllSortedIDs(self, aShape, aType):
5824             """
5825             Deprecated method
5826             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5827             defines centres of faces, shells and solids.
5828             """
5829             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5830             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5831             return ListIDs
5832
5833         ## Deprecated method
5834         #  It works like SubShapeSortedCentres(), but has a bug
5835         #  (wrongly defines centres of faces, shells and solids).
5836         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5837             """
5838             Deprecated method
5839             It works like geompy.SubShapeSortedCentres, but has a bug
5840             (wrongly defines centres of faces, shells and solids).
5841             """
5842             ListOfIDs = []
5843             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5844             for ind in ListOfInd:
5845                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5846             # note: auto-publishing is done in self.GetSubShape()
5847             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5848             return anObj
5849
5850         # end of l4_decompose_d
5851         ## @}
5852
5853         ## @addtogroup l3_healing
5854         ## @{
5855
5856         ## Apply a sequence of Shape Healing operators to the given object.
5857         #  @param theShape Shape to be processed.
5858         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5859         #  @param theParameters List of names of parameters
5860         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5861         #  @param theValues List of values of parameters, in the same order
5862         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5863         #  @param theName Object name; when specified, this parameter is used
5864         #         for result publication in the study. Otherwise, if automatic
5865         #         publication is switched on, default value is used for result name.
5866         #
5867         #  <b> Operators and Parameters: </b> \n
5868         #
5869         #  * \b FixShape - corrects invalid shapes. \n
5870         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5871         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5872         #
5873         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5874         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5875         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5876         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5877         #
5878         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5879         #    surfaces in segments using a certain angle. \n
5880         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5881         #    if Angle=180, four if Angle=90, etc). \n
5882         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5883         #
5884         #  * \b SplitClosedFaces - splits closed faces in segments.
5885         #    The number of segments depends on the number of splitting points.\n
5886         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5887         #
5888         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5889         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5890         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5891         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5892         #   This and the previous parameters can take the following values:\n
5893         #   \b Parametric \b Continuity \n
5894         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5895         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5896         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5897         #    ruling out sharp edges).\n
5898         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5899         #       are of the same magnitude).\n
5900         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5901         #    or surfaces (d/du C(u)) are the same at junction. \n
5902         #   \b Geometric \b Continuity \n
5903         #   \b G1: first derivatives are proportional at junction.\n
5904         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5905         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5906         #   \b G2: first and second derivatives are proportional at junction.
5907         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5908         #    continuity requires that the underlying parameterization was continuous as well.
5909         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5910         #
5911         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5912         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5913         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5914         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5915         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5916         #       with the specified parameters.\n
5917         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5918         #       with the specified parameters.\n
5919         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5920         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5921         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5922         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5923         #
5924         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5925         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5926         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5927         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5928         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5929         #
5930         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5931         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5932         #
5933         #
5934         #  @return New GEOM.GEOM_Object, containing processed shape.
5935         #
5936         #  \n @ref tui_shape_processing "Example"
5937         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5938             """
5939             Apply a sequence of Shape Healing operators to the given object.
5940
5941             Parameters:
5942                 theShape Shape to be processed.
5943                 theValues List of values of parameters, in the same order
5944                           as parameters are listed in theParameters list.
5945                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5946                 theParameters List of names of parameters
5947                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5948                 theName Object name; when specified, this parameter is used
5949                         for result publication in the study. Otherwise, if automatic
5950                         publication is switched on, default value is used for result name.
5951
5952                 Operators and Parameters:
5953
5954                  * FixShape - corrects invalid shapes.
5955                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5956                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5957                  * FixFaceSize - removes small faces, such as spots and strips.
5958                      * FixFaceSize.Tolerance - defines minimum possible face size.
5959                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5960                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5961                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5962                                 in segments using a certain angle.
5963                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5964                                           if Angle=180, four if Angle=90, etc).
5965                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5966                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5967                                       splitting points.
5968                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5969                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5970                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5971                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5972                      * SplitContinuity.CurveContinuity - required continuity for curves.
5973                        This and the previous parameters can take the following values:
5974                        
5975                        Parametric Continuity:
5976                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5977                                                    coincidental. The curves or surfaces may still meet at an angle,
5978                                                    giving rise to a sharp corner or edge).
5979                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5980                                                    are parallel, ruling out sharp edges).
5981                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5982                                                   or surfaces are of the same magnitude).
5983                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5984                           curves or surfaces (d/du C(u)) are the same at junction.
5985                           
5986                        Geometric Continuity:
5987                        G1: first derivatives are proportional at junction.
5988                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5989                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5990                        G2: first and second derivatives are proportional at junction. As the names imply,
5991                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5992                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5993                            geometric continuity of order n, but not vice-versa.
5994                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5995                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5996                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5997                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5998                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5999                                                         the specified parameters.
6000                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6001                                                         the specified parameters.
6002                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6003                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6004                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6005                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6006                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6007                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6008                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6009                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6010                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6011                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6012                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6013
6014             Returns:
6015                 New GEOM.GEOM_Object, containing processed shape.
6016
6017             Note: For more information look through SALOME Geometry User's Guide->
6018                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6019             """
6020             # Example: see GEOM_TestHealing.py
6021             theValues,Parameters = ParseList(theValues)
6022             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6023             # To avoid script failure in case of good argument shape
6024             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6025                 return theShape
6026             RaiseIfFailed("ProcessShape", self.HealOp)
6027             for string in (theOperators + theParameters):
6028                 Parameters = ":" + Parameters
6029                 pass
6030             anObj.SetParameters(Parameters)
6031             self._autoPublish(anObj, theName, "healed")
6032             return anObj
6033
6034         ## Remove faces from the given object (shape).
6035         #  @param theObject Shape to be processed.
6036         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6037         #                  removes ALL faces of the given object.
6038         #  @param theName Object name; when specified, this parameter is used
6039         #         for result publication in the study. Otherwise, if automatic
6040         #         publication is switched on, default value is used for result name.
6041         #
6042         #  @return New GEOM.GEOM_Object, containing processed shape.
6043         #
6044         #  @ref tui_suppress_faces "Example"
6045         def SuppressFaces(self, theObject, theFaces, theName=None):
6046             """
6047             Remove faces from the given object (shape).
6048
6049             Parameters:
6050                 theObject Shape to be processed.
6051                 theFaces Indices of faces to be removed, if EMPTY then the method
6052                          removes ALL faces of the given object.
6053                 theName Object name; when specified, this parameter is used
6054                         for result publication in the study. Otherwise, if automatic
6055                         publication is switched on, default value is used for result name.
6056
6057             Returns:
6058                 New GEOM.GEOM_Object, containing processed shape.
6059             """
6060             # Example: see GEOM_TestHealing.py
6061             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6062             RaiseIfFailed("SuppressFaces", self.HealOp)
6063             self._autoPublish(anObj, theName, "suppressFaces")
6064             return anObj
6065
6066         ## Sewing of some shapes into single shape.
6067         #  @param ListShape Shapes to be processed.
6068         #  @param theTolerance Required tolerance value.
6069         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6070         #  @param theName Object name; when specified, this parameter is used
6071         #         for result publication in the study. Otherwise, if automatic
6072         #         publication is switched on, default value is used for result name.
6073         #
6074         #  @return New GEOM.GEOM_Object, containing processed shape.
6075         #
6076         #  @ref tui_sewing "Example"
6077         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6078             """
6079             Sewing of some shapes into single shape.
6080
6081             Parameters:
6082                 ListShape Shapes to be processed.
6083                 theTolerance Required tolerance value.
6084                 AllowNonManifold Flag that allows non-manifold sewing.
6085                 theName Object name; when specified, this parameter is used
6086                         for result publication in the study. Otherwise, if automatic
6087                         publication is switched on, default value is used for result name.
6088
6089             Returns:
6090                 New GEOM.GEOM_Object, containing processed shape.
6091             """
6092             # Example: see GEOM_TestHealing.py
6093             comp = self.MakeCompound(ListShape)
6094             # note: auto-publishing is done in self.Sew()
6095             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6096             return anObj
6097
6098         ## Sewing of the given object.
6099         #  @param theObject Shape to be processed.
6100         #  @param theTolerance Required tolerance value.
6101         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6102         #  @param theName Object name; when specified, this parameter is used
6103         #         for result publication in the study. Otherwise, if automatic
6104         #         publication is switched on, default value is used for result name.
6105         #
6106         #  @return New GEOM.GEOM_Object, containing processed shape.
6107         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6108             """
6109             Sewing of the given object.
6110
6111             Parameters:
6112                 theObject Shape to be processed.
6113                 theTolerance Required tolerance value.
6114                 AllowNonManifold Flag that allows non-manifold sewing.
6115                 theName Object name; when specified, this parameter is used
6116                         for result publication in the study. Otherwise, if automatic
6117                         publication is switched on, default value is used for result name.
6118
6119             Returns:
6120                 New GEOM.GEOM_Object, containing processed shape.
6121             """
6122             # Example: see MakeSewing() above
6123             theTolerance,Parameters = ParseParameters(theTolerance)
6124             if AllowNonManifold:
6125                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6126             else:
6127                 anObj = self.HealOp.Sew(theObject, theTolerance)
6128             # To avoid script failure in case of good argument shape
6129             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6130                 return theObject
6131             RaiseIfFailed("Sew", self.HealOp)
6132             anObj.SetParameters(Parameters)
6133             self._autoPublish(anObj, theName, "sewed")
6134             return anObj
6135
6136         ## Rebuild the topology of theCompound of solids by removing
6137         #  of the faces that are shared by several solids.
6138         #  @param theCompound Shape to be processed.
6139         #  @param theName Object name; when specified, this parameter is used
6140         #         for result publication in the study. Otherwise, if automatic
6141         #         publication is switched on, default value is used for result name.
6142         #
6143         #  @return New GEOM.GEOM_Object, containing processed shape.
6144         #
6145         #  @ref tui_remove_webs "Example"
6146         def RemoveInternalFaces (self, theCompound, theName=None):
6147             """
6148             Rebuild the topology of theCompound of solids by removing
6149             of the faces that are shared by several solids.
6150
6151             Parameters:
6152                 theCompound Shape to be processed.
6153                 theName Object name; when specified, this parameter is used
6154                         for result publication in the study. Otherwise, if automatic
6155                         publication is switched on, default value is used for result name.
6156
6157             Returns:
6158                 New GEOM.GEOM_Object, containing processed shape.
6159             """
6160             # Example: see GEOM_TestHealing.py
6161             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6162             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6163             self._autoPublish(anObj, theName, "removeWebs")
6164             return anObj
6165
6166         ## Remove internal wires and edges from the given object (face).
6167         #  @param theObject Shape to be processed.
6168         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6169         #                  removes ALL internal wires of the given object.
6170         #  @param theName Object name; when specified, this parameter is used
6171         #         for result publication in the study. Otherwise, if automatic
6172         #         publication is switched on, default value is used for result name.
6173         #
6174         #  @return New GEOM.GEOM_Object, containing processed shape.
6175         #
6176         #  @ref tui_suppress_internal_wires "Example"
6177         def SuppressInternalWires(self, theObject, theWires, theName=None):
6178             """
6179             Remove internal wires and edges from the given object (face).
6180
6181             Parameters:
6182                 theObject Shape to be processed.
6183                 theWires Indices of wires to be removed, if EMPTY then the method
6184                          removes ALL internal wires of the given object.
6185                 theName Object name; when specified, this parameter is used
6186                         for result publication in the study. Otherwise, if automatic
6187                         publication is switched on, default value is used for result name.
6188
6189             Returns:                
6190                 New GEOM.GEOM_Object, containing processed shape.
6191             """
6192             # Example: see GEOM_TestHealing.py
6193             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6194             RaiseIfFailed("RemoveIntWires", self.HealOp)
6195             self._autoPublish(anObj, theName, "suppressWires")
6196             return anObj
6197
6198         ## Remove internal closed contours (holes) from the given object.
6199         #  @param theObject Shape to be processed.
6200         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6201         #                  removes ALL internal holes of the given object
6202         #  @param theName Object name; when specified, this parameter is used
6203         #         for result publication in the study. Otherwise, if automatic
6204         #         publication is switched on, default value is used for result name.
6205         #
6206         #  @return New GEOM.GEOM_Object, containing processed shape.
6207         #
6208         #  @ref tui_suppress_holes "Example"
6209         def SuppressHoles(self, theObject, theWires, theName=None):
6210             """
6211             Remove internal closed contours (holes) from the given object.
6212
6213             Parameters:
6214                 theObject Shape to be processed.
6215                 theWires Indices of wires to be removed, if EMPTY then the method
6216                          removes ALL internal holes of the given object
6217                 theName Object name; when specified, this parameter is used
6218                         for result publication in the study. Otherwise, if automatic
6219                         publication is switched on, default value is used for result name.
6220
6221             Returns:    
6222                 New GEOM.GEOM_Object, containing processed shape.
6223             """
6224             # Example: see GEOM_TestHealing.py
6225             anObj = self.HealOp.FillHoles(theObject, theWires)
6226             RaiseIfFailed("FillHoles", self.HealOp)
6227             self._autoPublish(anObj, theName, "suppressHoles")
6228             return anObj
6229
6230         ## Close an open wire.
6231         #  @param theObject Shape to be processed.
6232         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6233         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6234         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6235         #                        If False : closure by creation of an edge between ends.
6236         #  @param theName Object name; when specified, this parameter is used
6237         #         for result publication in the study. Otherwise, if automatic
6238         #         publication is switched on, default value is used for result name.
6239         #
6240         #  @return New GEOM.GEOM_Object, containing processed shape.
6241         #
6242         #  @ref tui_close_contour "Example"
6243         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6244             """
6245             Close an open wire.
6246
6247             Parameters: 
6248                 theObject Shape to be processed.
6249                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6250                          if [ ], then theObject itself is a wire.
6251                 isCommonVertex If True  : closure by creation of a common vertex,
6252                                If False : closure by creation of an edge between ends.
6253                 theName Object name; when specified, this parameter is used
6254                         for result publication in the study. Otherwise, if automatic
6255                         publication is switched on, default value is used for result name.
6256
6257             Returns:                      
6258                 New GEOM.GEOM_Object, containing processed shape. 
6259             """
6260             # Example: see GEOM_TestHealing.py
6261             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6262             RaiseIfFailed("CloseContour", self.HealOp)
6263             self._autoPublish(anObj, theName, "closeContour")
6264             return anObj
6265
6266         ## Addition of a point to a given edge object.
6267         #  @param theObject Shape to be processed.
6268         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6269         #                      if -1, then theObject itself is the edge.
6270         #  @param theValue Value of parameter on edge or length parameter,
6271         #                  depending on \a isByParameter.
6272         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6273         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6274         #  @param theName Object name; when specified, this parameter is used
6275         #         for result publication in the study. Otherwise, if automatic
6276         #         publication is switched on, default value is used for result name.
6277         #
6278         #  @return New GEOM.GEOM_Object, containing processed shape.
6279         #
6280         #  @ref tui_add_point_on_edge "Example"
6281         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6282             """
6283             Addition of a point to a given edge object.
6284
6285             Parameters: 
6286                 theObject Shape to be processed.
6287                 theEdgeIndex Index of edge to be divided within theObject's shape,
6288                              if -1, then theObject itself is the edge.
6289                 theValue Value of parameter on edge or length parameter,
6290                          depending on isByParameter.
6291                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6292                               if FALSE : theValue is treated as a length parameter [0..1]
6293                 theName Object name; when specified, this parameter is used
6294                         for result publication in the study. Otherwise, if automatic
6295                         publication is switched on, default value is used for result name.
6296
6297             Returns:  
6298                 New GEOM.GEOM_Object, containing processed shape.
6299             """
6300             # Example: see GEOM_TestHealing.py
6301             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6302             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6303             RaiseIfFailed("DivideEdge", self.HealOp)
6304             anObj.SetParameters(Parameters)
6305             self._autoPublish(anObj, theName, "divideEdge")
6306             return anObj
6307
6308         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6309         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6310         #  @param theVertices A list of vertices to suppress. If the list
6311         #                     is empty, all vertices in a wire will be assumed.
6312         #  @param theName Object name; when specified, this parameter is used
6313         #         for result publication in the study. Otherwise, if automatic
6314         #         publication is switched on, default value is used for result name.
6315         #
6316         #  @return New GEOM.GEOM_Object with modified wire.
6317         #
6318         #  @ref tui_fuse_collinear_edges "Example"
6319         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6320             """
6321             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6322
6323             Parameters: 
6324                 theWire Wire to minimize the number of C1 continuous edges in.
6325                 theVertices A list of vertices to suppress. If the list
6326                             is empty, all vertices in a wire will be assumed.
6327                 theName Object name; when specified, this parameter is used
6328                         for result publication in the study. Otherwise, if automatic
6329                         publication is switched on, default value is used for result name.
6330
6331             Returns:  
6332                 New GEOM.GEOM_Object with modified wire.
6333             """
6334             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6335             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6336             self._autoPublish(anObj, theName, "fuseEdges")
6337             return anObj
6338
6339         ## Change orientation of the given object. Updates given shape.
6340         #  @param theObject Shape to be processed.
6341         #  @return Updated <var>theObject</var>
6342         #
6343         #  @ref swig_todo "Example"
6344         def ChangeOrientationShell(self,theObject):
6345             """
6346             Change orientation of the given object. Updates given shape.
6347
6348             Parameters: 
6349                 theObject Shape to be processed.
6350
6351             Returns:  
6352                 Updated theObject
6353             """
6354             theObject = self.HealOp.ChangeOrientation(theObject)
6355             RaiseIfFailed("ChangeOrientation", self.HealOp)
6356             pass
6357
6358         ## Change orientation of the given object.
6359         #  @param theObject Shape to be processed.
6360         #  @param theName Object name; when specified, this parameter is used
6361         #         for result publication in the study. Otherwise, if automatic
6362         #         publication is switched on, default value is used for result name.
6363         #
6364         #  @return New GEOM.GEOM_Object, containing processed shape.
6365         #
6366         #  @ref swig_todo "Example"
6367         def ChangeOrientationShellCopy(self, theObject, theName=None):
6368             """
6369             Change orientation of the given object.
6370
6371             Parameters:
6372                 theObject Shape to be processed.
6373                 theName Object name; when specified, this parameter is used
6374                         for result publication in the study. Otherwise, if automatic
6375                         publication is switched on, default value is used for result name.
6376
6377             Returns:   
6378                 New GEOM.GEOM_Object, containing processed shape.
6379             """
6380             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6381             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6382             self._autoPublish(anObj, theName, "reversed")
6383             return anObj
6384
6385         ## Try to limit tolerance of the given object by value \a theTolerance.
6386         #  @param theObject Shape to be processed.
6387         #  @param theTolerance Required tolerance value.
6388         #  @param theName Object name; when specified, this parameter is used
6389         #         for result publication in the study. Otherwise, if automatic
6390         #         publication is switched on, default value is used for result name.
6391         #
6392         #  @return New GEOM.GEOM_Object, containing processed shape.
6393         #
6394         #  @ref tui_limit_tolerance "Example"
6395         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6396             """
6397             Try to limit tolerance of the given object by value theTolerance.
6398
6399             Parameters:
6400                 theObject Shape to be processed.
6401                 theTolerance Required tolerance value.
6402                 theName Object name; when specified, this parameter is used
6403                         for result publication in the study. Otherwise, if automatic
6404                         publication is switched on, default value is used for result name.
6405
6406             Returns:   
6407                 New GEOM.GEOM_Object, containing processed shape.
6408             """
6409             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6410             RaiseIfFailed("LimitTolerance", self.HealOp)
6411             self._autoPublish(anObj, theName, "limitTolerance")
6412             return anObj
6413
6414         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6415         #  that constitute a free boundary of the given shape.
6416         #  @param theObject Shape to get free boundary of.
6417         #  @param theName Object name; when specified, this parameter is used
6418         #         for result publication in the study. Otherwise, if automatic
6419         #         publication is switched on, default value is used for result name.
6420         #
6421         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6422         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6423         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6424         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6425         #
6426         #  @ref tui_measurement_tools_page "Example"
6427         def GetFreeBoundary(self, theObject, theName=None):
6428             """
6429             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6430             that constitute a free boundary of the given shape.
6431
6432             Parameters:
6433                 theObject Shape to get free boundary of.
6434                 theName Object name; when specified, this parameter is used
6435                         for result publication in the study. Otherwise, if automatic
6436                         publication is switched on, default value is used for result name.
6437
6438             Returns: 
6439                 [status, theClosedWires, theOpenWires]
6440                  status: FALSE, if an error(s) occured during the method execution.
6441                  theClosedWires: Closed wires on the free boundary of the given shape.
6442                  theOpenWires: Open wires on the free boundary of the given shape.
6443             """
6444             # Example: see GEOM_TestHealing.py
6445             anObj = self.HealOp.GetFreeBoundary(theObject)
6446             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6447             self._autoPublish(anObj[1], theName, "closedWire")
6448             self._autoPublish(anObj[2], theName, "openWire")
6449             return anObj
6450
6451         ## Replace coincident faces in theShape by one face.
6452         #  @param theShape Initial shape.
6453         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6454         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6455         #                         otherwise all initial shapes.
6456         #  @param theName Object name; when specified, this parameter is used
6457         #         for result publication in the study. Otherwise, if automatic
6458         #         publication is switched on, default value is used for result name.
6459         #
6460         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6461         #
6462         #  @ref tui_glue_faces "Example"
6463         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6464             """
6465             Replace coincident faces in theShape by one face.
6466
6467             Parameters:
6468                 theShape Initial shape.
6469                 theTolerance Maximum distance between faces, which can be considered as coincident.
6470                 doKeepNonSolids If FALSE, only solids will present in the result,
6471                                 otherwise all initial shapes.
6472                 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             Returns:
6477                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6478             """
6479             # Example: see GEOM_Spanner.py
6480             theTolerance,Parameters = ParseParameters(theTolerance)
6481             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6482             if anObj is None:
6483                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6484             anObj.SetParameters(Parameters)
6485             self._autoPublish(anObj, theName, "glueFaces")
6486             return anObj
6487
6488         ## Find coincident faces in theShape for possible gluing.
6489         #  @param theShape Initial shape.
6490         #  @param theTolerance Maximum distance between faces,
6491         #                      which can be considered as coincident.
6492         #  @param theName Object name; when specified, this parameter is used
6493         #         for result publication in the study. Otherwise, if automatic
6494         #         publication is switched on, default value is used for result name.
6495         #
6496         #  @return GEOM.ListOfGO
6497         #
6498         #  @ref tui_glue_faces "Example"
6499         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6500             """
6501             Find coincident faces in theShape for possible gluing.
6502
6503             Parameters:
6504                 theShape Initial shape.
6505                 theTolerance Maximum distance between faces,
6506                              which can be considered as coincident.
6507                 theName Object name; when specified, this parameter is used
6508                         for result publication in the study. Otherwise, if automatic
6509                         publication is switched on, default value is used for result name.
6510
6511             Returns:                    
6512                 GEOM.ListOfGO
6513             """
6514             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6515             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6516             self._autoPublish(anObj, theName, "facesToGlue")
6517             return anObj
6518
6519         ## Replace coincident faces in theShape by one face
6520         #  in compliance with given list of faces
6521         #  @param theShape Initial shape.
6522         #  @param theTolerance Maximum distance between faces,
6523         #                      which can be considered as coincident.
6524         #  @param theFaces List of faces for gluing.
6525         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6526         #                         otherwise all initial shapes.
6527         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6528         #                        will be glued, otherwise only the edges,
6529         #                        belonging to <VAR>theFaces</VAR>.
6530         #  @param theName Object name; when specified, this parameter is used
6531         #         for result publication in the study. Otherwise, if automatic
6532         #         publication is switched on, default value is used for result name.
6533         #
6534         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6535         #          without some faces.
6536         #
6537         #  @ref tui_glue_faces "Example"
6538         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6539                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6540             """
6541             Replace coincident faces in theShape by one face
6542             in compliance with given list of faces
6543
6544             Parameters:
6545                 theShape Initial shape.
6546                 theTolerance Maximum distance between faces,
6547                              which can be considered as coincident.
6548                 theFaces List of faces for gluing.
6549                 doKeepNonSolids If FALSE, only solids will present in the result,
6550                                 otherwise all initial shapes.
6551                 doGlueAllEdges If TRUE, all coincident edges of theShape
6552                                will be glued, otherwise only the edges,
6553                                belonging to theFaces.
6554                 theName Object name; when specified, this parameter is used
6555                         for result publication in the study. Otherwise, if automatic
6556                         publication is switched on, default value is used for result name.
6557
6558             Returns:
6559                 New GEOM.GEOM_Object, containing a copy of theShape
6560                     without some faces.
6561             """
6562             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6563                                                       doKeepNonSolids, doGlueAllEdges)
6564             if anObj is None:
6565                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6566             self._autoPublish(anObj, theName, "glueFaces")
6567             return anObj
6568
6569         ## Replace coincident edges in theShape by one edge.
6570         #  @param theShape Initial shape.
6571         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6572         #  @param theName Object name; when specified, this parameter is used
6573         #         for result publication in the study. Otherwise, if automatic
6574         #         publication is switched on, default value is used for result name.
6575         #
6576         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6577         #
6578         #  @ref tui_glue_edges "Example"
6579         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6580             """
6581             Replace coincident edges in theShape by one edge.
6582
6583             Parameters:
6584                 theShape Initial shape.
6585                 theTolerance Maximum distance between edges, which can be considered as coincident.
6586                 theName Object name; when specified, this parameter is used
6587                         for result publication in the study. Otherwise, if automatic
6588                         publication is switched on, default value is used for result name.
6589
6590             Returns:    
6591                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6592             """
6593             theTolerance,Parameters = ParseParameters(theTolerance)
6594             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6595             if anObj is None:
6596                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6597             anObj.SetParameters(Parameters)
6598             self._autoPublish(anObj, theName, "glueEdges")
6599             return anObj
6600
6601         ## Find coincident edges in theShape for possible gluing.
6602         #  @param theShape Initial shape.
6603         #  @param theTolerance Maximum distance between edges,
6604         #                      which can be considered as coincident.
6605         #  @param theName Object name; when specified, this parameter is used
6606         #         for result publication in the study. Otherwise, if automatic
6607         #         publication is switched on, default value is used for result name.
6608         #
6609         #  @return GEOM.ListOfGO
6610         #
6611         #  @ref tui_glue_edges "Example"
6612         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6613             """
6614             Find coincident edges in theShape for possible gluing.
6615
6616             Parameters:
6617                 theShape Initial shape.
6618                 theTolerance Maximum distance between edges,
6619                              which can be considered as coincident.
6620                 theName Object name; when specified, this parameter is used
6621                         for result publication in the study. Otherwise, if automatic
6622                         publication is switched on, default value is used for result name.
6623
6624             Returns:                         
6625                 GEOM.ListOfGO
6626             """
6627             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6628             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6629             self._autoPublish(anObj, theName, "edgesToGlue")
6630             return anObj
6631
6632         ## Replace coincident edges in theShape by one edge
6633         #  in compliance with given list of edges.
6634         #  @param theShape Initial shape.
6635         #  @param theTolerance Maximum distance between edges,
6636         #                      which can be considered as coincident.
6637         #  @param theEdges List of edges for gluing.
6638         #  @param theName Object name; when specified, this parameter is used
6639         #         for result publication in the study. Otherwise, if automatic
6640         #         publication is switched on, default value is used for result name.
6641         #
6642         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6643         #          without some edges.
6644         #
6645         #  @ref tui_glue_edges "Example"
6646         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6647             """
6648             Replace coincident edges in theShape by one edge
6649             in compliance with given list of edges.
6650
6651             Parameters:
6652                 theShape Initial shape.
6653                 theTolerance Maximum distance between edges,
6654                              which can be considered as coincident.
6655                 theEdges List of edges for gluing.
6656                 theName Object name; when specified, this parameter is used
6657                         for result publication in the study. Otherwise, if automatic
6658                         publication is switched on, default value is used for result name.
6659
6660             Returns:  
6661                 New GEOM.GEOM_Object, containing a copy of theShape
6662                 without some edges.
6663             """
6664             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6665             if anObj is None:
6666                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6667             self._autoPublish(anObj, theName, "glueEdges")
6668             return anObj
6669
6670         # end of l3_healing
6671         ## @}
6672
6673         ## @addtogroup l3_boolean Boolean Operations
6674         ## @{
6675
6676         # -----------------------------------------------------------------------------
6677         # Boolean (Common, Cut, Fuse, Section)
6678         # -----------------------------------------------------------------------------
6679
6680         ## Perform one of boolean operations on two given shapes.
6681         #  @param theShape1 First argument for boolean operation.
6682         #  @param theShape2 Second argument for boolean operation.
6683         #  @param theOperation Indicates the operation to be done:\n
6684         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6685         #  @param checkSelfInte The flag that tells if the arguments should
6686         #         be checked for self-intersection prior to the operation.
6687         #  @param theName Object name; when specified, this parameter is used
6688         #         for result publication in the study. Otherwise, if automatic
6689         #         publication is switched on, default value is used for result name.
6690         #
6691         #  @note This algorithm doesn't find all types of self-intersections.
6692         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6693         #        vertex/face and edge/face intersections. Face/face
6694         #        intersections detection is switched off as it is a
6695         #        time-consuming operation that gives an impact on performance.
6696         #        To find all self-intersections please use
6697         #        CheckSelfIntersections() method.
6698         #
6699         #  @return New GEOM.GEOM_Object, containing the result shape.
6700         #
6701         #  @ref tui_fuse "Example"
6702         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6703             """
6704             Perform one of boolean operations on two given shapes.
6705
6706             Parameters: 
6707                 theShape1 First argument for boolean operation.
6708                 theShape2 Second argument for boolean operation.
6709                 theOperation Indicates the operation to be done:
6710                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6711                 checkSelfInte The flag that tells if the arguments should
6712                               be checked for self-intersection prior to
6713                               the operation.
6714                 theName Object name; when specified, this parameter is used
6715                         for result publication in the study. Otherwise, if automatic
6716                         publication is switched on, default value is used for result name.
6717
6718             Note:
6719                     This algorithm doesn't find all types of self-intersections.
6720                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6721                     vertex/face and edge/face intersections. Face/face
6722                     intersections detection is switched off as it is a
6723                     time-consuming operation that gives an impact on performance.
6724                     To find all self-intersections please use
6725                     CheckSelfIntersections() method.
6726
6727             Returns:   
6728                 New GEOM.GEOM_Object, containing the result shape.
6729             """
6730             # Example: see GEOM_TestAll.py
6731             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
6732             RaiseIfFailed("MakeBoolean", self.BoolOp)
6733             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6734             self._autoPublish(anObj, theName, def_names[theOperation])
6735             return anObj
6736
6737         ## Perform Common boolean operation on two given shapes.
6738         #  @param theShape1 First argument for boolean operation.
6739         #  @param theShape2 Second argument for boolean operation.
6740         #  @param checkSelfInte The flag that tells if the arguments should
6741         #         be checked for self-intersection prior to the operation.
6742         #  @param theName Object name; when specified, this parameter is used
6743         #         for result publication in the study. Otherwise, if automatic
6744         #         publication is switched on, default value is used for result name.
6745         #
6746         #  @note This algorithm doesn't find all types of self-intersections.
6747         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6748         #        vertex/face and edge/face intersections. Face/face
6749         #        intersections detection is switched off as it is a
6750         #        time-consuming operation that gives an impact on performance.
6751         #        To find all self-intersections please use
6752         #        CheckSelfIntersections() method.
6753         #
6754         #  @return New GEOM.GEOM_Object, containing the result shape.
6755         #
6756         #  @ref tui_common "Example 1"
6757         #  \n @ref swig_MakeCommon "Example 2"
6758         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6759             """
6760             Perform Common boolean operation on two given shapes.
6761
6762             Parameters: 
6763                 theShape1 First argument for boolean operation.
6764                 theShape2 Second argument for boolean operation.
6765                 checkSelfInte The flag that tells if the arguments should
6766                               be checked for self-intersection prior to
6767                               the operation.
6768                 theName Object name; when specified, this parameter is used
6769                         for result publication in the study. Otherwise, if automatic
6770                         publication is switched on, default value is used for result name.
6771
6772             Note:
6773                     This algorithm doesn't find all types of self-intersections.
6774                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6775                     vertex/face and edge/face intersections. Face/face
6776                     intersections detection is switched off as it is a
6777                     time-consuming operation that gives an impact on performance.
6778                     To find all self-intersections please use
6779                     CheckSelfIntersections() method.
6780
6781             Returns:   
6782                 New GEOM.GEOM_Object, containing the result shape.
6783             """
6784             # Example: see GEOM_TestOthers.py
6785             # note: auto-publishing is done in self.MakeBoolean()
6786             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
6787
6788         ## Perform Cut boolean operation on two given shapes.
6789         #  @param theShape1 First argument for boolean operation.
6790         #  @param theShape2 Second argument for boolean operation.
6791         #  @param checkSelfInte The flag that tells if the arguments should
6792         #         be checked for self-intersection prior to the operation.
6793         #  @param theName Object name; when specified, this parameter is used
6794         #         for result publication in the study. Otherwise, if automatic
6795         #         publication is switched on, default value is used for result name.
6796         #
6797         #  @note This algorithm doesn't find all types of self-intersections.
6798         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6799         #        vertex/face and edge/face intersections. Face/face
6800         #        intersections detection is switched off as it is a
6801         #        time-consuming operation that gives an impact on performance.
6802         #        To find all self-intersections please use
6803         #        CheckSelfIntersections() method.
6804         #
6805         #  @return New GEOM.GEOM_Object, containing the result shape.
6806         #
6807         #  @ref tui_cut "Example 1"
6808         #  \n @ref swig_MakeCommon "Example 2"
6809         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6810             """
6811             Perform Cut boolean operation on two given shapes.
6812
6813             Parameters: 
6814                 theShape1 First argument for boolean operation.
6815                 theShape2 Second argument for boolean operation.
6816                 checkSelfInte The flag that tells if the arguments should
6817                               be checked for self-intersection prior to
6818                               the operation.
6819                 theName Object name; when specified, this parameter is used
6820                         for result publication in the study. Otherwise, if automatic
6821                         publication is switched on, default value is used for result name.
6822
6823             Note:
6824                     This algorithm doesn't find all types of self-intersections.
6825                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6826                     vertex/face and edge/face intersections. Face/face
6827                     intersections detection is switched off as it is a
6828                     time-consuming operation that gives an impact on performance.
6829                     To find all self-intersections please use
6830                     CheckSelfIntersections() method.
6831
6832             Returns:   
6833                 New GEOM.GEOM_Object, containing the result shape.
6834             
6835             """
6836             # Example: see GEOM_TestOthers.py
6837             # note: auto-publishing is done in self.MakeBoolean()
6838             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
6839
6840         ## Perform Fuse boolean operation on two given shapes.
6841         #  @param theShape1 First argument for boolean operation.
6842         #  @param theShape2 Second argument for boolean operation.
6843         #  @param checkSelfInte The flag that tells if the arguments should
6844         #         be checked for self-intersection prior to the operation.
6845         #  @param theName Object name; when specified, this parameter is used
6846         #         for result publication in the study. Otherwise, if automatic
6847         #         publication is switched on, default value is used for result name.
6848         #
6849         #  @note This algorithm doesn't find all types of self-intersections.
6850         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6851         #        vertex/face and edge/face intersections. Face/face
6852         #        intersections detection is switched off as it is a
6853         #        time-consuming operation that gives an impact on performance.
6854         #        To find all self-intersections please use
6855         #        CheckSelfIntersections() method.
6856         #
6857         #  @return New GEOM.GEOM_Object, containing the result shape.
6858         #
6859         #  @ref tui_fuse "Example 1"
6860         #  \n @ref swig_MakeCommon "Example 2"
6861         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6862             """
6863             Perform Fuse boolean operation on two given shapes.
6864
6865             Parameters: 
6866                 theShape1 First argument for boolean operation.
6867                 theShape2 Second argument for boolean operation.
6868                 checkSelfInte The flag that tells if the arguments should
6869                               be checked for self-intersection prior to
6870                               the operation.
6871                 theName Object name; when specified, this parameter is used
6872                         for result publication in the study. Otherwise, if automatic
6873                         publication is switched on, default value is used for result name.
6874
6875             Note:
6876                     This algorithm doesn't find all types of self-intersections.
6877                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6878                     vertex/face and edge/face intersections. Face/face
6879                     intersections detection is switched off as it is a
6880                     time-consuming operation that gives an impact on performance.
6881                     To find all self-intersections please use
6882                     CheckSelfIntersections() method.
6883
6884             Returns:   
6885                 New GEOM.GEOM_Object, containing the result shape.
6886             
6887             """
6888             # Example: see GEOM_TestOthers.py
6889             # note: auto-publishing is done in self.MakeBoolean()
6890             return self.MakeBoolean(theShape1, theShape2, 3, checkSelfInte, theName)
6891
6892         ## Perform Section boolean operation on two given shapes.
6893         #  @param theShape1 First argument for boolean operation.
6894         #  @param theShape2 Second argument for boolean operation.
6895         #  @param checkSelfInte The flag that tells if the arguments should
6896         #         be checked for self-intersection prior to the operation.
6897         #  @param theName Object name; when specified, this parameter is used
6898         #         for result publication in the study. Otherwise, if automatic
6899         #         publication is switched on, default value is used for result name.
6900         #
6901         #  @note This algorithm doesn't find all types of self-intersections.
6902         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6903         #        vertex/face and edge/face intersections. Face/face
6904         #        intersections detection is switched off as it is a
6905         #        time-consuming operation that gives an impact on performance.
6906         #        To find all self-intersections please use
6907         #        CheckSelfIntersections() method.
6908         #
6909         #  @return New GEOM.GEOM_Object, containing the result shape.
6910         #
6911         #  @ref tui_section "Example 1"
6912         #  \n @ref swig_MakeCommon "Example 2"
6913         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6914             """
6915             Perform Section boolean operation on two given shapes.
6916
6917             Parameters: 
6918                 theShape1 First argument for boolean operation.
6919                 theShape2 Second argument for boolean operation.
6920                 checkSelfInte The flag that tells if the arguments should
6921                               be checked for self-intersection prior to
6922                               the operation.
6923                 theName Object name; when specified, this parameter is used
6924                         for result publication in the study. Otherwise, if automatic
6925                         publication is switched on, default value is used for result name.
6926
6927             Note:
6928                     This algorithm doesn't find all types of self-intersections.
6929                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6930                     vertex/face and edge/face intersections. Face/face
6931                     intersections detection is switched off as it is a
6932                     time-consuming operation that gives an impact on performance.
6933                     To find all self-intersections please use
6934                     CheckSelfIntersections() method.
6935
6936             Returns:   
6937                 New GEOM.GEOM_Object, containing the result shape.
6938             
6939             """
6940             # Example: see GEOM_TestOthers.py
6941             # note: auto-publishing is done in self.MakeBoolean()
6942             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
6943
6944         ## Perform Fuse boolean operation on the list of shapes.
6945         #  @param theShapesList Shapes to be fused.
6946         #  @param checkSelfInte The flag that tells if the arguments should
6947         #         be checked for self-intersection prior to the operation.
6948         #  @param theName Object name; when specified, this parameter is used
6949         #         for result publication in the study. Otherwise, if automatic
6950         #         publication is switched on, default value is used for result name.
6951         #
6952         #  @note This algorithm doesn't find all types of self-intersections.
6953         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6954         #        vertex/face and edge/face intersections. Face/face
6955         #        intersections detection is switched off as it is a
6956         #        time-consuming operation that gives an impact on performance.
6957         #        To find all self-intersections please use
6958         #        CheckSelfIntersections() method.
6959         #
6960         #  @return New GEOM.GEOM_Object, containing the result shape.
6961         #
6962         #  @ref tui_fuse "Example 1"
6963         #  \n @ref swig_MakeCommon "Example 2"
6964         def MakeFuseList(self, theShapesList, checkSelfInte=False, theName=None):
6965             """
6966             Perform Fuse boolean operation on the list of shapes.
6967
6968             Parameters: 
6969                 theShapesList Shapes to be fused.
6970                 checkSelfInte The flag that tells if the arguments should
6971                               be checked for self-intersection prior to
6972                               the operation.
6973                 theName Object name; when specified, this parameter is used
6974                         for result publication in the study. Otherwise, if automatic
6975                         publication is switched on, default value is used for result name.
6976
6977             Note:
6978                     This algorithm doesn't find all types of self-intersections.
6979                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6980                     vertex/face and edge/face intersections. Face/face
6981                     intersections detection is switched off as it is a
6982                     time-consuming operation that gives an impact on performance.
6983                     To find all self-intersections please use
6984                     CheckSelfIntersections() method.
6985
6986             Returns:   
6987                 New GEOM.GEOM_Object, containing the result shape.
6988             
6989             """
6990             # Example: see GEOM_TestOthers.py
6991             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte)
6992             RaiseIfFailed("MakeFuseList", self.BoolOp)
6993             self._autoPublish(anObj, theName, "fuse")
6994             return anObj
6995
6996         ## Perform Common boolean operation on the list of shapes.
6997         #  @param theShapesList Shapes for Common operation.
6998         #  @param checkSelfInte The flag that tells if the arguments should
6999         #         be checked for self-intersection prior to the operation.
7000         #  @param theName Object name; when specified, this parameter is used
7001         #         for result publication in the study. Otherwise, if automatic
7002         #         publication is switched on, default value is used for result name.
7003         #
7004         #  @note This algorithm doesn't find all types of self-intersections.
7005         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7006         #        vertex/face and edge/face intersections. Face/face
7007         #        intersections detection is switched off as it is a
7008         #        time-consuming operation that gives an impact on performance.
7009         #        To find all self-intersections please use
7010         #        CheckSelfIntersections() method.
7011         #
7012         #  @return New GEOM.GEOM_Object, containing the result shape.
7013         #
7014         #  @ref tui_common "Example 1"
7015         #  \n @ref swig_MakeCommon "Example 2"
7016         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7017             """
7018             Perform Common boolean operation on the list of shapes.
7019
7020             Parameters: 
7021                 theShapesList Shapes for Common operation.
7022                 checkSelfInte The flag that tells if the arguments should
7023                               be checked for self-intersection prior to
7024                               the operation.
7025                 theName Object name; when specified, this parameter is used
7026                         for result publication in the study. Otherwise, if automatic
7027                         publication is switched on, default value is used for result name.
7028
7029             Note:
7030                     This algorithm doesn't find all types of self-intersections.
7031                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7032                     vertex/face and edge/face intersections. Face/face
7033                     intersections detection is switched off as it is a
7034                     time-consuming operation that gives an impact on performance.
7035                     To find all self-intersections please use
7036                     CheckSelfIntersections() method.
7037
7038             Returns:   
7039                 New GEOM.GEOM_Object, containing the result shape.
7040             
7041             """
7042             # Example: see GEOM_TestOthers.py
7043             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7044             RaiseIfFailed("MakeCommonList", self.BoolOp)
7045             self._autoPublish(anObj, theName, "common")
7046             return anObj
7047
7048         ## Perform Cut boolean operation on one object and the list of tools.
7049         #  @param theMainShape The object of the operation.
7050         #  @param theShapesList The list of tools of the operation.
7051         #  @param checkSelfInte The flag that tells if the arguments should
7052         #         be checked for self-intersection prior to the operation.
7053         #  @param theName Object name; when specified, this parameter is used
7054         #         for result publication in the study. Otherwise, if automatic
7055         #         publication is switched on, default value is used for result name.
7056         #
7057         #  @note This algorithm doesn't find all types of self-intersections.
7058         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7059         #        vertex/face and edge/face intersections. Face/face
7060         #        intersections detection is switched off as it is a
7061         #        time-consuming operation that gives an impact on performance.
7062         #        To find all self-intersections please use
7063         #        CheckSelfIntersections() method.
7064         #
7065         #  @return New GEOM.GEOM_Object, containing the result shape.
7066         #
7067         #  @ref tui_cut "Example 1"
7068         #  \n @ref swig_MakeCommon "Example 2"
7069         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7070             """
7071             Perform Cut boolean operation on one object and the list of tools.
7072
7073             Parameters: 
7074                 theMainShape The object of the operation.
7075                 theShapesList The list of tools of the operation.
7076                 checkSelfInte The flag that tells if the arguments should
7077                               be checked for self-intersection prior to
7078                               the operation.
7079                 theName Object name; when specified, this parameter is used
7080                         for result publication in the study. Otherwise, if automatic
7081                         publication is switched on, default value is used for result name.
7082
7083             Note:
7084                     This algorithm doesn't find all types of self-intersections.
7085                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7086                     vertex/face and edge/face intersections. Face/face
7087                     intersections detection is switched off as it is a
7088                     time-consuming operation that gives an impact on performance.
7089                     To find all self-intersections please use
7090                     CheckSelfIntersections() method.
7091
7092             Returns:   
7093                 New GEOM.GEOM_Object, containing the result shape.
7094             
7095             """
7096             # Example: see GEOM_TestOthers.py
7097             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7098             RaiseIfFailed("MakeCutList", self.BoolOp)
7099             self._autoPublish(anObj, theName, "cut")
7100             return anObj
7101
7102         # end of l3_boolean
7103         ## @}
7104
7105         ## @addtogroup l3_basic_op
7106         ## @{
7107
7108         ## Perform partition operation.
7109         #  @param ListShapes Shapes to be intersected.
7110         #  @param ListTools Shapes to intersect theShapes.
7111         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7112         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7113         #         type will be detected automatically.
7114         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7115         #                             target type (equal to Limit) are kept in the result,
7116         #                             else standalone shapes of lower dimension
7117         #                             are kept also (if they exist).
7118         #  @param checkSelfInte The flag that tells if the arguments should
7119         #         be checked for self-intersection prior to the operation.
7120         #
7121         #  @note This algorithm doesn't find all types of self-intersections.
7122         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7123         #        vertex/face and edge/face intersections. Face/face
7124         #        intersections detection is switched off as it is a
7125         #        time-consuming operation that gives an impact on performance.
7126         #        To find all self-intersections please use
7127         #        CheckSelfIntersections() method.
7128         #
7129         #  @param theName Object name; when specified, this parameter is used
7130         #         for result publication in the study. Otherwise, if automatic
7131         #         publication is switched on, default value is used for result name.
7132         #
7133         #  @note Each compound from ListShapes and ListTools will be exploded
7134         #        in order to avoid possible intersection between shapes from this compound.
7135         #
7136         #  After implementation new version of PartitionAlgo (October 2006)
7137         #  other parameters are ignored by current functionality. They are kept
7138         #  in this function only for support old versions.
7139         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7140         #         Each shape from theKeepInside must belong to theShapes also.
7141         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7142         #         Each shape from theRemoveInside must belong to theShapes also.
7143         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7144         #      @param ListMaterials Material indices for each shape. Make sence,
7145         #         only if theRemoveWebs is TRUE.
7146         #
7147         #  @return New GEOM.GEOM_Object, containing the result shapes.
7148         #
7149         #  @ref tui_partition "Example"
7150         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7151                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7152                           KeepNonlimitShapes=0, checkSelfInte=False, theName=None):
7153             """
7154             Perform partition operation.
7155
7156             Parameters: 
7157                 ListShapes Shapes to be intersected.
7158                 ListTools Shapes to intersect theShapes.
7159                 Limit Type of resulting shapes (see geompy.ShapeType)
7160                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7161                       type will be detected automatically.
7162                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7163                                     target type (equal to Limit) are kept in the result,
7164                                     else standalone shapes of lower dimension
7165                                     are kept also (if they exist).
7166                 checkSelfInte The flag that tells if the arguments should
7167                               be checked for self-intersection prior to
7168                               the operation.
7169
7170             Note:
7171                     This algorithm doesn't find all types of self-intersections.
7172                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7173                     vertex/face and edge/face intersections. Face/face
7174                     intersections detection is switched off as it is a
7175                     time-consuming operation that gives an impact on performance.
7176                     To find all self-intersections please use
7177                     CheckSelfIntersections() method.
7178
7179                 theName Object name; when specified, this parameter is used
7180                         for result publication in the study. Otherwise, if automatic
7181                         publication is switched on, default value is used for result name.
7182             Note:
7183                     Each compound from ListShapes and ListTools will be exploded
7184                     in order to avoid possible intersection between shapes from
7185                     this compound.
7186                     
7187             After implementation new version of PartitionAlgo (October 2006) other
7188             parameters are ignored by current functionality. They are kept in this
7189             function only for support old versions.
7190             
7191             Ignored parameters:
7192                 ListKeepInside Shapes, outside which the results will be deleted.
7193                                Each shape from theKeepInside must belong to theShapes also.
7194                 ListRemoveInside Shapes, inside which the results will be deleted.
7195                                  Each shape from theRemoveInside must belong to theShapes also.
7196                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7197                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7198
7199             Returns:   
7200                 New GEOM.GEOM_Object, containing the result shapes.
7201             """
7202             # Example: see GEOM_TestAll.py
7203             if Limit == self.ShapeType["AUTO"]:
7204                 # automatic detection of the most appropriate shape limit type
7205                 lim = GEOM.SHAPE
7206                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7207                 Limit = EnumToLong(lim)
7208                 pass
7209             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7210                                               ListKeepInside, ListRemoveInside,
7211                                               Limit, RemoveWebs, ListMaterials,
7212                                               KeepNonlimitShapes, checkSelfInte);
7213             RaiseIfFailed("MakePartition", self.BoolOp)
7214             self._autoPublish(anObj, theName, "partition")
7215             return anObj
7216
7217         ## Perform partition operation.
7218         #  This method may be useful if it is needed to make a partition for
7219         #  compound contains nonintersected shapes. Performance will be better
7220         #  since intersection between shapes from compound is not performed.
7221         #
7222         #  Description of all parameters as in previous method MakePartition()
7223         #
7224         #  @note Passed compounds (via ListShapes or via ListTools)
7225         #           have to consist of nonintersecting shapes.
7226         #
7227         #  @return New GEOM.GEOM_Object, containing the result shapes.
7228         #
7229         #  @ref swig_todo "Example"
7230         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7231                                                  ListKeepInside=[], ListRemoveInside=[],
7232                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7233                                                  ListMaterials=[], KeepNonlimitShapes=0,
7234                                                  checkSelfInte=False, theName=None):
7235             """
7236             Perform partition operation.
7237             This method may be useful if it is needed to make a partition for
7238             compound contains nonintersected shapes. Performance will be better
7239             since intersection between shapes from compound is not performed.
7240
7241             Parameters: 
7242                 Description of all parameters as in method geompy.MakePartition
7243         
7244             NOTE:
7245                 Passed compounds (via ListShapes or via ListTools)
7246                 have to consist of nonintersecting shapes.
7247
7248             Returns:   
7249                 New GEOM.GEOM_Object, containing the result shapes.
7250             """
7251             if Limit == self.ShapeType["AUTO"]:
7252                 # automatic detection of the most appropriate shape limit type
7253                 lim = GEOM.SHAPE
7254                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7255                 Limit = EnumToLong(lim)
7256                 pass
7257             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7258                                                                      ListKeepInside, ListRemoveInside,
7259                                                                      Limit, RemoveWebs, ListMaterials,
7260                                                                      KeepNonlimitShapes, checkSelfInte);
7261             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7262             self._autoPublish(anObj, theName, "partition")
7263             return anObj
7264
7265         ## See method MakePartition() for more information.
7266         #
7267         #  @ref tui_partition "Example 1"
7268         #  \n @ref swig_Partition "Example 2"
7269         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7270                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7271                       KeepNonlimitShapes=0, checkSelfInte=False, theName=None):
7272             """
7273             See method geompy.MakePartition for more information.
7274             """
7275             # Example: see GEOM_TestOthers.py
7276             # note: auto-publishing is done in self.MakePartition()
7277             anObj = self.MakePartition(ListShapes, ListTools,
7278                                        ListKeepInside, ListRemoveInside,
7279                                        Limit, RemoveWebs, ListMaterials,
7280                                        KeepNonlimitShapes, checkSelfInte,
7281                                        theName);
7282             return anObj
7283
7284         ## Perform partition of the Shape with the Plane
7285         #  @param theShape Shape to be intersected.
7286         #  @param thePlane Tool shape, to intersect theShape.
7287         #  @param checkSelfInte The flag that tells if the arguments should
7288         #         be checked for self-intersection prior to the operation.
7289         #  @param theName Object name; when specified, this parameter is used
7290         #         for result publication in the study. Otherwise, if automatic
7291         #         publication is switched on, default value is used for result name.
7292         #
7293         #  @note This algorithm doesn't find all types of self-intersections.
7294         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7295         #        vertex/face and edge/face intersections. Face/face
7296         #        intersections detection is switched off as it is a
7297         #        time-consuming operation that gives an impact on performance.
7298         #        To find all self-intersections please use
7299         #        CheckSelfIntersections() method.
7300         #
7301         #  @return New GEOM.GEOM_Object, containing the result shape.
7302         #
7303         #  @ref tui_partition "Example"
7304         def MakeHalfPartition(self, theShape, thePlane, checkSelfInte=False, theName=None):
7305             """
7306             Perform partition of the Shape with the Plane
7307
7308             Parameters: 
7309                 theShape Shape to be intersected.
7310                 thePlane Tool shape, to intersect theShape.
7311                 checkSelfInte The flag that tells if the arguments should
7312                               be checked for self-intersection prior to
7313                               the operation.
7314                 theName Object name; when specified, this parameter is used
7315                         for result publication in the study. Otherwise, if automatic
7316                         publication is switched on, default value is used for result name.
7317
7318             Note:
7319                     This algorithm doesn't find all types of self-intersections.
7320                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7321                     vertex/face and edge/face intersections. Face/face
7322                     intersections detection is switched off as it is a
7323                     time-consuming operation that gives an impact on performance.
7324                     To find all self-intersections please use
7325                     CheckSelfIntersections() method.
7326
7327             Returns:  
7328                 New GEOM.GEOM_Object, containing the result shape.
7329             """
7330             # Example: see GEOM_TestAll.py
7331             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane, checkSelfInte)
7332             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7333             self._autoPublish(anObj, theName, "partition")
7334             return anObj
7335
7336         # end of l3_basic_op
7337         ## @}
7338
7339         ## @addtogroup l3_transform
7340         ## @{
7341
7342         ## Translate the given object along the vector, specified
7343         #  by its end points.
7344         #  @param theObject The object to be translated.
7345         #  @param thePoint1 Start point of translation vector.
7346         #  @param thePoint2 End point of translation vector.
7347         #  @param theCopy Flag used to translate object itself or create a copy.
7348         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7349         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7350         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7351             """
7352             Translate the given object along the vector, specified by its end points.
7353
7354             Parameters: 
7355                 theObject The object to be translated.
7356                 thePoint1 Start point of translation vector.
7357                 thePoint2 End point of translation vector.
7358                 theCopy Flag used to translate object itself or create a copy.
7359
7360             Returns: 
7361                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7362                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7363             """
7364             if theCopy:
7365                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7366             else:
7367                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7368             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7369             return anObj
7370
7371         ## Translate the given object along the vector, specified
7372         #  by its end points, creating its copy before the translation.
7373         #  @param theObject The object to be translated.
7374         #  @param thePoint1 Start point of translation vector.
7375         #  @param thePoint2 End point of translation vector.
7376         #  @param theName Object name; when specified, this parameter is used
7377         #         for result publication in the study. Otherwise, if automatic
7378         #         publication is switched on, default value is used for result name.
7379         #
7380         #  @return New GEOM.GEOM_Object, containing the translated object.
7381         #
7382         #  @ref tui_translation "Example 1"
7383         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7384         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7385             """
7386             Translate the given object along the vector, specified
7387             by its end points, creating its copy before the translation.
7388
7389             Parameters: 
7390                 theObject The object to be translated.
7391                 thePoint1 Start point of translation vector.
7392                 thePoint2 End point of translation vector.
7393                 theName Object name; when specified, this parameter is used
7394                         for result publication in the study. Otherwise, if automatic
7395                         publication is switched on, default value is used for result name.
7396
7397             Returns:  
7398                 New GEOM.GEOM_Object, containing the translated object.
7399             """
7400             # Example: see GEOM_TestAll.py
7401             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7402             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7403             self._autoPublish(anObj, theName, "translated")
7404             return anObj
7405
7406         ## Translate the given object along the vector, specified by its components.
7407         #  @param theObject The object to be translated.
7408         #  @param theDX,theDY,theDZ Components of translation vector.
7409         #  @param theCopy Flag used to translate object itself or create a copy.
7410         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7411         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7412         #
7413         #  @ref tui_translation "Example"
7414         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7415             """
7416             Translate the given object along the vector, specified by its components.
7417
7418             Parameters: 
7419                 theObject The object to be translated.
7420                 theDX,theDY,theDZ Components of translation vector.
7421                 theCopy Flag used to translate object itself or create a copy.
7422
7423             Returns: 
7424                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7425                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7426             """
7427             # Example: see GEOM_TestAll.py
7428             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7429             if theCopy:
7430                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7431             else:
7432                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7433             anObj.SetParameters(Parameters)
7434             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7435             return anObj
7436
7437         ## Translate the given object along the vector, specified
7438         #  by its components, creating its copy before the translation.
7439         #  @param theObject The object to be translated.
7440         #  @param theDX,theDY,theDZ Components of translation vector.
7441         #  @param 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         #  @return New GEOM.GEOM_Object, containing the translated object.
7446         #
7447         #  @ref tui_translation "Example"
7448         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7449             """
7450             Translate the given object along the vector, specified
7451             by its components, creating its copy before the translation.
7452
7453             Parameters: 
7454                 theObject The object to be translated.
7455                 theDX,theDY,theDZ Components of translation vector.
7456                 theName Object name; when specified, this parameter is used
7457                         for result publication in the study. Otherwise, if automatic
7458                         publication is switched on, default value is used for result name.
7459
7460             Returns: 
7461                 New GEOM.GEOM_Object, containing the translated object.
7462             """
7463             # Example: see GEOM_TestAll.py
7464             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7465             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7466             anObj.SetParameters(Parameters)
7467             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7468             self._autoPublish(anObj, theName, "translated")
7469             return anObj
7470
7471         ## Translate the given object along the given vector.
7472         #  @param theObject The object to be translated.
7473         #  @param theVector The translation vector.
7474         #  @param theCopy Flag used to translate object itself or create a copy.
7475         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7476         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7477         def TranslateVector(self, theObject, theVector, theCopy=False):
7478             """
7479             Translate the given object along the given vector.
7480
7481             Parameters: 
7482                 theObject The object to be translated.
7483                 theVector The translation vector.
7484                 theCopy Flag used to translate object itself or create a copy.
7485
7486             Returns: 
7487                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7488                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7489             """
7490             if theCopy:
7491                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7492             else:
7493                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7494             RaiseIfFailed("TranslateVector", self.TrsfOp)
7495             return anObj
7496
7497         ## Translate the given object along the given vector,
7498         #  creating its copy before the translation.
7499         #  @param theObject The object to be translated.
7500         #  @param theVector The translation vector.
7501         #  @param theName Object name; when specified, this parameter is used
7502         #         for result publication in the study. Otherwise, if automatic
7503         #         publication is switched on, default value is used for result name.
7504         #
7505         #  @return New GEOM.GEOM_Object, containing the translated object.
7506         #
7507         #  @ref tui_translation "Example"
7508         def MakeTranslationVector(self, theObject, theVector, theName=None):
7509             """
7510             Translate the given object along the given vector,
7511             creating its copy before the translation.
7512
7513             Parameters: 
7514                 theObject The object to be translated.
7515                 theVector The translation vector.
7516                 theName Object name; when specified, this parameter is used
7517                         for result publication in the study. Otherwise, if automatic
7518                         publication is switched on, default value is used for result name.
7519
7520             Returns: 
7521                 New GEOM.GEOM_Object, containing the translated object.
7522             """
7523             # Example: see GEOM_TestAll.py
7524             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7525             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7526             self._autoPublish(anObj, theName, "translated")
7527             return anObj
7528
7529         ## Translate the given object along the given vector on given distance.
7530         #  @param theObject The object to be translated.
7531         #  @param theVector The translation vector.
7532         #  @param theDistance The translation distance.
7533         #  @param theCopy Flag used to translate object itself or create a copy.
7534         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7535         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7536         #
7537         #  @ref tui_translation "Example"
7538         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7539             """
7540             Translate the given object along the given vector on given distance.
7541
7542             Parameters: 
7543                 theObject The object to be translated.
7544                 theVector The translation vector.
7545                 theDistance The translation distance.
7546                 theCopy Flag used to translate object itself or create a copy.
7547
7548             Returns: 
7549                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7550                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7551             """
7552             # Example: see GEOM_TestAll.py
7553             theDistance,Parameters = ParseParameters(theDistance)
7554             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7555             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7556             anObj.SetParameters(Parameters)
7557             return anObj
7558
7559         ## Translate the given object along the given vector on given distance,
7560         #  creating its copy before the translation.
7561         #  @param theObject The object to be translated.
7562         #  @param theVector The translation vector.
7563         #  @param theDistance The translation distance.
7564         #  @param theName Object name; when specified, this parameter is used
7565         #         for result publication in the study. Otherwise, if automatic
7566         #         publication is switched on, default value is used for result name.
7567         #
7568         #  @return New GEOM.GEOM_Object, containing the translated object.
7569         #
7570         #  @ref tui_translation "Example"
7571         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7572             """
7573             Translate the given object along the given vector on given distance,
7574             creating its copy before the translation.
7575
7576             Parameters:
7577                 theObject The object to be translated.
7578                 theVector The translation vector.
7579                 theDistance The translation distance.
7580                 theName Object name; when specified, this parameter is used
7581                         for result publication in the study. Otherwise, if automatic
7582                         publication is switched on, default value is used for result name.
7583
7584             Returns: 
7585                 New GEOM.GEOM_Object, containing the translated object.
7586             """
7587             # Example: see GEOM_TestAll.py
7588             theDistance,Parameters = ParseParameters(theDistance)
7589             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7590             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7591             anObj.SetParameters(Parameters)
7592             self._autoPublish(anObj, theName, "translated")
7593             return anObj
7594
7595         ## Rotate the given object around the given axis on the given angle.
7596         #  @param theObject The object to be rotated.
7597         #  @param theAxis Rotation axis.
7598         #  @param theAngle Rotation angle in radians.
7599         #  @param theCopy Flag used to rotate object itself or create a copy.
7600         #
7601         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7602         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7603         #
7604         #  @ref tui_rotation "Example"
7605         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7606             """
7607             Rotate the given object around the given axis on the given angle.
7608
7609             Parameters:
7610                 theObject The object to be rotated.
7611                 theAxis Rotation axis.
7612                 theAngle Rotation angle in radians.
7613                 theCopy Flag used to rotate object itself or create a copy.
7614
7615             Returns:
7616                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7617                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7618             """
7619             # Example: see GEOM_TestAll.py
7620             flag = False
7621             if isinstance(theAngle,str):
7622                 flag = True
7623             theAngle, Parameters = ParseParameters(theAngle)
7624             if flag:
7625                 theAngle = theAngle*math.pi/180.0
7626             if theCopy:
7627                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7628             else:
7629                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7630             RaiseIfFailed("Rotate", self.TrsfOp)
7631             anObj.SetParameters(Parameters)
7632             return anObj
7633
7634         ## Rotate the given object around the given axis
7635         #  on the given angle, creating its copy before the rotatation.
7636         #  @param theObject The object to be rotated.
7637         #  @param theAxis Rotation axis.
7638         #  @param theAngle Rotation angle in radians.
7639         #  @param theName Object name; when specified, this parameter is used
7640         #         for result publication in the study. Otherwise, if automatic
7641         #         publication is switched on, default value is used for result name.
7642         #
7643         #  @return New GEOM.GEOM_Object, containing the rotated object.
7644         #
7645         #  @ref tui_rotation "Example"
7646         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7647             """
7648             Rotate the given object around the given axis
7649             on the given angle, creating its copy before the rotatation.
7650
7651             Parameters:
7652                 theObject The object to be rotated.
7653                 theAxis Rotation axis.
7654                 theAngle Rotation angle in radians.
7655                 theName Object name; when specified, this parameter is used
7656                         for result publication in the study. Otherwise, if automatic
7657                         publication is switched on, default value is used for result name.
7658
7659             Returns:
7660                 New GEOM.GEOM_Object, containing the rotated object.
7661             """
7662             # Example: see GEOM_TestAll.py
7663             flag = False
7664             if isinstance(theAngle,str):
7665                 flag = True
7666             theAngle, Parameters = ParseParameters(theAngle)
7667             if flag:
7668                 theAngle = theAngle*math.pi/180.0
7669             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7670             RaiseIfFailed("RotateCopy", self.TrsfOp)
7671             anObj.SetParameters(Parameters)
7672             self._autoPublish(anObj, theName, "rotated")
7673             return anObj
7674
7675         ## Rotate given object around vector perpendicular to plane
7676         #  containing three points.
7677         #  @param theObject The object to be rotated.
7678         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7679         #  containing the three points.
7680         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7681         #  @param theCopy Flag used to rotate object itself or create a copy.
7682         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7683         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7684         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7685             """
7686             Rotate given object around vector perpendicular to plane
7687             containing three points.
7688
7689             Parameters:
7690                 theObject The object to be rotated.
7691                 theCentPoint central point  the axis is the vector perpendicular to the plane
7692                              containing the three points.
7693                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7694                 theCopy Flag used to rotate object itself or create a copy.
7695
7696             Returns:
7697                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7698                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7699             """
7700             if theCopy:
7701                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7702             else:
7703                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7704             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7705             return anObj
7706
7707         ## Rotate given object around vector perpendicular to plane
7708         #  containing three points, creating its copy before the rotatation.
7709         #  @param theObject The object to be rotated.
7710         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7711         #  containing the three points.
7712         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7713         #  @param theName Object name; when specified, this parameter is used
7714         #         for result publication in the study. Otherwise, if automatic
7715         #         publication is switched on, default value is used for result name.
7716         #
7717         #  @return New GEOM.GEOM_Object, containing the rotated object.
7718         #
7719         #  @ref tui_rotation "Example"
7720         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7721             """
7722             Rotate given object around vector perpendicular to plane
7723             containing three points, creating its copy before the rotatation.
7724
7725             Parameters:
7726                 theObject The object to be rotated.
7727                 theCentPoint central point  the axis is the vector perpendicular to the plane
7728                              containing the three points.
7729                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7730                 theName Object name; when specified, this parameter is used
7731                         for result publication in the study. Otherwise, if automatic
7732                         publication is switched on, default value is used for result name.
7733
7734             Returns:
7735                 New GEOM.GEOM_Object, containing the rotated object.
7736             """
7737             # Example: see GEOM_TestAll.py
7738             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7739             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7740             self._autoPublish(anObj, theName, "rotated")
7741             return anObj
7742
7743         ## Scale the given object by the specified factor.
7744         #  @param theObject The object to be scaled.
7745         #  @param thePoint Center point for scaling.
7746         #                  Passing None for it means scaling relatively the origin of global CS.
7747         #  @param theFactor Scaling factor value.
7748         #  @param theCopy Flag used to scale object itself or create a copy.
7749         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7750         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7751         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7752             """
7753             Scale the given object by the specified factor.
7754
7755             Parameters:
7756                 theObject The object to be scaled.
7757                 thePoint Center point for scaling.
7758                          Passing None for it means scaling relatively the origin of global CS.
7759                 theFactor Scaling factor value.
7760                 theCopy Flag used to scale object itself or create a copy.
7761
7762             Returns:    
7763                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7764                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7765             """
7766             # Example: see GEOM_TestAll.py
7767             theFactor, Parameters = ParseParameters(theFactor)
7768             if theCopy:
7769                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7770             else:
7771                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7772             RaiseIfFailed("Scale", self.TrsfOp)
7773             anObj.SetParameters(Parameters)
7774             return anObj
7775
7776         ## Scale the given object by the factor, creating its copy before the scaling.
7777         #  @param theObject The object to be scaled.
7778         #  @param thePoint Center point for scaling.
7779         #                  Passing None for it means scaling relatively the origin of global CS.
7780         #  @param theFactor Scaling factor value.
7781         #  @param theName Object name; when specified, this parameter is used
7782         #         for result publication in the study. Otherwise, if automatic
7783         #         publication is switched on, default value is used for result name.
7784         #
7785         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7786         #
7787         #  @ref tui_scale "Example"
7788         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7789             """
7790             Scale the given object by the factor, creating its copy before the scaling.
7791
7792             Parameters:
7793                 theObject The object to be scaled.
7794                 thePoint Center point for scaling.
7795                          Passing None for it means scaling relatively the origin of global CS.
7796                 theFactor Scaling factor value.
7797                 theName Object name; when specified, this parameter is used
7798                         for result publication in the study. Otherwise, if automatic
7799                         publication is switched on, default value is used for result name.
7800
7801             Returns:    
7802                 New GEOM.GEOM_Object, containing the scaled shape.
7803             """
7804             # Example: see GEOM_TestAll.py
7805             theFactor, Parameters = ParseParameters(theFactor)
7806             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7807             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7808             anObj.SetParameters(Parameters)
7809             self._autoPublish(anObj, theName, "scaled")
7810             return anObj
7811
7812         ## Scale the given object by different factors along coordinate axes.
7813         #  @param theObject The object to be scaled.
7814         #  @param thePoint Center point for scaling.
7815         #                  Passing None for it means scaling relatively the origin of global CS.
7816         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7817         #  @param theCopy Flag used to scale object itself or create a copy.
7818         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7819         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7820         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7821             """
7822             Scale the given object by different factors along coordinate axes.
7823
7824             Parameters:
7825                 theObject The object to be scaled.
7826                 thePoint Center point for scaling.
7827                             Passing None for it means scaling relatively the origin of global CS.
7828                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7829                 theCopy Flag used to scale object itself or create a copy.
7830
7831             Returns:    
7832                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7833                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7834             """
7835             # Example: see GEOM_TestAll.py
7836             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7837             if theCopy:
7838                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7839                                                             theFactorX, theFactorY, theFactorZ)
7840             else:
7841                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7842                                                         theFactorX, theFactorY, theFactorZ)
7843             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7844             anObj.SetParameters(Parameters)
7845             return anObj
7846
7847         ## Scale the given object by different factors along coordinate axes,
7848         #  creating its copy before the scaling.
7849         #  @param theObject The object to be scaled.
7850         #  @param thePoint Center point for scaling.
7851         #                  Passing None for it means scaling relatively the origin of global CS.
7852         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7853         #  @param theName Object name; when specified, this parameter is used
7854         #         for result publication in the study. Otherwise, if automatic
7855         #         publication is switched on, default value is used for result name.
7856         #
7857         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7858         #
7859         #  @ref swig_scale "Example"
7860         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7861             """
7862             Scale the given object by different factors along coordinate axes,
7863             creating its copy before the scaling.
7864
7865             Parameters:
7866                 theObject The object to be scaled.
7867                 thePoint Center point for scaling.
7868                             Passing None for it means scaling relatively the origin of global CS.
7869                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7870                 theName Object name; when specified, this parameter is used
7871                         for result publication in the study. Otherwise, if automatic
7872                         publication is switched on, default value is used for result name.
7873
7874             Returns:
7875                 New GEOM.GEOM_Object, containing the scaled shape.
7876             """
7877             # Example: see GEOM_TestAll.py
7878             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7879             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7880                                                         theFactorX, theFactorY, theFactorZ)
7881             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7882             anObj.SetParameters(Parameters)
7883             self._autoPublish(anObj, theName, "scaled")
7884             return anObj
7885
7886         ## Mirror an object relatively the given plane.
7887         #  @param theObject The object to be mirrored.
7888         #  @param thePlane Plane of symmetry.
7889         #  @param theCopy Flag used to mirror object itself or create a copy.
7890         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7891         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7892         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7893             """
7894             Mirror an object relatively the given plane.
7895
7896             Parameters:
7897                 theObject The object to be mirrored.
7898                 thePlane Plane of symmetry.
7899                 theCopy Flag used to mirror object itself or create a copy.
7900
7901             Returns:
7902                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7903                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7904             """
7905             if theCopy:
7906                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7907             else:
7908                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7909             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7910             return anObj
7911
7912         ## Create an object, symmetrical
7913         #  to the given one relatively the given plane.
7914         #  @param theObject The object to be mirrored.
7915         #  @param thePlane Plane of symmetry.
7916         #  @param theName Object name; when specified, this parameter is used
7917         #         for result publication in the study. Otherwise, if automatic
7918         #         publication is switched on, default value is used for result name.
7919         #
7920         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7921         #
7922         #  @ref tui_mirror "Example"
7923         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7924             """
7925             Create an object, symmetrical to the given one relatively the given plane.
7926
7927             Parameters:
7928                 theObject The object to be mirrored.
7929                 thePlane Plane of symmetry.
7930                 theName Object name; when specified, this parameter is used
7931                         for result publication in the study. Otherwise, if automatic
7932                         publication is switched on, default value is used for result name.
7933
7934             Returns:
7935                 New GEOM.GEOM_Object, containing the mirrored shape.
7936             """
7937             # Example: see GEOM_TestAll.py
7938             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7939             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7940             self._autoPublish(anObj, theName, "mirrored")
7941             return anObj
7942
7943         ## Mirror an object relatively the given axis.
7944         #  @param theObject The object to be mirrored.
7945         #  @param theAxis Axis of symmetry.
7946         #  @param theCopy Flag used to mirror object itself or create a copy.
7947         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7948         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7949         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7950             """
7951             Mirror an object relatively the given axis.
7952
7953             Parameters:
7954                 theObject The object to be mirrored.
7955                 theAxis Axis of symmetry.
7956                 theCopy Flag used to mirror object itself or create a copy.
7957
7958             Returns:
7959                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7960                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7961             """
7962             if theCopy:
7963                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7964             else:
7965                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7966             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7967             return anObj
7968
7969         ## Create an object, symmetrical
7970         #  to the given one relatively the given axis.
7971         #  @param theObject The object to be mirrored.
7972         #  @param theAxis Axis of symmetry.
7973         #  @param theName Object name; when specified, this parameter is used
7974         #         for result publication in the study. Otherwise, if automatic
7975         #         publication is switched on, default value is used for result name.
7976         #
7977         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7978         #
7979         #  @ref tui_mirror "Example"
7980         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7981             """
7982             Create an object, symmetrical to the given one relatively the given axis.
7983
7984             Parameters:
7985                 theObject The object to be mirrored.
7986                 theAxis Axis of symmetry.
7987                 theName Object name; when specified, this parameter is used
7988                         for result publication in the study. Otherwise, if automatic
7989                         publication is switched on, default value is used for result name.
7990
7991             Returns: 
7992                 New GEOM.GEOM_Object, containing the mirrored shape.
7993             """
7994             # Example: see GEOM_TestAll.py
7995             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7996             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7997             self._autoPublish(anObj, theName, "mirrored")
7998             return anObj
7999
8000         ## Mirror an object relatively the given point.
8001         #  @param theObject The object to be mirrored.
8002         #  @param thePoint Point of symmetry.
8003         #  @param theCopy Flag used to mirror object itself or create a copy.
8004         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8005         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8006         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8007             """
8008             Mirror an object relatively the given point.
8009
8010             Parameters:
8011                 theObject The object to be mirrored.
8012                 thePoint Point of symmetry.
8013                 theCopy Flag used to mirror object itself or create a copy.
8014
8015             Returns:
8016                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8017                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8018             """
8019             # Example: see GEOM_TestAll.py
8020             if theCopy:
8021                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8022             else:
8023                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8024             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8025             return anObj
8026
8027         ## Create an object, symmetrical
8028         #  to the given one relatively the given point.
8029         #  @param theObject The object to be mirrored.
8030         #  @param thePoint Point of symmetry.
8031         #  @param theName Object name; when specified, this parameter is used
8032         #         for result publication in the study. Otherwise, if automatic
8033         #         publication is switched on, default value is used for result name.
8034         #
8035         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8036         #
8037         #  @ref tui_mirror "Example"
8038         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8039             """
8040             Create an object, symmetrical
8041             to the given one relatively the given point.
8042
8043             Parameters:
8044                 theObject The object to be mirrored.
8045                 thePoint Point of symmetry.
8046                 theName Object name; when specified, this parameter is used
8047                         for result publication in the study. Otherwise, if automatic
8048                         publication is switched on, default value is used for result name.
8049
8050             Returns:  
8051                 New GEOM.GEOM_Object, containing the mirrored shape.
8052             """
8053             # Example: see GEOM_TestAll.py
8054             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8055             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8056             self._autoPublish(anObj, theName, "mirrored")
8057             return anObj
8058
8059         ## Modify the location of the given object.
8060         #  @param theObject The object to be displaced.
8061         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8062         #                     If \a theStartLCS is NULL, displacement
8063         #                     will be performed from global CS.\n
8064         #                     If \a theObject itself is used as \a theStartLCS,
8065         #                     its location will be changed to \a theEndLCS.
8066         #  @param theEndLCS Coordinate system to perform displacement to it.
8067         #  @param theCopy Flag used to displace object itself or create a copy.
8068         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8069         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8070         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8071             """
8072             Modify the Location of the given object by LCS, creating its copy before the setting.
8073
8074             Parameters:
8075                 theObject The object to be displaced.
8076                 theStartLCS Coordinate system to perform displacement from it.
8077                             If theStartLCS is NULL, displacement
8078                             will be performed from global CS.
8079                             If theObject itself is used as theStartLCS,
8080                             its location will be changed to theEndLCS.
8081                 theEndLCS Coordinate system to perform displacement to it.
8082                 theCopy Flag used to displace object itself or create a copy.
8083
8084             Returns:
8085                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8086                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8087             """
8088             # Example: see GEOM_TestAll.py
8089             if theCopy:
8090                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8091             else:
8092                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8093             RaiseIfFailed("Displace", self.TrsfOp)
8094             return anObj
8095
8096         ## Modify the Location of the given object by LCS,
8097         #  creating its copy before the setting.
8098         #  @param theObject The object to be displaced.
8099         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8100         #                     If \a theStartLCS is NULL, displacement
8101         #                     will be performed from global CS.\n
8102         #                     If \a theObject itself is used as \a theStartLCS,
8103         #                     its location will be changed to \a theEndLCS.
8104         #  @param theEndLCS Coordinate system to perform displacement to it.
8105         #  @param theName Object name; when specified, this parameter is used
8106         #         for result publication in the study. Otherwise, if automatic
8107         #         publication is switched on, default value is used for result name.
8108         #
8109         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8110         #
8111         #  @ref tui_modify_location "Example"
8112         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8113             """
8114             Modify the Location of the given object by LCS, creating its copy before the setting.
8115
8116             Parameters:
8117                 theObject The object to be displaced.
8118                 theStartLCS Coordinate system to perform displacement from it.
8119                             If theStartLCS is NULL, displacement
8120                             will be performed from global CS.
8121                             If theObject itself is used as theStartLCS,
8122                             its location will be changed to theEndLCS.
8123                 theEndLCS Coordinate system to perform displacement to it.
8124                 theName Object name; when specified, this parameter is used
8125                         for result publication in the study. Otherwise, if automatic
8126                         publication is switched on, default value is used for result name.
8127
8128             Returns:  
8129                 New GEOM.GEOM_Object, containing the displaced shape.
8130
8131             Example of usage:
8132                 # create local coordinate systems
8133                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8134                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8135                 # modify the location of the given object
8136                 position = geompy.MakePosition(cylinder, cs1, cs2)
8137             """
8138             # Example: see GEOM_TestAll.py
8139             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8140             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8141             self._autoPublish(anObj, theName, "displaced")
8142             return anObj
8143
8144         ## Modify the Location of the given object by Path.
8145         #  @param  theObject The object to be displaced.
8146         #  @param  thePath Wire or Edge along that the object will be translated.
8147         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8148         #  @param  theCopy is to create a copy objects if true.
8149         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8150         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8151         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8152         #
8153         #  @ref tui_modify_location "Example"
8154         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8155             """
8156             Modify the Location of the given object by Path.
8157
8158             Parameters:
8159                  theObject The object to be displaced.
8160                  thePath Wire or Edge along that the object will be translated.
8161                  theDistance progress of Path (0 = start location, 1 = end of path location).
8162                  theCopy is to create a copy objects if true.
8163                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8164
8165             Returns:  
8166                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8167                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8168
8169             Example of usage:
8170                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8171             """
8172             # Example: see GEOM_TestAll.py
8173             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8174             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8175             return anObj
8176
8177         ## Modify the Location of the given object by Path, creating its copy before the operation.
8178         #  @param theObject The object to be displaced.
8179         #  @param thePath Wire or Edge along that the object will be translated.
8180         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8181         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8182         #  @param theName Object name; when specified, this parameter is used
8183         #         for result publication in the study. Otherwise, if automatic
8184         #         publication is switched on, default value is used for result name.
8185         #
8186         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8187         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8188             """
8189             Modify the Location of the given object by Path, creating its copy before the operation.
8190
8191             Parameters:
8192                  theObject The object to be displaced.
8193                  thePath Wire or Edge along that the object will be translated.
8194                  theDistance progress of Path (0 = start location, 1 = end of path location).
8195                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8196                  theName Object name; when specified, this parameter is used
8197                          for result publication in the study. Otherwise, if automatic
8198                          publication is switched on, default value is used for result name.
8199
8200             Returns:  
8201                 New GEOM.GEOM_Object, containing the displaced shape.
8202             """
8203             # Example: see GEOM_TestAll.py
8204             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8205             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8206             self._autoPublish(anObj, theName, "displaced")
8207             return anObj
8208
8209         ## Offset given shape.
8210         #  @param theObject The base object for the offset.
8211         #  @param theOffset Offset value.
8212         #  @param theCopy Flag used to offset object itself or create a copy.
8213         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8214         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8215         def Offset(self, theObject, theOffset, theCopy=False):
8216             """
8217             Offset given shape.
8218
8219             Parameters:
8220                 theObject The base object for the offset.
8221                 theOffset Offset value.
8222                 theCopy Flag used to offset object itself or create a copy.
8223
8224             Returns: 
8225                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8226                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8227             """
8228             theOffset, Parameters = ParseParameters(theOffset)
8229             if theCopy:
8230                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8231             else:
8232                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8233             RaiseIfFailed("Offset", self.TrsfOp)
8234             anObj.SetParameters(Parameters)
8235             return anObj
8236
8237         ## Create new object as offset of the given one.
8238         #  @param theObject The base object for the offset.
8239         #  @param theOffset Offset value.
8240         #  @param theName Object name; when specified, this parameter is used
8241         #         for result publication in the study. Otherwise, if automatic
8242         #         publication is switched on, default value is used for result name.
8243         #
8244         #  @return New GEOM.GEOM_Object, containing the offset object.
8245         #
8246         #  @ref tui_offset "Example"
8247         def MakeOffset(self, theObject, theOffset, theName=None):
8248             """
8249             Create new object as offset of the given one.
8250
8251             Parameters:
8252                 theObject The base object for the offset.
8253                 theOffset Offset value.
8254                 theName Object name; when specified, this parameter is used
8255                         for result publication in the study. Otherwise, if automatic
8256                         publication is switched on, default value is used for result name.
8257
8258             Returns:  
8259                 New GEOM.GEOM_Object, containing the offset object.
8260
8261             Example of usage:
8262                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8263                  # create a new object as offset of the given object
8264                  offset = geompy.MakeOffset(box, 70.)
8265             """
8266             # Example: see GEOM_TestAll.py
8267             theOffset, Parameters = ParseParameters(theOffset)
8268             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8269             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8270             anObj.SetParameters(Parameters)
8271             self._autoPublish(anObj, theName, "offset")
8272             return anObj
8273
8274         ## Create new object as projection of the given one on a 2D surface.
8275         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8276         #  @param theTarget The target object. It can be planar or cylindrical face.
8277         #  @param theName Object name; when specified, this parameter is used
8278         #         for result publication in the study. Otherwise, if automatic
8279         #         publication is switched on, default value is used for result name.
8280         #
8281         #  @return New GEOM.GEOM_Object, containing the projection.
8282         #
8283         #  @ref tui_projection "Example"
8284         def MakeProjection(self, theSource, theTarget, theName=None):
8285             """
8286             Create new object as projection of the given one on a 2D surface.
8287
8288             Parameters:
8289                 theSource The source object for the projection. It can be a point, edge or wire.
8290                 theTarget The target object. It can be planar or cylindrical face.
8291                 theName Object name; when specified, this parameter is used
8292                         for result publication in the study. Otherwise, if automatic
8293                         publication is switched on, default value is used for result name.
8294
8295             Returns:  
8296                 New GEOM.GEOM_Object, containing the projection.
8297             """
8298             # Example: see GEOM_TestAll.py
8299             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8300             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8301             self._autoPublish(anObj, theName, "projection")
8302             return anObj
8303             
8304         ## Create a projection projection of the given point on a wire or an edge.
8305         #  If there are no solutions or there are 2 or more solutions It throws an
8306         #  exception.
8307         #  @param thePoint the point to be projected.
8308         #  @param theWire the wire. The edge is accepted as well.
8309         #  @param theName Object name; when specified, this parameter is used
8310         #         for result publication in the study. Otherwise, if automatic
8311         #         publication is switched on, default value is used for result name.
8312         #
8313         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8314         #  \n \a u: The parameter of projection point on edge.
8315         #  \n \a PointOnEdge: The projection point.
8316         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8317         #
8318         #  @ref tui_projection "Example"
8319         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8320             """
8321             Create a projection projection of the given point on a wire or an edge.
8322             If there are no solutions or there are 2 or more solutions It throws an
8323             exception.
8324             
8325             Parameters:
8326                 thePoint the point to be projected.
8327                 theWire the wire. The edge is accepted as well.
8328                 theName Object name; when specified, this parameter is used
8329                         for result publication in the study. Otherwise, if automatic
8330                         publication is switched on, default value is used for result name.
8331           
8332             Returns:
8333                 [u, PointOnEdge, EdgeInWireIndex]
8334                  u: The parameter of projection point on edge.
8335                  PointOnEdge: The projection point.
8336                  EdgeInWireIndex: The index of an edge in a wire.
8337             """
8338             # Example: see GEOM_TestAll.py
8339             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8340             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8341             self._autoPublish(anObj[1], theName, "projection")
8342             return anObj
8343
8344         # -----------------------------------------------------------------------------
8345         # Patterns
8346         # -----------------------------------------------------------------------------
8347
8348         ## Translate the given object along the given vector a given number times
8349         #  @param theObject The object to be translated.
8350         #  @param theVector Direction of the translation. DX if None.
8351         #  @param theStep Distance to translate on.
8352         #  @param theNbTimes Quantity of translations to be done.
8353         #  @param theName Object name; when specified, this parameter is used
8354         #         for result publication in the study. Otherwise, if automatic
8355         #         publication is switched on, default value is used for result name.
8356         #
8357         #  @return New GEOM.GEOM_Object, containing compound of all
8358         #          the shapes, obtained after each translation.
8359         #
8360         #  @ref tui_multi_translation "Example"
8361         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8362             """
8363             Translate the given object along the given vector a given number times
8364
8365             Parameters:
8366                 theObject The object to be translated.
8367                 theVector Direction of the translation. DX if None.
8368                 theStep Distance to translate on.
8369                 theNbTimes Quantity of translations to be done.
8370                 theName Object name; when specified, this parameter is used
8371                         for result publication in the study. Otherwise, if automatic
8372                         publication is switched on, default value is used for result name.
8373
8374             Returns:     
8375                 New GEOM.GEOM_Object, containing compound of all
8376                 the shapes, obtained after each translation.
8377
8378             Example of usage:
8379                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8380             """
8381             # Example: see GEOM_TestAll.py
8382             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8383             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8384             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8385             anObj.SetParameters(Parameters)
8386             self._autoPublish(anObj, theName, "multitranslation")
8387             return anObj
8388
8389         ## Conseqently apply two specified translations to theObject specified number of times.
8390         #  @param theObject The object to be translated.
8391         #  @param theVector1 Direction of the first translation. DX if None.
8392         #  @param theStep1 Step of the first translation.
8393         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8394         #  @param theVector2 Direction of the second translation. DY if None.
8395         #  @param theStep2 Step of the second translation.
8396         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8397         #  @param theName Object name; when specified, this parameter is used
8398         #         for result publication in the study. Otherwise, if automatic
8399         #         publication is switched on, default value is used for result name.
8400         #
8401         #  @return New GEOM.GEOM_Object, containing compound of all
8402         #          the shapes, obtained after each translation.
8403         #
8404         #  @ref tui_multi_translation "Example"
8405         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8406                                    theVector2, theStep2, theNbTimes2, theName=None):
8407             """
8408             Conseqently apply two specified translations to theObject specified number of times.
8409
8410             Parameters:
8411                 theObject The object to be translated.
8412                 theVector1 Direction of the first translation. DX if None.
8413                 theStep1 Step of the first translation.
8414                 theNbTimes1 Quantity of translations to be done along theVector1.
8415                 theVector2 Direction of the second translation. DY if None.
8416                 theStep2 Step of the second translation.
8417                 theNbTimes2 Quantity of translations to be done along theVector2.
8418                 theName Object name; when specified, this parameter is used
8419                         for result publication in the study. Otherwise, if automatic
8420                         publication is switched on, default value is used for result name.
8421
8422             Returns:
8423                 New GEOM.GEOM_Object, containing compound of all
8424                 the shapes, obtained after each translation.
8425
8426             Example of usage:
8427                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8428             """
8429             # Example: see GEOM_TestAll.py
8430             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8431             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8432                                                  theVector2, theStep2, theNbTimes2)
8433             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8434             anObj.SetParameters(Parameters)
8435             self._autoPublish(anObj, theName, "multitranslation")
8436             return anObj
8437
8438         ## Rotate the given object around the given axis a given number times.
8439         #  Rotation angle will be 2*PI/theNbTimes.
8440         #  @param theObject The object to be rotated.
8441         #  @param theAxis The rotation axis. DZ if None.
8442         #  @param theNbTimes Quantity of rotations to be done.
8443         #  @param theName Object name; when specified, this parameter is used
8444         #         for result publication in the study. Otherwise, if automatic
8445         #         publication is switched on, default value is used for result name.
8446         #
8447         #  @return New GEOM.GEOM_Object, containing compound of all the
8448         #          shapes, obtained after each rotation.
8449         #
8450         #  @ref tui_multi_rotation "Example"
8451         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8452             """
8453             Rotate the given object around the given axis a given number times.
8454             Rotation angle will be 2*PI/theNbTimes.
8455
8456             Parameters:
8457                 theObject The object to be rotated.
8458                 theAxis The rotation axis. DZ if None.
8459                 theNbTimes Quantity of rotations to be done.
8460                 theName Object name; when specified, this parameter is used
8461                         for result publication in the study. Otherwise, if automatic
8462                         publication is switched on, default value is used for result name.
8463
8464             Returns:     
8465                 New GEOM.GEOM_Object, containing compound of all the
8466                 shapes, obtained after each rotation.
8467
8468             Example of usage:
8469                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8470             """
8471             # Example: see GEOM_TestAll.py
8472             theNbTimes, Parameters = ParseParameters(theNbTimes)
8473             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8474             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8475             anObj.SetParameters(Parameters)
8476             self._autoPublish(anObj, theName, "multirotation")
8477             return anObj
8478
8479         ## Rotate the given object around the given axis
8480         #  a given number times on the given angle.
8481         #  @param theObject The object to be rotated.
8482         #  @param theAxis The rotation axis. DZ if None.
8483         #  @param theAngleStep Rotation angle in radians.
8484         #  @param theNbTimes Quantity of rotations to be done.
8485         #  @param theName Object name; when specified, this parameter is used
8486         #         for result publication in the study. Otherwise, if automatic
8487         #         publication is switched on, default value is used for result name.
8488         #
8489         #  @return New GEOM.GEOM_Object, containing compound of all the
8490         #          shapes, obtained after each rotation.
8491         #
8492         #  @ref tui_multi_rotation "Example"
8493         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8494             """
8495             Rotate the given object around the given axis
8496             a given number times on the given angle.
8497
8498             Parameters:
8499                 theObject The object to be rotated.
8500                 theAxis The rotation axis. DZ if None.
8501                 theAngleStep Rotation angle in radians.
8502                 theNbTimes Quantity of rotations to be done.
8503                 theName Object name; when specified, this parameter is used
8504                         for result publication in the study. Otherwise, if automatic
8505                         publication is switched on, default value is used for result name.
8506
8507             Returns:     
8508                 New GEOM.GEOM_Object, containing compound of all the
8509                 shapes, obtained after each rotation.
8510
8511             Example of usage:
8512                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8513             """
8514             # Example: see GEOM_TestAll.py
8515             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8516             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8517             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8518             anObj.SetParameters(Parameters)
8519             self._autoPublish(anObj, theName, "multirotation")
8520             return anObj
8521
8522         ## Rotate the given object around the given axis a given
8523         #  number times and multi-translate each rotation result.
8524         #  Rotation angle will be 2*PI/theNbTimes1.
8525         #  Translation direction passes through center of gravity
8526         #  of rotated shape and its projection on the rotation axis.
8527         #  @param theObject The object to be rotated.
8528         #  @param theAxis Rotation axis. DZ if None.
8529         #  @param theNbTimes1 Quantity of rotations to be done.
8530         #  @param theRadialStep Translation distance.
8531         #  @param theNbTimes2 Quantity of translations to be done.
8532         #  @param theName Object name; when specified, this parameter is used
8533         #         for result publication in the study. Otherwise, if automatic
8534         #         publication is switched on, default value is used for result name.
8535         #
8536         #  @return New GEOM.GEOM_Object, containing compound of all the
8537         #          shapes, obtained after each transformation.
8538         #
8539         #  @ref tui_multi_rotation "Example"
8540         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8541             """
8542             Rotate the given object around the
8543             given axis on the given angle a given number
8544             times and multi-translate each rotation result.
8545             Translation direction passes through center of gravity
8546             of rotated shape and its projection on the rotation axis.
8547
8548             Parameters:
8549                 theObject The object to be rotated.
8550                 theAxis Rotation axis. DZ if None.
8551                 theNbTimes1 Quantity of rotations to be done.
8552                 theRadialStep Translation distance.
8553                 theNbTimes2 Quantity of translations to be done.
8554                 theName Object name; when specified, this parameter is used
8555                         for result publication in the study. Otherwise, if automatic
8556                         publication is switched on, default value is used for result name.
8557
8558             Returns:    
8559                 New GEOM.GEOM_Object, containing compound of all the
8560                 shapes, obtained after each transformation.
8561
8562             Example of usage:
8563                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8564             """
8565             # Example: see GEOM_TestAll.py
8566             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8567             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8568             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8569             anObj.SetParameters(Parameters)
8570             self._autoPublish(anObj, theName, "multirotation")
8571             return anObj
8572
8573         ## Rotate the given object around the
8574         #  given axis on the given angle a given number
8575         #  times and multi-translate each rotation result.
8576         #  Translation direction passes through center of gravity
8577         #  of rotated shape and its projection on the rotation axis.
8578         #  @param theObject The object to be rotated.
8579         #  @param theAxis Rotation axis. DZ if None.
8580         #  @param theAngleStep Rotation angle in radians.
8581         #  @param theNbTimes1 Quantity of rotations to be done.
8582         #  @param theRadialStep Translation distance.
8583         #  @param theNbTimes2 Quantity of translations to be done.
8584         #  @param theName Object name; when specified, this parameter is used
8585         #         for result publication in the study. Otherwise, if automatic
8586         #         publication is switched on, default value is used for result name.
8587         #
8588         #  @return New GEOM.GEOM_Object, containing compound of all the
8589         #          shapes, obtained after each transformation.
8590         #
8591         #  @ref tui_multi_rotation "Example"
8592         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8593             """
8594             Rotate the given object around the
8595             given axis on the given angle a given number
8596             times and multi-translate each rotation result.
8597             Translation direction passes through center of gravity
8598             of rotated shape and its projection on the rotation axis.
8599
8600             Parameters:
8601                 theObject The object to be rotated.
8602                 theAxis Rotation axis. DZ if None.
8603                 theAngleStep Rotation angle in radians.
8604                 theNbTimes1 Quantity of rotations to be done.
8605                 theRadialStep Translation distance.
8606                 theNbTimes2 Quantity of translations to be done.
8607                 theName Object name; when specified, this parameter is used
8608                         for result publication in the study. Otherwise, if automatic
8609                         publication is switched on, default value is used for result name.
8610
8611             Returns:    
8612                 New GEOM.GEOM_Object, containing compound of all the
8613                 shapes, obtained after each transformation.
8614
8615             Example of usage:
8616                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8617             """
8618             # Example: see GEOM_TestAll.py
8619             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8620             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8621             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8622             anObj.SetParameters(Parameters)
8623             self._autoPublish(anObj, theName, "multirotation")
8624             return anObj
8625
8626         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8627         #
8628         #  @ref swig_MakeMultiRotation "Example"
8629         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8630             """
8631             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8632
8633             Example of usage:
8634                 pz = geompy.MakeVertex(0, 0, 100)
8635                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8636                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8637             """
8638             # Example: see GEOM_TestOthers.py
8639             aVec = self.MakeLine(aPoint,aDir)
8640             # note: auto-publishing is done in self.MultiRotate1D()
8641             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8642             return anObj
8643
8644         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8645         #
8646         #  @ref swig_MakeMultiRotation "Example"
8647         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8648             """
8649             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8650
8651             Example of usage:
8652                 pz = geompy.MakeVertex(0, 0, 100)
8653                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8654                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8655             """
8656             # Example: see GEOM_TestOthers.py
8657             aVec = self.MakeLine(aPoint,aDir)
8658             # note: auto-publishing is done in self.MultiRotate1D()
8659             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8660             return anObj
8661
8662         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8663         #
8664         #  @ref swig_MakeMultiRotation "Example"
8665         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8666             """
8667             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8668             
8669             Example of usage:
8670                 pz = geompy.MakeVertex(0, 0, 100)
8671                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8672                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8673             """
8674             # Example: see GEOM_TestOthers.py
8675             aVec = self.MakeLine(aPoint,aDir)
8676             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8677             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8678             return anObj
8679
8680         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8681         #
8682         #  @ref swig_MakeMultiRotation "Example"
8683         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8684             """
8685             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8686             
8687             Example of usage:
8688                 pz = geompy.MakeVertex(0, 0, 100)
8689                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8690                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8691             """
8692             # Example: see GEOM_TestOthers.py
8693             aVec = self.MakeLine(aPoint,aDir)
8694             # note: auto-publishing is done in self.MultiRotate2D()
8695             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8696             return anObj
8697
8698         # end of l3_transform
8699         ## @}
8700
8701         ## @addtogroup l3_transform_d
8702         ## @{
8703
8704         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8705         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8706             """
8707             Deprecated method. Use MultiRotate1DNbTimes instead.
8708             """
8709             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8710             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8711
8712         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8713         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8714         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8715             """
8716             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8717             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8718
8719             Example of usage:
8720                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8721             """
8722             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8723             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8724             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8725             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8726             anObj.SetParameters(Parameters)
8727             self._autoPublish(anObj, theName, "multirotation")
8728             return anObj
8729
8730         ## The same, as MultiRotate1D(), but axis is given by direction and point
8731         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8732         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8733             """
8734             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8735             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8736
8737             Example of usage:
8738                 pz = geompy.MakeVertex(0, 0, 100)
8739                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8740                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8741             """
8742             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8743             aVec = self.MakeLine(aPoint,aDir)
8744             # note: auto-publishing is done in self.MultiRotate1D()
8745             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8746             return anObj
8747
8748         ## The same, as MultiRotate2D(), but axis is given by direction and point
8749         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8750         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8751             """
8752             The same, as MultiRotate2D(), but axis is given by direction and point
8753             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8754             
8755             Example of usage:
8756                 pz = geompy.MakeVertex(0, 0, 100)
8757                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8758                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8759             """
8760             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8761             aVec = self.MakeLine(aPoint,aDir)
8762             # note: auto-publishing is done in self.MultiRotate2D()
8763             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8764             return anObj
8765
8766         # end of l3_transform_d
8767         ## @}
8768
8769         ## @addtogroup l3_local
8770         ## @{
8771
8772         ## Perform a fillet on all edges of the given shape.
8773         #  @param theShape Shape, to perform fillet on.
8774         #  @param theR Fillet radius.
8775         #  @param theName Object name; when specified, this parameter is used
8776         #         for result publication in the study. Otherwise, if automatic
8777         #         publication is switched on, default value is used for result name.
8778         #
8779         #  @return New GEOM.GEOM_Object, containing the result shape.
8780         #
8781         #  @ref tui_fillet "Example 1"
8782         #  \n @ref swig_MakeFilletAll "Example 2"
8783         def MakeFilletAll(self, theShape, theR, theName=None):
8784             """
8785             Perform a fillet on all edges of the given shape.
8786
8787             Parameters:
8788                 theShape Shape, to perform fillet on.
8789                 theR Fillet radius.
8790                 theName Object name; when specified, this parameter is used
8791                         for result publication in the study. Otherwise, if automatic
8792                         publication is switched on, default value is used for result name.
8793
8794             Returns: 
8795                 New GEOM.GEOM_Object, containing the result shape.
8796
8797             Example of usage: 
8798                filletall = geompy.MakeFilletAll(prism, 10.)
8799             """
8800             # Example: see GEOM_TestOthers.py
8801             theR,Parameters = ParseParameters(theR)
8802             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8803             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8804             anObj.SetParameters(Parameters)
8805             self._autoPublish(anObj, theName, "fillet")
8806             return anObj
8807
8808         ## Perform a fillet on the specified edges/faces of the given shape
8809         #  @param theShape Shape, to perform fillet on.
8810         #  @param theR Fillet radius.
8811         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8812         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8813         #  @param theName Object name; when specified, this parameter is used
8814         #         for result publication in the study. Otherwise, if automatic
8815         #         publication is switched on, default value is used for result name.
8816         #
8817         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8818         #
8819         #  @return New GEOM.GEOM_Object, containing the result shape.
8820         #
8821         #  @ref tui_fillet "Example"
8822         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8823             """
8824             Perform a fillet on the specified edges/faces of the given shape
8825
8826             Parameters:
8827                 theShape Shape, to perform fillet on.
8828                 theR Fillet radius.
8829                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8830                 theListShapes Global indices of edges/faces to perform fillet on.
8831                 theName Object name; when specified, this parameter is used
8832                         for result publication in the study. Otherwise, if automatic
8833                         publication is switched on, default value is used for result name.
8834
8835             Note:
8836                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8837
8838             Returns: 
8839                 New GEOM.GEOM_Object, containing the result shape.
8840
8841             Example of usage:
8842                 # get the list of IDs (IDList) for the fillet
8843                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8844                 IDlist_e = []
8845                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8846                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8847                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8848                 # make a fillet on the specified edges of the given shape
8849                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8850             """
8851             # Example: see GEOM_TestAll.py
8852             theR,Parameters = ParseParameters(theR)
8853             anObj = None
8854             if theShapeType == self.ShapeType["EDGE"]:
8855                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8856                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8857             else:
8858                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8859                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8860             anObj.SetParameters(Parameters)
8861             self._autoPublish(anObj, theName, "fillet")
8862             return anObj
8863
8864         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8865         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8866             """
8867             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8868
8869             Example of usage:
8870                 # get the list of IDs (IDList) for the fillet
8871                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8872                 IDlist_e = []
8873                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8874                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8875                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8876                 # make a fillet on the specified edges of the given shape
8877                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8878             """
8879             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8880             anObj = None
8881             if theShapeType == self.ShapeType["EDGE"]:
8882                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8883                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8884             else:
8885                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8886                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8887             anObj.SetParameters(Parameters)
8888             self._autoPublish(anObj, theName, "fillet")
8889             return anObj
8890
8891         ## Perform a fillet on the specified edges of the given shape
8892         #  @param theShape  Wire Shape to perform fillet on.
8893         #  @param theR  Fillet radius.
8894         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8895         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8896         #    \note The list of vertices could be empty,
8897         #          in this case fillet will done done at all vertices in wire
8898         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8899         #         by the length of the edges, nearest to the fillet vertex.
8900         #         But sometimes the next edge is C1 continuous with the one, nearest to
8901         #         the fillet point, and such two (or more) edges can be united to allow
8902         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8903         #         thus ignoring the secant vertex (vertices).
8904         #  @param theName Object name; when specified, this parameter is used
8905         #         for result publication in the study. Otherwise, if automatic
8906         #         publication is switched on, default value is used for result name.
8907         #
8908         #  @return New GEOM.GEOM_Object, containing the result shape.
8909         #
8910         #  @ref tui_fillet2d "Example"
8911         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8912             """
8913             Perform a fillet on the specified edges of the given shape
8914
8915             Parameters:
8916                 theShape  Wire Shape to perform fillet on.
8917                 theR  Fillet radius.
8918                 theListOfVertexes Global indices of vertexes to perform fillet on.
8919                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8920                     by the length of the edges, nearest to the fillet vertex.
8921                     But sometimes the next edge is C1 continuous with the one, nearest to
8922                     the fillet point, and such two (or more) edges can be united to allow
8923                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8924                     thus ignoring the secant vertex (vertices).
8925                 theName Object name; when specified, this parameter is used
8926                         for result publication in the study. Otherwise, if automatic
8927                         publication is switched on, default value is used for result name.
8928             Note:
8929                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8930
8931                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8932
8933             Returns: 
8934                 New GEOM.GEOM_Object, containing the result shape.
8935
8936             Example of usage:  
8937                 # create wire
8938                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8939                 # make fillet at given wire vertices with giver radius
8940                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8941             """
8942             # Example: see GEOM_TestAll.py
8943             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8944             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8945             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8946             anObj.SetParameters(Parameters)
8947             self._autoPublish(anObj, theName, "fillet")
8948             return anObj
8949
8950         ## Perform a fillet at the specified vertices of the given face/shell.
8951         #  @param theShape Face or Shell shape to perform fillet on.
8952         #  @param theR Fillet radius.
8953         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
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         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8959         #
8960         #  @return New GEOM.GEOM_Object, containing the result shape.
8961         #
8962         #  @ref tui_fillet2d "Example"
8963         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8964             """
8965             Perform a fillet at the specified vertices of the given face/shell.
8966
8967             Parameters:
8968                 theShape  Face or Shell shape to perform fillet on.
8969                 theR  Fillet radius.
8970                 theListOfVertexes Global indices of vertexes to perform fillet on.
8971                 theName Object name; when specified, this parameter is used
8972                         for result publication in the study. Otherwise, if automatic
8973                         publication is switched on, default value is used for result name.
8974             Note:
8975                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8976
8977             Returns: 
8978                 New GEOM.GEOM_Object, containing the result shape.
8979
8980             Example of usage:
8981                 face = geompy.MakeFaceHW(100, 100, 1)
8982                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8983             """
8984             # Example: see GEOM_TestAll.py
8985             theR,Parameters = ParseParameters(theR)
8986             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8987             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8988             anObj.SetParameters(Parameters)
8989             self._autoPublish(anObj, theName, "fillet")
8990             return anObj
8991
8992         ## Perform a symmetric chamfer on all edges of the given shape.
8993         #  @param theShape Shape, to perform chamfer on.
8994         #  @param theD Chamfer size along each face.
8995         #  @param theName Object name; when specified, this parameter is used
8996         #         for result publication in the study. Otherwise, if automatic
8997         #         publication is switched on, default value is used for result name.
8998         #
8999         #  @return New GEOM.GEOM_Object, containing the result shape.
9000         #
9001         #  @ref tui_chamfer "Example 1"
9002         #  \n @ref swig_MakeChamferAll "Example 2"
9003         def MakeChamferAll(self, theShape, theD, theName=None):
9004             """
9005             Perform a symmetric chamfer on all edges of the given shape.
9006
9007             Parameters:
9008                 theShape Shape, to perform chamfer on.
9009                 theD Chamfer size along each face.
9010                 theName Object name; when specified, this parameter is used
9011                         for result publication in the study. Otherwise, if automatic
9012                         publication is switched on, default value is used for result name.
9013
9014             Returns:     
9015                 New GEOM.GEOM_Object, containing the result shape.
9016
9017             Example of usage:
9018                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9019             """
9020             # Example: see GEOM_TestOthers.py
9021             theD,Parameters = ParseParameters(theD)
9022             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9023             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9024             anObj.SetParameters(Parameters)
9025             self._autoPublish(anObj, theName, "chamfer")
9026             return anObj
9027
9028         ## Perform a chamfer on edges, common to the specified faces,
9029         #  with distance D1 on the Face1
9030         #  @param theShape Shape, to perform chamfer on.
9031         #  @param theD1 Chamfer size along \a theFace1.
9032         #  @param theD2 Chamfer size along \a theFace2.
9033         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9034         #  @param theName Object name; when specified, this parameter is used
9035         #         for result publication in the study. Otherwise, if automatic
9036         #         publication is switched on, default value is used for result name.
9037         #
9038         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9039         #
9040         #  @return New GEOM.GEOM_Object, containing the result shape.
9041         #
9042         #  @ref tui_chamfer "Example"
9043         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9044             """
9045             Perform a chamfer on edges, common to the specified faces,
9046             with distance D1 on the Face1
9047
9048             Parameters:
9049                 theShape Shape, to perform chamfer on.
9050                 theD1 Chamfer size along theFace1.
9051                 theD2 Chamfer size along theFace2.
9052                 theFace1,theFace2 Global indices of two faces of theShape.
9053                 theName Object name; when specified, this parameter is used
9054                         for result publication in the study. Otherwise, if automatic
9055                         publication is switched on, default value is used for result name.
9056
9057             Note:
9058                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9059
9060             Returns:      
9061                 New GEOM.GEOM_Object, containing the result shape.
9062
9063             Example of usage:
9064                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9065                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9066                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9067                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9068             """
9069             # Example: see GEOM_TestAll.py
9070             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9071             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9072             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9073             anObj.SetParameters(Parameters)
9074             self._autoPublish(anObj, theName, "chamfer")
9075             return anObj
9076
9077         ## Perform a chamfer on edges
9078         #  @param theShape Shape, to perform chamfer on.
9079         #  @param theD Chamfer length
9080         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9081         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9082         #  @param theName Object name; when specified, this parameter is used
9083         #         for result publication in the study. Otherwise, if automatic
9084         #         publication is switched on, default value is used for result name.
9085         #
9086         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9087         #
9088         #  @return New GEOM.GEOM_Object, containing the result shape.
9089         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9090             """
9091             Perform a chamfer on edges
9092
9093             Parameters:
9094                 theShape Shape, to perform chamfer on.
9095                 theD1 Chamfer size along theFace1.
9096                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9097                 theFace1,theFace2 Global indices of two faces of theShape.
9098                 theName Object name; when specified, this parameter is used
9099                         for result publication in the study. Otherwise, if automatic
9100                         publication is switched on, default value is used for result name.
9101
9102             Note:
9103                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9104
9105             Returns:      
9106                 New GEOM.GEOM_Object, containing the result shape.
9107
9108             Example of usage:
9109                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9110                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9111                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9112                 ang = 30
9113                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9114             """
9115             flag = False
9116             if isinstance(theAngle,str):
9117                 flag = True
9118             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9119             if flag:
9120                 theAngle = theAngle*math.pi/180.0
9121             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9122             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9123             anObj.SetParameters(Parameters)
9124             self._autoPublish(anObj, theName, "chamfer")
9125             return anObj
9126
9127         ## Perform a chamfer on all edges of the specified faces,
9128         #  with distance D1 on the first specified face (if several for one edge)
9129         #  @param theShape Shape, to perform chamfer on.
9130         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9131         #               connected to the edge, are in \a theFaces, \a theD1
9132         #               will be get along face, which is nearer to \a theFaces beginning.
9133         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9134         #  @param theFaces Sequence of global indices of faces of \a theShape.
9135         #  @param theName Object name; when specified, this parameter is used
9136         #         for result publication in the study. Otherwise, if automatic
9137         #         publication is switched on, default value is used for result name.
9138         #
9139         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9140         #
9141         #  @return New GEOM.GEOM_Object, containing the result shape.
9142         #
9143         #  @ref tui_chamfer "Example"
9144         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9145             """
9146             Perform a chamfer on all edges of the specified faces,
9147             with distance D1 on the first specified face (if several for one edge)
9148
9149             Parameters:
9150                 theShape Shape, to perform chamfer on.
9151                 theD1 Chamfer size along face from  theFaces. If both faces,
9152                       connected to the edge, are in theFaces, theD1
9153                       will be get along face, which is nearer to theFaces beginning.
9154                 theD2 Chamfer size along another of two faces, connected to the edge.
9155                 theFaces Sequence of global indices of faces of theShape.
9156                 theName Object name; when specified, this parameter is used
9157                         for result publication in the study. Otherwise, if automatic
9158                         publication is switched on, default value is used for result name.
9159                 
9160             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9161
9162             Returns:  
9163                 New GEOM.GEOM_Object, containing the result shape.
9164             """
9165             # Example: see GEOM_TestAll.py
9166             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9167             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9168             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9169             anObj.SetParameters(Parameters)
9170             self._autoPublish(anObj, theName, "chamfer")
9171             return anObj
9172
9173         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9174         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9175         #
9176         #  @ref swig_FilletChamfer "Example"
9177         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9178             """
9179             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9180             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9181             """
9182             flag = False
9183             if isinstance(theAngle,str):
9184                 flag = True
9185             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9186             if flag:
9187                 theAngle = theAngle*math.pi/180.0
9188             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9189             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9190             anObj.SetParameters(Parameters)
9191             self._autoPublish(anObj, theName, "chamfer")
9192             return anObj
9193
9194         ## Perform a chamfer on edges,
9195         #  with distance D1 on the first specified face (if several for one edge)
9196         #  @param theShape Shape, to perform chamfer on.
9197         #  @param theD1,theD2 Chamfer size
9198         #  @param theEdges Sequence of edges of \a theShape.
9199         #  @param theName Object name; when specified, this parameter is used
9200         #         for result publication in the study. Otherwise, if automatic
9201         #         publication is switched on, default value is used for result name.
9202         #
9203         #  @return New GEOM.GEOM_Object, containing the result shape.
9204         #
9205         #  @ref swig_FilletChamfer "Example"
9206         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9207             """
9208             Perform a chamfer on edges,
9209             with distance D1 on the first specified face (if several for one edge)
9210             
9211             Parameters:
9212                 theShape Shape, to perform chamfer on.
9213                 theD1,theD2 Chamfer size
9214                 theEdges Sequence of edges of theShape.
9215                 theName Object name; when specified, this parameter is used
9216                         for result publication in the study. Otherwise, if automatic
9217                         publication is switched on, default value is used for result name.
9218
9219             Returns:
9220                 New GEOM.GEOM_Object, containing the result shape.
9221             """
9222             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9223             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9224             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9225             anObj.SetParameters(Parameters)
9226             self._autoPublish(anObj, theName, "chamfer")
9227             return anObj
9228
9229         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9230         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9231         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9232             """
9233             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9234             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9235             """
9236             flag = False
9237             if isinstance(theAngle,str):
9238                 flag = True
9239             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9240             if flag:
9241                 theAngle = theAngle*math.pi/180.0
9242             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9243             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9244             anObj.SetParameters(Parameters)
9245             self._autoPublish(anObj, theName, "chamfer")
9246             return anObj
9247
9248         ## @sa MakeChamferEdge(), MakeChamferFaces()
9249         #
9250         #  @ref swig_MakeChamfer "Example"
9251         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9252             """
9253             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9254             """
9255             # Example: see GEOM_TestOthers.py
9256             anObj = None
9257             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9258             if aShapeType == self.ShapeType["EDGE"]:
9259                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9260             else:
9261                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9262             return anObj
9263             
9264         ## Remove material from a solid by extrusion of the base shape on the given distance.
9265         #  @param theInit Shape to remove material from. It must be a solid or 
9266         #  a compound made of a single solid.
9267         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9268         #  @param theH Prism dimension along the normal to theBase
9269         #  @param theAngle Draft angle in degrees.
9270         #  @param theName Object name; when specified, this parameter is used
9271         #         for result publication in the study. Otherwise, if automatic
9272         #         publication is switched on, default value is used for result name.
9273         #
9274         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
9275         #
9276         #  @ref tui_creation_prism "Example"
9277         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9278             """
9279             Add material to a solid by extrusion of the base shape on the given distance.
9280
9281             Parameters:
9282                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9283                 theBase Closed edge or wire defining the base shape to be extruded.
9284                 theH Prism dimension along the normal  to theBase
9285                 theAngle Draft angle in degrees.
9286                 theName Object name; when specified, this parameter is used
9287                         for result publication in the study. Otherwise, if automatic
9288                         publication is switched on, default value is used for result name.
9289
9290             Returns:
9291                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9292             """
9293             # Example: see GEOM_TestAll.py
9294             #theH,Parameters = ParseParameters(theH)
9295             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9296             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9297             #anObj.SetParameters(Parameters)
9298             self._autoPublish(anObj, theName, "extrudedCut")
9299             return anObj   
9300             
9301         ## Add material to a solid by extrusion of the base shape on the given distance.
9302         #  @param theInit Shape to add material to. It must be a solid or 
9303         #  a compound made of a single solid.
9304         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9305         #  @param theH Prism dimension along the normal to theBase
9306         #  @param theAngle Draft angle in degrees.
9307         #  @param theName Object name; when specified, this parameter is used
9308         #         for result publication in the study. Otherwise, if automatic
9309         #         publication is switched on, default value is used for result name.
9310         #
9311         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
9312         #
9313         #  @ref tui_creation_prism "Example"
9314         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9315             """
9316             Add material to a solid by extrusion of the base shape on the given distance.
9317
9318             Parameters:
9319                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9320                 theBase Closed edge or wire defining the base shape to be extruded.
9321                 theH Prism dimension along the normal  to theBase
9322                 theAngle Draft angle in degrees.
9323                 theName Object name; when specified, this parameter is used
9324                         for result publication in the study. Otherwise, if automatic
9325                         publication is switched on, default value is used for result name.
9326
9327             Returns:
9328                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9329             """
9330             # Example: see GEOM_TestAll.py
9331             #theH,Parameters = ParseParameters(theH)
9332             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9333             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9334             #anObj.SetParameters(Parameters)
9335             self._autoPublish(anObj, theName, "extrudedBoss")
9336             return anObj   
9337
9338         # end of l3_local
9339         ## @}
9340
9341         ## @addtogroup l3_basic_op
9342         ## @{
9343
9344         ## Perform an Archimde operation on the given shape with given parameters.
9345         #  The object presenting the resulting face is returned.
9346         #  @param theShape Shape to be put in water.
9347         #  @param theWeight Weight og the shape.
9348         #  @param theWaterDensity Density of the water.
9349         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9350         #  @param theName Object name; when specified, this parameter is used
9351         #         for result publication in the study. Otherwise, if automatic
9352         #         publication is switched on, default value is used for result name.
9353         #
9354         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9355         #          by a plane, corresponding to water level.
9356         #
9357         #  @ref tui_archimede "Example"
9358         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9359             """
9360             Perform an Archimde operation on the given shape with given parameters.
9361             The object presenting the resulting face is returned.
9362
9363             Parameters: 
9364                 theShape Shape to be put in water.
9365                 theWeight Weight og the shape.
9366                 theWaterDensity Density of the water.
9367                 theMeshDeflection Deflection of the mesh, using to compute the section.
9368                 theName Object name; when specified, this parameter is used
9369                         for result publication in the study. Otherwise, if automatic
9370                         publication is switched on, default value is used for result name.
9371
9372             Returns: 
9373                 New GEOM.GEOM_Object, containing a section of theShape
9374                 by a plane, corresponding to water level.
9375             """
9376             # Example: see GEOM_TestAll.py
9377             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9378               theWeight,theWaterDensity,theMeshDeflection)
9379             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9380             RaiseIfFailed("MakeArchimede", self.LocalOp)
9381             anObj.SetParameters(Parameters)
9382             self._autoPublish(anObj, theName, "archimede")
9383             return anObj
9384
9385         # end of l3_basic_op
9386         ## @}
9387
9388         ## @addtogroup l2_measure
9389         ## @{
9390
9391         ## Get point coordinates
9392         #  @return [x, y, z]
9393         #
9394         #  @ref tui_measurement_tools_page "Example"
9395         def PointCoordinates(self,Point):
9396             """
9397             Get point coordinates
9398
9399             Returns:
9400                 [x, y, z]
9401             """
9402             # Example: see GEOM_TestMeasures.py
9403             aTuple = self.MeasuOp.PointCoordinates(Point)
9404             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9405             return aTuple 
9406         
9407         ## Get vector coordinates
9408         #  @return [x, y, z]
9409         #
9410         #  @ref tui_measurement_tools_page "Example"
9411         def VectorCoordinates(self,Vector):
9412             """
9413             Get vector coordinates
9414
9415             Returns:
9416                 [x, y, z]
9417             """
9418
9419             p1=self.GetFirstVertex(Vector)
9420             p2=self.GetLastVertex(Vector)
9421             
9422             X1=self.PointCoordinates(p1)
9423             X2=self.PointCoordinates(p2)
9424
9425             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9426
9427
9428         ## Compute cross product
9429         #  @return vector w=u^v
9430         #
9431         #  @ref tui_measurement_tools_page "Example"
9432         def CrossProduct(self, Vector1, Vector2):
9433             """ 
9434             Compute cross product
9435             
9436             Returns: vector w=u^v
9437             """
9438             u=self.VectorCoordinates(Vector1)
9439             v=self.VectorCoordinates(Vector2)
9440             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])
9441             
9442             return w
9443         
9444         ## Compute cross product
9445         #  @return dot product  p=u.v
9446         #
9447         #  @ref tui_measurement_tools_page "Example"
9448         def DotProduct(self, Vector1, Vector2):
9449             """ 
9450             Compute cross product
9451             
9452             Returns: dot product  p=u.v
9453             """
9454             u=self.VectorCoordinates(Vector1)
9455             v=self.VectorCoordinates(Vector2)
9456             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9457             
9458             return p
9459
9460
9461         ## Get summarized length of all wires,
9462         #  area of surface and volume of the given shape.
9463         #  @param theShape Shape to define properties of.
9464         #  @return [theLength, theSurfArea, theVolume]\n
9465         #  theLength:   Summarized length of all wires of the given shape.\n
9466         #  theSurfArea: Area of surface of the given shape.\n
9467         #  theVolume:   Volume of the given shape.
9468         #
9469         #  @ref tui_measurement_tools_page "Example"
9470         def BasicProperties(self,theShape):
9471             """
9472             Get summarized length of all wires,
9473             area of surface and volume of the given shape.
9474
9475             Parameters: 
9476                 theShape Shape to define properties of.
9477
9478             Returns:
9479                 [theLength, theSurfArea, theVolume]
9480                  theLength:   Summarized length of all wires of the given shape.
9481                  theSurfArea: Area of surface of the given shape.
9482                  theVolume:   Volume of the given shape.
9483             """
9484             # Example: see GEOM_TestMeasures.py
9485             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9486             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9487             return aTuple
9488
9489         ## Get parameters of bounding box of the given shape
9490         #  @param theShape Shape to obtain bounding box of.
9491         #  @param precise TRUE for precise computation; FALSE for fast one.
9492         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9493         #  Xmin,Xmax: Limits of shape along OX axis.
9494         #  Ymin,Ymax: Limits of shape along OY axis.
9495         #  Zmin,Zmax: Limits of shape along OZ axis.
9496         #
9497         #  @ref tui_measurement_tools_page "Example"
9498         def BoundingBox (self, theShape, precise=False):
9499             """
9500             Get parameters of bounding box of the given shape
9501
9502             Parameters: 
9503                 theShape Shape to obtain bounding box of.
9504                 precise TRUE for precise computation; FALSE for fast one.
9505
9506             Returns:
9507                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9508                  Xmin,Xmax: Limits of shape along OX axis.
9509                  Ymin,Ymax: Limits of shape along OY axis.
9510                  Zmin,Zmax: Limits of shape along OZ axis.
9511             """
9512             # Example: see GEOM_TestMeasures.py
9513             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9514             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9515             return aTuple
9516
9517         ## Get bounding box of the given shape
9518         #  @param theShape Shape to obtain bounding box of.
9519         #  @param precise TRUE for precise computation; FALSE for fast one.
9520         #  @param theName Object name; when specified, this parameter is used
9521         #         for result publication in the study. Otherwise, if automatic
9522         #         publication is switched on, default value is used for result name.
9523         #
9524         #  @return New GEOM.GEOM_Object, containing the created box.
9525         #
9526         #  @ref tui_measurement_tools_page "Example"
9527         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9528             """
9529             Get bounding box of the given shape
9530
9531             Parameters: 
9532                 theShape Shape to obtain bounding box of.
9533                 precise TRUE for precise computation; FALSE for fast one.
9534                 theName Object name; when specified, this parameter is used
9535                         for result publication in the study. Otherwise, if automatic
9536                         publication is switched on, default value is used for result name.
9537
9538             Returns:
9539                 New GEOM.GEOM_Object, containing the created box.
9540             """
9541             # Example: see GEOM_TestMeasures.py
9542             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9543             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9544             self._autoPublish(anObj, theName, "bndbox")
9545             return anObj
9546
9547         ## Get inertia matrix and moments of inertia of theShape.
9548         #  @param theShape Shape to calculate inertia of.
9549         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9550         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9551         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9552         #
9553         #  @ref tui_measurement_tools_page "Example"
9554         def Inertia(self,theShape):
9555             """
9556             Get inertia matrix and moments of inertia of theShape.
9557
9558             Parameters: 
9559                 theShape Shape to calculate inertia of.
9560
9561             Returns:
9562                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9563                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9564                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9565             """
9566             # Example: see GEOM_TestMeasures.py
9567             aTuple = self.MeasuOp.GetInertia(theShape)
9568             RaiseIfFailed("GetInertia", self.MeasuOp)
9569             return aTuple
9570
9571         ## Get if coords are included in the shape (ST_IN or ST_ON)
9572         #  @param theShape Shape
9573         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9574         #  @param tolerance to be used (default is 1.0e-7)
9575         #  @return list_of_boolean = [res1, res2, ...]
9576         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9577             """
9578             Get if coords are included in the shape (ST_IN or ST_ON)
9579             
9580             Parameters: 
9581                 theShape Shape
9582                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9583                 tolerance to be used (default is 1.0e-7)
9584
9585             Returns:
9586                 list_of_boolean = [res1, res2, ...]
9587             """
9588             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9589
9590         ## Get minimal distance between the given shapes.
9591         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9592         #  @return Value of the minimal distance between the given shapes.
9593         #
9594         #  @ref tui_measurement_tools_page "Example"
9595         def MinDistance(self, theShape1, theShape2):
9596             """
9597             Get minimal distance between the given shapes.
9598             
9599             Parameters: 
9600                 theShape1,theShape2 Shapes to find minimal distance between.
9601
9602             Returns:    
9603                 Value of the minimal distance between the given shapes.
9604             """
9605             # Example: see GEOM_TestMeasures.py
9606             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9607             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9608             return aTuple[0]
9609
9610         ## Get minimal distance between the given shapes.
9611         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9612         #  @return Value of the minimal distance between the given shapes, in form of list
9613         #          [Distance, DX, DY, DZ].
9614         #
9615         #  @ref swig_all_measure "Example"
9616         def MinDistanceComponents(self, theShape1, theShape2):
9617             """
9618             Get minimal distance between the given shapes.
9619
9620             Parameters: 
9621                 theShape1,theShape2 Shapes to find minimal distance between.
9622
9623             Returns:  
9624                 Value of the minimal distance between the given shapes, in form of list
9625                 [Distance, DX, DY, DZ]
9626             """
9627             # Example: see GEOM_TestMeasures.py
9628             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9629             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9630             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9631             return aRes
9632
9633         ## Get closest points of the given shapes.
9634         #  @param theShape1,theShape2 Shapes to find closest points of.
9635         #  @return The number of found solutions (-1 in case of infinite number of
9636         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9637         #
9638         #  @ref tui_measurement_tools_page "Example"
9639         def ClosestPoints (self, theShape1, theShape2):
9640             """
9641             Get closest points of the given shapes.
9642
9643             Parameters: 
9644                 theShape1,theShape2 Shapes to find closest points of.
9645
9646             Returns:    
9647                 The number of found solutions (-1 in case of infinite number of
9648                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9649             """
9650             # Example: see GEOM_TestMeasures.py
9651             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9652             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9653             return aTuple
9654
9655         ## Get angle between the given shapes in degrees.
9656         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9657         #  @note If both arguments are vectors, the angle is computed in accordance
9658         #        with their orientations, otherwise the minimum angle is computed.
9659         #  @return Value of the angle between the given shapes in degrees.
9660         #
9661         #  @ref tui_measurement_tools_page "Example"
9662         def GetAngle(self, theShape1, theShape2):
9663             """
9664             Get angle between the given shapes in degrees.
9665
9666             Parameters: 
9667                 theShape1,theShape2 Lines or linear edges to find angle between.
9668
9669             Note:
9670                 If both arguments are vectors, the angle is computed in accordance
9671                 with their orientations, otherwise the minimum angle is computed.
9672
9673             Returns:  
9674                 Value of the angle between the given shapes in degrees.
9675             """
9676             # Example: see GEOM_TestMeasures.py
9677             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9678             RaiseIfFailed("GetAngle", self.MeasuOp)
9679             return anAngle
9680
9681         ## Get angle between the given shapes in radians.
9682         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9683         #  @note If both arguments are vectors, the angle is computed in accordance
9684         #        with their orientations, otherwise the minimum angle is computed.
9685         #  @return Value of the angle between the given shapes in radians.
9686         #
9687         #  @ref tui_measurement_tools_page "Example"
9688         def GetAngleRadians(self, theShape1, theShape2):
9689             """
9690             Get angle between the given shapes in radians.
9691
9692             Parameters: 
9693                 theShape1,theShape2 Lines or linear edges to find angle between.
9694
9695                 
9696             Note:
9697                 If both arguments are vectors, the angle is computed in accordance
9698                 with their orientations, otherwise the minimum angle is computed.
9699
9700             Returns:  
9701                 Value of the angle between the given shapes in radians.
9702             """
9703             # Example: see GEOM_TestMeasures.py
9704             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9705             RaiseIfFailed("GetAngle", self.MeasuOp)
9706             return anAngle
9707
9708         ## Get angle between the given vectors in degrees.
9709         #  @param theShape1,theShape2 Vectors to find angle between.
9710         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9711         #                 if False, the opposite vector to the normal vector is used.
9712         #  @return Value of the angle between the given vectors in degrees.
9713         #
9714         #  @ref tui_measurement_tools_page "Example"
9715         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9716             """
9717             Get angle between the given vectors in degrees.
9718
9719             Parameters: 
9720                 theShape1,theShape2 Vectors to find angle between.
9721                 theFlag If True, the normal vector is defined by the two vectors cross,
9722                         if False, the opposite vector to the normal vector is used.
9723
9724             Returns:  
9725                 Value of the angle between the given vectors in degrees.
9726             """
9727             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9728             if not theFlag:
9729                 anAngle = 360. - anAngle
9730             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9731             return anAngle
9732
9733         ## The same as GetAngleVectors, but the result is in radians.
9734         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9735             """
9736             Get angle between the given vectors in radians.
9737
9738             Parameters: 
9739                 theShape1,theShape2 Vectors to find angle between.
9740                 theFlag If True, the normal vector is defined by the two vectors cross,
9741                         if False, the opposite vector to the normal vector is used.
9742
9743             Returns:  
9744                 Value of the angle between the given vectors in radians.
9745             """
9746             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9747             return anAngle
9748
9749         ## @name Curve Curvature Measurement
9750         #  Methods for receiving radius of curvature of curves
9751         #  in the given point
9752         ## @{
9753
9754         ## Measure curvature of a curve at a point, set by parameter.
9755         #  @param theCurve a curve.
9756         #  @param theParam parameter.
9757         #  @return radius of curvature of \a theCurve.
9758         #
9759         #  @ref swig_todo "Example"
9760         def CurveCurvatureByParam(self, theCurve, theParam):
9761             """
9762             Measure curvature of a curve at a point, set by parameter.
9763
9764             Parameters: 
9765                 theCurve a curve.
9766                 theParam parameter.
9767
9768             Returns: 
9769                 radius of curvature of theCurve.
9770             """
9771             # Example: see GEOM_TestMeasures.py
9772             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9773             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9774             return aCurv
9775
9776         ## Measure curvature of a curve at a point.
9777         #  @param theCurve a curve.
9778         #  @param thePoint given point.
9779         #  @return radius of curvature of \a theCurve.
9780         #
9781         #  @ref swig_todo "Example"
9782         def CurveCurvatureByPoint(self, theCurve, thePoint):
9783             """
9784             Measure curvature of a curve at a point.
9785
9786             Parameters: 
9787                 theCurve a curve.
9788                 thePoint given point.
9789
9790             Returns: 
9791                 radius of curvature of theCurve.           
9792             """
9793             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9794             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9795             return aCurv
9796         ## @}
9797
9798         ## @name Surface Curvature Measurement
9799         #  Methods for receiving max and min radius of curvature of surfaces
9800         #  in the given point
9801         ## @{
9802
9803         ## Measure max radius of curvature of surface.
9804         #  @param theSurf the given surface.
9805         #  @param theUParam Value of U-parameter on the referenced surface.
9806         #  @param theVParam Value of V-parameter on the referenced surface.
9807         #  @return max radius of curvature of theSurf.
9808         #
9809         ## @ref swig_todo "Example"
9810         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9811             """
9812             Measure max radius of curvature of surface.
9813
9814             Parameters: 
9815                 theSurf the given surface.
9816                 theUParam Value of U-parameter on the referenced surface.
9817                 theVParam Value of V-parameter on the referenced surface.
9818                 
9819             Returns:     
9820                 max radius of curvature of theSurf.
9821             """
9822             # Example: see GEOM_TestMeasures.py
9823             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9824             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9825             return aSurf
9826
9827         ## Measure max radius of curvature of surface in the given point
9828         #  @param theSurf the given surface.
9829         #  @param thePoint given point.
9830         #  @return max radius of curvature of theSurf.
9831         #
9832         ## @ref swig_todo "Example"
9833         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9834             """
9835             Measure max radius of curvature of surface in the given point.
9836
9837             Parameters: 
9838                 theSurf the given surface.
9839                 thePoint given point.
9840                 
9841             Returns:     
9842                 max radius of curvature of theSurf.          
9843             """
9844             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9845             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9846             return aSurf
9847
9848         ## Measure min radius of curvature of surface.
9849         #  @param theSurf the given surface.
9850         #  @param theUParam Value of U-parameter on the referenced surface.
9851         #  @param theVParam Value of V-parameter on the referenced surface.
9852         #  @return min radius of curvature of theSurf.
9853         #   
9854         ## @ref swig_todo "Example"
9855         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9856             """
9857             Measure min radius of curvature of surface.
9858
9859             Parameters: 
9860                 theSurf the given surface.
9861                 theUParam Value of U-parameter on the referenced surface.
9862                 theVParam Value of V-parameter on the referenced surface.
9863                 
9864             Returns:     
9865                 Min radius of curvature of theSurf.
9866             """
9867             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9868             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9869             return aSurf
9870
9871         ## Measure min radius of curvature of surface in the given point
9872         #  @param theSurf the given surface.
9873         #  @param thePoint given point.
9874         #  @return min radius of curvature of theSurf.
9875         #
9876         ## @ref swig_todo "Example"
9877         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9878             """
9879             Measure min radius of curvature of surface in the given point.
9880
9881             Parameters: 
9882                 theSurf the given surface.
9883                 thePoint given point.
9884                 
9885             Returns:     
9886                 Min radius of curvature of theSurf.          
9887             """
9888             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9889             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9890             return aSurf
9891         ## @}
9892
9893         ## Get min and max tolerances of sub-shapes of theShape
9894         #  @param theShape Shape, to get tolerances of.
9895         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9896         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9897         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9898         #  VertMin,VertMax: Min and max tolerances of the vertices.
9899         #
9900         #  @ref tui_measurement_tools_page "Example"
9901         def Tolerance(self,theShape):
9902             """
9903             Get min and max tolerances of sub-shapes of theShape
9904
9905             Parameters: 
9906                 theShape Shape, to get tolerances of.
9907
9908             Returns:    
9909                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9910                  FaceMin,FaceMax: Min and max tolerances of the faces.
9911                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9912                  VertMin,VertMax: Min and max tolerances of the vertices.
9913             """
9914             # Example: see GEOM_TestMeasures.py
9915             aTuple = self.MeasuOp.GetTolerance(theShape)
9916             RaiseIfFailed("GetTolerance", self.MeasuOp)
9917             return aTuple
9918
9919         ## Obtain description of the given shape (number of sub-shapes of each type)
9920         #  @param theShape Shape to be described.
9921         #  @return Description of the given shape.
9922         #
9923         #  @ref tui_measurement_tools_page "Example"
9924         def WhatIs(self,theShape):
9925             """
9926             Obtain description of the given shape (number of sub-shapes of each type)
9927
9928             Parameters:
9929                 theShape Shape to be described.
9930
9931             Returns:
9932                 Description of the given shape.
9933             """
9934             # Example: see GEOM_TestMeasures.py
9935             aDescr = self.MeasuOp.WhatIs(theShape)
9936             RaiseIfFailed("WhatIs", self.MeasuOp)
9937             return aDescr
9938
9939         ## Obtain quantity of shapes of the given type in \a theShape.
9940         #  If \a theShape is of type \a theType, it is also counted.
9941         #  @param theShape Shape to be described.
9942         #  @param theType the given ShapeType().
9943         #  @return Quantity of shapes of type \a theType in \a theShape.
9944         #
9945         #  @ref tui_measurement_tools_page "Example"
9946         def NbShapes (self, theShape, theType):
9947             """
9948             Obtain quantity of shapes of the given type in theShape.
9949             If theShape is of type theType, it is also counted.
9950
9951             Parameters:
9952                 theShape Shape to be described.
9953                 theType the given geompy.ShapeType
9954
9955             Returns:
9956                 Quantity of shapes of type theType in theShape.
9957             """
9958             # Example: see GEOM_TestMeasures.py
9959             listSh = self.SubShapeAllIDs(theShape, theType)
9960             Nb = len(listSh)
9961             return Nb
9962
9963         ## Obtain quantity of shapes of each type in \a theShape.
9964         #  The \a theShape is also counted.
9965         #  @param theShape Shape to be described.
9966         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9967         #
9968         #  @ref tui_measurement_tools_page "Example"
9969         def ShapeInfo (self, theShape):
9970             """
9971             Obtain quantity of shapes of each type in theShape.
9972             The theShape is also counted.
9973
9974             Parameters:
9975                 theShape Shape to be described.
9976
9977             Returns:
9978                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9979             """
9980             # Example: see GEOM_TestMeasures.py
9981             aDict = {}
9982             for typeSh in self.ShapeType:
9983                 if typeSh in ( "AUTO", "SHAPE" ): continue
9984                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9985                 Nb = len(listSh)
9986                 aDict[typeSh] = Nb
9987                 pass
9988             return aDict
9989
9990         def GetCreationInformation(self, theShape):
9991             info = theShape.GetCreationInformation()
9992             # operationName
9993             opName = info.operationName
9994             if not opName: opName = "no info available"
9995             res = "Operation: " + opName
9996             # parameters
9997             for parVal in info.params:
9998                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9999             return res
10000
10001         ## Get a point, situated at the centre of mass of theShape.
10002         #  @param theShape Shape to define centre of mass of.
10003         #  @param theName Object name; when specified, this parameter is used
10004         #         for result publication in the study. Otherwise, if automatic
10005         #         publication is switched on, default value is used for result name.
10006         #
10007         #  @return New GEOM.GEOM_Object, containing the created point.
10008         #
10009         #  @ref tui_measurement_tools_page "Example"
10010         def MakeCDG(self, theShape, theName=None):
10011             """
10012             Get a point, situated at the centre of mass of theShape.
10013
10014             Parameters:
10015                 theShape Shape to define centre of mass of.
10016                 theName Object name; when specified, this parameter is used
10017                         for result publication in the study. Otherwise, if automatic
10018                         publication is switched on, default value is used for result name.
10019
10020             Returns:
10021                 New GEOM.GEOM_Object, containing the created point.
10022             """
10023             # Example: see GEOM_TestMeasures.py
10024             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10025             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10026             self._autoPublish(anObj, theName, "centerOfMass")
10027             return anObj
10028
10029         ## Get a vertex sub-shape by index depended with orientation.
10030         #  @param theShape Shape to find sub-shape.
10031         #  @param theIndex Index to find vertex by this index (starting from zero)
10032         #  @param theName Object name; when specified, this parameter is used
10033         #         for result publication in the study. Otherwise, if automatic
10034         #         publication is switched on, default value is used for result name.
10035         #
10036         #  @return New GEOM.GEOM_Object, containing the created vertex.
10037         #
10038         #  @ref tui_measurement_tools_page "Example"
10039         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10040             """
10041             Get a vertex sub-shape by index depended with orientation.
10042
10043             Parameters:
10044                 theShape Shape to find sub-shape.
10045                 theIndex Index to find vertex by this index (starting from zero)
10046                 theName Object name; when specified, this parameter is used
10047                         for result publication in the study. Otherwise, if automatic
10048                         publication is switched on, default value is used for result name.
10049
10050             Returns:
10051                 New GEOM.GEOM_Object, containing the created vertex.
10052             """
10053             # Example: see GEOM_TestMeasures.py
10054             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10055             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10056             self._autoPublish(anObj, theName, "vertex")
10057             return anObj
10058
10059         ## Get the first vertex of wire/edge depended orientation.
10060         #  @param theShape Shape to find first vertex.
10061         #  @param theName Object name; when specified, this parameter is used
10062         #         for result publication in the study. Otherwise, if automatic
10063         #         publication is switched on, default value is used for result name.
10064         #
10065         #  @return New GEOM.GEOM_Object, containing the created vertex.
10066         #
10067         #  @ref tui_measurement_tools_page "Example"
10068         def GetFirstVertex(self, theShape, theName=None):
10069             """
10070             Get the first vertex of wire/edge depended orientation.
10071
10072             Parameters:
10073                 theShape Shape to find first vertex.
10074                 theName Object name; when specified, this parameter is used
10075                         for result publication in the study. Otherwise, if automatic
10076                         publication is switched on, default value is used for result name.
10077
10078             Returns:    
10079                 New GEOM.GEOM_Object, containing the created vertex.
10080             """
10081             # Example: see GEOM_TestMeasures.py
10082             # note: auto-publishing is done in self.GetVertexByIndex()
10083             anObj = self.GetVertexByIndex(theShape, 0, theName)
10084             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
10085             return anObj
10086
10087         ## Get the last vertex of wire/edge depended orientation.
10088         #  @param theShape Shape to find last vertex.
10089         #  @param theName Object name; when specified, this parameter is used
10090         #         for result publication in the study. Otherwise, if automatic
10091         #         publication is switched on, default value is used for result name.
10092         #
10093         #  @return New GEOM.GEOM_Object, containing the created vertex.
10094         #
10095         #  @ref tui_measurement_tools_page "Example"
10096         def GetLastVertex(self, theShape, theName=None):
10097             """
10098             Get the last vertex of wire/edge depended orientation.
10099
10100             Parameters: 
10101                 theShape Shape to find last vertex.
10102                 theName Object name; when specified, this parameter is used
10103                         for result publication in the study. Otherwise, if automatic
10104                         publication is switched on, default value is used for result name.
10105
10106             Returns:   
10107                 New GEOM.GEOM_Object, containing the created vertex.
10108             """
10109             # Example: see GEOM_TestMeasures.py
10110             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10111             # note: auto-publishing is done in self.GetVertexByIndex()
10112             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10113             RaiseIfFailed("GetLastVertex", self.MeasuOp)
10114             return anObj
10115
10116         ## Get a normale to the given face. If the point is not given,
10117         #  the normale is calculated at the center of mass.
10118         #  @param theFace Face to define normale of.
10119         #  @param theOptionalPoint Point to compute the normale at.
10120         #  @param theName Object name; when specified, this parameter is used
10121         #         for result publication in the study. Otherwise, if automatic
10122         #         publication is switched on, default value is used for result name.
10123         #
10124         #  @return New GEOM.GEOM_Object, containing the created vector.
10125         #
10126         #  @ref swig_todo "Example"
10127         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10128             """
10129             Get a normale to the given face. If the point is not given,
10130             the normale is calculated at the center of mass.
10131             
10132             Parameters: 
10133                 theFace Face to define normale of.
10134                 theOptionalPoint Point to compute the normale at.
10135                 theName Object name; when specified, this parameter is used
10136                         for result publication in the study. Otherwise, if automatic
10137                         publication is switched on, default value is used for result name.
10138
10139             Returns:   
10140                 New GEOM.GEOM_Object, containing the created vector.
10141             """
10142             # Example: see GEOM_TestMeasures.py
10143             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10144             RaiseIfFailed("GetNormal", self.MeasuOp)
10145             self._autoPublish(anObj, theName, "normal")
10146             return anObj
10147
10148         ## Check a topology of the given shape.
10149         #  @param theShape Shape to check validity of.
10150         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10151         #                        if TRUE, the shape's geometry will be checked also.
10152         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
10153         #                        of problem is printed.
10154         #                        if TRUE and if theShape is invalid, the description 
10155         #                        of problem is also returned.
10156         #  @return TRUE, if the shape "seems to be valid".
10157         #
10158         #  @ref tui_measurement_tools_page "Example"
10159         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10160             """
10161             Check a topology of the given shape.
10162
10163             Parameters: 
10164                 theShape Shape to check validity of.
10165                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10166                                if TRUE, the shape's geometry will be checked also.
10167                 theReturnStatus If FALSE and if theShape is invalid, a description
10168                                 of problem is printed.
10169                                 if TRUE and if theShape is invalid, the description 
10170                                 of problem is returned.
10171
10172             Returns:   
10173                 TRUE, if the shape "seems to be valid".
10174                 If theShape is invalid, prints a description of problem.
10175                 This description can also be returned.
10176             """
10177             # Example: see GEOM_TestMeasures.py
10178             if theIsCheckGeom:
10179                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10180                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10181             else:
10182                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
10183                 RaiseIfFailed("CheckShape", self.MeasuOp)
10184             if IsValid == 0:
10185                 if theReturnStatus == 0:
10186                     print Status
10187             if theReturnStatus == 1:
10188               return (IsValid, Status)
10189             return IsValid
10190
10191         ## Detect self-intersections in the given shape.
10192         #  @param theShape Shape to check.
10193         #  @return TRUE, if the shape contains no self-intersections.
10194         #
10195         #  @ref tui_measurement_tools_page "Example"
10196         def CheckSelfIntersections(self, theShape):
10197             """
10198             Detect self-intersections in the given shape.
10199
10200             Parameters: 
10201                 theShape Shape to check.
10202
10203             Returns:   
10204                 TRUE, if the shape contains no self-intersections.
10205             """
10206             # Example: see GEOM_TestMeasures.py
10207             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10208             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10209             return IsValid
10210
10211         ## Get position (LCS) of theShape.
10212         #
10213         #  Origin of the LCS is situated at the shape's center of mass.
10214         #  Axes of the LCS are obtained from shape's location or,
10215         #  if the shape is a planar face, from position of its plane.
10216         #
10217         #  @param theShape Shape to calculate position of.
10218         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10219         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10220         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10221         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10222         #
10223         #  @ref swig_todo "Example"
10224         def GetPosition(self,theShape):
10225             """
10226             Get position (LCS) of theShape.
10227             Origin of the LCS is situated at the shape's center of mass.
10228             Axes of the LCS are obtained from shape's location or,
10229             if the shape is a planar face, from position of its plane.
10230
10231             Parameters: 
10232                 theShape Shape to calculate position of.
10233
10234             Returns:  
10235                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10236                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10237                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10238                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10239             """
10240             # Example: see GEOM_TestMeasures.py
10241             aTuple = self.MeasuOp.GetPosition(theShape)
10242             RaiseIfFailed("GetPosition", self.MeasuOp)
10243             return aTuple
10244
10245         ## Get kind of theShape.
10246         #
10247         #  @param theShape Shape to get a kind of.
10248         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10249         #          and a list of parameters, describing the shape.
10250         #  @note  Concrete meaning of each value, returned via \a theIntegers
10251         #         or \a theDoubles list depends on the kind() of the shape.
10252         #
10253         #  @ref swig_todo "Example"
10254         def KindOfShape(self,theShape):
10255             """
10256             Get kind of theShape.
10257          
10258             Parameters: 
10259                 theShape Shape to get a kind of.
10260
10261             Returns:
10262                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10263                     and a list of parameters, describing the shape.
10264             Note:
10265                 Concrete meaning of each value, returned via theIntegers
10266                 or theDoubles list depends on the geompy.kind of the shape
10267             """
10268             # Example: see GEOM_TestMeasures.py
10269             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10270             RaiseIfFailed("KindOfShape", self.MeasuOp)
10271
10272             aKind  = aRoughTuple[0]
10273             anInts = aRoughTuple[1]
10274             aDbls  = aRoughTuple[2]
10275
10276             # Now there is no exception from this rule:
10277             aKindTuple = [aKind] + aDbls + anInts
10278
10279             # If they are we will regroup parameters for such kind of shape.
10280             # For example:
10281             #if aKind == kind.SOME_KIND:
10282             #    #  SOME_KIND     int int double int double double
10283             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10284
10285             return aKindTuple
10286
10287         # end of l2_measure
10288         ## @}
10289
10290         ## @addtogroup l2_import_export
10291         ## @{
10292
10293         ## Import a shape from the BREP or IGES or STEP file
10294         #  (depends on given format) with given name.
10295         #  @param theFileName The file, containing the shape.
10296         #  @param theFormatName Specify format for the file reading.
10297         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10298         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10299         #            format 'STEP_SCALE' is used instead of 'STEP',
10300         #            length unit will be set to 'meter' and result model will be scaled.
10301         #  @param theName Object name; when specified, this parameter is used
10302         #         for result publication in the study. Otherwise, if automatic
10303         #         publication is switched on, default value is used for result name.
10304         #
10305         #  @return New GEOM.GEOM_Object, containing the imported shape.
10306         #
10307         #  @ref swig_Import_Export "Example"
10308         def ImportFile(self, theFileName, theFormatName, theName=None):
10309             """
10310             Import a shape from the BREP or IGES or STEP file
10311             (depends on given format) with given name.
10312
10313             Parameters: 
10314                 theFileName The file, containing the shape.
10315                 theFormatName Specify format for the file reading.
10316                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10317                     If format 'IGES_SCALE' is used instead of 'IGES' or
10318                        format 'STEP_SCALE' is used instead of 'STEP',
10319                        length unit will be set to 'meter' and result model will be scaled.
10320                 theName Object name; when specified, this parameter is used
10321                         for result publication in the study. Otherwise, if automatic
10322                         publication is switched on, default value is used for result name.
10323
10324             Returns:
10325                 New GEOM.GEOM_Object, containing the imported shape.
10326             """
10327             # Example: see GEOM_TestOthers.py
10328             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10329             RaiseIfFailed("ImportFile", self.InsertOp)
10330             self._autoPublish(anObj, theName, "imported")
10331             return anObj
10332
10333         ## Deprecated analog of ImportFile()
10334         def Import(self, theFileName, theFormatName, theName=None):
10335             """
10336             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10337             """
10338             print "WARNING: Function Import is deprecated, use ImportFile instead"
10339             # note: auto-publishing is done in self.ImportFile()
10340             return self.ImportFile(theFileName, theFormatName, theName)
10341
10342         ## Shortcut to ImportFile() for BREP format.
10343         #  Import a shape from the BREP file with given name.
10344         #  @param theFileName The file, containing the shape.
10345         #  @param theName Object name; when specified, this parameter is used
10346         #         for result publication in the study. Otherwise, if automatic
10347         #         publication is switched on, default value is used for result name.
10348         #
10349         #  @return New GEOM.GEOM_Object, containing the imported shape.
10350         #
10351         #  @ref swig_Import_Export "Example"
10352         def ImportBREP(self, theFileName, theName=None):
10353             """
10354             geompy.ImportFile(...) function for BREP format
10355             Import a shape from the BREP file with given name.
10356
10357             Parameters: 
10358                 theFileName The file, containing the shape.
10359                 theName Object name; when specified, this parameter is used
10360                         for result publication in the study. Otherwise, if automatic
10361                         publication is switched on, default value is used for result name.
10362
10363             Returns:
10364                 New GEOM.GEOM_Object, containing the imported shape.
10365             """
10366             # Example: see GEOM_TestOthers.py
10367             # note: auto-publishing is done in self.ImportFile()
10368             return self.ImportFile(theFileName, "BREP", theName)
10369
10370         ## Shortcut to ImportFile() for IGES format
10371         #  Import a shape from the IGES file with given name.
10372         #  @param theFileName The file, containing the shape.
10373         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10374         #                     and result model will be scaled, if its units are not meters.
10375         #                     If False (default), file length units will be taken into account.
10376         #  @param theName Object name; when specified, this parameter is used
10377         #         for result publication in the study. Otherwise, if automatic
10378         #         publication is switched on, default value is used for result name.
10379         #
10380         #  @return New GEOM.GEOM_Object, containing the imported shape.
10381         #
10382         #  @ref swig_Import_Export "Example"
10383         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10384             """
10385             geompy.ImportFile(...) function for IGES format
10386
10387             Parameters:
10388                 theFileName The file, containing the shape.
10389                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10390                             and result model will be scaled, if its units are not meters.
10391                             If False (default), file length units will be taken into account.
10392                 theName Object name; when specified, this parameter is used
10393                         for result publication in the study. Otherwise, if automatic
10394                         publication is switched on, default value is used for result name.
10395
10396             Returns:
10397                 New GEOM.GEOM_Object, containing the imported shape.
10398             """
10399             # Example: see GEOM_TestOthers.py
10400             # note: auto-publishing is done in self.ImportFile()
10401             if ignoreUnits:
10402                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10403             return self.ImportFile(theFileName, "IGES", theName)
10404
10405         ## Return length unit from given IGES file
10406         #  @param theFileName The file, containing the shape.
10407         #  @return String, containing the units name.
10408         #
10409         #  @ref swig_Import_Export "Example"
10410         def GetIGESUnit(self, theFileName):
10411             """
10412             Return length units from given IGES file
10413
10414             Parameters:
10415                 theFileName The file, containing the shape.
10416
10417             Returns:
10418                 String, containing the units name.
10419             """
10420             # Example: see GEOM_TestOthers.py
10421             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10422             return aUnitName
10423
10424         ## Shortcut to ImportFile() for STEP format
10425         #  Import a shape from the STEP file with given name.
10426         #  @param theFileName The file, containing the shape.
10427         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10428         #                     and result model will be scaled, if its units are not meters.
10429         #                     If False (default), file length units will be taken into account.
10430         #  @param theName Object name; when specified, this parameter is used
10431         #         for result publication in the study. Otherwise, if automatic
10432         #         publication is switched on, default value is used for result name.
10433         #
10434         #  @return New GEOM.GEOM_Object, containing the imported shape.
10435         #
10436         #  @ref swig_Import_Export "Example"
10437         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10438             """
10439             geompy.ImportFile(...) function for STEP format
10440
10441             Parameters:
10442                 theFileName The file, containing the shape.
10443                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10444                             and result model will be scaled, if its units are not meters.
10445                             If False (default), file length units will be taken into account.
10446                 theName Object name; when specified, this parameter is used
10447                         for result publication in the study. Otherwise, if automatic
10448                         publication is switched on, default value is used for result name.
10449
10450             Returns:
10451                 New GEOM.GEOM_Object, containing the imported shape.
10452             """
10453             # Example: see GEOM_TestOthers.py
10454             # note: auto-publishing is done in self.ImportFile()
10455             if ignoreUnits:
10456                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10457             return self.ImportFile(theFileName, "STEP", theName)
10458
10459         ## Return length unit from given IGES or STEP file
10460         #  @param theFileName The file, containing the shape.
10461         #  @return String, containing the units name.
10462         #
10463         #  @ref swig_Import_Export "Example"
10464         def GetSTEPUnit(self, theFileName):
10465             """
10466             Return length units from given STEP file
10467
10468             Parameters:
10469                 theFileName The file, containing the shape.
10470
10471             Returns:
10472                 String, containing the units name.
10473             """
10474             # Example: see GEOM_TestOthers.py
10475             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10476             return aUnitName
10477
10478         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10479         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10480         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10481         #  @param theStream The BRep binary stream.
10482         #  @param theName Object name; when specified, this parameter is used
10483         #         for result publication in the study. Otherwise, if automatic
10484         #         publication is switched on, default value is used for result name.
10485         #
10486         #  @return New GEOM_Object, containing the shape, read from theStream.
10487         #
10488         #  @ref swig_Import_Export "Example"
10489         def RestoreShape (self, theStream, theName=None):
10490             """
10491             Read a shape from the binary stream, containing its bounding representation (BRep).
10492
10493             Note:
10494                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10495
10496             Parameters: 
10497                 theStream The BRep binary stream.
10498                 theName Object name; when specified, this parameter is used
10499                         for result publication in the study. Otherwise, if automatic
10500                         publication is switched on, default value is used for result name.
10501
10502             Returns:
10503                 New GEOM_Object, containing the shape, read from theStream.
10504             """
10505             # Example: see GEOM_TestOthers.py
10506             anObj = self.InsertOp.RestoreShape(theStream)
10507             RaiseIfFailed("RestoreShape", self.InsertOp)
10508             self._autoPublish(anObj, theName, "restored")
10509             return anObj
10510
10511         ## Export the given shape into a file with given name.
10512         #  @param theObject Shape to be stored in the file.
10513         #  @param theFileName Name of the file to store the given shape in.
10514         #  @param theFormatName Specify format for the shape storage.
10515         #         Available formats can be obtained with
10516         #         geompy.InsertOp.ExportTranslators()[0] method.
10517         #
10518         #  @ref swig_Import_Export "Example"
10519         def Export(self, theObject, theFileName, theFormatName):
10520             """
10521             Export the given shape into a file with given name.
10522
10523             Parameters: 
10524                 theObject Shape to be stored in the file.
10525                 theFileName Name of the file to store the given shape in.
10526                 theFormatName Specify format for the shape storage.
10527                               Available formats can be obtained with
10528                               geompy.InsertOp.ExportTranslators()[0] method.
10529             """
10530             # Example: see GEOM_TestOthers.py
10531             self.InsertOp.Export(theObject, theFileName, theFormatName)
10532             if self.InsertOp.IsDone() == 0:
10533                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10534                 pass
10535             pass
10536
10537         ## Shortcut to Export() for BREP format
10538         #
10539         #  @ref swig_Import_Export "Example"
10540         def ExportBREP(self,theObject, theFileName):
10541             """
10542             geompy.Export(...) function for BREP format
10543             """
10544             # Example: see GEOM_TestOthers.py
10545             return self.Export(theObject, theFileName, "BREP")
10546
10547         ## Shortcut to Export() for IGES format
10548         #
10549         #  @ref swig_Import_Export "Example"
10550         def ExportIGES(self,theObject, theFileName):
10551             """
10552             geompy.Export(...) function for IGES format
10553             """
10554             # Example: see GEOM_TestOthers.py
10555             return self.Export(theObject, theFileName, "IGES")
10556
10557         ## Shortcut to Export() for STEP format
10558         #
10559         #  @ref swig_Import_Export "Example"
10560         def ExportSTEP(self,theObject, theFileName):
10561             """
10562             geompy.Export(...) function for STEP format
10563             """
10564             # Example: see GEOM_TestOthers.py
10565             return self.Export(theObject, theFileName, "STEP")
10566
10567         # end of l2_import_export
10568         ## @}
10569
10570         ## @addtogroup l3_blocks
10571         ## @{
10572
10573         ## Create a quadrangle face from four edges. Order of Edges is not
10574         #  important. It is  not necessary that edges share the same vertex.
10575         #  @param E1,E2,E3,E4 Edges for the face bound.
10576         #  @param theName Object name; when specified, this parameter is used
10577         #         for result publication in the study. Otherwise, if automatic
10578         #         publication is switched on, default value is used for result name.
10579         #
10580         #  @return New GEOM.GEOM_Object, containing the created face.
10581         #
10582         #  @ref tui_building_by_blocks_page "Example"
10583         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10584             """
10585             Create a quadrangle face from four edges. Order of Edges is not
10586             important. It is  not necessary that edges share the same vertex.
10587
10588             Parameters: 
10589                 E1,E2,E3,E4 Edges for the face bound.
10590                 theName Object name; when specified, this parameter is used
10591                         for result publication in the study. Otherwise, if automatic
10592                         publication is switched on, default value is used for result name.
10593
10594             Returns: 
10595                 New GEOM.GEOM_Object, containing the created face.
10596
10597             Example of usage:               
10598                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10599             """
10600             # Example: see GEOM_Spanner.py
10601             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10602             RaiseIfFailed("MakeQuad", self.BlocksOp)
10603             self._autoPublish(anObj, theName, "quad")
10604             return anObj
10605
10606         ## Create a quadrangle face on two edges.
10607         #  The missing edges will be built by creating the shortest ones.
10608         #  @param E1,E2 Two opposite edges for the face.
10609         #  @param theName Object name; when specified, this parameter is used
10610         #         for result publication in the study. Otherwise, if automatic
10611         #         publication is switched on, default value is used for result name.
10612         #
10613         #  @return New GEOM.GEOM_Object, containing the created face.
10614         #
10615         #  @ref tui_building_by_blocks_page "Example"
10616         def MakeQuad2Edges(self, E1, E2, theName=None):
10617             """
10618             Create a quadrangle face on two edges.
10619             The missing edges will be built by creating the shortest ones.
10620
10621             Parameters: 
10622                 E1,E2 Two opposite edges for the face.
10623                 theName Object name; when specified, this parameter is used
10624                         for result publication in the study. Otherwise, if automatic
10625                         publication is switched on, default value is used for result name.
10626
10627             Returns: 
10628                 New GEOM.GEOM_Object, containing the created face.
10629             
10630             Example of usage:
10631                 # create vertices
10632                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10633                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10634                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10635                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10636                 # create edges
10637                 edge1 = geompy.MakeEdge(p1, p2)
10638                 edge2 = geompy.MakeEdge(p3, p4)
10639                 # create a quadrangle face from two edges
10640                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10641             """
10642             # Example: see GEOM_Spanner.py
10643             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10644             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10645             self._autoPublish(anObj, theName, "quad")
10646             return anObj
10647
10648         ## Create a quadrangle face with specified corners.
10649         #  The missing edges will be built by creating the shortest ones.
10650         #  @param V1,V2,V3,V4 Corner vertices for the face.
10651         #  @param theName Object name; when specified, this parameter is used
10652         #         for result publication in the study. Otherwise, if automatic
10653         #         publication is switched on, default value is used for result name.
10654         #
10655         #  @return New GEOM.GEOM_Object, containing the created face.
10656         #
10657         #  @ref tui_building_by_blocks_page "Example 1"
10658         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10659         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10660             """
10661             Create a quadrangle face with specified corners.
10662             The missing edges will be built by creating the shortest ones.
10663
10664             Parameters: 
10665                 V1,V2,V3,V4 Corner vertices for the face.
10666                 theName Object name; when specified, this parameter is used
10667                         for result publication in the study. Otherwise, if automatic
10668                         publication is switched on, default value is used for result name.
10669
10670             Returns: 
10671                 New GEOM.GEOM_Object, containing the created face.
10672
10673             Example of usage:
10674                 # create vertices
10675                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10676                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10677                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10678                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10679                 # create a quadrangle from four points in its corners
10680                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10681             """
10682             # Example: see GEOM_Spanner.py
10683             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10684             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10685             self._autoPublish(anObj, theName, "quad")
10686             return anObj
10687
10688         ## Create a hexahedral solid, bounded by the six given faces. Order of
10689         #  faces is not important. It is  not necessary that Faces share the same edge.
10690         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10691         #  @param theName Object name; when specified, this parameter is used
10692         #         for result publication in the study. Otherwise, if automatic
10693         #         publication is switched on, default value is used for result name.
10694         #
10695         #  @return New GEOM.GEOM_Object, containing the created solid.
10696         #
10697         #  @ref tui_building_by_blocks_page "Example 1"
10698         #  \n @ref swig_MakeHexa "Example 2"
10699         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10700             """
10701             Create a hexahedral solid, bounded by the six given faces. Order of
10702             faces is not important. It is  not necessary that Faces share the same edge.
10703
10704             Parameters: 
10705                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10706                 theName Object name; when specified, this parameter is used
10707                         for result publication in the study. Otherwise, if automatic
10708                         publication is switched on, default value is used for result name.
10709
10710             Returns:    
10711                 New GEOM.GEOM_Object, containing the created solid.
10712
10713             Example of usage:
10714                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10715             """
10716             # Example: see GEOM_Spanner.py
10717             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10718             RaiseIfFailed("MakeHexa", self.BlocksOp)
10719             self._autoPublish(anObj, theName, "hexa")
10720             return anObj
10721
10722         ## Create a hexahedral solid between two given faces.
10723         #  The missing faces will be built by creating the smallest ones.
10724         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10725         #  @param theName Object name; when specified, this parameter is used
10726         #         for result publication in the study. Otherwise, if automatic
10727         #         publication is switched on, default value is used for result name.
10728         #
10729         #  @return New GEOM.GEOM_Object, containing the created solid.
10730         #
10731         #  @ref tui_building_by_blocks_page "Example 1"
10732         #  \n @ref swig_MakeHexa2Faces "Example 2"
10733         def MakeHexa2Faces(self, F1, F2, theName=None):
10734             """
10735             Create a hexahedral solid between two given faces.
10736             The missing faces will be built by creating the smallest ones.
10737
10738             Parameters: 
10739                 F1,F2 Two opposite faces for the hexahedral solid.
10740                 theName Object name; when specified, this parameter is used
10741                         for result publication in the study. Otherwise, if automatic
10742                         publication is switched on, default value is used for result name.
10743
10744             Returns:
10745                 New GEOM.GEOM_Object, containing the created solid.
10746
10747             Example of usage:
10748                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10749             """
10750             # Example: see GEOM_Spanner.py
10751             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10752             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10753             self._autoPublish(anObj, theName, "hexa")
10754             return anObj
10755
10756         # end of l3_blocks
10757         ## @}
10758
10759         ## @addtogroup l3_blocks_op
10760         ## @{
10761
10762         ## Get a vertex, found in the given shape by its coordinates.
10763         #  @param theShape Block or a compound of blocks.
10764         #  @param theX,theY,theZ Coordinates of the sought vertex.
10765         #  @param theEpsilon Maximum allowed distance between the resulting
10766         #                    vertex and point with the given coordinates.
10767         #  @param theName Object name; when specified, this parameter is used
10768         #         for result publication in the study. Otherwise, if automatic
10769         #         publication is switched on, default value is used for result name.
10770         #
10771         #  @return New GEOM.GEOM_Object, containing the found vertex.
10772         #
10773         #  @ref swig_GetPoint "Example"
10774         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10775             """
10776             Get a vertex, found in the given shape by its coordinates.
10777
10778             Parameters: 
10779                 theShape Block or a compound of blocks.
10780                 theX,theY,theZ Coordinates of the sought vertex.
10781                 theEpsilon Maximum allowed distance between the resulting
10782                            vertex and point with the given coordinates.
10783                 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             Returns:                  
10788                 New GEOM.GEOM_Object, containing the found vertex.
10789
10790             Example of usage:
10791                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10792             """
10793             # Example: see GEOM_TestOthers.py
10794             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10795             RaiseIfFailed("GetPoint", self.BlocksOp)
10796             self._autoPublish(anObj, theName, "vertex")
10797             return anObj
10798
10799         ## Find a vertex of the given shape, which has minimal distance to the given point.
10800         #  @param theShape Any shape.
10801         #  @param thePoint Point, close to the desired vertex.
10802         #  @param theName Object name; when specified, this parameter is used
10803         #         for result publication in the study. Otherwise, if automatic
10804         #         publication is switched on, default value is used for result name.
10805         #
10806         #  @return New GEOM.GEOM_Object, containing the found vertex.
10807         #
10808         #  @ref swig_GetVertexNearPoint "Example"
10809         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10810             """
10811             Find a vertex of the given shape, which has minimal distance to the given point.
10812
10813             Parameters: 
10814                 theShape Any shape.
10815                 thePoint Point, close to the desired vertex.
10816                 theName Object name; when specified, this parameter is used
10817                         for result publication in the study. Otherwise, if automatic
10818                         publication is switched on, default value is used for result name.
10819
10820             Returns:
10821                 New GEOM.GEOM_Object, containing the found vertex.
10822
10823             Example of usage:
10824                 pmidle = geompy.MakeVertex(50, 0, 50)
10825                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10826             """
10827             # Example: see GEOM_TestOthers.py
10828             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10829             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10830             self._autoPublish(anObj, theName, "vertex")
10831             return anObj
10832
10833         ## Get an edge, found in the given shape by two given vertices.
10834         #  @param theShape Block or a compound of blocks.
10835         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10836         #  @param 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         #  @return New GEOM.GEOM_Object, containing the found edge.
10841         #
10842         #  @ref swig_GetEdge "Example"
10843         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10844             """
10845             Get an edge, found in the given shape by two given vertices.
10846
10847             Parameters: 
10848                 theShape Block or a compound of blocks.
10849                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10850                 theName Object name; when specified, this parameter is used
10851                         for result publication in the study. Otherwise, if automatic
10852                         publication is switched on, default value is used for result name.
10853
10854             Returns:
10855                 New GEOM.GEOM_Object, containing the found edge.
10856             """
10857             # Example: see GEOM_Spanner.py
10858             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10859             RaiseIfFailed("GetEdge", self.BlocksOp)
10860             self._autoPublish(anObj, theName, "edge")
10861             return anObj
10862
10863         ## Find an edge of the given shape, which has minimal distance to the given point.
10864         #  @param theShape Block or a compound of blocks.
10865         #  @param thePoint Point, close to the desired edge.
10866         #  @param theName Object name; when specified, this parameter is used
10867         #         for result publication in the study. Otherwise, if automatic
10868         #         publication is switched on, default value is used for result name.
10869         #
10870         #  @return New GEOM.GEOM_Object, containing the found edge.
10871         #
10872         #  @ref swig_GetEdgeNearPoint "Example"
10873         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10874             """
10875             Find an edge of the given shape, which has minimal distance to the given point.
10876
10877             Parameters: 
10878                 theShape Block or a compound of blocks.
10879                 thePoint Point, close to the desired edge.
10880                 theName Object name; when specified, this parameter is used
10881                         for result publication in the study. Otherwise, if automatic
10882                         publication is switched on, default value is used for result name.
10883
10884             Returns:
10885                 New GEOM.GEOM_Object, containing the found edge.
10886             """
10887             # Example: see GEOM_TestOthers.py
10888             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10889             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10890             self._autoPublish(anObj, theName, "edge")
10891             return anObj
10892
10893         ## Returns a face, found in the given shape by four given corner vertices.
10894         #  @param theShape Block or a compound of blocks.
10895         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10896         #  @param theName Object name; when specified, this parameter is used
10897         #         for result publication in the study. Otherwise, if automatic
10898         #         publication is switched on, default value is used for result name.
10899         #
10900         #  @return New GEOM.GEOM_Object, containing the found face.
10901         #
10902         #  @ref swig_todo "Example"
10903         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10904             """
10905             Returns a face, found in the given shape by four given corner vertices.
10906
10907             Parameters:
10908                 theShape Block or a compound of blocks.
10909                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10910                 theName Object name; when specified, this parameter is used
10911                         for result publication in the study. Otherwise, if automatic
10912                         publication is switched on, default value is used for result name.
10913
10914             Returns:
10915                 New GEOM.GEOM_Object, containing the found face.
10916             """
10917             # Example: see GEOM_Spanner.py
10918             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10919             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10920             self._autoPublish(anObj, theName, "face")
10921             return anObj
10922
10923         ## Get a face of block, found in the given shape by two given edges.
10924         #  @param theShape Block or a compound of blocks.
10925         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10926         #  @param theName Object name; when specified, this parameter is used
10927         #         for result publication in the study. Otherwise, if automatic
10928         #         publication is switched on, default value is used for result name.
10929         #
10930         #  @return New GEOM.GEOM_Object, containing the found face.
10931         #
10932         #  @ref swig_todo "Example"
10933         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10934             """
10935             Get a face of block, found in the given shape by two given edges.
10936
10937             Parameters:
10938                 theShape Block or a compound of blocks.
10939                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10940                 theName Object name; when specified, this parameter is used
10941                         for result publication in the study. Otherwise, if automatic
10942                         publication is switched on, default value is used for result name.
10943
10944             Returns:
10945                 New GEOM.GEOM_Object, containing the found face.
10946             """
10947             # Example: see GEOM_Spanner.py
10948             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10949             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10950             self._autoPublish(anObj, theName, "face")
10951             return anObj
10952
10953         ## Find a face, opposite to the given one in the given block.
10954         #  @param theBlock Must be a hexahedral solid.
10955         #  @param theFace Face of \a theBlock, opposite to the desired face.
10956         #  @param theName Object name; when specified, this parameter is used
10957         #         for result publication in the study. Otherwise, if automatic
10958         #         publication is switched on, default value is used for result name.
10959         #
10960         #  @return New GEOM.GEOM_Object, containing the found face.
10961         #
10962         #  @ref swig_GetOppositeFace "Example"
10963         def GetOppositeFace(self, theBlock, theFace, theName=None):
10964             """
10965             Find a face, opposite to the given one in the given block.
10966
10967             Parameters:
10968                 theBlock Must be a hexahedral solid.
10969                 theFace Face of theBlock, opposite to the desired face.
10970                 theName Object name; when specified, this parameter is used
10971                         for result publication in the study. Otherwise, if automatic
10972                         publication is switched on, default value is used for result name.
10973
10974             Returns: 
10975                 New GEOM.GEOM_Object, containing the found face.
10976             """
10977             # Example: see GEOM_Spanner.py
10978             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10979             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10980             self._autoPublish(anObj, theName, "face")
10981             return anObj
10982
10983         ## Find a face of the given shape, which has minimal distance to the given point.
10984         #  @param theShape Block or a compound of blocks.
10985         #  @param thePoint Point, close to the desired face.
10986         #  @param theName Object name; when specified, this parameter is used
10987         #         for result publication in the study. Otherwise, if automatic
10988         #         publication is switched on, default value is used for result name.
10989         #
10990         #  @return New GEOM.GEOM_Object, containing the found face.
10991         #
10992         #  @ref swig_GetFaceNearPoint "Example"
10993         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10994             """
10995             Find a face of the given shape, which has minimal distance to the given point.
10996
10997             Parameters:
10998                 theShape Block or a compound of blocks.
10999                 thePoint Point, close to the desired face.
11000                 theName Object name; when specified, this parameter is used
11001                         for result publication in the study. Otherwise, if automatic
11002                         publication is switched on, default value is used for result name.
11003
11004             Returns:
11005                 New GEOM.GEOM_Object, containing the found face.
11006             """
11007             # Example: see GEOM_Spanner.py
11008             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11009             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11010             self._autoPublish(anObj, theName, "face")
11011             return anObj
11012
11013         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11014         #  @param theBlock Block or a compound of blocks.
11015         #  @param theVector Vector, close to the normale of the desired face.
11016         #  @param theName Object name; when specified, this parameter is used
11017         #         for result publication in the study. Otherwise, if automatic
11018         #         publication is switched on, default value is used for result name.
11019         #
11020         #  @return New GEOM.GEOM_Object, containing the found face.
11021         #
11022         #  @ref swig_todo "Example"
11023         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11024             """
11025             Find a face of block, whose outside normale has minimal angle with the given vector.
11026
11027             Parameters:
11028                 theBlock Block or a compound of blocks.
11029                 theVector Vector, close to the normale of the desired face.
11030                 theName Object name; when specified, this parameter is used
11031                         for result publication in the study. Otherwise, if automatic
11032                         publication is switched on, default value is used for result name.
11033
11034             Returns:
11035                 New GEOM.GEOM_Object, containing the found face.
11036             """
11037             # Example: see GEOM_Spanner.py
11038             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11039             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11040             self._autoPublish(anObj, theName, "face")
11041             return anObj
11042
11043         ## Find all sub-shapes of type \a theShapeType of the given shape,
11044         #  which have minimal distance to the given point.
11045         #  @param theShape Any shape.
11046         #  @param thePoint Point, close to the desired shape.
11047         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11048         #  @param theTolerance The tolerance for distances comparison. All shapes
11049         #                      with distances to the given point in interval
11050         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11051         #  @param theName Object name; when specified, this parameter is used
11052         #         for result publication in the study. Otherwise, if automatic
11053         #         publication is switched on, default value is used for result name.
11054         #
11055         #  @return New GEOM_Object, containing a group of all found shapes.
11056         #
11057         #  @ref swig_GetShapesNearPoint "Example"
11058         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11059             """
11060             Find all sub-shapes of type theShapeType of the given shape,
11061             which have minimal distance to the given point.
11062
11063             Parameters:
11064                 theShape Any shape.
11065                 thePoint Point, close to the desired shape.
11066                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11067                 theTolerance The tolerance for distances comparison. All shapes
11068                                 with distances to the given point in interval
11069                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11070                 theName Object name; when specified, this parameter is used
11071                         for result publication in the study. Otherwise, if automatic
11072                         publication is switched on, default value is used for result name.
11073
11074             Returns:
11075                 New GEOM_Object, containing a group of all found shapes.
11076             """
11077             # Example: see GEOM_TestOthers.py
11078             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11079             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11080             self._autoPublish(anObj, theName, "group")
11081             return anObj
11082
11083         # end of l3_blocks_op
11084         ## @}
11085
11086         ## @addtogroup l4_blocks_measure
11087         ## @{
11088
11089         ## Check, if the compound of blocks is given.
11090         #  To be considered as a compound of blocks, the
11091         #  given shape must satisfy the following conditions:
11092         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11093         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11094         #  - The compound should be connexe.
11095         #  - The glue between two quadrangle faces should be applied.
11096         #  @param theCompound The compound to check.
11097         #  @return TRUE, if the given shape is a compound of blocks.
11098         #  If theCompound is not valid, prints all discovered errors.
11099         #
11100         #  @ref tui_measurement_tools_page "Example 1"
11101         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11102         def CheckCompoundOfBlocks(self,theCompound):
11103             """
11104             Check, if the compound of blocks is given.
11105             To be considered as a compound of blocks, the
11106             given shape must satisfy the following conditions:
11107             - Each element of the compound should be a Block (6 faces and 12 edges).
11108             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11109             - The compound should be connexe.
11110             - The glue between two quadrangle faces should be applied.
11111
11112             Parameters:
11113                 theCompound The compound to check.
11114
11115             Returns:
11116                 TRUE, if the given shape is a compound of blocks.
11117                 If theCompound is not valid, prints all discovered errors.            
11118             """
11119             # Example: see GEOM_Spanner.py
11120             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11121             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11122             if IsValid == 0:
11123                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11124                 print Descr
11125             return IsValid
11126
11127         ## Retrieve all non blocks solids and faces from \a theShape.
11128         #  @param theShape The shape to explore.
11129         #  @param theName Object name; when specified, this parameter is used
11130         #         for result publication in the study. Otherwise, if automatic
11131         #         publication is switched on, default value is used for result name.
11132         #
11133         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11134         #          non block solids (= not 6 faces, or with 6 faces, but with the
11135         #          presence of non-quadrangular faces). The second object is a
11136         #          group of all non quadrangular faces.
11137         #
11138         #  @ref tui_measurement_tools_page "Example 1"
11139         #  \n @ref swig_GetNonBlocks "Example 2"
11140         def GetNonBlocks (self, theShape, theName=None):
11141             """
11142             Retrieve all non blocks solids and faces from theShape.
11143
11144             Parameters:
11145                 theShape The shape to explore.
11146                 theName Object name; when specified, this parameter is used
11147                         for result publication in the study. Otherwise, if automatic
11148                         publication is switched on, default value is used for result name.
11149
11150             Returns:
11151                 A tuple of two GEOM_Objects. The first object is a group of all
11152                 non block solids (= not 6 faces, or with 6 faces, but with the
11153                 presence of non-quadrangular faces). The second object is a
11154                 group of all non quadrangular faces.
11155
11156             Usage:
11157                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11158             """
11159             # Example: see GEOM_Spanner.py
11160             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11161             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11162             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11163             return aTuple
11164
11165         ## Remove all seam and degenerated edges from \a theShape.
11166         #  Unite faces and edges, sharing one surface. It means that
11167         #  this faces must have references to one C++ surface object (handle).
11168         #  @param theShape The compound or single solid to remove irregular edges from.
11169         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11170         #         do not unite faces.
11171         #  @param theName Object name; when specified, this parameter is used
11172         #         for result publication in the study. Otherwise, if automatic
11173         #         publication is switched on, default value is used for result name.
11174         #
11175         #  @return Improved shape.
11176         #
11177         #  @ref swig_RemoveExtraEdges "Example"
11178         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11179             """
11180             Remove all seam and degenerated edges from theShape.
11181             Unite faces and edges, sharing one surface. It means that
11182             this faces must have references to one C++ surface object (handle).
11183
11184             Parameters:
11185                 theShape The compound or single solid to remove irregular edges from.
11186                 doUnionFaces If True, then unite faces. If False (the default value),
11187                              do not unite faces.
11188                 theName Object name; when specified, this parameter is used
11189                         for result publication in the study. Otherwise, if automatic
11190                         publication is switched on, default value is used for result name.
11191
11192             Returns: 
11193                 Improved shape.
11194             """
11195             # Example: see GEOM_TestOthers.py
11196             nbFacesOptimum = -1 # -1 means do not unite faces
11197             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11198             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11199             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11200             self._autoPublish(anObj, theName, "removeExtraEdges")
11201             return anObj
11202
11203         ## Performs union faces of \a theShape
11204         #  Unite faces sharing one surface. It means that
11205         #  these faces must have references to one C++ surface object (handle).
11206         #  @param theShape The compound or single solid that contains faces
11207         #         to perform union.
11208         #  @param theName Object name; when specified, this parameter is used
11209         #         for result publication in the study. Otherwise, if automatic
11210         #         publication is switched on, default value is used for result name.
11211         #
11212         #  @return Improved shape.
11213         #
11214         #  @ref swig_UnionFaces "Example"
11215         def UnionFaces(self, theShape, theName=None):
11216             """
11217             Performs union faces of theShape.
11218             Unite faces sharing one surface. It means that
11219             these faces must have references to one C++ surface object (handle).
11220
11221             Parameters:
11222                 theShape The compound or single solid that contains faces
11223                          to perform union.
11224                 theName Object name; when specified, this parameter is used
11225                         for result publication in the study. Otherwise, if automatic
11226                         publication is switched on, default value is used for result name.
11227
11228             Returns: 
11229                 Improved shape.
11230             """
11231             # Example: see GEOM_TestOthers.py
11232             anObj = self.BlocksOp.UnionFaces(theShape)
11233             RaiseIfFailed("UnionFaces", self.BlocksOp)
11234             self._autoPublish(anObj, theName, "unionFaces")
11235             return anObj
11236
11237         ## Check, if the given shape is a blocks compound.
11238         #  Fix all detected errors.
11239         #    \note Single block can be also fixed by this method.
11240         #  @param theShape The compound to check and improve.
11241         #  @param theName Object name; when specified, this parameter is used
11242         #         for result publication in the study. Otherwise, if automatic
11243         #         publication is switched on, default value is used for result name.
11244         #
11245         #  @return Improved compound.
11246         #
11247         #  @ref swig_CheckAndImprove "Example"
11248         def CheckAndImprove(self, theShape, theName=None):
11249             """
11250             Check, if the given shape is a blocks compound.
11251             Fix all detected errors.
11252
11253             Note:
11254                 Single block can be also fixed by this method.
11255
11256             Parameters:
11257                 theShape The compound to check and improve.
11258                 theName Object name; when specified, this parameter is used
11259                         for result publication in the study. Otherwise, if automatic
11260                         publication is switched on, default value is used for result name.
11261
11262             Returns: 
11263                 Improved compound.
11264             """
11265             # Example: see GEOM_TestOthers.py
11266             anObj = self.BlocksOp.CheckAndImprove(theShape)
11267             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11268             self._autoPublish(anObj, theName, "improved")
11269             return anObj
11270
11271         # end of l4_blocks_measure
11272         ## @}
11273
11274         ## @addtogroup l3_blocks_op
11275         ## @{
11276
11277         ## Get all the blocks, contained in the given compound.
11278         #  @param theCompound The compound to explode.
11279         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11280         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11281         #  @param theName Object name; when specified, this parameter is used
11282         #         for result publication in the study. Otherwise, if automatic
11283         #         publication is switched on, default value is used for result name.
11284         #
11285         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11286         #
11287         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11288         #
11289         #  @ref tui_explode_on_blocks "Example 1"
11290         #  \n @ref swig_MakeBlockExplode "Example 2"
11291         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11292             """
11293             Get all the blocks, contained in the given compound.
11294
11295             Parameters:
11296                 theCompound The compound to explode.
11297                 theMinNbFaces If solid has lower number of faces, it is not a block.
11298                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11299                 theName Object name; when specified, this parameter is used
11300                         for result publication in the study. Otherwise, if automatic
11301                         publication is switched on, default value is used for result name.
11302
11303             Note:
11304                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11305
11306             Returns:  
11307                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11308             """
11309             # Example: see GEOM_TestOthers.py
11310             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11311             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11312             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11313             for anObj in aList:
11314                 anObj.SetParameters(Parameters)
11315                 pass
11316             self._autoPublish(aList, theName, "block")
11317             return aList
11318
11319         ## Find block, containing the given point inside its volume or on boundary.
11320         #  @param theCompound Compound, to find block in.
11321         #  @param thePoint Point, close to the desired block. If the point lays on
11322         #         boundary between some blocks, we return block with nearest center.
11323         #  @param theName Object name; when specified, this parameter is used
11324         #         for result publication in the study. Otherwise, if automatic
11325         #         publication is switched on, default value is used for result name.
11326         #
11327         #  @return New GEOM.GEOM_Object, containing the found block.
11328         #
11329         #  @ref swig_todo "Example"
11330         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11331             """
11332             Find block, containing the given point inside its volume or on boundary.
11333
11334             Parameters:
11335                 theCompound Compound, to find block in.
11336                 thePoint Point, close to the desired block. If the point lays on
11337                          boundary between some blocks, we return block with nearest center.
11338                 theName Object name; when specified, this parameter is used
11339                         for result publication in the study. Otherwise, if automatic
11340                         publication is switched on, default value is used for result name.
11341
11342             Returns:
11343                 New GEOM.GEOM_Object, containing the found block.
11344             """
11345             # Example: see GEOM_Spanner.py
11346             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11347             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11348             self._autoPublish(anObj, theName, "block")
11349             return anObj
11350
11351         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11352         #  @param theCompound Compound, to find block in.
11353         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11354         #  @param theName Object name; when specified, this parameter is used
11355         #         for result publication in the study. Otherwise, if automatic
11356         #         publication is switched on, default value is used for result name.
11357         #
11358         #  @return New GEOM.GEOM_Object, containing the found block.
11359         #
11360         #  @ref swig_GetBlockByParts "Example"
11361         def GetBlockByParts(self, theCompound, theParts, theName=None):
11362             """
11363              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11364
11365              Parameters:
11366                 theCompound Compound, to find block in.
11367                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11368                 theName Object name; when specified, this parameter is used
11369                         for result publication in the study. Otherwise, if automatic
11370                         publication is switched on, default value is used for result name.
11371
11372             Returns: 
11373                 New GEOM_Object, containing the found block.
11374             """
11375             # Example: see GEOM_TestOthers.py
11376             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11377             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11378             self._autoPublish(anObj, theName, "block")
11379             return anObj
11380
11381         ## Return all blocks, containing all the elements, passed as the parts.
11382         #  @param theCompound Compound, to find blocks in.
11383         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11384         #  @param theName Object name; when specified, this parameter is used
11385         #         for result publication in the study. Otherwise, if automatic
11386         #         publication is switched on, default value is used for result name.
11387         #
11388         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11389         #
11390         #  @ref swig_todo "Example"
11391         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11392             """
11393             Return all blocks, containing all the elements, passed as the parts.
11394
11395             Parameters:
11396                 theCompound Compound, to find blocks in.
11397                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11398                 theName Object name; when specified, this parameter is used
11399                         for result publication in the study. Otherwise, if automatic
11400                         publication is switched on, default value is used for result name.
11401
11402             Returns:
11403                 List of GEOM.GEOM_Object, containing the found blocks.
11404             """
11405             # Example: see GEOM_Spanner.py
11406             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11407             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11408             self._autoPublish(aList, theName, "block")
11409             return aList
11410
11411         ## Multi-transformate block and glue the result.
11412         #  Transformation is defined so, as to superpose direction faces.
11413         #  @param Block Hexahedral solid to be multi-transformed.
11414         #  @param DirFace1 ID of First direction face.
11415         #  @param DirFace2 ID of Second direction face.
11416         #  @param NbTimes Quantity of transformations to be done.
11417         #  @param theName Object name; when specified, this parameter is used
11418         #         for result publication in the study. Otherwise, if automatic
11419         #         publication is switched on, default value is used for result name.
11420         #
11421         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11422         #
11423         #  @return New GEOM.GEOM_Object, containing the result shape.
11424         #
11425         #  @ref tui_multi_transformation "Example"
11426         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11427             """
11428             Multi-transformate block and glue the result.
11429             Transformation is defined so, as to superpose direction faces.
11430
11431             Parameters:
11432                 Block Hexahedral solid to be multi-transformed.
11433                 DirFace1 ID of First direction face.
11434                 DirFace2 ID of Second direction face.
11435                 NbTimes Quantity of transformations to be done.
11436                 theName Object name; when specified, this parameter is used
11437                         for result publication in the study. Otherwise, if automatic
11438                         publication is switched on, default value is used for result name.
11439
11440             Note:
11441                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11442
11443             Returns:
11444                 New GEOM.GEOM_Object, containing the result shape.
11445             """
11446             # Example: see GEOM_Spanner.py
11447             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11448             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11449             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11450             anObj.SetParameters(Parameters)
11451             self._autoPublish(anObj, theName, "transformed")
11452             return anObj
11453
11454         ## Multi-transformate block and glue the result.
11455         #  @param Block Hexahedral solid to be multi-transformed.
11456         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11457         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11458         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11459         #  @param theName Object name; when specified, this parameter is used
11460         #         for result publication in the study. Otherwise, if automatic
11461         #         publication is switched on, default value is used for result name.
11462         #
11463         #  @return New GEOM.GEOM_Object, containing the result shape.
11464         #
11465         #  @ref tui_multi_transformation "Example"
11466         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11467                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11468             """
11469             Multi-transformate block and glue the result.
11470
11471             Parameters:
11472                 Block Hexahedral solid to be multi-transformed.
11473                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11474                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11475                 NbTimesU,NbTimesV Quantity of transformations to be done.
11476                 theName Object name; when specified, this parameter is used
11477                         for result publication in the study. Otherwise, if automatic
11478                         publication is switched on, default value is used for result name.
11479
11480             Returns:
11481                 New GEOM.GEOM_Object, containing the result shape.
11482             """
11483             # Example: see GEOM_Spanner.py
11484             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11485               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11486             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11487                                                             DirFace1V, DirFace2V, NbTimesV)
11488             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11489             anObj.SetParameters(Parameters)
11490             self._autoPublish(anObj, theName, "transformed")
11491             return anObj
11492
11493         ## Build all possible propagation groups.
11494         #  Propagation group is a set of all edges, opposite to one (main)
11495         #  edge of this group directly or through other opposite edges.
11496         #  Notion of Opposite Edge make sence only on quadrangle face.
11497         #  @param theShape Shape to build propagation groups on.
11498         #  @param theName Object name; when specified, this parameter is used
11499         #         for result publication in the study. Otherwise, if automatic
11500         #         publication is switched on, default value is used for result name.
11501         #
11502         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11503         #
11504         #  @ref swig_Propagate "Example"
11505         def Propagate(self, theShape, theName=None):
11506             """
11507             Build all possible propagation groups.
11508             Propagation group is a set of all edges, opposite to one (main)
11509             edge of this group directly or through other opposite edges.
11510             Notion of Opposite Edge make sence only on quadrangle face.
11511
11512             Parameters:
11513                 theShape Shape to build propagation groups on.
11514                 theName Object name; when specified, this parameter is used
11515                         for result publication in the study. Otherwise, if automatic
11516                         publication is switched on, default value is used for result name.
11517
11518             Returns:
11519                 List of GEOM.GEOM_Object, each of them is a propagation group.
11520             """
11521             # Example: see GEOM_TestOthers.py
11522             listChains = self.BlocksOp.Propagate(theShape)
11523             RaiseIfFailed("Propagate", self.BlocksOp)
11524             self._autoPublish(listChains, theName, "propagate")
11525             return listChains
11526
11527         # end of l3_blocks_op
11528         ## @}
11529
11530         ## @addtogroup l3_groups
11531         ## @{
11532
11533         ## Creates a new group which will store sub-shapes of theMainShape
11534         #  @param theMainShape is a GEOM object on which the group is selected
11535         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11536         #  @param theName Object name; when specified, this parameter is used
11537         #         for result publication in the study. Otherwise, if automatic
11538         #         publication is switched on, default value is used for result name.
11539         #
11540         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11541         #
11542         #  @ref tui_working_with_groups_page "Example 1"
11543         #  \n @ref swig_CreateGroup "Example 2"
11544         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11545             """
11546             Creates a new group which will store sub-shapes of theMainShape
11547
11548             Parameters:
11549                theMainShape is a GEOM object on which the group is selected
11550                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11551                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11552                 theName Object name; when specified, this parameter is used
11553                         for result publication in the study. Otherwise, if automatic
11554                         publication is switched on, default value is used for result name.
11555
11556             Returns:
11557                a newly created GEOM group
11558
11559             Example of usage:
11560                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11561                 
11562             """
11563             # Example: see GEOM_TestOthers.py
11564             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11565             RaiseIfFailed("CreateGroup", self.GroupOp)
11566             self._autoPublish(anObj, theName, "group")
11567             return anObj
11568
11569         ## Adds a sub-object with ID theSubShapeId to the group
11570         #  @param theGroup is a GEOM group to which the new sub-shape is added
11571         #  @param theSubShapeID is a sub-shape ID in the main object.
11572         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11573         #
11574         #  @ref tui_working_with_groups_page "Example"
11575         def AddObject(self,theGroup, theSubShapeID):
11576             """
11577             Adds a sub-object with ID theSubShapeId to the group
11578
11579             Parameters:
11580                 theGroup       is a GEOM group to which the new sub-shape is added
11581                 theSubShapeID  is a sub-shape ID in the main object.
11582
11583             Note:
11584                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11585             """
11586             # Example: see GEOM_TestOthers.py
11587             self.GroupOp.AddObject(theGroup, theSubShapeID)
11588             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11589                 RaiseIfFailed("AddObject", self.GroupOp)
11590                 pass
11591             pass
11592
11593         ## Removes a sub-object with ID \a theSubShapeId from the group
11594         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11595         #  @param theSubShapeID is a sub-shape ID in the main object.
11596         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11597         #
11598         #  @ref tui_working_with_groups_page "Example"
11599         def RemoveObject(self,theGroup, theSubShapeID):
11600             """
11601             Removes a sub-object with ID theSubShapeId from the group
11602
11603             Parameters:
11604                 theGroup is a GEOM group from which the new sub-shape is removed
11605                 theSubShapeID is a sub-shape ID in the main object.
11606
11607             Note:
11608                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11609             """
11610             # Example: see GEOM_TestOthers.py
11611             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11612             RaiseIfFailed("RemoveObject", self.GroupOp)
11613             pass
11614
11615         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11616         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11617         #  @param theSubShapes is a list of sub-shapes to be added.
11618         #
11619         #  @ref tui_working_with_groups_page "Example"
11620         def UnionList (self,theGroup, theSubShapes):
11621             """
11622             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11623
11624             Parameters:
11625                 theGroup is a GEOM group to which the new sub-shapes are added.
11626                 theSubShapes is a list of sub-shapes to be added.
11627             """
11628             # Example: see GEOM_TestOthers.py
11629             self.GroupOp.UnionList(theGroup, theSubShapes)
11630             RaiseIfFailed("UnionList", self.GroupOp)
11631             pass
11632
11633         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11634         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11635         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11636         #
11637         #  @ref swig_UnionIDs "Example"
11638         def UnionIDs(self,theGroup, theSubShapes):
11639             """
11640             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11641
11642             Parameters:
11643                 theGroup is a GEOM group to which the new sub-shapes are added.
11644                 theSubShapes is a list of indices of sub-shapes to be added.
11645             """
11646             # Example: see GEOM_TestOthers.py
11647             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11648             RaiseIfFailed("UnionIDs", self.GroupOp)
11649             pass
11650
11651         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11652         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11653         #  @param theSubShapes is a list of sub-shapes to be removed.
11654         #
11655         #  @ref tui_working_with_groups_page "Example"
11656         def DifferenceList (self,theGroup, theSubShapes):
11657             """
11658             Removes from the group all the given shapes. No errors, if some shapes are not included.
11659
11660             Parameters:
11661                 theGroup is a GEOM group from which the sub-shapes are removed.
11662                 theSubShapes is a list of sub-shapes to be removed.
11663             """
11664             # Example: see GEOM_TestOthers.py
11665             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11666             RaiseIfFailed("DifferenceList", self.GroupOp)
11667             pass
11668
11669         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11670         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11671         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11672         #
11673         #  @ref swig_DifferenceIDs "Example"
11674         def DifferenceIDs(self,theGroup, theSubShapes):
11675             """
11676             Removes from the group all the given shapes. No errors, if some shapes are not included.
11677
11678             Parameters:
11679                 theGroup is a GEOM group from which the sub-shapes are removed.
11680                 theSubShapes is a list of indices of sub-shapes to be removed.
11681             """            
11682             # Example: see GEOM_TestOthers.py
11683             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11684             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11685             pass
11686
11687         ## Union of two groups.
11688         #  New group is created. It will contain all entities
11689         #  which are present in groups theGroup1 and theGroup2.
11690         #  @param theGroup1, theGroup2 are the initial GEOM groups
11691         #                              to create the united group from.
11692         #  @param theName Object name; when specified, this parameter is used
11693         #         for result publication in the study. Otherwise, if automatic
11694         #         publication is switched on, default value is used for result name.
11695         #
11696         #  @return a newly created GEOM group.
11697         #
11698         #  @ref tui_union_groups_anchor "Example"
11699         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11700             """
11701             Union of two groups.
11702             New group is created. It will contain all entities
11703             which are present in groups theGroup1 and theGroup2.
11704
11705             Parameters:
11706                 theGroup1, theGroup2 are the initial GEOM groups
11707                                      to create the united group from.
11708                 theName Object name; when specified, this parameter is used
11709                         for result publication in the study. Otherwise, if automatic
11710                         publication is switched on, default value is used for result name.
11711
11712             Returns:
11713                 a newly created GEOM group.
11714             """
11715             # Example: see GEOM_TestOthers.py
11716             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11717             RaiseIfFailed("UnionGroups", self.GroupOp)
11718             self._autoPublish(aGroup, theName, "group")
11719             return aGroup
11720
11721         ## Intersection of two groups.
11722         #  New group is created. It will contain only those entities
11723         #  which are present in both groups theGroup1 and theGroup2.
11724         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11725         #  @param theName Object name; when specified, this parameter is used
11726         #         for result publication in the study. Otherwise, if automatic
11727         #         publication is switched on, default value is used for result name.
11728         #
11729         #  @return a newly created GEOM group.
11730         #
11731         #  @ref tui_intersect_groups_anchor "Example"
11732         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11733             """
11734             Intersection of two groups.
11735             New group is created. It will contain only those entities
11736             which are present in both groups theGroup1 and theGroup2.
11737
11738             Parameters:
11739                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11740                 theName Object name; when specified, this parameter is used
11741                         for result publication in the study. Otherwise, if automatic
11742                         publication is switched on, default value is used for result name.
11743
11744             Returns:
11745                 a newly created GEOM group.
11746             """
11747             # Example: see GEOM_TestOthers.py
11748             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11749             RaiseIfFailed("IntersectGroups", self.GroupOp)
11750             self._autoPublish(aGroup, theName, "group")
11751             return aGroup
11752
11753         ## Cut of two groups.
11754         #  New group is created. It will contain entities which are
11755         #  present in group theGroup1 but are not present in group theGroup2.
11756         #  @param theGroup1 is a GEOM group to include elements of.
11757         #  @param theGroup2 is a GEOM group to exclude elements of.
11758         #  @param theName Object name; when specified, this parameter is used
11759         #         for result publication in the study. Otherwise, if automatic
11760         #         publication is switched on, default value is used for result name.
11761         #
11762         #  @return a newly created GEOM group.
11763         #
11764         #  @ref tui_cut_groups_anchor "Example"
11765         def CutGroups (self, theGroup1, theGroup2, theName=None):
11766             """
11767             Cut of two groups.
11768             New group is created. It will contain entities which are
11769             present in group theGroup1 but are not present in group theGroup2.
11770
11771             Parameters:
11772                 theGroup1 is a GEOM group to include elements of.
11773                 theGroup2 is a GEOM group to exclude elements of.
11774                 theName Object name; when specified, this parameter is used
11775                         for result publication in the study. Otherwise, if automatic
11776                         publication is switched on, default value is used for result name.
11777
11778             Returns:
11779                 a newly created GEOM group.
11780             """
11781             # Example: see GEOM_TestOthers.py
11782             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11783             RaiseIfFailed("CutGroups", self.GroupOp)
11784             self._autoPublish(aGroup, theName, "group")
11785             return aGroup
11786
11787         ## Union of list of groups.
11788         #  New group is created. It will contain all entities that are
11789         #  present in groups listed in theGList.
11790         #  @param theGList is a list of GEOM groups to create the united group from.
11791         #  @param theName Object name; when specified, this parameter is used
11792         #         for result publication in the study. Otherwise, if automatic
11793         #         publication is switched on, default value is used for result name.
11794         #
11795         #  @return a newly created GEOM group.
11796         #
11797         #  @ref tui_union_groups_anchor "Example"
11798         def UnionListOfGroups (self, theGList, theName=None):
11799             """
11800             Union of list of groups.
11801             New group is created. It will contain all entities that are
11802             present in groups listed in theGList.
11803
11804             Parameters:
11805                 theGList is a list of GEOM groups to create the united group from.
11806                 theName Object name; when specified, this parameter is used
11807                         for result publication in the study. Otherwise, if automatic
11808                         publication is switched on, default value is used for result name.
11809
11810             Returns:
11811                 a newly created GEOM group.
11812             """
11813             # Example: see GEOM_TestOthers.py
11814             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11815             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11816             self._autoPublish(aGroup, theName, "group")
11817             return aGroup
11818
11819         ## Cut of lists of groups.
11820         #  New group is created. It will contain only entities
11821         #  which are present in groups listed in theGList.
11822         #  @param theGList is a list of GEOM groups to include elements of.
11823         #  @param theName Object name; when specified, this parameter is used
11824         #         for result publication in the study. Otherwise, if automatic
11825         #         publication is switched on, default value is used for result name.
11826         #
11827         #  @return a newly created GEOM group.
11828         #
11829         #  @ref tui_intersect_groups_anchor "Example"
11830         def IntersectListOfGroups (self, theGList, theName=None):
11831             """
11832             Cut of lists of groups.
11833             New group is created. It will contain only entities
11834             which are present in groups listed in theGList.
11835
11836             Parameters:
11837                 theGList is a list of GEOM groups to include elements of.
11838                 theName Object name; when specified, this parameter is used
11839                         for result publication in the study. Otherwise, if automatic
11840                         publication is switched on, default value is used for result name.
11841
11842             Returns:
11843                 a newly created GEOM group.
11844             """
11845             # Example: see GEOM_TestOthers.py
11846             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11847             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11848             self._autoPublish(aGroup, theName, "group")
11849             return aGroup
11850
11851         ## Cut of lists of groups.
11852         #  New group is created. It will contain only entities
11853         #  which are present in groups listed in theGList1 but 
11854         #  are not present in groups from theGList2.
11855         #  @param theGList1 is a list of GEOM groups to include elements of.
11856         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11857         #  @param theName Object name; when specified, this parameter is used
11858         #         for result publication in the study. Otherwise, if automatic
11859         #         publication is switched on, default value is used for result name.
11860         #
11861         #  @return a newly created GEOM group.
11862         #
11863         #  @ref tui_cut_groups_anchor "Example"
11864         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11865             """
11866             Cut of lists of groups.
11867             New group is created. It will contain only entities
11868             which are present in groups listed in theGList1 but 
11869             are not present in groups from theGList2.
11870
11871             Parameters:
11872                 theGList1 is a list of GEOM groups to include elements of.
11873                 theGList2 is a list of GEOM groups to exclude elements of.
11874                 theName Object name; when specified, this parameter is used
11875                         for result publication in the study. Otherwise, if automatic
11876                         publication is switched on, default value is used for result name.
11877
11878             Returns:
11879                 a newly created GEOM group.
11880             """
11881             # Example: see GEOM_TestOthers.py
11882             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11883             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11884             self._autoPublish(aGroup, theName, "group")
11885             return aGroup
11886
11887         ## Returns a list of sub-objects ID stored in the group
11888         #  @param theGroup is a GEOM group for which a list of IDs is requested
11889         #
11890         #  @ref swig_GetObjectIDs "Example"
11891         def GetObjectIDs(self,theGroup):
11892             """
11893             Returns a list of sub-objects ID stored in the group
11894
11895             Parameters:
11896                 theGroup is a GEOM group for which a list of IDs is requested
11897             """
11898             # Example: see GEOM_TestOthers.py
11899             ListIDs = self.GroupOp.GetObjects(theGroup)
11900             RaiseIfFailed("GetObjects", self.GroupOp)
11901             return ListIDs
11902
11903         ## Returns a type of sub-objects stored in the group
11904         #  @param theGroup is a GEOM group which type is returned.
11905         #
11906         #  @ref swig_GetType "Example"
11907         def GetType(self,theGroup):
11908             """
11909             Returns a type of sub-objects stored in the group
11910
11911             Parameters:
11912                 theGroup is a GEOM group which type is returned.
11913             """
11914             # Example: see GEOM_TestOthers.py
11915             aType = self.GroupOp.GetType(theGroup)
11916             RaiseIfFailed("GetType", self.GroupOp)
11917             return aType
11918
11919         ## Convert a type of geom object from id to string value
11920         #  @param theId is a GEOM obect type id.
11921         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11922         #  @ref swig_GetType "Example"
11923         def ShapeIdToType(self, theId):
11924             """
11925             Convert a type of geom object from id to string value
11926
11927             Parameters:
11928                 theId is a GEOM obect type id.
11929                 
11930             Returns:
11931                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11932             """
11933             if theId == 0:
11934                 return "COPY"
11935             if theId == 1:
11936                 return "IMPORT"
11937             if theId == 2:
11938                 return "POINT"
11939             if theId == 3:
11940                 return "VECTOR"
11941             if theId == 4:
11942                 return "PLANE"
11943             if theId == 5:
11944                 return "LINE"
11945             if theId == 6:
11946                 return "TORUS"
11947             if theId == 7:
11948                 return "BOX"
11949             if theId == 8:
11950                 return "CYLINDER"
11951             if theId == 9:
11952                 return "CONE"
11953             if theId == 10:
11954                 return "SPHERE"
11955             if theId == 11:
11956                 return "PRISM"
11957             if theId == 12:
11958                 return "REVOLUTION"
11959             if theId == 13:
11960                 return "BOOLEAN"
11961             if theId == 14:
11962                 return "PARTITION"
11963             if theId == 15:
11964                 return "POLYLINE"
11965             if theId == 16:
11966                 return "CIRCLE"
11967             if theId == 17:
11968                 return "SPLINE"
11969             if theId == 18:
11970                 return "ELLIPSE"
11971             if theId == 19:
11972                 return "CIRC_ARC"
11973             if theId == 20:
11974                 return "FILLET"
11975             if theId == 21:
11976                 return "CHAMFER"
11977             if theId == 22:
11978                 return "EDGE"
11979             if theId == 23:
11980                 return "WIRE"
11981             if theId == 24:
11982                 return "FACE"
11983             if theId == 25:
11984                 return "SHELL"
11985             if theId == 26:
11986                 return "SOLID"
11987             if theId == 27:
11988                 return "COMPOUND"
11989             if theId == 28:
11990                 return "SUBSHAPE"
11991             if theId == 29:
11992                 return "PIPE"
11993             if theId == 30:
11994                 return "ARCHIMEDE"
11995             if theId == 31:
11996                 return "FILLING"
11997             if theId == 32:
11998                 return "EXPLODE"
11999             if theId == 33:
12000                 return "GLUED"
12001             if theId == 34:
12002                 return "SKETCHER"
12003             if theId == 35:
12004                 return "CDG"
12005             if theId == 36:
12006                 return "FREE_BOUNDS"
12007             if theId == 37:
12008                 return "GROUP"
12009             if theId == 38:
12010                 return "BLOCK"
12011             if theId == 39:
12012                 return "MARKER"
12013             if theId == 40:
12014                 return "THRUSECTIONS"
12015             if theId == 41:
12016                 return "COMPOUNDFILTER"
12017             if theId == 42:
12018                 return "SHAPES_ON_SHAPE"
12019             if theId == 43:
12020                 return "ELLIPSE_ARC"
12021             if theId == 44:
12022                 return "3DSKETCHER"
12023             if theId == 45:
12024                 return "FILLET_2D"
12025             if theId == 46:
12026                 return "FILLET_1D"
12027             if theId == 201:
12028                 return "PIPETSHAPE"
12029             return "Shape Id not exist."
12030
12031         ## Returns a main shape associated with the group
12032         #  @param theGroup is a GEOM group for which a main shape object is requested
12033         #  @return a GEOM object which is a main shape for theGroup
12034         #
12035         #  @ref swig_GetMainShape "Example"
12036         def GetMainShape(self,theGroup):
12037             """
12038             Returns a main shape associated with the group
12039
12040             Parameters:
12041                 theGroup is a GEOM group for which a main shape object is requested
12042
12043             Returns:
12044                 a GEOM object which is a main shape for theGroup
12045
12046             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12047             """
12048             # Example: see GEOM_TestOthers.py
12049             anObj = self.GroupOp.GetMainShape(theGroup)
12050             RaiseIfFailed("GetMainShape", self.GroupOp)
12051             return anObj
12052
12053         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12054         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12055         #  @param theShape given shape (see GEOM.GEOM_Object)
12056         #  @param min_length minimum length of edges of theShape
12057         #  @param max_length maximum length of edges of theShape
12058         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12059         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12060         #  @param theName Object name; when specified, this parameter is used
12061         #         for result publication in the study. Otherwise, if automatic
12062         #         publication is switched on, default value is used for result name.
12063         #
12064         #  @return a newly created GEOM group of edges
12065         #
12066         #  @@ref swig_todo "Example"
12067         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12068             """
12069             Create group of edges of theShape, whose length is in range [min_length, max_length].
12070             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12071
12072             Parameters:
12073                 theShape given shape
12074                 min_length minimum length of edges of theShape
12075                 max_length maximum length of edges of theShape
12076                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12077                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12078                 theName Object name; when specified, this parameter is used
12079                         for result publication in the study. Otherwise, if automatic
12080                         publication is switched on, default value is used for result name.
12081
12082              Returns:
12083                 a newly created GEOM group of edges.
12084             """
12085             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12086             edges_in_range = []
12087             for edge in edges:
12088                 Props = self.BasicProperties(edge)
12089                 if min_length <= Props[0] and Props[0] <= max_length:
12090                     if (not include_min) and (min_length == Props[0]):
12091                         skip = 1
12092                     else:
12093                         if (not include_max) and (Props[0] == max_length):
12094                             skip = 1
12095                         else:
12096                             edges_in_range.append(edge)
12097
12098             if len(edges_in_range) <= 0:
12099                 print "No edges found by given criteria"
12100                 return None
12101
12102             # note: auto-publishing is done in self.CreateGroup()
12103             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12104             self.UnionList(group_edges, edges_in_range)
12105
12106             return group_edges
12107
12108         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12109         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12110         #  @param min_length minimum length of edges of selected shape
12111         #  @param max_length maximum length of edges of selected shape
12112         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12113         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12114         #  @return a newly created GEOM group of edges
12115         #  @ref swig_todo "Example"
12116         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12117             """
12118             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12119             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12120
12121             Parameters:
12122                 min_length minimum length of edges of selected shape
12123                 max_length maximum length of edges of selected shape
12124                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12125                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12126
12127              Returns:
12128                 a newly created GEOM group of edges.
12129             """
12130             nb_selected = sg.SelectedCount()
12131             if nb_selected < 1:
12132                 print "Select a shape before calling this function, please."
12133                 return 0
12134             if nb_selected > 1:
12135                 print "Only one shape must be selected"
12136                 return 0
12137
12138             id_shape = sg.getSelected(0)
12139             shape = IDToObject( id_shape )
12140
12141             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12142
12143             left_str  = " < "
12144             right_str = " < "
12145             if include_min: left_str  = " <= "
12146             if include_max: right_str  = " <= "
12147
12148             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12149                                     + left_str + "length" + right_str + `max_length`)
12150
12151             sg.updateObjBrowser(1)
12152
12153             return group_edges
12154
12155         # end of l3_groups
12156         ## @}
12157
12158         ## @addtogroup l4_advanced
12159         ## @{
12160
12161         ## Create a T-shape object with specified caracteristics for the main
12162         #  and the incident pipes (radius, width, half-length).
12163         #  The extremities of the main pipe are located on junctions points P1 and P2.
12164         #  The extremity of the incident pipe is located on junction point P3.
12165         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12166         #  the main plane of the T-shape is XOY.
12167         #
12168         #  @param theR1 Internal radius of main pipe
12169         #  @param theW1 Width of main pipe
12170         #  @param theL1 Half-length of main pipe
12171         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12172         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12173         #  @param theL2 Half-length of incident pipe
12174         #
12175         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12176         #  @param theP1 1st junction point of main pipe
12177         #  @param theP2 2nd junction point of main pipe
12178         #  @param theP3 Junction point of incident pipe
12179         #
12180         #  @param theRL Internal radius of left thickness reduction
12181         #  @param theWL Width of left thickness reduction
12182         #  @param theLtransL Length of left transition part
12183         #  @param theLthinL Length of left thin part
12184         #
12185         #  @param theRR Internal radius of right thickness reduction
12186         #  @param theWR Width of right thickness reduction
12187         #  @param theLtransR Length of right transition part
12188         #  @param theLthinR Length of right thin part
12189         #
12190         #  @param theRI Internal radius of incident thickness reduction
12191         #  @param theWI Width of incident thickness reduction
12192         #  @param theLtransI Length of incident transition part
12193         #  @param theLthinI Length of incident thin part
12194         #
12195         #  @param theName Object name; when specified, this parameter is used
12196         #         for result publication in the study. Otherwise, if automatic
12197         #         publication is switched on, default value is used for result name.
12198         #
12199         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12200         #
12201         #  @ref tui_creation_pipetshape "Example"
12202         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
12203                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
12204                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12205                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12206                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12207                             theName=None):
12208             """
12209             Create a T-shape object with specified caracteristics for the main
12210             and the incident pipes (radius, width, half-length).
12211             The extremities of the main pipe are located on junctions points P1 and P2.
12212             The extremity of the incident pipe is located on junction point P3.
12213             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12214             the main plane of the T-shape is XOY.
12215
12216             Parameters:
12217                 theR1 Internal radius of main pipe
12218                 theW1 Width of main pipe
12219                 theL1 Half-length of main pipe
12220                 theR2 Internal radius of incident pipe (R2 < R1)
12221                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12222                 theL2 Half-length of incident pipe
12223                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12224                 theP1 1st junction point of main pipe
12225                 theP2 2nd junction point of main pipe
12226                 theP3 Junction point of incident pipe
12227
12228                 theRL Internal radius of left thickness reduction
12229                 theWL Width of left thickness reduction
12230                 theLtransL Length of left transition part
12231                 theLthinL Length of left thin part
12232
12233                 theRR Internal radius of right thickness reduction
12234                 theWR Width of right thickness reduction
12235                 theLtransR Length of right transition part
12236                 theLthinR Length of right thin part
12237
12238                 theRI Internal radius of incident thickness reduction
12239                 theWI Width of incident thickness reduction
12240                 theLtransI Length of incident transition part
12241                 theLthinI Length of incident thin part
12242
12243                 theName Object name; when specified, this parameter is used
12244                         for result publication in the study. Otherwise, if automatic
12245                         publication is switched on, default value is used for result name.
12246
12247             Returns:
12248                 List of GEOM_Object, containing the created shape and propagation groups.
12249
12250             Example of usage:
12251                 # create PipeTShape object
12252                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
12253                 # create PipeTShape object with position
12254                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
12255                 # create PipeTShape object with left thickness reduction
12256                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12257             """
12258             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)
12259             if (theP1 and theP2 and theP3):
12260                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12261                                                                 theRL, theWL, theLtransL, theLthinL,
12262                                                                 theRR, theWR, theLtransR, theLthinR,
12263                                                                 theRI, theWI, theLtransI, theLthinI,
12264                                                                 theHexMesh, theP1, theP2, theP3)
12265             else:
12266                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12267                                                     theRL, theWL, theLtransL, theLthinL,
12268                                                     theRR, theWR, theLtransR, theLthinR,
12269                                                     theRI, theWI, theLtransI, theLthinI,
12270                                                     theHexMesh)
12271             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12272             if Parameters: anObj[0].SetParameters(Parameters)
12273             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12274             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12275             return anObj
12276
12277         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12278         #  and the incident pipes (radius, width, half-length). The chamfer is
12279         #  created on the junction of the pipes.
12280         #  The extremities of the main pipe are located on junctions points P1 and P2.
12281         #  The extremity of the incident pipe is located on junction point P3.
12282         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12283         #  the main plane of the T-shape is XOY.
12284         #  @param theR1 Internal radius of main pipe
12285         #  @param theW1 Width of main pipe
12286         #  @param theL1 Half-length of main pipe
12287         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12288         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12289         #  @param theL2 Half-length of incident pipe
12290         #  @param theH Height of the chamfer.
12291         #  @param theW Width of the chamfer.
12292         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12293         #  @param theP1 1st junction point of main pipe
12294         #  @param theP2 2nd junction point of main pipe
12295         #  @param theP3 Junction point of incident pipe
12296         #
12297         #  @param theRL Internal radius of left thickness reduction
12298         #  @param theWL Width of left thickness reduction
12299         #  @param theLtransL Length of left transition part
12300         #  @param theLthinL Length of left thin part
12301         #
12302         #  @param theRR Internal radius of right thickness reduction
12303         #  @param theWR Width of right thickness reduction
12304         #  @param theLtransR Length of right transition part
12305         #  @param theLthinR Length of right thin part
12306         #
12307         #  @param theRI Internal radius of incident thickness reduction
12308         #  @param theWI Width of incident thickness reduction
12309         #  @param theLtransI Length of incident transition part
12310         #  @param theLthinI Length of incident thin part
12311         #
12312         #  @param theName Object name; when specified, this parameter is used
12313         #         for result publication in the study. Otherwise, if automatic
12314         #         publication is switched on, default value is used for result name.
12315         #
12316         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12317         #
12318         #  @ref tui_creation_pipetshape "Example"
12319         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12320                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12321                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12322                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12323                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12324                                    theName=None):
12325             """
12326             Create a T-shape object with chamfer and with specified caracteristics for the main
12327             and the incident pipes (radius, width, half-length). The chamfer is
12328             created on the junction of the pipes.
12329             The extremities of the main pipe are located on junctions points P1 and P2.
12330             The extremity of the incident pipe is located on junction point P3.
12331             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12332             the main plane of the T-shape is XOY.
12333
12334             Parameters:
12335                 theR1 Internal radius of main pipe
12336                 theW1 Width of main pipe
12337                 theL1 Half-length of main pipe
12338                 theR2 Internal radius of incident pipe (R2 < R1)
12339                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12340                 theL2 Half-length of incident pipe
12341                 theH Height of the chamfer.
12342                 theW Width of the chamfer.
12343                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12344                 theP1 1st junction point of main pipe
12345                 theP2 2nd junction point of main pipe
12346                 theP3 Junction point of incident pipe
12347
12348                 theRL Internal radius of left thickness reduction
12349                 theWL Width of left thickness reduction
12350                 theLtransL Length of left transition part
12351                 theLthinL Length of left thin part
12352
12353                 theRR Internal radius of right thickness reduction
12354                 theWR Width of right thickness reduction
12355                 theLtransR Length of right transition part
12356                 theLthinR Length of right thin part
12357
12358                 theRI Internal radius of incident thickness reduction
12359                 theWI Width of incident thickness reduction
12360                 theLtransI Length of incident transition part
12361                 theLthinI Length of incident thin part
12362
12363                 theName Object name; when specified, this parameter is used
12364                         for result publication in the study. Otherwise, if automatic
12365                         publication is switched on, default value is used for result name.
12366
12367             Returns:
12368                 List of GEOM_Object, containing the created shape and propagation groups.
12369
12370             Example of usage:
12371                 # create PipeTShape with chamfer object
12372                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12373                 # create PipeTShape with chamfer object with position
12374                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12375                 # create PipeTShape with chamfer object with left thickness reduction
12376                 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)
12377             """
12378             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)
12379             if (theP1 and theP2 and theP3):
12380               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12381                                                                      theRL, theWL, theLtransL, theLthinL,
12382                                                                      theRR, theWR, theLtransR, theLthinR,
12383                                                                      theRI, theWI, theLtransI, theLthinI,
12384                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12385             else:
12386               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12387                                                          theRL, theWL, theLtransL, theLthinL,
12388                                                          theRR, theWR, theLtransR, theLthinR,
12389                                                          theRI, theWI, theLtransI, theLthinI,
12390                                                          theH, theW, theHexMesh)
12391             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12392             if Parameters: anObj[0].SetParameters(Parameters)
12393             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12394             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12395             return anObj
12396
12397         ## Create a T-shape object with fillet and with specified caracteristics for the main
12398         #  and the incident pipes (radius, width, half-length). The fillet is
12399         #  created on the junction of the pipes.
12400         #  The extremities of the main pipe are located on junctions points P1 and P2.
12401         #  The extremity of the incident pipe is located on junction point P3.
12402         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12403         #  the main plane of the T-shape is XOY.
12404         #  @param theR1 Internal radius of main pipe
12405         #  @param theW1 Width of main pipe
12406         #  @param theL1 Half-length of main pipe
12407         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12408         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12409         #  @param theL2 Half-length of incident pipe
12410         #  @param theRF Radius of curvature of fillet.
12411         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12412         #  @param theP1 1st junction point of main pipe
12413         #  @param theP2 2nd junction point of main pipe
12414         #  @param theP3 Junction point of incident pipe
12415         #
12416         #  @param theRL Internal radius of left thickness reduction
12417         #  @param theWL Width of left thickness reduction
12418         #  @param theLtransL Length of left transition part
12419         #  @param theLthinL Length of left thin part
12420         #
12421         #  @param theRR Internal radius of right thickness reduction
12422         #  @param theWR Width of right thickness reduction
12423         #  @param theLtransR Length of right transition part
12424         #  @param theLthinR Length of right thin part
12425         #
12426         #  @param theRI Internal radius of incident thickness reduction
12427         #  @param theWI Width of incident thickness reduction
12428         #  @param theLtransI Length of incident transition part
12429         #  @param theLthinI Length of incident thin part
12430         #
12431         #  @param theName Object name; when specified, this parameter is used
12432         #         for result publication in the study. Otherwise, if automatic
12433         #         publication is switched on, default value is used for result name.
12434         #
12435         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12436         #
12437         #  @ref tui_creation_pipetshape "Example"
12438         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12439                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12440                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12441                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12442                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12443                                   theName=None):
12444             """
12445             Create a T-shape object with fillet and with specified caracteristics for the main
12446             and the incident pipes (radius, width, half-length). The fillet is
12447             created on the junction of the pipes.
12448             The extremities of the main pipe are located on junctions points P1 and P2.
12449             The extremity of the incident pipe is located on junction point P3.
12450
12451             Parameters:
12452                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12453                 the main plane of the T-shape is XOY.
12454                 theR1 Internal radius of main pipe
12455                 theW1 Width of main pipe
12456                 heL1 Half-length of main pipe
12457                 theR2 Internal radius of incident pipe (R2 < R1)
12458                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12459                 theL2 Half-length of incident pipe
12460                 theRF Radius of curvature of fillet.
12461                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12462                 theP1 1st junction point of main pipe
12463                 theP2 2nd junction point of main pipe
12464                 theP3 Junction point of incident pipe
12465
12466                 theRL Internal radius of left thickness reduction
12467                 theWL Width of left thickness reduction
12468                 theLtransL Length of left transition part
12469                 theLthinL Length of left thin part
12470
12471                 theRR Internal radius of right thickness reduction
12472                 theWR Width of right thickness reduction
12473                 theLtransR Length of right transition part
12474                 theLthinR Length of right thin part
12475
12476                 theRI Internal radius of incident thickness reduction
12477                 theWI Width of incident thickness reduction
12478                 theLtransI Length of incident transition part
12479                 theLthinI Length of incident thin part
12480
12481                 theName Object name; when specified, this parameter is used
12482                         for result publication in the study. Otherwise, if automatic
12483                         publication is switched on, default value is used for result name.
12484                 
12485             Returns:
12486                 List of GEOM_Object, containing the created shape and propagation groups.
12487                 
12488             Example of usage:
12489                 # create PipeTShape with fillet object
12490                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12491                 # create PipeTShape with fillet object with position
12492                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12493                 # create PipeTShape with fillet object with left thickness reduction
12494                 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)
12495             """
12496             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)
12497             if (theP1 and theP2 and theP3):
12498               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12499                                                                     theRL, theWL, theLtransL, theLthinL,
12500                                                                     theRR, theWR, theLtransR, theLthinR,
12501                                                                     theRI, theWI, theLtransI, theLthinI,
12502                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12503             else:
12504               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12505                                                         theRL, theWL, theLtransL, theLthinL,
12506                                                         theRR, theWR, theLtransR, theLthinR,
12507                                                         theRI, theWI, theLtransI, theLthinI,
12508                                                         theRF, theHexMesh)
12509             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12510             if Parameters: anObj[0].SetParameters(Parameters)
12511             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12512             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12513             return anObj
12514
12515         ## This function allows creating a disk already divided into blocks. It
12516         #  can be used to create divided pipes for later meshing in hexaedra.
12517         #  @param theR Radius of the disk
12518         #  @param theOrientation Orientation of the plane on which the disk will be built
12519         #         1 = XOY, 2 = OYZ, 3 = OZX
12520         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12521         #  @param theName Object name; when specified, this parameter is used
12522         #         for result publication in the study. Otherwise, if automatic
12523         #         publication is switched on, default value is used for result name.
12524         #
12525         #  @return New GEOM_Object, containing the created shape.
12526         #
12527         #  @ref tui_creation_divideddisk "Example"
12528         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12529             """
12530             Creates a disk, divided into blocks. It can be used to create divided pipes
12531             for later meshing in hexaedra.
12532
12533             Parameters:
12534                 theR Radius of the disk
12535                 theOrientation Orientation of the plane on which the disk will be built:
12536                                1 = XOY, 2 = OYZ, 3 = OZX
12537                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12538                 theName Object name; when specified, this parameter is used
12539                         for result publication in the study. Otherwise, if automatic
12540                         publication is switched on, default value is used for result name.
12541
12542             Returns:
12543                 New GEOM_Object, containing the created shape.
12544             """
12545             theR, Parameters = ParseParameters(theR)
12546             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12547             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12548             if Parameters: anObj.SetParameters(Parameters)
12549             self._autoPublish(anObj, theName, "dividedDisk")
12550             return anObj
12551             
12552         ## This function allows creating a disk already divided into blocks. It
12553         #  can be used to create divided pipes for later meshing in hexaedra.
12554         #  @param theCenter Center of the disk
12555         #  @param theVector Normal vector to the plane of the created disk
12556         #  @param theRadius Radius of the disk
12557         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12558         #  @param theName Object name; when specified, this parameter is used
12559         #         for result publication in the study. Otherwise, if automatic
12560         #         publication is switched on, default value is used for result name.
12561         #
12562         #  @return New GEOM_Object, containing the created shape.
12563         #
12564         #  @ref tui_creation_divideddisk "Example"
12565         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12566             """
12567             Creates a disk already divided into blocks. It can be used to create divided pipes
12568             for later meshing in hexaedra.
12569
12570             Parameters:
12571                 theCenter Center of the disk
12572                 theVector Normal vector to the plane of the created disk
12573                 theRadius Radius of the disk
12574                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12575                 theName Object name; when specified, this parameter is used
12576                         for result publication in the study. Otherwise, if automatic
12577                         publication is switched on, default value is used for result name.
12578
12579             Returns:
12580                 New GEOM_Object, containing the created shape.
12581             """
12582             theRadius, Parameters = ParseParameters(theRadius)
12583             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12584             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12585             if Parameters: anObj.SetParameters(Parameters)
12586             self._autoPublish(anObj, theName, "dividedDisk")
12587             return anObj
12588
12589         ## Builds a cylinder prepared for hexa meshes
12590         #  @param theR Radius of the cylinder
12591         #  @param theH Height of the cylinder
12592         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12593         #  @param theName Object name; when specified, this parameter is used
12594         #         for result publication in the study. Otherwise, if automatic
12595         #         publication is switched on, default value is used for result name.
12596         #
12597         #  @return New GEOM_Object, containing the created shape.
12598         #
12599         #  @ref tui_creation_dividedcylinder "Example"
12600         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12601             """
12602             Builds a cylinder prepared for hexa meshes
12603
12604             Parameters:
12605                 theR Radius of the cylinder
12606                 theH Height of the cylinder
12607                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12608                 theName Object name; when specified, this parameter is used
12609                         for result publication in the study. Otherwise, if automatic
12610                         publication is switched on, default value is used for result name.
12611
12612             Returns:
12613                 New GEOM_Object, containing the created shape.
12614             """
12615             theR, theH, Parameters = ParseParameters(theR, theH)
12616             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12617             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12618             if Parameters: anObj.SetParameters(Parameters)
12619             self._autoPublish(anObj, theName, "dividedCylinder")
12620             return anObj
12621
12622         ## Create a surface from a cloud of points
12623         #  @param thelPoints list of points
12624         #  @return New GEOM_Object, containing the created shape.
12625         #
12626         #  @ref tui_creation_smoothingsurface "Example"
12627         def MakeSmoothingSurface(self, thelPoints):
12628             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12629             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12630             return anObj
12631
12632         ## Export a shape to XAO format
12633         #  @param shape The shape to export
12634         #  @param groups The list of groups to export
12635         #  @param fields The list of fields to export
12636         #  @param author The author of the export
12637         #  @param fileName The name of the file to export
12638         #  @return boolean
12639         #
12640         #  @ref tui_exportxao "Example"
12641         def ExportXAO(self, shape, groups, fields, author, fileName):
12642             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
12643             RaiseIfFailed("ExportXAO", self.InsertOp)
12644             return res
12645
12646         ## Import a shape from XAO format
12647         #  @param shape Shape to export
12648         #  @param fileName The name of the file to import
12649         #  @return tuple (res, shape, subShapes, groups, fields)
12650         #       res Flag indicating if the import was successful
12651         #       shape The imported shape
12652         #       subShapes The list of imported subShapes
12653         #       groups The list of imported groups
12654         #       fields The list of imported fields
12655         #
12656         #  @ref tui_importxao "Example"
12657         def ImportXAO(self, fileName):
12658             res = self.InsertOp.ImportXAO(fileName)
12659             RaiseIfFailed("ImportXAO", self.InsertOp)
12660             return res
12661
12662         #@@ insert new functions before this line @@ do not remove this line @@#
12663
12664         # end of l4_advanced
12665         ## @}
12666
12667         ## Create a copy of the given object
12668         #
12669         #  @param theOriginal geometry object for copy
12670         #  @param theName Object name; when specified, this parameter is used
12671         #         for result publication in the study. Otherwise, if automatic
12672         #         publication is switched on, default value is used for result name.
12673         #
12674         #  @return New GEOM_Object, containing the copied shape.
12675         #
12676         #  @ingroup l1_geomBuilder_auxiliary
12677         #  @ref swig_MakeCopy "Example"
12678         def MakeCopy(self, theOriginal, theName=None):
12679             """
12680             Create a copy of the given object
12681
12682             Parameters:
12683                 theOriginal geometry object for copy
12684                 theName Object name; when specified, this parameter is used
12685                         for result publication in the study. Otherwise, if automatic
12686                         publication is switched on, default value is used for result name.
12687
12688             Returns:
12689                 New GEOM_Object, containing the copied shape.
12690
12691             Example of usage: Copy = geompy.MakeCopy(Box)
12692             """
12693             # Example: see GEOM_TestAll.py
12694             anObj = self.InsertOp.MakeCopy(theOriginal)
12695             RaiseIfFailed("MakeCopy", self.InsertOp)
12696             self._autoPublish(anObj, theName, "copy")
12697             return anObj
12698
12699         ## Add Path to load python scripts from
12700         #  @param Path a path to load python scripts from
12701         #  @ingroup l1_geomBuilder_auxiliary
12702         def addPath(self,Path):
12703             """
12704             Add Path to load python scripts from
12705
12706             Parameters:
12707                 Path a path to load python scripts from
12708             """
12709             if (sys.path.count(Path) < 1):
12710                 sys.path.append(Path)
12711                 pass
12712             pass
12713
12714         ## Load marker texture from the file
12715         #  @param Path a path to the texture file
12716         #  @return unique texture identifier
12717         #  @ingroup l1_geomBuilder_auxiliary
12718         def LoadTexture(self, Path):
12719             """
12720             Load marker texture from the file
12721             
12722             Parameters:
12723                 Path a path to the texture file
12724                 
12725             Returns:
12726                 unique texture identifier
12727             """
12728             # Example: see GEOM_TestAll.py
12729             ID = self.InsertOp.LoadTexture(Path)
12730             RaiseIfFailed("LoadTexture", self.InsertOp)
12731             return ID
12732
12733         ## Get internal name of the object based on its study entry
12734         #  @note This method does not provide an unique identifier of the geometry object.
12735         #  @note This is internal function of GEOM component, though it can be used outside it for 
12736         #  appropriate reason (e.g. for identification of geometry object).
12737         #  @param obj geometry object
12738         #  @return unique object identifier
12739         #  @ingroup l1_geomBuilder_auxiliary
12740         def getObjectID(self, obj):
12741             """
12742             Get internal name of the object based on its study entry.
12743             Note: this method does not provide an unique identifier of the geometry object.
12744             It is an internal function of GEOM component, though it can be used outside GEOM for 
12745             appropriate reason (e.g. for identification of geometry object).
12746
12747             Parameters:
12748                 obj geometry object
12749
12750             Returns:
12751                 unique object identifier
12752             """
12753             ID = ""
12754             entry = salome.ObjectToID(obj)
12755             if entry is not None:
12756                 lst = entry.split(":")
12757                 if len(lst) > 0:
12758                     ID = lst[-1] # -1 means last item in the list            
12759                     return "GEOM_" + ID
12760             return ID
12761                 
12762             
12763
12764         ## Add marker texture. @a Width and @a Height parameters
12765         #  specify width and height of the texture in pixels.
12766         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12767         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12768         #  parameter should be unpacked string, in which '1' symbols represent opaque
12769         #  pixels and '0' represent transparent pixels of the texture bitmap.
12770         #
12771         #  @param Width texture width in pixels
12772         #  @param Height texture height in pixels
12773         #  @param Texture texture data
12774         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12775         #  @return unique texture identifier
12776         #  @ingroup l1_geomBuilder_auxiliary
12777         def AddTexture(self, Width, Height, Texture, RowData=False):
12778             """
12779             Add marker texture. Width and Height parameters
12780             specify width and height of the texture in pixels.
12781             If RowData is True, Texture parameter should represent texture data
12782             packed into the byte array. If RowData is False (default), Texture
12783             parameter should be unpacked string, in which '1' symbols represent opaque
12784             pixels and '0' represent transparent pixels of the texture bitmap.
12785
12786             Parameters:
12787                 Width texture width in pixels
12788                 Height texture height in pixels
12789                 Texture texture data
12790                 RowData if True, Texture data are packed in the byte stream
12791
12792             Returns:
12793                 return unique texture identifier
12794             """
12795             if not RowData: Texture = PackData(Texture)
12796             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12797             RaiseIfFailed("AddTexture", self.InsertOp)
12798             return ID
12799
12800         ## Creates a new folder object. It is a container for any GEOM objects.
12801         #  @param Name name of the container
12802         #  @param Father parent object. If None, 
12803         #         folder under 'Geometry' root object will be created.
12804         #  @return a new created folder
12805         #  @ingroup l1_publish_data
12806         def NewFolder(self, Name, Father=None):
12807             """
12808             Create a new folder object. It is an auxiliary container for any GEOM objects.
12809             
12810             Parameters:
12811                 Name name of the container
12812                 Father parent object. If None, 
12813                 folder under 'Geometry' root object will be created.
12814             
12815             Returns:
12816                 a new created folder
12817             """
12818             if not Father: Father = self.father
12819             return self.CreateFolder(Name, Father)
12820
12821         ## Move object to the specified folder
12822         #  @param Object object to move
12823         #  @param Folder target folder
12824         #  @ingroup l1_publish_data
12825         def PutToFolder(self, Object, Folder):
12826             """
12827             Move object to the specified folder
12828             
12829             Parameters:
12830                 Object object to move
12831                 Folder target folder
12832             """
12833             self.MoveToFolder(Object, Folder)
12834             pass
12835
12836         ## Move list of objects to the specified folder
12837         #  @param ListOfSO list of objects to move
12838         #  @param Folder target folder
12839         #  @ingroup l1_publish_data
12840         def PutListToFolder(self, ListOfSO, Folder):
12841             """
12842             Move list of objects to the specified folder
12843             
12844             Parameters:
12845                 ListOfSO list of objects to move
12846                 Folder target folder
12847             """
12848             self.MoveListToFolder(ListOfSO, Folder)
12849             pass
12850
12851         ## @addtogroup l2_field
12852         ## @{
12853
12854         ## Creates a field
12855         #  @param shape the shape the field lies on
12856         #  @param name the field name
12857         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12858         #  @param dimension dimension of the shape the field lies on
12859         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12860         #  @param componentNames names of components
12861         #  @return a created field
12862         def CreateField(self, shape, name, type, dimension, componentNames):
12863             """
12864             Creates a field
12865
12866             Parameters:
12867                 shape the shape the field lies on
12868                 name  the field name
12869                 type  type of field data
12870                 dimension dimension of the shape the field lies on
12871                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12872                 componentNames names of components
12873             
12874             Returns:
12875                 a created field
12876             """
12877             if isinstance( type, int ):
12878                 if type < 0 or type > 3:
12879                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12880                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12881
12882             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12883             RaiseIfFailed("CreateField", self.FieldOp)
12884             global geom
12885             geom._autoPublish( f, "", name)
12886             return f
12887
12888         ## Removes a field from the GEOM component
12889         #  @param field the field to remove
12890         def RemoveField(self, field):
12891             "Removes a field from the GEOM component"
12892             global geom
12893             if isinstance( field, GEOM._objref_GEOM_Field ):
12894                 geom.RemoveObject( field )
12895             elif isinstance( field, geomField ):
12896                 geom.RemoveObject( field.field )
12897             else:
12898                 raise RuntimeError, "RemoveField() : the object is not a field"
12899             return
12900
12901         ## Returns number of fields on a shape
12902         def CountFields(self, shape):
12903             "Returns number of fields on a shape"
12904             nb = self.FieldOp.CountFields( shape )
12905             RaiseIfFailed("CountFields", self.FieldOp)
12906             return nb
12907
12908         ## Returns all fields on a shape
12909         def GetFields(self, shape):
12910             "Returns all fields on a shape"
12911             ff = self.FieldOp.GetFields( shape )
12912             RaiseIfFailed("GetFields", self.FieldOp)
12913             return ff
12914
12915         ## Returns a field on a shape by its name
12916         def GetField(self, shape, name):
12917             "Returns a field on a shape by its name"
12918             f = self.FieldOp.GetField( shape, name )
12919             RaiseIfFailed("GetField", self.FieldOp)
12920             return f
12921
12922         # end of l2_field
12923         ## @}
12924
12925
12926 import omniORB
12927 # Register the new proxy for GEOM_Gen
12928 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12929
12930
12931 ## Field on Geometry
12932 #  @ingroup l2_field
12933 class geomField( GEOM._objref_GEOM_Field ):
12934
12935     def __init__(self):
12936         GEOM._objref_GEOM_Field.__init__(self)
12937         self.field = GEOM._objref_GEOM_Field
12938         return
12939
12940     ## Returns the shape the field lies on
12941     def getShape(self):
12942         "Returns the shape the field lies on"
12943         return self.field.GetShape(self)
12944
12945     ## Returns the field name
12946     def getName(self):
12947         "Returns the field name"
12948         return self.field.GetName(self)
12949
12950     ## Returns type of field data as integer [0-3]
12951     def getType(self):
12952         "Returns type of field data"
12953         return self.field.GetDataType(self)._v
12954
12955     ## Returns type of field data:
12956     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12957     def getTypeEnum(self):
12958         "Returns type of field data"
12959         return self.field.GetDataType(self)
12960
12961     ## Returns dimension of the shape the field lies on:
12962     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12963     def getDimension(self):
12964         """Returns dimension of the shape the field lies on:
12965         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
12966         return self.field.GetDimension(self)
12967
12968     ## Returns names of components
12969     def getComponents(self):
12970         "Returns names of components"
12971         return self.field.GetComponents(self)
12972
12973     ## Adds a time step to the field
12974     #  @param step the time step number futher used as the step identifier
12975     #  @param stamp the time step time
12976     #  @param values the values of the time step
12977     def addStep(self, step, stamp, values):
12978         "Adds a time step to the field"
12979         stp = self.field.AddStep( self, step, stamp )
12980         if not stp:
12981             raise RuntimeError, \
12982                   "Field.addStep() : Error: step %s already exists in this field"%step
12983         global geom
12984         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
12985         self.setValues( step, values )
12986         return stp
12987
12988     ## Remove a time step from the field
12989     def removeStep(self,step):
12990         "Remove a time step from the field"
12991         stepSO = None
12992         try:
12993             stepObj = self.field.GetStep( self, step )
12994             if stepObj:
12995                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
12996         except:
12997             #import traceback
12998             #traceback.print_exc()
12999             pass
13000         self.field.RemoveStep( self, step )
13001         if stepSO:
13002             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13003         return
13004
13005     ## Returns number of time steps in the field
13006     def countSteps(self):
13007         "Returns number of time steps in the field"
13008         return self.field.CountSteps(self)
13009
13010     ## Returns a list of time step IDs in the field
13011     def getSteps(self):
13012         "Returns a list of time step IDs in the field"
13013         return self.field.GetSteps(self)
13014
13015     ## Returns a time step by its ID
13016     def getStep(self,step):
13017         "Returns a time step by its ID"
13018         stp = self.field.GetStep(self, step)
13019         if not stp:
13020             raise RuntimeError, "Step %s is missing from this field"%step
13021         return stp
13022
13023     ## Returns the time of the field step
13024     def getStamp(self,step):
13025         "Returns the time of the field step"
13026         return self.getStep(step).GetStamp()
13027
13028     ## Changes the time of the field step
13029     def setStamp(self, step, stamp):
13030         "Changes the time of the field step"
13031         return self.getStep(step).SetStamp(stamp)
13032
13033     ## Returns values of the field step
13034     def getValues(self, step):
13035         "Returns values of the field step"
13036         return self.getStep(step).GetValues()
13037
13038     ## Changes values of the field step
13039     def setValues(self, step, values):
13040         "Changes values of the field step"
13041         stp = self.getStep(step)
13042         errBeg = "Field.setValues(values) : Error: "
13043         try:
13044             ok = stp.SetValues( values )
13045         except Exception, e:
13046             excStr = str(e)
13047             if excStr.find("WrongPythonType") > 0:
13048                 raise RuntimeError, errBeg +\
13049                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13050             raise RuntimeError, errBeg + str(e)
13051         if not ok:
13052             nbOK = self.field.GetArraySize(self)
13053             nbKO = len(values)
13054             if nbOK != nbKO:
13055                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13056             else:
13057                 raise RuntimeError, errBeg + "failed"
13058         return
13059
13060     pass # end of class geomField
13061
13062 # Register the new proxy for GEOM_Field
13063 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13064
13065
13066 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13067 #  interface to GEOM operations.
13068 #
13069 #  Typical use is:
13070 #  \code
13071 #    import salome
13072 #    salome.salome_init()
13073 #    from salome.geom import geomBuilder
13074 #    geompy = geomBuilder.New(salome.myStudy)
13075 #  \endcode
13076 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13077 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13078 #  @return geomBuilder instance
13079 def New( study, instance=None):
13080     """
13081     Create a new geomBuilder instance.The geomBuilder class provides the Python
13082     interface to GEOM operations.
13083
13084     Typical use is:
13085         import salome
13086         salome.salome_init()
13087         from salome.geom import geomBuilder
13088         geompy = geomBuilder.New(salome.myStudy)
13089
13090     Parameters:
13091         study     SALOME study, generally obtained by salome.myStudy.
13092         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13093     Returns:
13094         geomBuilder instance
13095     """
13096     #print "New geomBuilder ", study, instance
13097     global engine
13098     global geom
13099     global doLcc
13100     engine = instance
13101     if engine is None:
13102       doLcc = True
13103     geom = geomBuilder()
13104     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13105     geom.init_geom(study)
13106     return geom