]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
0e8257dec7d0b19e64e5e0608f521142fe376d73
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2015  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 geomBuilder geomBuilder Python module
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, theName="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, theName=("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 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Pack an argument into a list
521 def ToList( arg ):
522     if isinstance( arg, list ):
523         return arg
524     if hasattr( arg, "__getitem__" ):
525         return list( arg )
526     return [ arg ]
527
528 ## Information about closed/unclosed state of shell or wire
529 #  @ingroup l1_geomBuilder_auxiliary
530 class info:
531     """
532     Information about closed/unclosed state of shell or wire
533     """
534     UNKNOWN  = 0
535     CLOSED   = 1
536     UNCLOSED = 2
537
538 ## Private class used to bind calls of plugin operations to geomBuilder
539 class PluginOperation:
540   def __init__(self, operation, function):
541     self.operation = operation
542     self.function = function
543     pass
544
545   @ManageTransactions("operation")
546   def __call__(self, *args):
547     res = self.function(self.operation, *args)
548     RaiseIfFailed(self.function.__name__, self.operation)
549     return res
550
551 # Warning: geom is a singleton
552 geom = None
553 engine = None
554 doLcc = False
555 created = False
556
557 class geomBuilder(object, GEOM._objref_GEOM_Gen):
558
559         ## Enumeration ShapeType as a dictionary. \n
560         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
561         #  @ingroup l1_geomBuilder_auxiliary
562         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
563
564         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
565         #  and a list of parameters, describing the shape.
566         #  List of parameters, describing the shape:
567         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
568         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
569         #
570         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
571         #
572         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
573         #
574         #  - SPHERE:       [xc yc zc            R]
575         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
576         #  - BOX:          [xc yc zc                      ax ay az]
577         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
578         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
579         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
580         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
581         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
582         #
583         #  - SPHERE2D:     [xc yc zc            R]
584         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
585         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
586         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
587         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
588         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
589         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
590         #  - PLANE:        [xo yo zo  dx dy dz]
591         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
592         #  - FACE:                                       [nb_edges  nb_vertices]
593         #
594         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
595         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
596         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
597         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
598         #  - LINE:         [xo yo zo  dx dy dz]
599         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
600         #  - EDGE:                                                 [nb_vertices]
601         #
602         #  - VERTEX:       [x  y  z]
603         #  @ingroup l1_geomBuilder_auxiliary
604         kind = GEOM.GEOM_IKindOfShape
605
606         def __new__(cls):
607             global engine
608             global geom
609             global doLcc
610             global created
611             #print "==== __new__ ", engine, geom, doLcc, created
612             if geom is None:
613                 # geom engine is either retrieved from engine, or created
614                 geom = engine
615                 # Following test avoids a recursive loop
616                 if doLcc:
617                     if geom is not None:
618                         # geom engine not created: existing engine found
619                         doLcc = False
620                     if doLcc and not created:
621                         doLcc = False
622                         # FindOrLoadComponent called:
623                         # 1. CORBA resolution of server
624                         # 2. the __new__ method is called again
625                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
626                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
627                         #print "====1 ",geom
628                 else:
629                     # FindOrLoadComponent not called
630                     if geom is None:
631                         # geomBuilder instance is created from lcc.FindOrLoadComponent
632                         #print "==== super ", engine, geom, doLcc, created
633                         geom = super(geomBuilder,cls).__new__(cls)
634                         #print "====2 ",geom
635                     else:
636                         # geom engine not created: existing engine found
637                         #print "==== existing ", engine, geom, doLcc, created
638                         pass
639                 #print "return geom 1 ", geom
640                 return geom
641
642             #print "return geom 2 ", geom
643             return geom
644
645         def __init__(self):
646             global created
647             #print "-------- geomBuilder __init__ --- ", created, self
648             if not created:
649               created = True
650               GEOM._objref_GEOM_Gen.__init__(self)
651               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
652               self.myBuilder = None
653               self.myStudyId = 0
654               self.father    = None
655
656               self.BasicOp  = None
657               self.CurvesOp = None
658               self.PrimOp   = None
659               self.ShapesOp = None
660               self.HealOp   = None
661               self.InsertOp = None
662               self.BoolOp   = None
663               self.TrsfOp   = None
664               self.LocalOp  = None
665               self.MeasuOp  = None
666               self.BlocksOp = None
667               self.GroupOp  = None
668               self.FieldOp  = None
669             pass
670
671         ## Process object publication in the study, as follows:
672         #  - if @a theName is specified (not None), the object is published in the study
673         #    with this name, not taking into account "auto-publishing" option;
674         #  - if @a theName is NOT specified, the object is published in the study
675         #    (using default name, which can be customized using @a theDefaultName parameter)
676         #    only if auto-publishing is switched on.
677         #
678         #  @param theObj  object, a subject for publishing
679         #  @param theName object name for study
680         #  @param theDefaultName default name for the auto-publishing
681         #
682         #  @sa addToStudyAuto()
683         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
684             # ---
685             def _item_name(_names, _defname, _idx=-1):
686                 if not _names: _names = _defname
687                 if type(_names) in [types.ListType, types.TupleType]:
688                     if _idx >= 0:
689                         if _idx >= len(_names) or not _names[_idx]:
690                             if type(_defname) not in [types.ListType, types.TupleType]:
691                                 _name = "%s_%d"%(_defname, _idx+1)
692                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
693                                 _name = _defname[_idx]
694                             else:
695                                 _name = "%noname_%d"%(dn, _idx+1)
696                             pass
697                         else:
698                             _name = _names[_idx]
699                         pass
700                     else:
701                         # must be wrong  usage
702                         _name = _names[0]
703                     pass
704                 else:
705                     if _idx >= 0:
706                         _name = "%s_%d"%(_names, _idx+1)
707                     else:
708                         _name = _names
709                     pass
710                 return _name
711             # ---
712             def _publish( _name, _obj ):
713                 fatherObj = None
714                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
715                     fatherObj = _obj.GetShape()
716                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
717                     fatherObj = _obj.GetField()
718                 elif not _obj.IsMainShape():
719                     fatherObj = _obj.GetMainShape()
720                     pass
721                 if fatherObj and fatherObj.GetStudyEntry():
722                     self.addToStudyInFather(fatherObj, _obj, _name)
723                 else:
724                     self.addToStudy(_obj, _name)
725                     pass
726                 return
727             # ---
728             if not theObj:
729                 return # null object
730             if not theName and not self.myMaxNbSubShapesAllowed:
731                 return # nothing to do: auto-publishing is disabled
732             if not theName and not theDefaultName:
733                 return # neither theName nor theDefaultName is given
734             import types
735             if type(theObj) in [types.ListType, types.TupleType]:
736                 # list of objects is being published
737                 idx = 0
738                 for obj in theObj:
739                     if not obj: continue # bad object
740                     name = _item_name(theName, theDefaultName, idx)
741                     _publish( name, obj )
742                     idx = idx+1
743                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
744                     pass
745                 pass
746             else:
747                 # single object is published
748                 name = _item_name(theName, theDefaultName)
749                 _publish( name, theObj )
750             pass
751
752         ## @addtogroup l1_geomBuilder_auxiliary
753         ## @{
754         def init_geom(self,theStudy):
755             self.myStudy = theStudy
756             self.myStudyId = self.myStudy._get_StudyId()
757             self.myBuilder = self.myStudy.NewBuilder()
758             self.father = self.myStudy.FindComponent("GEOM")
759             notebook.myStudy = theStudy
760             if self.father is None:
761                 self.father = self.myBuilder.NewComponent("GEOM")
762                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
763                 FName = A1._narrow(SALOMEDS.AttributeName)
764                 FName.SetValue("Geometry")
765                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
766                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
767                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
768                 self.myBuilder.DefineComponentInstance(self.father,self)
769                 pass
770             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
771             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
772             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
773             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
774             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
775             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
776             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
777             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
778             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
779             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
780             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
781             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
782             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
783
784             # set GEOM as root in the use case tree
785             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
786             self.myUseCaseBuilder.SetRootCurrent()
787             self.myUseCaseBuilder.Append(self.father)
788
789             # load data from the study file, if necessary
790             self.myBuilder.LoadWith(self.father, self)
791             pass
792
793         def GetPluginOperations(self, studyID, libraryName):
794             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
795             return op
796
797         ## Enable / disable results auto-publishing
798         #
799         #  The automatic publishing is managed in the following way:
800         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
801         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
802         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
803         #  value passed as parameter has the same effect.
804         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
805         #  maximum number of sub-shapes allowed for publishing is set to specified value.
806         #
807         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
808         #  @ingroup l1_publish_data
809         def addToStudyAuto(self, maxNbSubShapes=-1):
810             """
811             Enable / disable results auto-publishing
812
813             The automatic publishing is managed in the following way:
814             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
815             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
816             maximum number of sub-shapes allowed for publishing is unlimited; any negative
817             value passed as parameter has the same effect.
818             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
819             maximum number of sub-shapes allowed for publishing is set to this value.
820
821             Parameters:
822                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
823
824             Example of usage:
825                 geompy.addToStudyAuto()   # enable auto-publishing
826                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
827                 geompy.addToStudyAuto(0)  # disable auto-publishing
828             """
829             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
830             pass
831
832         ## Dump component to the Python script
833         #  This method overrides IDL function to allow default values for the parameters.
834         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
835             """
836             Dump component to the Python script
837             This method overrides IDL function to allow default values for the parameters.
838             """
839             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
840
841         ## Get name for sub-shape aSubObj of shape aMainObj
842         #
843         # @ref swig_SubShapeName "Example"
844         @ManageTransactions("ShapesOp")
845         def SubShapeName(self,aSubObj, aMainObj):
846             """
847             Get name for sub-shape aSubObj of shape aMainObj
848             """
849             # Example: see GEOM_TestAll.py
850
851             #aSubId  = orb.object_to_string(aSubObj)
852             #aMainId = orb.object_to_string(aMainObj)
853             #index = gg.getIndexTopology(aSubId, aMainId)
854             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
855             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
856             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
857             return name
858
859         ## Publish in study aShape with name aName
860         #
861         #  \param aShape the shape to be published
862         #  \param aName  the name for the shape
863         #  \param doRestoreSubShapes if True, finds and publishes also
864         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
865         #         and published sub-shapes of arguments
866         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
867         #                                                  these arguments description
868         #  \return study entry of the published shape in form of string
869         #
870         #  @ingroup l1_publish_data
871         #  @ref swig_all_addtostudy "Example"
872         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
873                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
874             """
875             Publish in study aShape with name aName
876
877             Parameters:
878                 aShape the shape to be published
879                 aName  the name for the shape
880                 doRestoreSubShapes if True, finds and publishes also
881                                    sub-shapes of aShape, corresponding to its arguments
882                                    and published sub-shapes of arguments
883                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
884                                                          these arguments description
885
886             Returns:
887                 study entry of the published shape in form of string
888
889             Example of usage:
890                 id_block1 = geompy.addToStudy(Block1, "Block 1")
891             """
892             # Example: see GEOM_TestAll.py
893             try:
894                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
895                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
896                 if doRestoreSubShapes:
897                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
898                                             theFindMethod, theInheritFirstArg, True )
899             except:
900                 print "addToStudy() failed"
901                 return ""
902             return aShape.GetStudyEntry()
903
904         ## Publish in study aShape with name aName as sub-object of previously published aFather
905         #  \param aFather previously published object
906         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
907         #  \param aName  the name for the shape
908         #
909         #  \return study entry of the published shape in form of string
910         #
911         #  @ingroup l1_publish_data
912         #  @ref swig_all_addtostudyInFather "Example"
913         def addToStudyInFather(self, aFather, aShape, aName):
914             """
915             Publish in study aShape with name aName as sub-object of previously published aFather
916
917             Parameters:
918                 aFather previously published object
919                 aShape the shape to be published as sub-object of aFather
920                 aName  the name for the shape
921
922             Returns:
923                 study entry of the published shape in form of string
924             """
925             # Example: see GEOM_TestAll.py
926             try:
927                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
928                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
929             except:
930                 print "addToStudyInFather() failed"
931                 return ""
932             return aShape.GetStudyEntry()
933
934         ## Unpublish object in study
935         #
936         #  \param obj the object to be unpublished
937         def hideInStudy(self, obj):
938             """
939             Unpublish object in study
940
941             Parameters:
942                 obj the object to be unpublished
943             """
944             ior = salome.orb.object_to_string(obj)
945             aSObject = self.myStudy.FindObjectIOR(ior)
946             if aSObject is not None:
947                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
948                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
949                 drwAttribute.SetDrawable(False)
950                 # hide references if any
951                 vso = self.myStudy.FindDependances(aSObject);
952                 for refObj in vso :
953                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
954                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
955                     drwAttribute.SetDrawable(False)
956                     pass
957                 pass
958
959         # end of l1_geomBuilder_auxiliary
960         ## @}
961
962         ## @addtogroup l3_restore_ss
963         ## @{
964
965         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
966         #  To be used from python scripts out of addToStudy() (non-default usage)
967         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
968         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
969         #                   If this list is empty, all operation arguments will be published
970         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
971         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
972         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
973         #                            Do not publish sub-shapes in place of arguments, but only
974         #                            in place of sub-shapes of the first argument,
975         #                            because the whole shape corresponds to the first argument.
976         #                            Mainly to be used after transformations, but it also can be
977         #                            usefull after partition with one object shape, and some other
978         #                            operations, where only the first argument has to be considered.
979         #                            If theObject has only one argument shape, this flag is automatically
980         #                            considered as True, not regarding really passed value.
981         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
982         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
983         #  \return list of published sub-shapes
984         #
985         #  @ref tui_restore_prs_params "Example"
986         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
987                               theInheritFirstArg=False, theAddPrefix=True):
988             """
989             Publish sub-shapes, standing for arguments and sub-shapes of arguments
990             To be used from python scripts out of geompy.addToStudy (non-default usage)
991
992             Parameters:
993                 theObject published GEOM.GEOM_Object, arguments of which will be published
994                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
995                           If this list is empty, all operation arguments will be published
996                 theFindMethod method to search sub-shapes, corresponding to arguments and
997                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
998                 theInheritFirstArg set properties of the first argument for theObject.
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                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1008                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1009             Returns:
1010                 list of published sub-shapes
1011             """
1012             # Example: see GEOM_TestAll.py
1013             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1014                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1015
1016         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1017         #  To be used from python scripts out of addToStudy() (non-default usage)
1018         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1019         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1020         #                   If this list is empty, all operation arguments will be published
1021         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1022         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1023         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1024         #                            Do not publish sub-shapes in place of arguments, but only
1025         #                            in place of sub-shapes of the first argument,
1026         #                            because the whole shape corresponds to the first argument.
1027         #                            Mainly to be used after transformations, but it also can be
1028         #                            usefull after partition with one object shape, and some other
1029         #                            operations, where only the first argument has to be considered.
1030         #                            If theObject has only one argument shape, this flag is automatically
1031         #                            considered as True, not regarding really passed value.
1032         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1033         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1034         #  \return list of published sub-shapes
1035         #
1036         #  @ref tui_restore_prs_params "Example"
1037         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1038                                    theInheritFirstArg=False, theAddPrefix=True):
1039             """
1040             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1041             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1042
1043             Parameters:
1044                 theObject published GEOM.GEOM_Object, arguments of which will be published
1045                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1046                           If this list is empty, all operation arguments will be published
1047                 theFindMethod method to search sub-shapes, corresponding to arguments and
1048                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1049                 theInheritFirstArg set properties of the first argument for theObject.
1050                                    Do not publish sub-shapes in place of arguments, but only
1051                                    in place of sub-shapes of the first argument,
1052                                    because the whole shape corresponds to the first argument.
1053                                    Mainly to be used after transformations, but it also can be
1054                                    usefull after partition with one object shape, and some other
1055                                    operations, where only the first argument has to be considered.
1056                                    If theObject has only one argument shape, this flag is automatically
1057                                    considered as True, not regarding really passed value.
1058                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1059                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1060
1061             Returns:
1062                 list of published sub-shapes
1063             """
1064             # Example: see GEOM_TestAll.py
1065             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1066                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1067
1068         # end of l3_restore_ss
1069         ## @}
1070
1071         ## @addtogroup l3_basic_go
1072         ## @{
1073
1074         ## Create point by three coordinates.
1075         #  @param theX The X coordinate of the point.
1076         #  @param theY The Y coordinate of the point.
1077         #  @param theZ The Z coordinate of the point.
1078         #  @param theName Object name; when specified, this parameter is used
1079         #         for result publication in the study. Otherwise, if automatic
1080         #         publication is switched on, default value is used for result name.
1081         #
1082         #  @return New GEOM.GEOM_Object, containing the created point.
1083         #
1084         #  @ref tui_creation_point "Example"
1085         @ManageTransactions("BasicOp")
1086         def MakeVertex(self, theX, theY, theZ, theName=None):
1087             """
1088             Create point by three coordinates.
1089
1090             Parameters:
1091                 theX The X coordinate of the point.
1092                 theY The Y coordinate of the point.
1093                 theZ The Z coordinate of the point.
1094                 theName Object name; when specified, this parameter is used
1095                         for result publication in the study. Otherwise, if automatic
1096                         publication is switched on, default value is used for result name.
1097
1098             Returns:
1099                 New GEOM.GEOM_Object, containing the created point.
1100             """
1101             # Example: see GEOM_TestAll.py
1102             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1103             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1104             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1105             anObj.SetParameters(Parameters)
1106             self._autoPublish(anObj, theName, "vertex")
1107             return anObj
1108
1109         ## Create a point, distant from the referenced point
1110         #  on the given distances along the coordinate axes.
1111         #  @param theReference The referenced point.
1112         #  @param theX Displacement from the referenced point along OX axis.
1113         #  @param theY Displacement from the referenced point along OY axis.
1114         #  @param theZ Displacement from the referenced point along OZ axis.
1115         #  @param theName Object name; when specified, this parameter is used
1116         #         for result publication in the study. Otherwise, if automatic
1117         #         publication is switched on, default value is used for result name.
1118         #
1119         #  @return New GEOM.GEOM_Object, containing the created point.
1120         #
1121         #  @ref tui_creation_point "Example"
1122         @ManageTransactions("BasicOp")
1123         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1124             """
1125             Create a point, distant from the referenced point
1126             on the given distances along the coordinate axes.
1127
1128             Parameters:
1129                 theReference The referenced point.
1130                 theX Displacement from the referenced point along OX axis.
1131                 theY Displacement from the referenced point along OY axis.
1132                 theZ Displacement from the referenced point along OZ axis.
1133                 theName Object name; when specified, this parameter is used
1134                         for result publication in the study. Otherwise, if automatic
1135                         publication is switched on, default value is used for result name.
1136
1137             Returns:
1138                 New GEOM.GEOM_Object, containing the created point.
1139             """
1140             # Example: see GEOM_TestAll.py
1141             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1142             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1143             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1144             anObj.SetParameters(Parameters)
1145             self._autoPublish(anObj, theName, "vertex")
1146             return anObj
1147
1148         ## Create a point, corresponding to the given parameter on the given curve.
1149         #  @param theRefCurve The referenced curve.
1150         #  @param theParameter Value of parameter on the referenced curve.
1151         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1152         #         to take the curve's orientation into account for the
1153         #         operation. I.e. if this flag is set, the results for the same
1154         #         parameters (except the value 0.5) is different for forward
1155         #         and reversed curves. If it is not set the result is the same.
1156         #  @param theName Object name; when specified, this parameter is used
1157         #         for result publication in the study. Otherwise, if automatic
1158         #         publication is switched on, default value is used for result name.
1159         #
1160         #  @return New GEOM.GEOM_Object, containing the created point.
1161         #
1162         #  @ref tui_creation_point "Example"
1163         @ManageTransactions("BasicOp")
1164         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1165                               takeOrientationIntoAccount=False, theName=None):
1166             """
1167             Create a point, corresponding to the given parameter on the given curve.
1168
1169             Parameters:
1170                 theRefCurve The referenced curve.
1171                 theParameter Value of parameter on the referenced curve.
1172                 takeOrientationIntoAccount flag that tells if it is necessary
1173                         to take the curve's orientation into account for the
1174                         operation. I.e. if this flag is set, the results for
1175                         the same parameters (except the value 0.5) is different
1176                         for forward and reversed curves. If it is not set
1177                         the result is the same.
1178                 theName Object name; when specified, this parameter is used
1179                         for result publication in the study. Otherwise, if automatic
1180                         publication is switched on, default value is used for result name.
1181
1182             Returns:
1183                 New GEOM.GEOM_Object, containing the created point.
1184
1185             Example of usage:
1186                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1187             """
1188             # Example: see GEOM_TestAll.py
1189             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1190                 theParameter, takeOrientationIntoAccount)
1191             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1192                                                   takeOrientationIntoAccount)
1193             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1194             anObj.SetParameters(Parameters)
1195             self._autoPublish(anObj, theName, "vertex")
1196             return anObj
1197
1198         ## Create a point by projection give coordinates on the given curve
1199         #  @param theRefCurve The referenced curve.
1200         #  @param theX X-coordinate in 3D space
1201         #  @param theY Y-coordinate in 3D space
1202         #  @param theZ Z-coordinate in 3D space
1203         #  @param theName Object name; when specified, this parameter is used
1204         #         for result publication in the study. Otherwise, if automatic
1205         #         publication is switched on, default value is used for result name.
1206         #
1207         #  @return New GEOM.GEOM_Object, containing the created point.
1208         #
1209         #  @ref tui_creation_point "Example"
1210         @ManageTransactions("BasicOp")
1211         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1212             """
1213             Create a point by projection give coordinates on the given curve
1214
1215             Parameters:
1216                 theRefCurve The referenced curve.
1217                 theX X-coordinate in 3D space
1218                 theY Y-coordinate in 3D space
1219                 theZ Z-coordinate in 3D space
1220                 theName Object name; when specified, this parameter is used
1221                         for result publication in the study. Otherwise, if automatic
1222                         publication is switched on, default value is used for result name.
1223
1224             Returns:
1225                 New GEOM.GEOM_Object, containing the created point.
1226
1227             Example of usage:
1228                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1229             """
1230             # Example: see GEOM_TestAll.py
1231             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1232             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1233             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1234             anObj.SetParameters(Parameters)
1235             self._autoPublish(anObj, theName, "vertex")
1236             return anObj
1237
1238         ## Create a point, corresponding to the given length on the given curve.
1239         #  @param theRefCurve The referenced curve.
1240         #  @param theLength Length on the referenced curve. It can be negative.
1241         #  @param theStartPoint Point allowing to choose the direction for the calculation
1242         #                       of the length. If None, start from the first point of theRefCurve.
1243         #  @param theName Object name; when specified, this parameter is used
1244         #         for result publication in the study. Otherwise, if automatic
1245         #         publication is switched on, default value is used for result name.
1246         #
1247         #  @return New GEOM.GEOM_Object, containing the created point.
1248         #
1249         #  @ref tui_creation_point "Example"
1250         @ManageTransactions("BasicOp")
1251         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1252             """
1253             Create a point, corresponding to the given length on the given curve.
1254
1255             Parameters:
1256                 theRefCurve The referenced curve.
1257                 theLength Length on the referenced curve. It can be negative.
1258                 theStartPoint Point allowing to choose the direction for the calculation
1259                               of the length. If None, start from the first point of theRefCurve.
1260                 theName Object name; when specified, this parameter is used
1261                         for result publication in the study. Otherwise, if automatic
1262                         publication is switched on, default value is used for result name.
1263
1264             Returns:
1265                 New GEOM.GEOM_Object, containing the created point.
1266             """
1267             # Example: see GEOM_TestAll.py
1268             theLength, Parameters = ParseParameters(theLength)
1269             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1270             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1271             anObj.SetParameters(Parameters)
1272             self._autoPublish(anObj, theName, "vertex")
1273             return anObj
1274
1275         ## Create a point, corresponding to the given parameters on the
1276         #    given surface.
1277         #  @param theRefSurf The referenced surface.
1278         #  @param theUParameter Value of U-parameter on the referenced surface.
1279         #  @param theVParameter Value of V-parameter on the referenced surface.
1280         #  @param theName Object name; when specified, this parameter is used
1281         #         for result publication in the study. Otherwise, if automatic
1282         #         publication is switched on, default value is used for result name.
1283         #
1284         #  @return New GEOM.GEOM_Object, containing the created point.
1285         #
1286         #  @ref swig_MakeVertexOnSurface "Example"
1287         @ManageTransactions("BasicOp")
1288         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1289             """
1290             Create a point, corresponding to the given parameters on the
1291             given surface.
1292
1293             Parameters:
1294                 theRefSurf The referenced surface.
1295                 theUParameter Value of U-parameter on the referenced surface.
1296                 theVParameter Value of V-parameter on the referenced surface.
1297                 theName Object name; when specified, this parameter is used
1298                         for result publication in the study. Otherwise, if automatic
1299                         publication is switched on, default value is used for result name.
1300
1301             Returns:
1302                 New GEOM.GEOM_Object, containing the created point.
1303
1304             Example of usage:
1305                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1306             """
1307             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1308             # Example: see GEOM_TestAll.py
1309             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1310             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1311             anObj.SetParameters(Parameters);
1312             self._autoPublish(anObj, theName, "vertex")
1313             return anObj
1314
1315         ## Create a point by projection give coordinates on the given surface
1316         #  @param theRefSurf The referenced surface.
1317         #  @param theX X-coordinate in 3D space
1318         #  @param theY Y-coordinate in 3D space
1319         #  @param theZ Z-coordinate in 3D space
1320         #  @param theName Object name; when specified, this parameter is used
1321         #         for result publication in the study. Otherwise, if automatic
1322         #         publication is switched on, default value is used for result name.
1323         #
1324         #  @return New GEOM.GEOM_Object, containing the created point.
1325         #
1326         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1327         @ManageTransactions("BasicOp")
1328         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1329             """
1330             Create a point by projection give coordinates on the given surface
1331
1332             Parameters:
1333                 theRefSurf The referenced surface.
1334                 theX X-coordinate in 3D space
1335                 theY Y-coordinate in 3D space
1336                 theZ Z-coordinate in 3D space
1337                 theName Object name; when specified, this parameter is used
1338                         for result publication in the study. Otherwise, if automatic
1339                         publication is switched on, default value is used for result name.
1340
1341             Returns:
1342                 New GEOM.GEOM_Object, containing the created point.
1343
1344             Example of usage:
1345                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1346             """
1347             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1348             # Example: see GEOM_TestAll.py
1349             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1350             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1351             anObj.SetParameters(Parameters);
1352             self._autoPublish(anObj, theName, "vertex")
1353             return anObj
1354
1355         ## Create a point, which lays on the given face.
1356         #  The point will lay in arbitrary place of the face.
1357         #  The only condition on it is a non-zero distance to the face boundary.
1358         #  Such point can be used to uniquely identify the face inside any
1359         #  shape in case, when the shape does not contain overlapped faces.
1360         #  @param theFace The referenced face.
1361         #  @param theName Object name; when specified, this parameter is used
1362         #         for result publication in the study. Otherwise, if automatic
1363         #         publication is switched on, default value is used for result name.
1364         #
1365         #  @return New GEOM.GEOM_Object, containing the created point.
1366         #
1367         #  @ref swig_MakeVertexInsideFace "Example"
1368         @ManageTransactions("BasicOp")
1369         def MakeVertexInsideFace (self, theFace, theName=None):
1370             """
1371             Create a point, which lays on the given face.
1372             The point will lay in arbitrary place of the face.
1373             The only condition on it is a non-zero distance to the face boundary.
1374             Such point can be used to uniquely identify the face inside any
1375             shape in case, when the shape does not contain overlapped faces.
1376
1377             Parameters:
1378                 theFace The referenced face.
1379                 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             Returns:
1384                 New GEOM.GEOM_Object, containing the created point.
1385
1386             Example of usage:
1387                 p_on_face = geompy.MakeVertexInsideFace(Face)
1388             """
1389             # Example: see GEOM_TestAll.py
1390             anObj = self.BasicOp.MakePointOnFace(theFace)
1391             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1392             self._autoPublish(anObj, theName, "vertex")
1393             return anObj
1394
1395         ## Create a point on intersection of two lines.
1396         #  @param theRefLine1, theRefLine2 The referenced lines.
1397         #  @param theName Object name; when specified, this parameter is used
1398         #         for result publication in the study. Otherwise, if automatic
1399         #         publication is switched on, default value is used for result name.
1400         #
1401         #  @return New GEOM.GEOM_Object, containing the created point.
1402         #
1403         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1404         @ManageTransactions("BasicOp")
1405         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1406             """
1407             Create a point on intersection of two lines.
1408
1409             Parameters:
1410                 theRefLine1, theRefLine2 The referenced lines.
1411                 theName Object name; when specified, this parameter is used
1412                         for result publication in the study. Otherwise, if automatic
1413                         publication is switched on, default value is used for result name.
1414
1415             Returns:
1416                 New GEOM.GEOM_Object, containing the created point.
1417             """
1418             # Example: see GEOM_TestAll.py
1419             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1420             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1421             self._autoPublish(anObj, theName, "vertex")
1422             return anObj
1423
1424         ## Create a tangent, corresponding to the given parameter on the given curve.
1425         #  @param theRefCurve The referenced curve.
1426         #  @param theParameter Value of parameter on the referenced curve.
1427         #  @param theName Object name; when specified, this parameter is used
1428         #         for result publication in the study. Otherwise, if automatic
1429         #         publication is switched on, default value is used for result name.
1430         #
1431         #  @return New GEOM.GEOM_Object, containing the created tangent.
1432         #
1433         #  @ref swig_MakeTangentOnCurve "Example"
1434         @ManageTransactions("BasicOp")
1435         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1436             """
1437             Create a tangent, corresponding to the given parameter on the given curve.
1438
1439             Parameters:
1440                 theRefCurve The referenced curve.
1441                 theParameter Value of parameter on the referenced curve.
1442                 theName Object name; when specified, this parameter is used
1443                         for result publication in the study. Otherwise, if automatic
1444                         publication is switched on, default value is used for result name.
1445
1446             Returns:
1447                 New GEOM.GEOM_Object, containing the created tangent.
1448
1449             Example of usage:
1450                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1451             """
1452             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1453             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1454             self._autoPublish(anObj, theName, "tangent")
1455             return anObj
1456
1457         ## Create a tangent plane, corresponding to the given parameter on the given face.
1458         #  @param theFace The face for which tangent plane should be built.
1459         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1460         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1461         #  @param theTrimSize the size of plane.
1462         #  @param theName Object name; when specified, this parameter is used
1463         #         for result publication in the study. Otherwise, if automatic
1464         #         publication is switched on, default value is used for result name.
1465         #
1466         #  @return New GEOM.GEOM_Object, containing the created tangent.
1467         #
1468         #  @ref swig_MakeTangentPlaneOnFace "Example"
1469         @ManageTransactions("BasicOp")
1470         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1471             """
1472             Create a tangent plane, corresponding to the given parameter on the given face.
1473
1474             Parameters:
1475                 theFace The face for which tangent plane should be built.
1476                 theParameterV vertical value of the center point (0.0 - 1.0).
1477                 theParameterU horisontal value of the center point (0.0 - 1.0).
1478                 theTrimSize the size of plane.
1479                 theName Object name; when specified, this parameter is used
1480                         for result publication in the study. Otherwise, if automatic
1481                         publication is switched on, default value is used for result name.
1482
1483            Returns:
1484                 New GEOM.GEOM_Object, containing the created tangent.
1485
1486            Example of usage:
1487                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1488             """
1489             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1490             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1491             self._autoPublish(anObj, theName, "tangent")
1492             return anObj
1493
1494         ## Create a vector with the given components.
1495         #  @param theDX X component of the vector.
1496         #  @param theDY Y component of the vector.
1497         #  @param theDZ Z component of the vector.
1498         #  @param theName Object name; when specified, this parameter is used
1499         #         for result publication in the study. Otherwise, if automatic
1500         #         publication is switched on, default value is used for result name.
1501         #
1502         #  @return New GEOM.GEOM_Object, containing the created vector.
1503         #
1504         #  @ref tui_creation_vector "Example"
1505         @ManageTransactions("BasicOp")
1506         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1507             """
1508             Create a vector with the given components.
1509
1510             Parameters:
1511                 theDX X component of the vector.
1512                 theDY Y component of the vector.
1513                 theDZ Z component of the vector.
1514                 theName Object name; when specified, this parameter is used
1515                         for result publication in the study. Otherwise, if automatic
1516                         publication is switched on, default value is used for result name.
1517
1518             Returns:
1519                 New GEOM.GEOM_Object, containing the created vector.
1520             """
1521             # Example: see GEOM_TestAll.py
1522             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1523             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1524             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1525             anObj.SetParameters(Parameters)
1526             self._autoPublish(anObj, theName, "vector")
1527             return anObj
1528
1529         ## Create a vector between two points.
1530         #  @param thePnt1 Start point for the vector.
1531         #  @param thePnt2 End point for the vector.
1532         #  @param theName Object name; when specified, this parameter is used
1533         #         for result publication in the study. Otherwise, if automatic
1534         #         publication is switched on, default value is used for result name.
1535         #
1536         #  @return New GEOM.GEOM_Object, containing the created vector.
1537         #
1538         #  @ref tui_creation_vector "Example"
1539         @ManageTransactions("BasicOp")
1540         def MakeVector(self, thePnt1, thePnt2, theName=None):
1541             """
1542             Create a vector between two points.
1543
1544             Parameters:
1545                 thePnt1 Start point for the vector.
1546                 thePnt2 End point for the vector.
1547                 theName Object name; when specified, this parameter is used
1548                         for result publication in the study. Otherwise, if automatic
1549                         publication is switched on, default value is used for result name.
1550
1551             Returns:
1552                 New GEOM.GEOM_Object, containing the created vector.
1553             """
1554             # Example: see GEOM_TestAll.py
1555             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1556             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1557             self._autoPublish(anObj, theName, "vector")
1558             return anObj
1559
1560         ## Create a line, passing through the given point
1561         #  and parrallel to the given direction
1562         #  @param thePnt Point. The resulting line will pass through it.
1563         #  @param theDir Direction. The resulting line will be parallel to it.
1564         #  @param theName Object name; when specified, this parameter is used
1565         #         for result publication in the study. Otherwise, if automatic
1566         #         publication is switched on, default value is used for result name.
1567         #
1568         #  @return New GEOM.GEOM_Object, containing the created line.
1569         #
1570         #  @ref tui_creation_line "Example"
1571         @ManageTransactions("BasicOp")
1572         def MakeLine(self, thePnt, theDir, theName=None):
1573             """
1574             Create a line, passing through the given point
1575             and parrallel to the given direction
1576
1577             Parameters:
1578                 thePnt Point. The resulting line will pass through it.
1579                 theDir Direction. The resulting line will be parallel to it.
1580                 theName Object name; when specified, this parameter is used
1581                         for result publication in the study. Otherwise, if automatic
1582                         publication is switched on, default value is used for result name.
1583
1584             Returns:
1585                 New GEOM.GEOM_Object, containing the created line.
1586             """
1587             # Example: see GEOM_TestAll.py
1588             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1589             RaiseIfFailed("MakeLine", self.BasicOp)
1590             self._autoPublish(anObj, theName, "line")
1591             return anObj
1592
1593         ## Create a line, passing through the given points
1594         #  @param thePnt1 First of two points, defining the line.
1595         #  @param thePnt2 Second of two points, defining the line.
1596         #  @param theName Object name; when specified, this parameter is used
1597         #         for result publication in the study. Otherwise, if automatic
1598         #         publication is switched on, default value is used for result name.
1599         #
1600         #  @return New GEOM.GEOM_Object, containing the created line.
1601         #
1602         #  @ref tui_creation_line "Example"
1603         @ManageTransactions("BasicOp")
1604         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1605             """
1606             Create a line, passing through the given points
1607
1608             Parameters:
1609                 thePnt1 First of two points, defining the line.
1610                 thePnt2 Second of two points, defining the line.
1611                 theName Object name; when specified, this parameter is used
1612                         for result publication in the study. Otherwise, if automatic
1613                         publication is switched on, default value is used for result name.
1614
1615             Returns:
1616                 New GEOM.GEOM_Object, containing the created line.
1617             """
1618             # Example: see GEOM_TestAll.py
1619             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1620             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1621             self._autoPublish(anObj, theName, "line")
1622             return anObj
1623
1624         ## Create a line on two faces intersection.
1625         #  @param theFace1 First of two faces, defining the line.
1626         #  @param theFace2 Second of two faces, defining the line.
1627         #  @param theName Object name; when specified, this parameter is used
1628         #         for result publication in the study. Otherwise, if automatic
1629         #         publication is switched on, default value is used for result name.
1630         #
1631         #  @return New GEOM.GEOM_Object, containing the created line.
1632         #
1633         #  @ref swig_MakeLineTwoFaces "Example"
1634         @ManageTransactions("BasicOp")
1635         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1636             """
1637             Create a line on two faces intersection.
1638
1639             Parameters:
1640                 theFace1 First of two faces, defining the line.
1641                 theFace2 Second of two faces, defining the line.
1642                 theName Object name; when specified, this parameter is used
1643                         for result publication in the study. Otherwise, if automatic
1644                         publication is switched on, default value is used for result name.
1645
1646             Returns:
1647                 New GEOM.GEOM_Object, containing the created line.
1648             """
1649             # Example: see GEOM_TestAll.py
1650             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1651             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1652             self._autoPublish(anObj, theName, "line")
1653             return anObj
1654
1655         ## Create a plane, passing through the given point
1656         #  and normal to the given vector.
1657         #  @param thePnt Point, the plane has to pass through.
1658         #  @param theVec Vector, defining the plane normal direction.
1659         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1660         #  @param theName Object name; when specified, this parameter is used
1661         #         for result publication in the study. Otherwise, if automatic
1662         #         publication is switched on, default value is used for result name.
1663         #
1664         #  @return New GEOM.GEOM_Object, containing the created plane.
1665         #
1666         #  @ref tui_creation_plane "Example"
1667         @ManageTransactions("BasicOp")
1668         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1669             """
1670             Create a plane, passing through the given point
1671             and normal to the given vector.
1672
1673             Parameters:
1674                 thePnt Point, the plane has to pass through.
1675                 theVec Vector, defining the plane normal direction.
1676                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1677                 theName Object name; when specified, this parameter is used
1678                         for result publication in the study. Otherwise, if automatic
1679                         publication is switched on, default value is used for result name.
1680
1681             Returns:
1682                 New GEOM.GEOM_Object, containing the created plane.
1683             """
1684             # Example: see GEOM_TestAll.py
1685             theTrimSize, Parameters = ParseParameters(theTrimSize);
1686             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1687             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1688             anObj.SetParameters(Parameters)
1689             self._autoPublish(anObj, theName, "plane")
1690             return anObj
1691
1692         ## Create a plane, passing through the three given points
1693         #  @param thePnt1 First of three points, defining the plane.
1694         #  @param thePnt2 Second of three points, defining the plane.
1695         #  @param thePnt3 Fird of three points, defining the plane.
1696         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1697         #  @param theName Object name; when specified, this parameter is used
1698         #         for result publication in the study. Otherwise, if automatic
1699         #         publication is switched on, default value is used for result name.
1700         #
1701         #  @return New GEOM.GEOM_Object, containing the created plane.
1702         #
1703         #  @ref tui_creation_plane "Example"
1704         @ManageTransactions("BasicOp")
1705         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1706             """
1707             Create a plane, passing through the three given points
1708
1709             Parameters:
1710                 thePnt1 First of three points, defining the plane.
1711                 thePnt2 Second of three points, defining the plane.
1712                 thePnt3 Fird of three points, defining the plane.
1713                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1714                 theName Object name; when specified, this parameter is used
1715                         for result publication in the study. Otherwise, if automatic
1716                         publication is switched on, default value is used for result name.
1717
1718             Returns:
1719                 New GEOM.GEOM_Object, containing the created plane.
1720             """
1721             # Example: see GEOM_TestAll.py
1722             theTrimSize, Parameters = ParseParameters(theTrimSize);
1723             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1724             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1725             anObj.SetParameters(Parameters)
1726             self._autoPublish(anObj, theName, "plane")
1727             return anObj
1728
1729         ## Create a plane, similar to the existing one, but with another size of representing face.
1730         #  @param theFace Referenced plane or LCS(Marker).
1731         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1732         #  @param theName Object name; when specified, this parameter is used
1733         #         for result publication in the study. Otherwise, if automatic
1734         #         publication is switched on, default value is used for result name.
1735         #
1736         #  @return New GEOM.GEOM_Object, containing the created plane.
1737         #
1738         #  @ref tui_creation_plane "Example"
1739         @ManageTransactions("BasicOp")
1740         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1741             """
1742             Create a plane, similar to the existing one, but with another size of representing face.
1743
1744             Parameters:
1745                 theFace Referenced plane or LCS(Marker).
1746                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1747                 theName Object name; when specified, this parameter is used
1748                         for result publication in the study. Otherwise, if automatic
1749                         publication is switched on, default value is used for result name.
1750
1751             Returns:
1752                 New GEOM.GEOM_Object, containing the created plane.
1753             """
1754             # Example: see GEOM_TestAll.py
1755             theTrimSize, Parameters = ParseParameters(theTrimSize);
1756             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1757             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1758             anObj.SetParameters(Parameters)
1759             self._autoPublish(anObj, theName, "plane")
1760             return anObj
1761
1762         ## Create a plane, passing through the 2 vectors
1763         #  with center in a start point of the first vector.
1764         #  @param theVec1 Vector, defining center point and plane direction.
1765         #  @param theVec2 Vector, defining the plane normal direction.
1766         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1767         #  @param theName Object name; when specified, this parameter is used
1768         #         for result publication in the study. Otherwise, if automatic
1769         #         publication is switched on, default value is used for result name.
1770         #
1771         #  @return New GEOM.GEOM_Object, containing the created plane.
1772         #
1773         #  @ref tui_creation_plane "Example"
1774         @ManageTransactions("BasicOp")
1775         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1776             """
1777             Create a plane, passing through the 2 vectors
1778             with center in a start point of the first vector.
1779
1780             Parameters:
1781                 theVec1 Vector, defining center point and plane direction.
1782                 theVec2 Vector, defining the plane normal direction.
1783                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1784                 theName Object name; when specified, this parameter is used
1785                         for result publication in the study. Otherwise, if automatic
1786                         publication is switched on, default value is used for result name.
1787
1788             Returns:
1789                 New GEOM.GEOM_Object, containing the created plane.
1790             """
1791             # Example: see GEOM_TestAll.py
1792             theTrimSize, Parameters = ParseParameters(theTrimSize);
1793             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1794             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1795             anObj.SetParameters(Parameters)
1796             self._autoPublish(anObj, theName, "plane")
1797             return anObj
1798
1799         ## Create a plane, based on a Local coordinate system.
1800         #  @param theLCS  coordinate system, defining plane.
1801         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1802         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1803         #  @param theName Object name; when specified, this parameter is used
1804         #         for result publication in the study. Otherwise, if automatic
1805         #         publication is switched on, default value is used for result name.
1806         #
1807         #  @return New GEOM.GEOM_Object, containing the created plane.
1808         #
1809         #  @ref tui_creation_plane "Example"
1810         @ManageTransactions("BasicOp")
1811         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1812             """
1813             Create a plane, based on a Local coordinate system.
1814
1815            Parameters:
1816                 theLCS  coordinate system, defining plane.
1817                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1818                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1819                 theName Object name; when specified, this parameter is used
1820                         for result publication in the study. Otherwise, if automatic
1821                         publication is switched on, default value is used for result name.
1822
1823             Returns:
1824                 New GEOM.GEOM_Object, containing the created plane.
1825             """
1826             # Example: see GEOM_TestAll.py
1827             theTrimSize, Parameters = ParseParameters(theTrimSize);
1828             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1829             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1830             anObj.SetParameters(Parameters)
1831             self._autoPublish(anObj, theName, "plane")
1832             return anObj
1833
1834         ## Create a local coordinate system.
1835         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1836         #  @param XDX,XDY,XDZ Three components of OX direction
1837         #  @param YDX,YDY,YDZ Three components of OY direction
1838         #  @param theName Object name; when specified, this parameter is used
1839         #         for result publication in the study. Otherwise, if automatic
1840         #         publication is switched on, default value is used for result name.
1841         #
1842         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1843         #
1844         #  @ref swig_MakeMarker "Example"
1845         @ManageTransactions("BasicOp")
1846         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1847             """
1848             Create a local coordinate system.
1849
1850             Parameters:
1851                 OX,OY,OZ Three coordinates of coordinate system origin.
1852                 XDX,XDY,XDZ Three components of OX direction
1853                 YDX,YDY,YDZ Three components of OY 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             # Example: see GEOM_TestAll.py
1862             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1863             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1864             RaiseIfFailed("MakeMarker", self.BasicOp)
1865             anObj.SetParameters(Parameters)
1866             self._autoPublish(anObj, theName, "lcs")
1867             return anObj
1868
1869         ## Create a local coordinate system from shape.
1870         #  @param theShape The initial shape to detect the coordinate system.
1871         #  @param theName Object name; when specified, this parameter is used
1872         #         for result publication in the study. Otherwise, if automatic
1873         #         publication is switched on, default value is used for result name.
1874         #
1875         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1876         #
1877         #  @ref tui_creation_lcs "Example"
1878         @ManageTransactions("BasicOp")
1879         def MakeMarkerFromShape(self, theShape, theName=None):
1880             """
1881             Create a local coordinate system from shape.
1882
1883             Parameters:
1884                 theShape The initial shape to detect the coordinate system.
1885                 theName Object name; when specified, this parameter is used
1886                         for result publication in the study. Otherwise, if automatic
1887                         publication is switched on, default value is used for result name.
1888
1889             Returns:
1890                 New GEOM.GEOM_Object, containing the created coordinate system.
1891             """
1892             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1893             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1894             self._autoPublish(anObj, theName, "lcs")
1895             return anObj
1896
1897         ## Create a local coordinate system from point and two vectors.
1898         #  @param theOrigin Point of coordinate system origin.
1899         #  @param theXVec Vector of X direction
1900         #  @param theYVec Vector of Y direction
1901         #  @param theName Object name; when specified, this parameter is used
1902         #         for result publication in the study. Otherwise, if automatic
1903         #         publication is switched on, default value is used for result name.
1904         #
1905         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1906         #
1907         #  @ref tui_creation_lcs "Example"
1908         @ManageTransactions("BasicOp")
1909         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1910             """
1911             Create a local coordinate system from point and two vectors.
1912
1913             Parameters:
1914                 theOrigin Point of coordinate system origin.
1915                 theXVec Vector of X direction
1916                 theYVec Vector of Y direction
1917                 theName Object name; when specified, this parameter is used
1918                         for result publication in the study. Otherwise, if automatic
1919                         publication is switched on, default value is used for result name.
1920
1921             Returns:
1922                 New GEOM.GEOM_Object, containing the created coordinate system.
1923
1924             """
1925             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1926             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1927             self._autoPublish(anObj, theName, "lcs")
1928             return anObj
1929
1930         # end of l3_basic_go
1931         ## @}
1932
1933         ## @addtogroup l4_curves
1934         ## @{
1935
1936         ##  Create an arc of circle, passing through three given points.
1937         #  @param thePnt1 Start point of the arc.
1938         #  @param thePnt2 Middle point of the arc.
1939         #  @param thePnt3 End point of the arc.
1940         #  @param theName Object name; when specified, this parameter is used
1941         #         for result publication in the study. Otherwise, if automatic
1942         #         publication is switched on, default value is used for result name.
1943         #
1944         #  @return New GEOM.GEOM_Object, containing the created arc.
1945         #
1946         #  @ref swig_MakeArc "Example"
1947         @ManageTransactions("CurvesOp")
1948         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1949             """
1950             Create an arc of circle, passing through three given points.
1951
1952             Parameters:
1953                 thePnt1 Start point of the arc.
1954                 thePnt2 Middle point of the arc.
1955                 thePnt3 End point of the arc.
1956                 theName Object name; when specified, this parameter is used
1957                         for result publication in the study. Otherwise, if automatic
1958                         publication is switched on, default value is used for result name.
1959
1960             Returns:
1961                 New GEOM.GEOM_Object, containing the created arc.
1962             """
1963             # Example: see GEOM_TestAll.py
1964             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1965             RaiseIfFailed("MakeArc", self.CurvesOp)
1966             self._autoPublish(anObj, theName, "arc")
1967             return anObj
1968
1969         ##  Create an arc of circle from a center and 2 points.
1970         #  @param thePnt1 Center of the arc
1971         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1972         #  @param thePnt3 End point of the arc (Gives also a direction)
1973         #  @param theSense Orientation of the arc
1974         #  @param theName Object name; when specified, this parameter is used
1975         #         for result publication in the study. Otherwise, if automatic
1976         #         publication is switched on, default value is used for result name.
1977         #
1978         #  @return New GEOM.GEOM_Object, containing the created arc.
1979         #
1980         #  @ref swig_MakeArc "Example"
1981         @ManageTransactions("CurvesOp")
1982         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1983             """
1984             Create an arc of circle from a center and 2 points.
1985
1986             Parameters:
1987                 thePnt1 Center of the arc
1988                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1989                 thePnt3 End point of the arc (Gives also a direction)
1990                 theSense Orientation of the arc
1991                 theName Object name; when specified, this parameter is used
1992                         for result publication in the study. Otherwise, if automatic
1993                         publication is switched on, default value is used for result name.
1994
1995             Returns:
1996                 New GEOM.GEOM_Object, containing the created arc.
1997             """
1998             # Example: see GEOM_TestAll.py
1999             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2000             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2001             self._autoPublish(anObj, theName, "arc")
2002             return anObj
2003
2004         ##  Create an arc of ellipse, of center and two points.
2005         #  @param theCenter Center of the arc.
2006         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2007         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2008         #  @param theName Object name; when specified, this parameter is used
2009         #         for result publication in the study. Otherwise, if automatic
2010         #         publication is switched on, default value is used for result name.
2011         #
2012         #  @return New GEOM.GEOM_Object, containing the created arc.
2013         #
2014         #  @ref swig_MakeArc "Example"
2015         @ManageTransactions("CurvesOp")
2016         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2017             """
2018             Create an arc of ellipse, of center and two points.
2019
2020             Parameters:
2021                 theCenter Center of the arc.
2022                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2023                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2024                 theName Object name; when specified, this parameter is used
2025                         for result publication in the study. Otherwise, if automatic
2026                         publication is switched on, default value is used for result name.
2027
2028             Returns:
2029                 New GEOM.GEOM_Object, containing the created arc.
2030             """
2031             # Example: see GEOM_TestAll.py
2032             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2033             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2034             self._autoPublish(anObj, theName, "arc")
2035             return anObj
2036
2037         ## Create a circle with given center, normal vector and radius.
2038         #  @param thePnt Circle center.
2039         #  @param theVec Vector, normal to the plane of the circle.
2040         #  @param theR Circle radius.
2041         #  @param theName Object name; when specified, this parameter is used
2042         #         for result publication in the study. Otherwise, if automatic
2043         #         publication is switched on, default value is used for result name.
2044         #
2045         #  @return New GEOM.GEOM_Object, containing the created circle.
2046         #
2047         #  @ref tui_creation_circle "Example"
2048         @ManageTransactions("CurvesOp")
2049         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2050             """
2051             Create a circle with given center, normal vector and radius.
2052
2053             Parameters:
2054                 thePnt Circle center.
2055                 theVec Vector, normal to the plane of the circle.
2056                 theR Circle radius.
2057                 theName Object name; when specified, this parameter is used
2058                         for result publication in the study. Otherwise, if automatic
2059                         publication is switched on, default value is used for result name.
2060
2061             Returns:
2062                 New GEOM.GEOM_Object, containing the created circle.
2063             """
2064             # Example: see GEOM_TestAll.py
2065             theR, Parameters = ParseParameters(theR)
2066             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2067             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2068             anObj.SetParameters(Parameters)
2069             self._autoPublish(anObj, theName, "circle")
2070             return anObj
2071
2072         ## Create a circle with given radius.
2073         #  Center of the circle will be in the origin of global
2074         #  coordinate system and normal vector will be codirected with Z axis
2075         #  @param theR Circle radius.
2076         #  @param theName Object name; when specified, this parameter is used
2077         #         for result publication in the study. Otherwise, if automatic
2078         #         publication is switched on, default value is used for result name.
2079         #
2080         #  @return New GEOM.GEOM_Object, containing the created circle.
2081         @ManageTransactions("CurvesOp")
2082         def MakeCircleR(self, theR, theName=None):
2083             """
2084             Create a circle with given radius.
2085             Center of the circle will be in the origin of global
2086             coordinate system and normal vector will be codirected with Z axis
2087
2088             Parameters:
2089                 theR Circle radius.
2090                 theName Object name; when specified, this parameter is used
2091                         for result publication in the study. Otherwise, if automatic
2092                         publication is switched on, default value is used for result name.
2093
2094             Returns:
2095                 New GEOM.GEOM_Object, containing the created circle.
2096             """
2097             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2098             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2099             self._autoPublish(anObj, theName, "circle")
2100             return anObj
2101
2102         ## Create a circle, passing through three given points
2103         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2104         #  @param theName Object name; when specified, this parameter is used
2105         #         for result publication in the study. Otherwise, if automatic
2106         #         publication is switched on, default value is used for result name.
2107         #
2108         #  @return New GEOM.GEOM_Object, containing the created circle.
2109         #
2110         #  @ref tui_creation_circle "Example"
2111         @ManageTransactions("CurvesOp")
2112         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2113             """
2114             Create a circle, passing through three given points
2115
2116             Parameters:
2117                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2118                 theName Object name; when specified, this parameter is used
2119                         for result publication in the study. Otherwise, if automatic
2120                         publication is switched on, default value is used for result name.
2121
2122             Returns:
2123                 New GEOM.GEOM_Object, containing the created circle.
2124             """
2125             # Example: see GEOM_TestAll.py
2126             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2127             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2128             self._autoPublish(anObj, theName, "circle")
2129             return anObj
2130
2131         ## Create a circle, with given point1 as center,
2132         #  passing through the point2 as radius and laying in the plane,
2133         #  defined by all three given points.
2134         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2135         #  @param theName Object name; when specified, this parameter is used
2136         #         for result publication in the study. Otherwise, if automatic
2137         #         publication is switched on, default value is used for result name.
2138         #
2139         #  @return New GEOM.GEOM_Object, containing the created circle.
2140         #
2141         #  @ref swig_MakeCircle "Example"
2142         @ManageTransactions("CurvesOp")
2143         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2144             """
2145             Create a circle, with given point1 as center,
2146             passing through the point2 as radius and laying in the plane,
2147             defined by all three given points.
2148
2149             Parameters:
2150                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2151                 theName Object name; when specified, this parameter is used
2152                         for result publication in the study. Otherwise, if automatic
2153                         publication is switched on, default value is used for result name.
2154
2155             Returns:
2156                 New GEOM.GEOM_Object, containing the created circle.
2157             """
2158             # Example: see GEOM_example6.py
2159             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2160             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2161             self._autoPublish(anObj, theName, "circle")
2162             return anObj
2163
2164         ## Create an ellipse with given center, normal vector and radiuses.
2165         #  @param thePnt Ellipse center.
2166         #  @param theVec Vector, normal to the plane of the ellipse.
2167         #  @param theRMajor Major ellipse radius.
2168         #  @param theRMinor Minor ellipse radius.
2169         #  @param theVecMaj Vector, direction of the ellipse's main axis.
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 ellipse.
2175         #
2176         #  @ref tui_creation_ellipse "Example"
2177         @ManageTransactions("CurvesOp")
2178         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2179             """
2180             Create an ellipse with given center, normal vector and radiuses.
2181
2182             Parameters:
2183                 thePnt Ellipse center.
2184                 theVec Vector, normal to the plane of the ellipse.
2185                 theRMajor Major ellipse radius.
2186                 theRMinor Minor ellipse radius.
2187                 theVecMaj Vector, direction of the ellipse's main axis.
2188                 theName Object name; when specified, this parameter is used
2189                         for result publication in the study. Otherwise, if automatic
2190                         publication is switched on, default value is used for result name.
2191
2192             Returns:
2193                 New GEOM.GEOM_Object, containing the created ellipse.
2194             """
2195             # Example: see GEOM_TestAll.py
2196             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2197             if theVecMaj is not None:
2198                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2199             else:
2200                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2201                 pass
2202             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2203             anObj.SetParameters(Parameters)
2204             self._autoPublish(anObj, theName, "ellipse")
2205             return anObj
2206
2207         ## Create an ellipse with given radiuses.
2208         #  Center of the ellipse will be in the origin of global
2209         #  coordinate system and normal vector will be codirected with Z axis
2210         #  @param theRMajor Major ellipse radius.
2211         #  @param theRMinor Minor ellipse radius.
2212         #  @param theName Object name; when specified, this parameter is used
2213         #         for result publication in the study. Otherwise, if automatic
2214         #         publication is switched on, default value is used for result name.
2215         #
2216         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2217         @ManageTransactions("CurvesOp")
2218         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2219             """
2220             Create an ellipse with given radiuses.
2221             Center of the ellipse will be in the origin of global
2222             coordinate system and normal vector will be codirected with Z axis
2223
2224             Parameters:
2225                 theRMajor Major ellipse radius.
2226                 theRMinor Minor ellipse radius.
2227                 theName Object name; when specified, this parameter is used
2228                         for result publication in the study. Otherwise, if automatic
2229                         publication is switched on, default value is used for result name.
2230
2231             Returns:
2232             New GEOM.GEOM_Object, containing the created ellipse.
2233             """
2234             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2235             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2236             self._autoPublish(anObj, theName, "ellipse")
2237             return anObj
2238
2239         ## Create a polyline on the set of points.
2240         #  @param thePoints Sequence of points for the polyline.
2241         #  @param theIsClosed If True, build a closed wire.
2242         #  @param theName Object name; when specified, this parameter is used
2243         #         for result publication in the study. Otherwise, if automatic
2244         #         publication is switched on, default value is used for result name.
2245         #
2246         #  @return New GEOM.GEOM_Object, containing the created polyline.
2247         #
2248         #  @ref tui_creation_curve "Example"
2249         @ManageTransactions("CurvesOp")
2250         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2251             """
2252             Create a polyline on the set of points.
2253
2254             Parameters:
2255                 thePoints Sequence of points for the polyline.
2256                 theIsClosed If True, build a closed wire.
2257                 theName Object name; when specified, this parameter is used
2258                         for result publication in the study. Otherwise, if automatic
2259                         publication is switched on, default value is used for result name.
2260
2261             Returns:
2262                 New GEOM.GEOM_Object, containing the created polyline.
2263             """
2264             # Example: see GEOM_TestAll.py
2265             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2266             RaiseIfFailed("MakePolyline", self.CurvesOp)
2267             self._autoPublish(anObj, theName, "polyline")
2268             return anObj
2269
2270         ## Create bezier curve on the set of points.
2271         #  @param thePoints Sequence of points for the bezier curve.
2272         #  @param theIsClosed If True, build a closed curve.
2273         #  @param theName Object name; when specified, this parameter is used
2274         #         for result publication in the study. Otherwise, if automatic
2275         #         publication is switched on, default value is used for result name.
2276         #
2277         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2278         #
2279         #  @ref tui_creation_curve "Example"
2280         @ManageTransactions("CurvesOp")
2281         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2282             """
2283             Create bezier curve on the set of points.
2284
2285             Parameters:
2286                 thePoints Sequence of points for the bezier curve.
2287                 theIsClosed If True, build a closed curve.
2288                 theName Object name; when specified, this parameter is used
2289                         for result publication in the study. Otherwise, if automatic
2290                         publication is switched on, default value is used for result name.
2291
2292             Returns:
2293                 New GEOM.GEOM_Object, containing the created bezier curve.
2294             """
2295             # Example: see GEOM_TestAll.py
2296             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2297             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2298             self._autoPublish(anObj, theName, "bezier")
2299             return anObj
2300
2301         ## Create B-Spline curve on the set of points.
2302         #  @param thePoints Sequence of points for the B-Spline curve.
2303         #  @param theIsClosed If True, build a closed curve.
2304         #  @param theDoReordering If TRUE, the algo does not follow the order of
2305         #                         \a thePoints but searches for the closest vertex.
2306         #  @param theName Object name; when specified, this parameter is used
2307         #         for result publication in the study. Otherwise, if automatic
2308         #         publication is switched on, default value is used for result name.
2309         #
2310         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2311         #
2312         #  @ref tui_creation_curve "Example"
2313         @ManageTransactions("CurvesOp")
2314         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2315             """
2316             Create B-Spline curve on the set of points.
2317
2318             Parameters:
2319                 thePoints Sequence of points for the B-Spline curve.
2320                 theIsClosed If True, build a closed curve.
2321                 theDoReordering If True, the algo does not follow the order of
2322                                 thePoints but searches for the closest vertex.
2323                 theName Object name; when specified, this parameter is used
2324                         for result publication in the study. Otherwise, if automatic
2325                         publication is switched on, default value is used for result name.
2326
2327             Returns:
2328                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2329             """
2330             # Example: see GEOM_TestAll.py
2331             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2332             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2333             self._autoPublish(anObj, theName, "bspline")
2334             return anObj
2335
2336         ## Create B-Spline curve on the set of points.
2337         #  @param thePoints Sequence of points for the B-Spline curve.
2338         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2339         #  @param theLastVec Vector object, defining the curve direction at its last point.
2340         #  @param theName Object name; when specified, this parameter is used
2341         #         for result publication in the study. Otherwise, if automatic
2342         #         publication is switched on, default value is used for result name.
2343         #
2344         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2345         #
2346         #  @ref tui_creation_curve "Example"
2347         @ManageTransactions("CurvesOp")
2348         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2349             """
2350             Create B-Spline curve on the set of points.
2351
2352             Parameters:
2353                 thePoints Sequence of points for the B-Spline curve.
2354                 theFirstVec Vector object, defining the curve direction at its first point.
2355                 theLastVec Vector object, defining the curve direction at its last point.
2356                 theName Object name; when specified, this parameter is used
2357                         for result publication in the study. Otherwise, if automatic
2358                         publication is switched on, default value is used for result name.
2359
2360             Returns:
2361                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2362             """
2363             # Example: see GEOM_TestAll.py
2364             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2365             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2366             self._autoPublish(anObj, theName, "bspline")
2367             return anObj
2368
2369         ## Creates a curve using the parametric definition of the basic points.
2370         #  @param thexExpr parametric equation of the coordinates X.
2371         #  @param theyExpr parametric equation of the coordinates Y.
2372         #  @param thezExpr parametric equation of the coordinates Z.
2373         #  @param theParamMin the minimal value of the parameter.
2374         #  @param theParamMax the maximum value of the parameter.
2375         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2376         #  @param theCurveType the type of the curve,
2377         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2378         #  @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.
2379         #  @param theName Object name; when specified, this parameter is used
2380         #         for result publication in the study. Otherwise, if automatic
2381         #         publication is switched on, default value is used for result name.
2382         #
2383         #  @return New GEOM.GEOM_Object, containing the created curve.
2384         #
2385         #  @ref tui_creation_curve "Example"
2386         @ManageTransactions("CurvesOp")
2387         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2388                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2389             """
2390             Creates a curve using the parametric definition of the basic points.
2391
2392             Parameters:
2393                 thexExpr parametric equation of the coordinates X.
2394                 theyExpr parametric equation of the coordinates Y.
2395                 thezExpr parametric equation of the coordinates Z.
2396                 theParamMin the minimal value of the parameter.
2397                 theParamMax the maximum value of the parameter.
2398                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2399                 theCurveType the type of the curve,
2400                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2401                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2402                              method is used which can lead to a bug.
2403                 theName Object name; when specified, this parameter is used
2404                         for result publication in the study. Otherwise, if automatic
2405                         publication is switched on, default value is used for result name.
2406
2407             Returns:
2408                 New GEOM.GEOM_Object, containing the created curve.
2409             """
2410             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2411             if theNewMethod:
2412               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2413             else:
2414               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2415             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2416             anObj.SetParameters(Parameters)
2417             self._autoPublish(anObj, theName, "curve")
2418             return anObj
2419
2420         ## Create an isoline curve on a face.
2421         #  @param theFace the face for which an isoline is created.
2422         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2423         #         creation.
2424         #  @param theParameter the U parameter for U-isoline or V parameter
2425         #         for V-isoline.
2426         #  @param theName Object name; when specified, this parameter is used
2427         #         for result publication in the study. Otherwise, if automatic
2428         #         publication is switched on, default value is used for result name.
2429         #
2430         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2431         #          a compound of edges.
2432         #
2433         #  @ref tui_creation_curve "Example"
2434         @ManageTransactions("CurvesOp")
2435         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2436             """
2437             Create an isoline curve on a face.
2438
2439             Parameters:
2440                 theFace the face for which an isoline is created.
2441                 IsUIsoline True for U-isoline creation; False for V-isoline
2442                            creation.
2443                 theParameter the U parameter for U-isoline or V parameter
2444                              for V-isoline.
2445                 theName Object name; when specified, this parameter is used
2446                         for result publication in the study. Otherwise, if automatic
2447                         publication is switched on, default value is used for result name.
2448
2449             Returns:
2450                 New GEOM.GEOM_Object, containing the created isoline edge or a
2451                 compound of edges.
2452             """
2453             # Example: see GEOM_TestAll.py
2454             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2455             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2456             if IsUIsoline:
2457                 self._autoPublish(anObj, theName, "U-Isoline")
2458             else:
2459                 self._autoPublish(anObj, theName, "V-Isoline")
2460             return anObj
2461
2462         # end of l4_curves
2463         ## @}
2464
2465         ## @addtogroup l3_sketcher
2466         ## @{
2467
2468         ## Create a sketcher (wire or face), following the textual description,
2469         #  passed through <VAR>theCommand</VAR> argument. \n
2470         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2471         #  Format of the description string have to be the following:
2472         #
2473         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2474         #
2475         #  Where:
2476         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2477         #  - CMD is one of
2478         #     - "R angle" : Set the direction by angle
2479         #     - "D dx dy" : Set the direction by DX & DY
2480         #     .
2481         #       \n
2482         #     - "TT x y" : Create segment by point at X & Y
2483         #     - "T dx dy" : Create segment by point with DX & DY
2484         #     - "L length" : Create segment by direction & Length
2485         #     - "IX x" : Create segment by direction & Intersect. X
2486         #     - "IY y" : Create segment by direction & Intersect. Y
2487         #     .
2488         #       \n
2489         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2490         #     - "AA x y": Create arc by point at X & Y
2491         #     - "A dx dy" : Create arc by point with DX & DY
2492         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2493         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2494         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2495         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2496         #     .
2497         #       \n
2498         #     - "WW" : Close Wire (to finish)
2499         #     - "WF" : Close Wire and build face (to finish)
2500         #     .
2501         #        \n
2502         #  - Flag1 (= reverse) is 0 or 2 ...
2503         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2504         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2505         #     .
2506         #        \n
2507         #  - Flag2 (= control tolerance) is 0 or 1 ...
2508         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2509         #     - if 1 the wire is built only if the end point is on the arc
2510         #       with a tolerance of 10^-7 on the distance else the creation fails
2511         #
2512         #  @param theCommand String, defining the sketcher in local
2513         #                    coordinates of the working plane.
2514         #  @param theWorkingPlane Nine double values, defining origin,
2515         #                         OZ and OX directions of the working plane.
2516         #  @param theName Object name; when specified, this parameter is used
2517         #         for result publication in the study. Otherwise, if automatic
2518         #         publication is switched on, default value is used for result name.
2519         #
2520         #  @return New GEOM.GEOM_Object, containing the created wire.
2521         #
2522         #  @ref tui_sketcher_page "Example"
2523         @ManageTransactions("CurvesOp")
2524         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2525             """
2526             Create a sketcher (wire or face), following the textual description, passed
2527             through theCommand argument.
2528             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2529             Format of the description string have to be the following:
2530                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2531             Where:
2532             - x1, y1 are coordinates of the first sketcher point (zero by default),
2533             - CMD is one of
2534                - "R angle" : Set the direction by angle
2535                - "D dx dy" : Set the direction by DX & DY
2536
2537                - "TT x y" : Create segment by point at X & Y
2538                - "T dx dy" : Create segment by point with DX & DY
2539                - "L length" : Create segment by direction & Length
2540                - "IX x" : Create segment by direction & Intersect. X
2541                - "IY y" : Create segment by direction & Intersect. Y
2542
2543                - "C radius length" : Create arc by direction, radius and length(in degree)
2544                - "AA x y": Create arc by point at X & Y
2545                - "A dx dy" : Create arc by point with DX & DY
2546                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2547                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2548                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2549                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2550
2551                - "WW" : Close Wire (to finish)
2552                - "WF" : Close Wire and build face (to finish)
2553
2554             - Flag1 (= reverse) is 0 or 2 ...
2555                - if 0 the drawn arc is the one of lower angle (< Pi)
2556                - if 2 the drawn arc ius the one of greater angle (> Pi)
2557
2558             - Flag2 (= control tolerance) is 0 or 1 ...
2559                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2560                - if 1 the wire is built only if the end point is on the arc
2561                  with a tolerance of 10^-7 on the distance else the creation fails
2562
2563             Parameters:
2564                 theCommand String, defining the sketcher in local
2565                            coordinates of the working plane.
2566                 theWorkingPlane Nine double values, defining origin,
2567                                 OZ and OX directions of the working plane.
2568                 theName Object name; when specified, this parameter is used
2569                         for result publication in the study. Otherwise, if automatic
2570                         publication is switched on, default value is used for result name.
2571
2572             Returns:
2573                 New GEOM.GEOM_Object, containing the created wire.
2574             """
2575             # Example: see GEOM_TestAll.py
2576             theCommand,Parameters = ParseSketcherCommand(theCommand)
2577             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2578             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2579             anObj.SetParameters(Parameters)
2580             self._autoPublish(anObj, theName, "wire")
2581             return anObj
2582
2583         ## Create a sketcher (wire or face), following the textual description,
2584         #  passed through <VAR>theCommand</VAR> argument. \n
2585         #  For format of the description string see MakeSketcher() method.\n
2586         #  @param theCommand String, defining the sketcher in local
2587         #                    coordinates of the working plane.
2588         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2589         #  @param theName Object name; when specified, this parameter is used
2590         #         for result publication in the study. Otherwise, if automatic
2591         #         publication is switched on, default value is used for result name.
2592         #
2593         #  @return New GEOM.GEOM_Object, containing the created wire.
2594         #
2595         #  @ref tui_sketcher_page "Example"
2596         @ManageTransactions("CurvesOp")
2597         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2598             """
2599             Create a sketcher (wire or face), following the textual description,
2600             passed through theCommand argument.
2601             For format of the description string see geompy.MakeSketcher() method.
2602
2603             Parameters:
2604                 theCommand String, defining the sketcher in local
2605                            coordinates of the working plane.
2606                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2607                 theName Object name; when specified, this parameter is used
2608                         for result publication in the study. Otherwise, if automatic
2609                         publication is switched on, default value is used for result name.
2610
2611             Returns:
2612                 New GEOM.GEOM_Object, containing the created wire.
2613             """
2614             theCommand,Parameters = ParseSketcherCommand(theCommand)
2615             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2616             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2617             anObj.SetParameters(Parameters)
2618             self._autoPublish(anObj, theName, "wire")
2619             return anObj
2620
2621         ## Obtain a 2D sketcher interface
2622         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2623         def Sketcher2D (self):
2624             """
2625             Obtain a 2D sketcher interface.
2626
2627             Example of usage:
2628                sk = geompy.Sketcher2D()
2629                sk.addPoint(20, 20)
2630                sk.addSegmentRelative(15, 70)
2631                sk.addSegmentPerpY(50)
2632                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2633                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2634                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2635                sk.close()
2636                Sketch_1 = sk.wire(geomObj_1)
2637             """
2638             sk = Sketcher2D (self)
2639             return sk
2640
2641         ## Create a sketcher wire, following the numerical description,
2642         #  passed through <VAR>theCoordinates</VAR> argument. \n
2643         #  @param theCoordinates double values, defining points to create a wire,
2644         #                                                      passing from it.
2645         #  @param theName Object name; when specified, this parameter is used
2646         #         for result publication in the study. Otherwise, if automatic
2647         #         publication is switched on, default value is used for result name.
2648         #
2649         #  @return New GEOM.GEOM_Object, containing the created wire.
2650         #
2651         #  @ref tui_3dsketcher_page "Example"
2652         @ManageTransactions("CurvesOp")
2653         def Make3DSketcher(self, theCoordinates, theName=None):
2654             """
2655             Create a sketcher wire, following the numerical description,
2656             passed through theCoordinates argument.
2657
2658             Parameters:
2659                 theCoordinates double values, defining points to create a wire,
2660                                passing from it.
2661                 theName Object name; when specified, this parameter is used
2662                         for result publication in the study. Otherwise, if automatic
2663                         publication is switched on, default value is used for result name.
2664
2665             Returns:
2666                 New GEOM_Object, containing the created wire.
2667             """
2668             theCoordinates,Parameters = ParseParameters(theCoordinates)
2669             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2670             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2671             anObj.SetParameters(Parameters)
2672             self._autoPublish(anObj, theName, "wire")
2673             return anObj
2674
2675         ## Obtain a 3D sketcher interface
2676         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2677         #
2678         #  @ref tui_3dsketcher_page "Example"
2679         def Sketcher3D (self):
2680             """
2681             Obtain a 3D sketcher interface.
2682
2683             Example of usage:
2684                 sk = geompy.Sketcher3D()
2685                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2686                 sk.addPointsRelative(0, 0, 130)
2687                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2688                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2689                 sk.close()
2690                 a3D_Sketcher_1 = sk.wire()
2691             """
2692             sk = Sketcher3D (self)
2693             return sk
2694
2695         ## Obtain a 2D polyline creation interface
2696         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2697         #
2698         #  @ref tui_3dsketcher_page "Example"
2699         def Polyline2D (self):
2700             """
2701             Obtain a 2D polyline creation interface.
2702
2703             Example of usage:
2704                 pl = geompy.Polyline2D()
2705                 pl.addSection("section 1", GEOM.Polyline, True)
2706                 pl.addPoints(0, 0, 10, 0, 10, 10)
2707                 pl.addSection("section 2", GEOM.Interpolation, False)
2708                 pl.addPoints(20, 0, 30, 0, 30, 10)
2709                 resultObj = pl.result(WorkingPlane)
2710             """
2711             pl = Polyline2D (self)
2712             return pl
2713
2714         # end of l3_sketcher
2715         ## @}
2716
2717         ## @addtogroup l3_3d_primitives
2718         ## @{
2719
2720         ## Create a box by coordinates of two opposite vertices.
2721         #
2722         #  @param x1,y1,z1 double values, defining first point it.
2723         #  @param x2,y2,z2 double values, defining first point it.
2724         #  @param theName Object name; when specified, this parameter is used
2725         #         for result publication in the study. Otherwise, if automatic
2726         #         publication is switched on, default value is used for result name.
2727         #
2728         #  @return New GEOM.GEOM_Object, containing the created box.
2729         #
2730         #  @ref tui_creation_box "Example"
2731         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2732             """
2733             Create a box by coordinates of two opposite vertices.
2734
2735             Parameters:
2736                 x1,y1,z1 double values, defining first point.
2737                 x2,y2,z2 double values, defining second point.
2738                 theName Object name; when specified, this parameter is used
2739                         for result publication in the study. Otherwise, if automatic
2740                         publication is switched on, default value is used for result name.
2741
2742             Returns:
2743                 New GEOM.GEOM_Object, containing the created box.
2744             """
2745             # Example: see GEOM_TestAll.py
2746             pnt1 = self.MakeVertex(x1,y1,z1)
2747             pnt2 = self.MakeVertex(x2,y2,z2)
2748             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2749             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2750
2751         ## Create a box with specified dimensions along the coordinate axes
2752         #  and with edges, parallel to the coordinate axes.
2753         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2754         #  @param theDX Length of Box edges, parallel to OX axis.
2755         #  @param theDY Length of Box edges, parallel to OY axis.
2756         #  @param theDZ Length of Box edges, parallel to OZ axis.
2757         #  @param theName Object name; when specified, this parameter is used
2758         #         for result publication in the study. Otherwise, if automatic
2759         #         publication is switched on, default value is used for result name.
2760         #
2761         #  @return New GEOM.GEOM_Object, containing the created box.
2762         #
2763         #  @ref tui_creation_box "Example"
2764         @ManageTransactions("PrimOp")
2765         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2766             """
2767             Create a box with specified dimensions along the coordinate axes
2768             and with edges, parallel to the coordinate axes.
2769             Center of the box will be at point (DX/2, DY/2, DZ/2).
2770
2771             Parameters:
2772                 theDX Length of Box edges, parallel to OX axis.
2773                 theDY Length of Box edges, parallel to OY axis.
2774                 theDZ Length of Box edges, parallel to OZ axis.
2775                 theName Object name; when specified, this parameter is used
2776                         for result publication in the study. Otherwise, if automatic
2777                         publication is switched on, default value is used for result name.
2778
2779             Returns:
2780                 New GEOM.GEOM_Object, containing the created box.
2781             """
2782             # Example: see GEOM_TestAll.py
2783             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2784             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2785             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2786             anObj.SetParameters(Parameters)
2787             self._autoPublish(anObj, theName, "box")
2788             return anObj
2789
2790         ## Create a box with two specified opposite vertices,
2791         #  and with edges, parallel to the coordinate axes
2792         #  @param thePnt1 First of two opposite vertices.
2793         #  @param thePnt2 Second of two opposite vertices.
2794         #  @param theName Object name; when specified, this parameter is used
2795         #         for result publication in the study. Otherwise, if automatic
2796         #         publication is switched on, default value is used for result name.
2797         #
2798         #  @return New GEOM.GEOM_Object, containing the created box.
2799         #
2800         #  @ref tui_creation_box "Example"
2801         @ManageTransactions("PrimOp")
2802         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2803             """
2804             Create a box with two specified opposite vertices,
2805             and with edges, parallel to the coordinate axes
2806
2807             Parameters:
2808                 thePnt1 First of two opposite vertices.
2809                 thePnt2 Second of two opposite vertices.
2810                 theName Object name; when specified, this parameter is used
2811                         for result publication in the study. Otherwise, if automatic
2812                         publication is switched on, default value is used for result name.
2813
2814             Returns:
2815                 New GEOM.GEOM_Object, containing the created box.
2816             """
2817             # Example: see GEOM_TestAll.py
2818             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2819             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2820             self._autoPublish(anObj, theName, "box")
2821             return anObj
2822
2823         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2824         #  @param theH height of Face.
2825         #  @param theW width of Face.
2826         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2827         #  @param theName Object name; when specified, this parameter is used
2828         #         for result publication in the study. Otherwise, if automatic
2829         #         publication is switched on, default value is used for result name.
2830         #
2831         #  @return New GEOM.GEOM_Object, containing the created face.
2832         #
2833         #  @ref tui_creation_face "Example"
2834         @ManageTransactions("PrimOp")
2835         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2836             """
2837             Create a face with specified dimensions with edges parallel to coordinate axes.
2838
2839             Parameters:
2840                 theH height of Face.
2841                 theW width of Face.
2842                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2843                 theName Object name; when specified, this parameter is used
2844                         for result publication in the study. Otherwise, if automatic
2845                         publication is switched on, default value is used for result name.
2846
2847             Returns:
2848                 New GEOM.GEOM_Object, containing the created face.
2849             """
2850             # Example: see GEOM_TestAll.py
2851             theH,theW,Parameters = ParseParameters(theH, theW)
2852             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2853             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2854             anObj.SetParameters(Parameters)
2855             self._autoPublish(anObj, theName, "rectangle")
2856             return anObj
2857
2858         ## Create a face from another plane and two sizes,
2859         #  vertical size and horisontal size.
2860         #  @param theObj   Normale vector to the creating face or
2861         #  the face object.
2862         #  @param theH     Height (vertical size).
2863         #  @param theW     Width (horisontal size).
2864         #  @param theName Object name; when specified, this parameter is used
2865         #         for result publication in the study. Otherwise, if automatic
2866         #         publication is switched on, default value is used for result name.
2867         #
2868         #  @return New GEOM.GEOM_Object, containing the created face.
2869         #
2870         #  @ref tui_creation_face "Example"
2871         @ManageTransactions("PrimOp")
2872         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2873             """
2874             Create a face from another plane and two sizes,
2875             vertical size and horisontal size.
2876
2877             Parameters:
2878                 theObj   Normale vector to the creating face or
2879                          the face object.
2880                 theH     Height (vertical size).
2881                 theW     Width (horisontal size).
2882                 theName Object name; when specified, this parameter is used
2883                         for result publication in the study. Otherwise, if automatic
2884                         publication is switched on, default value is used for result name.
2885
2886             Returns:
2887                 New GEOM_Object, containing the created face.
2888             """
2889             # Example: see GEOM_TestAll.py
2890             theH,theW,Parameters = ParseParameters(theH, theW)
2891             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2892             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2893             anObj.SetParameters(Parameters)
2894             self._autoPublish(anObj, theName, "rectangle")
2895             return anObj
2896
2897         ## Create a disk with given center, normal vector and radius.
2898         #  @param thePnt Disk center.
2899         #  @param theVec Vector, normal to the plane of the disk.
2900         #  @param theR Disk radius.
2901         #  @param theName Object name; when specified, this parameter is used
2902         #         for result publication in the study. Otherwise, if automatic
2903         #         publication is switched on, default value is used for result name.
2904         #
2905         #  @return New GEOM.GEOM_Object, containing the created disk.
2906         #
2907         #  @ref tui_creation_disk "Example"
2908         @ManageTransactions("PrimOp")
2909         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2910             """
2911             Create a disk with given center, normal vector and radius.
2912
2913             Parameters:
2914                 thePnt Disk center.
2915                 theVec Vector, normal to the plane of the disk.
2916                 theR Disk radius.
2917                 theName Object name; when specified, this parameter is used
2918                         for result publication in the study. Otherwise, if automatic
2919                         publication is switched on, default value is used for result name.
2920
2921             Returns:
2922                 New GEOM.GEOM_Object, containing the created disk.
2923             """
2924             # Example: see GEOM_TestAll.py
2925             theR,Parameters = ParseParameters(theR)
2926             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2927             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2928             anObj.SetParameters(Parameters)
2929             self._autoPublish(anObj, theName, "disk")
2930             return anObj
2931
2932         ## Create a disk, passing through three given points
2933         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2934         #  @param theName Object name; when specified, this parameter is used
2935         #         for result publication in the study. Otherwise, if automatic
2936         #         publication is switched on, default value is used for result name.
2937         #
2938         #  @return New GEOM.GEOM_Object, containing the created disk.
2939         #
2940         #  @ref tui_creation_disk "Example"
2941         @ManageTransactions("PrimOp")
2942         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2943             """
2944             Create a disk, passing through three given points
2945
2946             Parameters:
2947                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2948                 theName Object name; when specified, this parameter is used
2949                         for result publication in the study. Otherwise, if automatic
2950                         publication is switched on, default value is used for result name.
2951
2952             Returns:
2953                 New GEOM.GEOM_Object, containing the created disk.
2954             """
2955             # Example: see GEOM_TestAll.py
2956             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2957             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2958             self._autoPublish(anObj, theName, "disk")
2959             return anObj
2960
2961         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2962         #  @param theR Radius of Face.
2963         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2964         #  @param theName Object name; when specified, this parameter is used
2965         #         for result publication in the study. Otherwise, if automatic
2966         #         publication is switched on, default value is used for result name.
2967         #
2968         #  @return New GEOM.GEOM_Object, containing the created disk.
2969         #
2970         #  @ref tui_creation_face "Example"
2971         @ManageTransactions("PrimOp")
2972         def MakeDiskR(self, theR, theOrientation, theName=None):
2973             """
2974             Create a disk with specified dimensions along OX-OY coordinate axes.
2975
2976             Parameters:
2977                 theR Radius of Face.
2978                 theOrientation set the orientation belong axis OXY or OYZ or OZX
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 disk.
2985
2986             Example of usage:
2987                 Disk3 = geompy.MakeDiskR(100., 1)
2988             """
2989             # Example: see GEOM_TestAll.py
2990             theR,Parameters = ParseParameters(theR)
2991             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2992             RaiseIfFailed("MakeDiskR", self.PrimOp)
2993             anObj.SetParameters(Parameters)
2994             self._autoPublish(anObj, theName, "disk")
2995             return anObj
2996
2997         ## Create a cylinder with given base point, axis, radius and height.
2998         #  @param thePnt Central point of cylinder base.
2999         #  @param theAxis Cylinder axis.
3000         #  @param theR Cylinder radius.
3001         #  @param theH Cylinder height.
3002         #  @param theName Object name; when specified, this parameter is used
3003         #         for result publication in the study. Otherwise, if automatic
3004         #         publication is switched on, default value is used for result name.
3005         #
3006         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3007         #
3008         #  @ref tui_creation_cylinder "Example"
3009         @ManageTransactions("PrimOp")
3010         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3011             """
3012             Create a cylinder with given base point, axis, radius and height.
3013
3014             Parameters:
3015                 thePnt Central point of cylinder base.
3016                 theAxis Cylinder axis.
3017                 theR Cylinder radius.
3018                 theH Cylinder height.
3019                 theName Object name; when specified, this parameter is used
3020                         for result publication in the study. Otherwise, if automatic
3021                         publication is switched on, default value is used for result name.
3022
3023             Returns:
3024                 New GEOM.GEOM_Object, containing the created cylinder.
3025             """
3026             # Example: see GEOM_TestAll.py
3027             theR,theH,Parameters = ParseParameters(theR, theH)
3028             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3029             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3030             anObj.SetParameters(Parameters)
3031             self._autoPublish(anObj, theName, "cylinder")
3032             return anObj
3033             
3034         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3035         #  @param thePnt Central point of cylinder base.
3036         #  @param theAxis Cylinder axis.
3037         #  @param theR Cylinder radius.
3038         #  @param theH Cylinder height.
3039         #  @param theA Cylinder angle in radians.
3040         #  @param theName Object name; when specified, this parameter is used
3041         #         for result publication in the study. Otherwise, if automatic
3042         #         publication is switched on, default value is used for result name.
3043         #
3044         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3045         #
3046         #  @ref tui_creation_cylinder "Example"
3047         @ManageTransactions("PrimOp")
3048         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3049             """
3050             Create a portion of cylinder with given base point, axis, radius, height and angle.
3051
3052             Parameters:
3053                 thePnt Central point of cylinder base.
3054                 theAxis Cylinder axis.
3055                 theR Cylinder radius.
3056                 theH Cylinder height.
3057                 theA Cylinder angle in radians.
3058                 theName Object name; when specified, this parameter is used
3059                         for result publication in the study. Otherwise, if automatic
3060                         publication is switched on, default value is used for result name.
3061
3062             Returns:
3063                 New GEOM.GEOM_Object, containing the created cylinder.
3064             """
3065             # Example: see GEOM_TestAll.py
3066             flag = False
3067             if isinstance(theA,str):
3068                 flag = True
3069             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3070             if flag:
3071                 theA = theA*math.pi/180.
3072             if theA<=0. or theA>=2*math.pi:
3073               raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3074             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3075             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3076             anObj.SetParameters(Parameters)
3077             self._autoPublish(anObj, theName, "cylinder")
3078             return anObj
3079
3080         ## Create a cylinder with given radius and height at
3081         #  the origin of coordinate system. Axis of the cylinder
3082         #  will be collinear to the OZ axis of the coordinate system.
3083         #  @param theR Cylinder radius.
3084         #  @param theH Cylinder height.
3085         #  @param theName Object name; when specified, this parameter is used
3086         #         for result publication in the study. Otherwise, if automatic
3087         #         publication is switched on, default value is used for result name.
3088         #
3089         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3090         #
3091         #  @ref tui_creation_cylinder "Example"
3092         @ManageTransactions("PrimOp")
3093         def MakeCylinderRH(self, theR, theH, theName=None):
3094             """
3095             Create a cylinder with given radius and height at
3096             the origin of coordinate system. Axis of the cylinder
3097             will be collinear to the OZ axis of the coordinate system.
3098
3099             Parameters:
3100                 theR Cylinder radius.
3101                 theH Cylinder height.
3102                 theName Object name; when specified, this parameter is used
3103                         for result publication in the study. Otherwise, if automatic
3104                         publication is switched on, default value is used for result name.
3105
3106             Returns:
3107                 New GEOM.GEOM_Object, containing the created cylinder.
3108             """
3109             # Example: see GEOM_TestAll.py
3110             theR,theH,Parameters = ParseParameters(theR, theH)
3111             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3112             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3113             anObj.SetParameters(Parameters)
3114             self._autoPublish(anObj, theName, "cylinder")
3115             return anObj
3116             
3117         ## Create a portion of cylinder with given radius, height and angle at
3118         #  the origin of coordinate system. Axis of the cylinder
3119         #  will be collinear to the OZ axis of the coordinate system.
3120         #  @param theR Cylinder radius.
3121         #  @param theH Cylinder height.
3122         #  @param theA Cylinder angle in radians.
3123         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3128         #
3129         #  @ref tui_creation_cylinder "Example"
3130         @ManageTransactions("PrimOp")
3131         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3132             """
3133             Create a portion of cylinder with given radius, height and angle at
3134             the origin of coordinate system. Axis of the cylinder
3135             will be collinear to the OZ axis of the coordinate system.
3136
3137             Parameters:
3138                 theR Cylinder radius.
3139                 theH Cylinder height.
3140                 theA Cylinder angle in radians.
3141                 theName Object name; when specified, this parameter is used
3142                         for result publication in the study. Otherwise, if automatic
3143                         publication is switched on, default value is used for result name.
3144
3145             Returns:
3146                 New GEOM.GEOM_Object, containing the created cylinder.
3147             """
3148             # Example: see GEOM_TestAll.py
3149             flag = False
3150             if isinstance(theA,str):
3151                 flag = True
3152             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3153             if flag:
3154                 theA = theA*math.pi/180.
3155             if theA<=0. or theA>=2*math.pi:
3156               raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3157             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3158             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3159             anObj.SetParameters(Parameters)
3160             self._autoPublish(anObj, theName, "cylinder")
3161             return anObj
3162
3163         ## Create a sphere with given center and radius.
3164         #  @param thePnt Sphere center.
3165         #  @param theR Sphere radius.
3166         #  @param theName Object name; when specified, this parameter is used
3167         #         for result publication in the study. Otherwise, if automatic
3168         #         publication is switched on, default value is used for result name.
3169         #
3170         #  @return New GEOM.GEOM_Object, containing the created sphere.
3171         #
3172         #  @ref tui_creation_sphere "Example"
3173         @ManageTransactions("PrimOp")
3174         def MakeSpherePntR(self, thePnt, theR, theName=None):
3175             """
3176             Create a sphere with given center and radius.
3177
3178             Parameters:
3179                 thePnt Sphere center.
3180                 theR Sphere radius.
3181                 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             Returns:
3186                 New GEOM.GEOM_Object, containing the created sphere.
3187             """
3188             # Example: see GEOM_TestAll.py
3189             theR,Parameters = ParseParameters(theR)
3190             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3191             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3192             anObj.SetParameters(Parameters)
3193             self._autoPublish(anObj, theName, "sphere")
3194             return anObj
3195
3196         ## Create a sphere with given center and radius.
3197         #  @param x,y,z Coordinates of sphere center.
3198         #  @param theR Sphere radius.
3199         #  @param theName Object name; when specified, this parameter is used
3200         #         for result publication in the study. Otherwise, if automatic
3201         #         publication is switched on, default value is used for result name.
3202         #
3203         #  @return New GEOM.GEOM_Object, containing the created sphere.
3204         #
3205         #  @ref tui_creation_sphere "Example"
3206         def MakeSphere(self, x, y, z, theR, theName=None):
3207             """
3208             Create a sphere with given center and radius.
3209
3210             Parameters:
3211                 x,y,z Coordinates of sphere center.
3212                 theR Sphere radius.
3213                 theName Object name; when specified, this parameter is used
3214                         for result publication in the study. Otherwise, if automatic
3215                         publication is switched on, default value is used for result name.
3216
3217             Returns:
3218                 New GEOM.GEOM_Object, containing the created sphere.
3219             """
3220             # Example: see GEOM_TestAll.py
3221             point = self.MakeVertex(x, y, z)
3222             # note: auto-publishing is done in self.MakeSpherePntR()
3223             anObj = self.MakeSpherePntR(point, theR, theName)
3224             return anObj
3225
3226         ## Create a sphere with given radius at the origin of coordinate system.
3227         #  @param theR Sphere radius.
3228         #  @param theName Object name; when specified, this parameter is used
3229         #         for result publication in the study. Otherwise, if automatic
3230         #         publication is switched on, default value is used for result name.
3231         #
3232         #  @return New GEOM.GEOM_Object, containing the created sphere.
3233         #
3234         #  @ref tui_creation_sphere "Example"
3235         @ManageTransactions("PrimOp")
3236         def MakeSphereR(self, theR, theName=None):
3237             """
3238             Create a sphere with given radius at the origin of coordinate system.
3239
3240             Parameters:
3241                 theR Sphere radius.
3242                 theName Object name; when specified, this parameter is used
3243                         for result publication in the study. Otherwise, if automatic
3244                         publication is switched on, default value is used for result name.
3245
3246             Returns:
3247                 New GEOM.GEOM_Object, containing the created sphere.
3248             """
3249             # Example: see GEOM_TestAll.py
3250             theR,Parameters = ParseParameters(theR)
3251             anObj = self.PrimOp.MakeSphereR(theR)
3252             RaiseIfFailed("MakeSphereR", self.PrimOp)
3253             anObj.SetParameters(Parameters)
3254             self._autoPublish(anObj, theName, "sphere")
3255             return anObj
3256
3257         ## Create a cone with given base point, axis, height and radiuses.
3258         #  @param thePnt Central point of the first cone base.
3259         #  @param theAxis Cone axis.
3260         #  @param theR1 Radius of the first cone base.
3261         #  @param theR2 Radius of the second cone base.
3262         #    \note If both radiuses are non-zero, the cone will be truncated.
3263         #    \note If the radiuses are equal, a cylinder will be created instead.
3264         #  @param theH Cone height.
3265         #  @param theName Object name; when specified, this parameter is used
3266         #         for result publication in the study. Otherwise, if automatic
3267         #         publication is switched on, default value is used for result name.
3268         #
3269         #  @return New GEOM.GEOM_Object, containing the created cone.
3270         #
3271         #  @ref tui_creation_cone "Example"
3272         @ManageTransactions("PrimOp")
3273         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3274             """
3275             Create a cone with given base point, axis, height and radiuses.
3276
3277             Parameters:
3278                 thePnt Central point of the first cone base.
3279                 theAxis Cone axis.
3280                 theR1 Radius of the first cone base.
3281                 theR2 Radius of the second cone base.
3282                 theH Cone height.
3283                 theName Object name; when specified, this parameter is used
3284                         for result publication in the study. Otherwise, if automatic
3285                         publication is switched on, default value is used for result name.
3286
3287             Note:
3288                 If both radiuses are non-zero, the cone will be truncated.
3289                 If the radiuses are equal, a cylinder will be created instead.
3290
3291             Returns:
3292                 New GEOM.GEOM_Object, containing the created cone.
3293             """
3294             # Example: see GEOM_TestAll.py
3295             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3296             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3297             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3298             anObj.SetParameters(Parameters)
3299             self._autoPublish(anObj, theName, "cone")
3300             return anObj
3301
3302         ## Create a cone with given height and radiuses at
3303         #  the origin of coordinate system. Axis of the cone will
3304         #  be collinear to the OZ axis of the coordinate system.
3305         #  @param theR1 Radius of the first cone base.
3306         #  @param theR2 Radius of the second cone base.
3307         #    \note If both radiuses are non-zero, the cone will be truncated.
3308         #    \note If the radiuses are equal, a cylinder will be created instead.
3309         #  @param theH Cone height.
3310         #  @param theName Object name; when specified, this parameter is used
3311         #         for result publication in the study. Otherwise, if automatic
3312         #         publication is switched on, default value is used for result name.
3313         #
3314         #  @return New GEOM.GEOM_Object, containing the created cone.
3315         #
3316         #  @ref tui_creation_cone "Example"
3317         @ManageTransactions("PrimOp")
3318         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3319             """
3320             Create a cone with given height and radiuses at
3321             the origin of coordinate system. Axis of the cone will
3322             be collinear to the OZ axis of the coordinate system.
3323
3324             Parameters:
3325                 theR1 Radius of the first cone base.
3326                 theR2 Radius of the second cone base.
3327                 theH Cone height.
3328                 theName Object name; when specified, this parameter is used
3329                         for result publication in the study. Otherwise, if automatic
3330                         publication is switched on, default value is used for result name.
3331
3332             Note:
3333                 If both radiuses are non-zero, the cone will be truncated.
3334                 If the radiuses are equal, a cylinder will be created instead.
3335
3336             Returns:
3337                 New GEOM.GEOM_Object, containing the created cone.
3338             """
3339             # Example: see GEOM_TestAll.py
3340             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3341             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3342             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3343             anObj.SetParameters(Parameters)
3344             self._autoPublish(anObj, theName, "cone")
3345             return anObj
3346
3347         ## Create a torus with given center, normal vector and radiuses.
3348         #  @param thePnt Torus central point.
3349         #  @param theVec Torus axis of symmetry.
3350         #  @param theRMajor Torus major radius.
3351         #  @param theRMinor Torus minor radius.
3352         #  @param theName Object name; when specified, this parameter is used
3353         #         for result publication in the study. Otherwise, if automatic
3354         #         publication is switched on, default value is used for result name.
3355         #
3356         #  @return New GEOM.GEOM_Object, containing the created torus.
3357         #
3358         #  @ref tui_creation_torus "Example"
3359         @ManageTransactions("PrimOp")
3360         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3361             """
3362             Create a torus with given center, normal vector and radiuses.
3363
3364             Parameters:
3365                 thePnt Torus central point.
3366                 theVec Torus axis of symmetry.
3367                 theRMajor Torus major radius.
3368                 theRMinor Torus minor radius.
3369                 theName Object name; when specified, this parameter is used
3370                         for result publication in the study. Otherwise, if automatic
3371                         publication is switched on, default value is used for result name.
3372
3373            Returns:
3374                 New GEOM.GEOM_Object, containing the created torus.
3375             """
3376             # Example: see GEOM_TestAll.py
3377             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3378             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3379             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3380             anObj.SetParameters(Parameters)
3381             self._autoPublish(anObj, theName, "torus")
3382             return anObj
3383
3384         ## Create a torus with given radiuses at the origin of coordinate system.
3385         #  @param theRMajor Torus major radius.
3386         #  @param theRMinor Torus minor radius.
3387         #  @param theName Object name; when specified, this parameter is used
3388         #         for result publication in the study. Otherwise, if automatic
3389         #         publication is switched on, default value is used for result name.
3390         #
3391         #  @return New GEOM.GEOM_Object, containing the created torus.
3392         #
3393         #  @ref tui_creation_torus "Example"
3394         @ManageTransactions("PrimOp")
3395         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3396             """
3397            Create a torus with given radiuses at the origin of coordinate system.
3398
3399            Parameters:
3400                 theRMajor Torus major radius.
3401                 theRMinor Torus minor radius.
3402                 theName Object name; when specified, this parameter is used
3403                         for result publication in the study. Otherwise, if automatic
3404                         publication is switched on, default value is used for result name.
3405
3406            Returns:
3407                 New GEOM.GEOM_Object, containing the created torus.
3408             """
3409             # Example: see GEOM_TestAll.py
3410             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3411             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3412             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3413             anObj.SetParameters(Parameters)
3414             self._autoPublish(anObj, theName, "torus")
3415             return anObj
3416
3417         # end of l3_3d_primitives
3418         ## @}
3419
3420         ## @addtogroup l3_complex
3421         ## @{
3422
3423         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3424         #  @param theBase Base shape to be extruded.
3425         #  @param thePoint1 First end of extrusion vector.
3426         #  @param thePoint2 Second end of extrusion vector.
3427         #  @param theScaleFactor Use it to make prism with scaled second base.
3428         #                        Nagative value means not scaled second base.
3429         #  @param theName Object name; when specified, this parameter is used
3430         #         for result publication in the study. Otherwise, if automatic
3431         #         publication is switched on, default value is used for result name.
3432         #
3433         #  @return New GEOM.GEOM_Object, containing the created prism.
3434         #
3435         #  @ref tui_creation_prism "Example"
3436         @ManageTransactions("PrimOp")
3437         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3438             """
3439             Create a shape by extrusion of the base shape along a vector, defined by two points.
3440
3441             Parameters:
3442                 theBase Base shape to be extruded.
3443                 thePoint1 First end of extrusion vector.
3444                 thePoint2 Second end of extrusion vector.
3445                 theScaleFactor Use it to make prism with scaled second base.
3446                                Nagative value means not scaled second base.
3447                 theName Object name; when specified, this parameter is used
3448                         for result publication in the study. Otherwise, if automatic
3449                         publication is switched on, default value is used for result name.
3450
3451             Returns:
3452                 New GEOM.GEOM_Object, containing the created prism.
3453             """
3454             # Example: see GEOM_TestAll.py
3455             anObj = None
3456             Parameters = ""
3457             if theScaleFactor > 0:
3458                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3459                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3460             else:
3461                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3462             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3463             anObj.SetParameters(Parameters)
3464             self._autoPublish(anObj, theName, "prism")
3465             return anObj
3466
3467         ## Create a shape by extrusion of the base shape along a
3468         #  vector, defined by two points, in 2 Ways (forward/backward).
3469         #  @param theBase Base shape to be extruded.
3470         #  @param thePoint1 First end of extrusion vector.
3471         #  @param thePoint2 Second end of extrusion vector.
3472         #  @param theName Object name; when specified, this parameter is used
3473         #         for result publication in the study. Otherwise, if automatic
3474         #         publication is switched on, default value is used for result name.
3475         #
3476         #  @return New GEOM.GEOM_Object, containing the created prism.
3477         #
3478         #  @ref tui_creation_prism "Example"
3479         @ManageTransactions("PrimOp")
3480         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3481             """
3482             Create a shape by extrusion of the base shape along a
3483             vector, defined by two points, in 2 Ways (forward/backward).
3484
3485             Parameters:
3486                 theBase Base shape to be extruded.
3487                 thePoint1 First end of extrusion vector.
3488                 thePoint2 Second end of extrusion vector.
3489                 theName Object name; when specified, this parameter is used
3490                         for result publication in the study. Otherwise, if automatic
3491                         publication is switched on, default value is used for result name.
3492
3493             Returns:
3494                 New GEOM.GEOM_Object, containing the created prism.
3495             """
3496             # Example: see GEOM_TestAll.py
3497             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3498             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3499             self._autoPublish(anObj, theName, "prism")
3500             return anObj
3501
3502         ## Create a shape by extrusion of the base shape along the vector,
3503         #  i.e. all the space, transfixed by the base shape during its translation
3504         #  along the vector on the given distance.
3505         #  @param theBase Base shape to be extruded.
3506         #  @param theVec Direction of extrusion.
3507         #  @param theH Prism dimension along theVec.
3508         #  @param theScaleFactor Use it to make prism with scaled second base.
3509         #                        Negative value means not scaled second base.
3510         #  @param theName Object name; when specified, this parameter is used
3511         #         for result publication in the study. Otherwise, if automatic
3512         #         publication is switched on, default value is used for result name.
3513         #
3514         #  @return New GEOM.GEOM_Object, containing the created prism.
3515         #
3516         #  @ref tui_creation_prism "Example"
3517         @ManageTransactions("PrimOp")
3518         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3519             """
3520             Create a shape by extrusion of the base shape along the vector,
3521             i.e. all the space, transfixed by the base shape during its translation
3522             along the vector on the given distance.
3523
3524             Parameters:
3525                 theBase Base shape to be extruded.
3526                 theVec Direction of extrusion.
3527                 theH Prism dimension along theVec.
3528                 theScaleFactor Use it to make prism with scaled second base.
3529                                Negative value means not scaled second base.
3530                 theName Object name; when specified, this parameter is used
3531                         for result publication in the study. Otherwise, if automatic
3532                         publication is switched on, default value is used for result name.
3533
3534             Returns:
3535                 New GEOM.GEOM_Object, containing the created prism.
3536             """
3537             # Example: see GEOM_TestAll.py
3538             anObj = None
3539             Parameters = ""
3540             if theScaleFactor > 0:
3541                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3542                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3543             else:
3544                 theH,Parameters = ParseParameters(theH)
3545                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3546             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3547             anObj.SetParameters(Parameters)
3548             self._autoPublish(anObj, theName, "prism")
3549             return anObj
3550
3551         ## Create a shape by extrusion of the base shape along the vector,
3552         #  i.e. all the space, transfixed by the base shape during its translation
3553         #  along the vector on the given distance in 2 Ways (forward/backward).
3554         #  @param theBase Base shape to be extruded.
3555         #  @param theVec Direction of extrusion.
3556         #  @param theH Prism dimension along theVec in forward direction.
3557         #  @param theName Object name; when specified, this parameter is used
3558         #         for result publication in the study. Otherwise, if automatic
3559         #         publication is switched on, default value is used for result name.
3560         #
3561         #  @return New GEOM.GEOM_Object, containing the created prism.
3562         #
3563         #  @ref tui_creation_prism "Example"
3564         @ManageTransactions("PrimOp")
3565         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3566             """
3567             Create a shape by extrusion of the base shape along the vector,
3568             i.e. all the space, transfixed by the base shape during its translation
3569             along the vector on the given distance in 2 Ways (forward/backward).
3570
3571             Parameters:
3572                 theBase Base shape to be extruded.
3573                 theVec Direction of extrusion.
3574                 theH Prism dimension along theVec in forward direction.
3575                 theName Object name; when specified, this parameter is used
3576                         for result publication in the study. Otherwise, if automatic
3577                         publication is switched on, default value is used for result name.
3578
3579             Returns:
3580                 New GEOM.GEOM_Object, containing the created prism.
3581             """
3582             # Example: see GEOM_TestAll.py
3583             theH,Parameters = ParseParameters(theH)
3584             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3585             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3586             anObj.SetParameters(Parameters)
3587             self._autoPublish(anObj, theName, "prism")
3588             return anObj
3589
3590         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3591         #  @param theBase Base shape to be extruded.
3592         #  @param theDX, theDY, theDZ Directions of extrusion.
3593         #  @param theScaleFactor Use it to make prism with scaled second base.
3594         #                        Nagative value means not scaled second base.
3595         #  @param theName Object name; when specified, this parameter is used
3596         #         for result publication in the study. Otherwise, if automatic
3597         #         publication is switched on, default value is used for result name.
3598         #
3599         #  @return New GEOM.GEOM_Object, containing the created prism.
3600         #
3601         #  @ref tui_creation_prism "Example"
3602         @ManageTransactions("PrimOp")
3603         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3604             """
3605             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3606
3607             Parameters:
3608                 theBase Base shape to be extruded.
3609                 theDX, theDY, theDZ Directions of extrusion.
3610                 theScaleFactor Use it to make prism with scaled second base.
3611                                Nagative value means not scaled second base.
3612                 theName Object name; when specified, this parameter is used
3613                         for result publication in the study. Otherwise, if automatic
3614                         publication is switched on, default value is used for result name.
3615
3616             Returns:
3617                 New GEOM.GEOM_Object, containing the created prism.
3618             """
3619             # Example: see GEOM_TestAll.py
3620             anObj = None
3621             Parameters = ""
3622             if theScaleFactor > 0:
3623                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3624                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3625             else:
3626                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3627                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3628             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3629             anObj.SetParameters(Parameters)
3630             self._autoPublish(anObj, theName, "prism")
3631             return anObj
3632
3633         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3634         #  i.e. all the space, transfixed by the base shape during its translation
3635         #  along the vector on the given distance in 2 Ways (forward/backward).
3636         #  @param theBase Base shape to be extruded.
3637         #  @param theDX, theDY, theDZ Directions of extrusion.
3638         #  @param theName Object name; when specified, this parameter is used
3639         #         for result publication in the study. Otherwise, if automatic
3640         #         publication is switched on, default value is used for result name.
3641         #
3642         #  @return New GEOM.GEOM_Object, containing the created prism.
3643         #
3644         #  @ref tui_creation_prism "Example"
3645         @ManageTransactions("PrimOp")
3646         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3647             """
3648             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3649             i.e. all the space, transfixed by the base shape during its translation
3650             along the vector on the given distance in 2 Ways (forward/backward).
3651
3652             Parameters:
3653                 theBase Base shape to be extruded.
3654                 theDX, theDY, theDZ Directions of extrusion.
3655                 theName Object name; when specified, this parameter is used
3656                         for result publication in the study. Otherwise, if automatic
3657                         publication is switched on, default value is used for result name.
3658
3659             Returns:
3660                 New GEOM.GEOM_Object, containing the created prism.
3661             """
3662             # Example: see GEOM_TestAll.py
3663             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3664             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3665             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3666             anObj.SetParameters(Parameters)
3667             self._autoPublish(anObj, theName, "prism")
3668             return anObj
3669
3670         ## Create a shape by revolution of the base shape around the axis
3671         #  on the given angle, i.e. all the space, transfixed by the base
3672         #  shape during its rotation around the axis on the given angle.
3673         #  @param theBase Base shape to be rotated.
3674         #  @param theAxis Rotation axis.
3675         #  @param theAngle Rotation angle in radians.
3676         #  @param theName Object name; when specified, this parameter is used
3677         #         for result publication in the study. Otherwise, if automatic
3678         #         publication is switched on, default value is used for result name.
3679         #
3680         #  @return New GEOM.GEOM_Object, containing the created revolution.
3681         #
3682         #  @ref tui_creation_revolution "Example"
3683         @ManageTransactions("PrimOp")
3684         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3685             """
3686             Create a shape by revolution of the base shape around the axis
3687             on the given angle, i.e. all the space, transfixed by the base
3688             shape during its rotation around the axis on the given angle.
3689
3690             Parameters:
3691                 theBase Base shape to be rotated.
3692                 theAxis Rotation axis.
3693                 theAngle Rotation angle in radians.
3694                 theName Object name; when specified, this parameter is used
3695                         for result publication in the study. Otherwise, if automatic
3696                         publication is switched on, default value is used for result name.
3697
3698             Returns:
3699                 New GEOM.GEOM_Object, containing the created revolution.
3700             """
3701             # Example: see GEOM_TestAll.py
3702             theAngle,Parameters = ParseParameters(theAngle)
3703             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3704             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3705             anObj.SetParameters(Parameters)
3706             self._autoPublish(anObj, theName, "revolution")
3707             return anObj
3708
3709         ## Create a shape by revolution of the base shape around the axis
3710         #  on the given angle, i.e. all the space, transfixed by the base
3711         #  shape during its rotation around the axis on the given angle in
3712         #  both directions (forward/backward)
3713         #  @param theBase Base shape to be rotated.
3714         #  @param theAxis Rotation axis.
3715         #  @param theAngle Rotation angle in radians.
3716         #  @param theName Object name; when specified, this parameter is used
3717         #         for result publication in the study. Otherwise, if automatic
3718         #         publication is switched on, default value is used for result name.
3719         #
3720         #  @return New GEOM.GEOM_Object, containing the created revolution.
3721         #
3722         #  @ref tui_creation_revolution "Example"
3723         @ManageTransactions("PrimOp")
3724         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3725             """
3726             Create a shape by revolution of the base shape around the axis
3727             on the given angle, i.e. all the space, transfixed by the base
3728             shape during its rotation around the axis on the given angle in
3729             both directions (forward/backward).
3730
3731             Parameters:
3732                 theBase Base shape to be rotated.
3733                 theAxis Rotation axis.
3734                 theAngle Rotation angle in radians.
3735                 theName Object name; when specified, this parameter is used
3736                         for result publication in the study. Otherwise, if automatic
3737                         publication is switched on, default value is used for result name.
3738
3739             Returns:
3740                 New GEOM.GEOM_Object, containing the created revolution.
3741             """
3742             theAngle,Parameters = ParseParameters(theAngle)
3743             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3744             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3745             anObj.SetParameters(Parameters)
3746             self._autoPublish(anObj, theName, "revolution")
3747             return anObj
3748
3749         ## Create a face from a given set of contours.
3750         #  @param theContours either a list or a compound of edges/wires.
3751         #  @param theMinDeg a minimal degree of BSpline surface to create.
3752         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3753         #  @param theTol2D a 2d tolerance to be reached.
3754         #  @param theTol3D a 3d tolerance to be reached.
3755         #  @param theNbIter a number of iteration of approximation algorithm.
3756         #  @param theMethod Kind of method to perform filling operation
3757         #         (see GEOM.filling_oper_method enum).
3758         #  @param isApprox if True, BSpline curves are generated in the process
3759         #                  of surface construction. By default it is False, that means
3760         #                  the surface is created using given curves. The usage of
3761         #                  Approximation makes the algorithm work slower, but allows
3762         #                  building the surface for rather complex cases.
3763         #  @param theName Object name; when specified, this parameter is used
3764         #         for result publication in the study. Otherwise, if automatic
3765         #         publication is switched on, default value is used for result name.
3766         #
3767         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3768         #
3769         #  @ref tui_creation_filling "Example"
3770         @ManageTransactions("PrimOp")
3771         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3772                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3773             """
3774             Create a face from a given set of contours.
3775
3776             Parameters:
3777                 theContours either a list or a compound of edges/wires.
3778                 theMinDeg a minimal degree of BSpline surface to create.
3779                 theMaxDeg a maximal degree of BSpline surface to create.
3780                 theTol2D a 2d tolerance to be reached.
3781                 theTol3D a 3d tolerance to be reached.
3782                 theNbIter a number of iteration of approximation algorithm.
3783                 theMethod Kind of method to perform filling operation
3784                           (see GEOM.filling_oper_method enum).
3785                 isApprox if True, BSpline curves are generated in the process
3786                          of surface construction. By default it is False, that means
3787                          the surface is created using given curves. The usage of
3788                          Approximation makes the algorithm work slower, but allows
3789                          building the surface for rather complex cases.
3790                 theName Object name; when specified, this parameter is used
3791                         for result publication in the study. Otherwise, if automatic
3792                         publication is switched on, default value is used for result name.
3793
3794             Returns:
3795                 New GEOM.GEOM_Object (face), containing the created filling surface.
3796
3797             Example of usage:
3798                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3799             """
3800             # Example: see GEOM_TestAll.py
3801             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3802             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3803                                             theTol2D, theTol3D, theNbIter,
3804                                             theMethod, isApprox)
3805             RaiseIfFailed("MakeFilling", self.PrimOp)
3806             anObj.SetParameters(Parameters)
3807             self._autoPublish(anObj, theName, "filling")
3808             return anObj
3809
3810
3811         ## Create a face from a given set of contours.
3812         #  This method corresponds to MakeFilling() with isApprox=True.
3813         #  @param theContours either a list or a compound of edges/wires.
3814         #  @param theMinDeg a minimal degree of BSpline surface to create.
3815         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3816         #  @param theTol3D a 3d tolerance to be reached.
3817         #  @param theName Object name; when specified, this parameter is used
3818         #         for result publication in the study. Otherwise, if automatic
3819         #         publication is switched on, default value is used for result name.
3820         #
3821         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3822         #
3823         #  @ref tui_creation_filling "Example"
3824         @ManageTransactions("PrimOp")
3825         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3826             """
3827             Create a filling from the given compound of contours.
3828             This method corresponds to MakeFilling() with isApprox=True.
3829
3830             Parameters:
3831                 theContours either a list or a compound of edges/wires.
3832                 theMinDeg a minimal degree of BSpline surface to create.
3833                 theMaxDeg a maximal degree of BSpline surface to create.
3834                 theTol3D a 3d tolerance to be reached.
3835                 theName Object name; when specified, this parameter is used
3836                         for result publication in the study. Otherwise, if automatic
3837                         publication is switched on, default value is used for result name.
3838
3839             Returns:
3840                 New GEOM.GEOM_Object (face), containing the created filling surface.
3841
3842             Example of usage:
3843                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3844             """
3845             # Example: see GEOM_TestAll.py
3846             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3847             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3848                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3849             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3850             anObj.SetParameters(Parameters)
3851             self._autoPublish(anObj, theName, "filling")
3852             return anObj
3853
3854         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3855         #  @param theSeqSections - set of specified sections.
3856         #  @param theModeSolid - mode defining building solid or shell
3857         #  @param thePreci - precision 3D used for smoothing
3858         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3859         #  @param theName Object name; when specified, this parameter is used
3860         #         for result publication in the study. Otherwise, if automatic
3861         #         publication is switched on, default value is used for result name.
3862         #
3863         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3864         #
3865         #  @ref swig_todo "Example"
3866         @ManageTransactions("PrimOp")
3867         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3868             """
3869             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3870
3871             Parameters:
3872                 theSeqSections - set of specified sections.
3873                 theModeSolid - mode defining building solid or shell
3874                 thePreci - precision 3D used for smoothing
3875                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3876                 theName Object name; when specified, this parameter is used
3877                         for result publication in the study. Otherwise, if automatic
3878                         publication is switched on, default value is used for result name.
3879
3880             Returns:
3881                 New GEOM.GEOM_Object, containing the created shell or solid.
3882             """
3883             # Example: see GEOM_TestAll.py
3884             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3885             RaiseIfFailed("MakeThruSections", self.PrimOp)
3886             self._autoPublish(anObj, theName, "filling")
3887             return anObj
3888
3889         ## Create a shape by extrusion of the base shape along
3890         #  the path shape. The path shape can be a wire or an edge. It is
3891         #  possible to generate groups along with the result by means of
3892         #  setting the flag \a IsGenerateGroups.<BR>
3893         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3894         #  set, an error is occured. If \a thePath is not closed edge/wire,
3895         #  the following groups are returned:
3896         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3897         #    "Side2";
3898         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3899         #    "Other".
3900         #  .
3901         #  "Down" and "Up" groups contain:
3902         #  - Edges if \a theBase is edge or wire;
3903         #  - Faces if \a theBase is face or shell.<BR>
3904         #  .
3905         #  "Side1" and "Side2" groups contain edges generated from the first
3906         #  and last vertices of \a theBase. The first and last vertices are
3907         #  determined taking into account edge/wire orientation.<BR>
3908         #  "Other" group represents faces generated from the bounding edges of
3909         #  \a theBase.
3910         #
3911         #  @param theBase Base shape to be extruded.
3912         #  @param thePath Path shape to extrude the base shape along it.
3913         #  @param IsGenerateGroups flag that tells if it is necessary to
3914         #         create groups. It is equal to False by default.
3915         #  @param theName Object name; when specified, this parameter is used
3916         #         for result publication in the study. Otherwise, if automatic
3917         #         publication is switched on, default value is used for result name.
3918         #
3919         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3920         #          \a IsGenerateGroups is not set. Otherwise it returns new
3921         #          GEOM.ListOfGO. Its first element is the created pipe, the
3922         #          remaining ones are created groups.
3923         #
3924         #  @ref tui_creation_pipe "Example"
3925         @ManageTransactions("PrimOp")
3926         def MakePipe(self, theBase, thePath,
3927                      IsGenerateGroups=False, theName=None):
3928             """
3929             Create a shape by extrusion of the base shape along
3930             the path shape. The path shape can be a wire or an edge. It is
3931             possible to generate groups along with the result by means of
3932             setting the flag IsGenerateGroups.
3933             If thePath is a closed edge or wire and IsGenerateGroups is
3934             set, an error is occured. If thePath is not closed edge/wire,
3935             the following groups are returned:
3936             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
3937               "Side2";
3938             - If theBase is closed edge or wire, face or shell: "Down", "Up",
3939               "Other".
3940             "Down" and "Up" groups contain:
3941             - Edges if theBase is edge or wire;
3942             - Faces if theBase is face or shell.
3943             "Side1" and "Side2" groups contain edges generated from the first
3944             and last vertices of theBase. The first and last vertices are
3945             determined taking into account edge/wire orientation.
3946             "Other" group represents faces generated from the bounding edges of
3947             theBase.
3948
3949             Parameters:
3950                 theBase Base shape to be extruded.
3951                 thePath Path shape to extrude the base shape along it.
3952                 IsGenerateGroups flag that tells if it is necessary to
3953                         create groups. It is equal to False by default.
3954                 theName Object name; when specified, this parameter is used
3955                         for result publication in the study. Otherwise, if automatic
3956                         publication is switched on, default value is used for result name.
3957
3958             Returns:
3959                 New GEOM.GEOM_Object, containing the created pipe if 
3960                 IsGenerateGroups is not set. Otherwise it returns new
3961                 GEOM.ListOfGO. Its first element is the created pipe, the
3962                 remaining ones are created groups.
3963             """
3964             # Example: see GEOM_TestAll.py
3965             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
3966             RaiseIfFailed("MakePipe", self.PrimOp)
3967
3968             if IsGenerateGroups:
3969               self._autoPublish(aList, theName, "pipe")
3970               return aList
3971
3972             self._autoPublish(aList[0], theName, "pipe")
3973             return aList[0]
3974
3975         ## Create a shape by extrusion of the profile shape along
3976         #  the path shape. The path shape can be a wire or an edge.
3977         #  the several profiles can be specified in the several locations of path.
3978         #  It is possible to generate groups along with the result by means of
3979         #  setting the flag \a IsGenerateGroups. For detailed information on
3980         #  groups that can be created please see the method MakePipe().
3981         #  @param theSeqBases - list of  Bases shape to be extruded.
3982         #  @param theLocations - list of locations on the path corresponding
3983         #                        specified list of the Bases shapes. Number of locations
3984         #                        should be equal to number of bases or list of locations can be empty.
3985         #  @param thePath - Path shape to extrude the base shape along it.
3986         #  @param theWithContact - the mode defining that the section is translated to be in
3987         #                          contact with the spine.
3988         #  @param theWithCorrection - defining that the section is rotated to be
3989         #                             orthogonal to the spine tangent in the correspondent point
3990         #  @param IsGenerateGroups - flag that tells if it is necessary to
3991         #                          create groups. It is equal to False by default.
3992         #  @param theName Object name; when specified, this parameter is used
3993         #         for result publication in the study. Otherwise, if automatic
3994         #         publication is switched on, default value is used for result name.
3995         #
3996         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3997         #          \a IsGenerateGroups is not set. Otherwise it returns new
3998         #          GEOM.ListOfGO. Its first element is the created pipe, the
3999         #          remaining ones are created groups.
4000         #
4001         #  @ref tui_creation_pipe_with_diff_sec "Example"
4002         @ManageTransactions("PrimOp")
4003         def MakePipeWithDifferentSections(self, theSeqBases,
4004                                           theLocations, thePath,
4005                                           theWithContact, theWithCorrection,
4006                                           IsGenerateGroups=False, theName=None):
4007             """
4008             Create a shape by extrusion of the profile shape along
4009             the path shape. The path shape can be a wire or an edge.
4010             the several profiles can be specified in the several locations of path.
4011             It is possible to generate groups along with the result by means of
4012             setting the flag IsGenerateGroups. For detailed information on
4013             groups that can be created please see the method geompy.MakePipe().
4014
4015             Parameters:
4016                 theSeqBases - list of  Bases shape to be extruded.
4017                 theLocations - list of locations on the path corresponding
4018                                specified list of the Bases shapes. Number of locations
4019                                should be equal to number of bases or list of locations can be empty.
4020                 thePath - Path shape to extrude the base shape along it.
4021                 theWithContact - the mode defining that the section is translated to be in
4022                                  contact with the spine(0/1)
4023                 theWithCorrection - defining that the section is rotated to be
4024                                     orthogonal to the spine tangent in the correspondent point (0/1)
4025                 IsGenerateGroups - flag that tells if it is necessary to
4026                                  create groups. It is equal to False by default.
4027                 theName Object name; when specified, this parameter is used
4028                         for result publication in the study. Otherwise, if automatic
4029                         publication is switched on, default value is used for result name.
4030
4031             Returns:
4032                 New GEOM.GEOM_Object, containing the created pipe if 
4033                 IsGenerateGroups is not set. Otherwise it returns new
4034                 GEOM.ListOfGO. Its first element is the created pipe, the
4035                 remaining ones are created groups.
4036             """
4037             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4038                                                               theLocations, thePath,
4039                                                               theWithContact, theWithCorrection,
4040                                                               IsGenerateGroups)
4041             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4042
4043             if IsGenerateGroups:
4044               self._autoPublish(aList, theName, "pipe")
4045               return aList
4046
4047             self._autoPublish(aList[0], theName, "pipe")
4048             return aList[0]
4049
4050         ## Create a shape by extrusion of the profile shape along
4051         #  the path shape. The path shape can be a wire or an edge.
4052         #  the several profiles can be specified in the several locations of path.
4053         #  It is possible to generate groups along with the result by means of
4054         #  setting the flag \a IsGenerateGroups. For detailed information on
4055         #  groups that can be created please see the method MakePipe().
4056         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4057         #                       shell or face. If number of faces in neighbour sections
4058         #                       aren't coincided result solid between such sections will
4059         #                       be created using external boundaries of this shells.
4060         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4061         #                          This list is used for searching correspondences between
4062         #                          faces in the sections. Size of this list must be equal
4063         #                          to size of list of base shapes.
4064         #  @param theLocations - list of locations on the path corresponding
4065         #                        specified list of the Bases shapes. Number of locations
4066         #                        should be equal to number of bases. First and last
4067         #                        locations must be coincided with first and last vertexes
4068         #                        of path correspondingly.
4069         #  @param thePath - Path shape to extrude the base shape along it.
4070         #  @param theWithContact - the mode defining that the section is translated to be in
4071         #                          contact with the spine.
4072         #  @param theWithCorrection - defining that the section is rotated to be
4073         #                             orthogonal to the spine tangent in the correspondent point
4074         #  @param IsGenerateGroups - flag that tells if it is necessary to
4075         #                          create groups. It is equal to False by default.
4076         #  @param theName Object name; when specified, this parameter is used
4077         #         for result publication in the study. Otherwise, if automatic
4078         #         publication is switched on, default value is used for result name.
4079         #
4080         #  @return New GEOM.GEOM_Object, containing the created solids if 
4081         #          \a IsGenerateGroups is not set. Otherwise it returns new
4082         #          GEOM.ListOfGO. Its first element is the created solids, the
4083         #          remaining ones are created groups.
4084         #
4085         #  @ref tui_creation_pipe_with_shell_sec "Example"
4086         @ManageTransactions("PrimOp")
4087         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4088                                       theLocations, thePath,
4089                                       theWithContact, theWithCorrection,
4090                                       IsGenerateGroups=False, theName=None):
4091             """
4092             Create a shape by extrusion of the profile shape along
4093             the path shape. The path shape can be a wire or an edge.
4094             the several profiles can be specified in the several locations of path.
4095             It is possible to generate groups along with the result by means of
4096             setting the flag IsGenerateGroups. For detailed information on
4097             groups that can be created please see the method geompy.MakePipe().
4098
4099             Parameters:
4100                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4101                               shell or face. If number of faces in neighbour sections
4102                               aren't coincided result solid between such sections will
4103                               be created using external boundaries of this shells.
4104                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4105                                  This list is used for searching correspondences between
4106                                  faces in the sections. Size of this list must be equal
4107                                  to size of list of base shapes.
4108                 theLocations - list of locations on the path corresponding
4109                                specified list of the Bases shapes. Number of locations
4110                                should be equal to number of bases. First and last
4111                                locations must be coincided with first and last vertexes
4112                                of path correspondingly.
4113                 thePath - Path shape to extrude the base shape along it.
4114                 theWithContact - the mode defining that the section is translated to be in
4115                                  contact with the spine (0/1)
4116                 theWithCorrection - defining that the section is rotated to be
4117                                     orthogonal to the spine tangent in the correspondent point (0/1)
4118                 IsGenerateGroups - flag that tells if it is necessary to
4119                                  create groups. It is equal to False by default.
4120                 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             Returns:
4125                 New GEOM.GEOM_Object, containing the created solids if 
4126                 IsGenerateGroups is not set. Otherwise it returns new
4127                 GEOM.ListOfGO. Its first element is the created solids, the
4128                 remaining ones are created groups.
4129             """
4130             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4131                                                           theLocations, thePath,
4132                                                           theWithContact, theWithCorrection,
4133                                                           IsGenerateGroups)
4134             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4135
4136             if IsGenerateGroups:
4137               self._autoPublish(aList, theName, "pipe")
4138               return aList
4139
4140             self._autoPublish(aList[0], theName, "pipe")
4141             return aList[0]
4142
4143         ## Create a shape by extrusion of the profile shape along
4144         #  the path shape. This function is used only for debug pipe
4145         #  functionality - it is a version of function MakePipeWithShellSections()
4146         #  which give a possibility to recieve information about
4147         #  creating pipe between each pair of sections step by step.
4148         @ManageTransactions("PrimOp")
4149         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4150                                              theLocations, thePath,
4151                                              theWithContact, theWithCorrection,
4152                                              IsGenerateGroups=False, theName=None):
4153             """
4154             Create a shape by extrusion of the profile shape along
4155             the path shape. This function is used only for debug pipe
4156             functionality - it is a version of previous function
4157             geompy.MakePipeWithShellSections() which give a possibility to
4158             recieve information about creating pipe between each pair of
4159             sections step by step.
4160             """
4161             res = []
4162             nbsect = len(theSeqBases)
4163             nbsubsect = len(theSeqSubBases)
4164             #print "nbsect = ",nbsect
4165             for i in range(1,nbsect):
4166                 #print "  i = ",i
4167                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4168                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4169                 tmpSeqSubBases = []
4170                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4171                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4172                                                               tmpLocations, thePath,
4173                                                               theWithContact, theWithCorrection,
4174                                                               IsGenerateGroups)
4175                 if self.PrimOp.IsDone() == 0:
4176                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4177                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4178                     break
4179                 else:
4180                     print "Pipe between ",i," and ",i+1," sections is OK"
4181                     res.append(aList[0])
4182                     pass
4183                 pass
4184
4185             resc = self.MakeCompound(res)
4186             #resc = self.MakeSewing(res, 0.001)
4187             #print "resc: ",resc
4188             self._autoPublish(resc, theName, "pipe")
4189             return resc
4190
4191         ## Create solids between given sections.
4192         #  It is possible to generate groups along with the result by means of
4193         #  setting the flag \a IsGenerateGroups. For detailed information on
4194         #  groups that can be created please see the method MakePipe().
4195         #  @param theSeqBases - list of sections (shell or face).
4196         #  @param theLocations - list of corresponding vertexes
4197         #  @param IsGenerateGroups - flag that tells if it is necessary to
4198         #         create groups. It is equal to False by default.
4199         #  @param theName Object name; when specified, this parameter is used
4200         #         for result publication in the study. Otherwise, if automatic
4201         #         publication is switched on, default value is used for result name.
4202         #
4203         #  @return New GEOM.GEOM_Object, containing the created solids if 
4204         #          \a IsGenerateGroups is not set. Otherwise it returns new
4205         #          GEOM.ListOfGO. Its first element is the created solids, the
4206         #          remaining ones are created groups.
4207         #
4208         #  @ref tui_creation_pipe_without_path "Example"
4209         @ManageTransactions("PrimOp")
4210         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4211                                       IsGenerateGroups=False, theName=None):
4212             """
4213             Create solids between given sections.
4214             It is possible to generate groups along with the result by means of
4215             setting the flag IsGenerateGroups. For detailed information on
4216             groups that can be created please see the method geompy.MakePipe().
4217
4218             Parameters:
4219                 theSeqBases - list of sections (shell or face).
4220                 theLocations - list of corresponding vertexes
4221                 IsGenerateGroups - flag that tells if it is necessary to
4222                                  create groups. It is equal to False by default.
4223                 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             Returns:
4228                 New GEOM.GEOM_Object, containing the created solids if 
4229                 IsGenerateGroups is not set. Otherwise it returns new
4230                 GEOM.ListOfGO. Its first element is the created solids, the
4231                 remaining ones are created groups.
4232             """
4233             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4234                                                           IsGenerateGroups)
4235             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4236
4237             if IsGenerateGroups:
4238               self._autoPublish(aList, theName, "pipe")
4239               return aList
4240
4241             self._autoPublish(aList[0], theName, "pipe")
4242             return aList[0]
4243
4244         ## Create a shape by extrusion of the base shape along
4245         #  the path shape with constant bi-normal direction along the given vector.
4246         #  The path shape can be a wire or an edge.
4247         #  It is possible to generate groups along with the result by means of
4248         #  setting the flag \a IsGenerateGroups. For detailed information on
4249         #  groups that can be created please see the method MakePipe().
4250         #  @param theBase Base shape to be extruded.
4251         #  @param thePath Path shape to extrude the base shape along it.
4252         #  @param theVec Vector defines a constant binormal direction to keep the
4253         #                same angle beetween the direction and the sections
4254         #                along the sweep surface.
4255         #  @param IsGenerateGroups flag that tells if it is necessary to
4256         #         create groups. It is equal to False by default.
4257         #  @param theName Object name; when specified, this parameter is used
4258         #         for result publication in the study. Otherwise, if automatic
4259         #         publication is switched on, default value is used for result name.
4260         #
4261         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4262         #          \a IsGenerateGroups is not set. Otherwise it returns new
4263         #          GEOM.ListOfGO. Its first element is the created pipe, the
4264         #          remaining ones are created groups.
4265         #
4266         #  @ref tui_creation_pipe "Example"
4267         @ManageTransactions("PrimOp")
4268         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4269                                         IsGenerateGroups=False, theName=None):
4270             """
4271             Create a shape by extrusion of the base shape along
4272             the path shape with constant bi-normal direction along the given vector.
4273             The path shape can be a wire or an edge.
4274             It is possible to generate groups along with the result by means of
4275             setting the flag IsGenerateGroups. For detailed information on
4276             groups that can be created please see the method geompy.MakePipe().
4277
4278             Parameters:
4279                 theBase Base shape to be extruded.
4280                 thePath Path shape to extrude the base shape along it.
4281                 theVec Vector defines a constant binormal direction to keep the
4282                        same angle beetween the direction and the sections
4283                        along the sweep surface.
4284                 IsGenerateGroups flag that tells if it is necessary to
4285                                  create groups. It is equal to False by default.
4286                 theName Object name; when specified, this parameter is used
4287                         for result publication in the study. Otherwise, if automatic
4288                         publication is switched on, default value is used for result name.
4289
4290             Returns:
4291                 New GEOM.GEOM_Object, containing the created pipe if 
4292                 IsGenerateGroups is not set. Otherwise it returns new
4293                 GEOM.ListOfGO. Its first element is the created pipe, the
4294                 remaining ones are created groups.
4295             """
4296             # Example: see GEOM_TestAll.py
4297             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4298                           theVec, IsGenerateGroups)
4299             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4300
4301             if IsGenerateGroups:
4302               self._autoPublish(aList, theName, "pipe")
4303               return aList
4304
4305             self._autoPublish(aList[0], theName, "pipe")
4306             return aList[0]
4307
4308         ## Makes a thick solid from a shape. If the input is a surface shape
4309         #  (face or shell) the result is a thick solid. If an input shape is
4310         #  a solid the result is a hollowed solid with removed faces.
4311         #  @param theShape Face or Shell to get thick solid or solid to get
4312         #         hollowed solid.
4313         #  @param theThickness Thickness of the resulting solid
4314         #  @param theFacesIDs the list of face IDs to be removed from the
4315         #         result. It is ignored if \a theShape is a face or a shell.
4316         #         It is empty by default. 
4317         #  @param theInside If true the thickness is applied towards inside
4318         #  @param theName Object name; when specified, this parameter is used
4319         #         for result publication in the study. Otherwise, if automatic
4320         #         publication is switched on, default value is used for result name.
4321         #
4322         #  @return New GEOM.GEOM_Object, containing the created solid
4323         #
4324         #  @ref tui_creation_thickness "Example"
4325         @ManageTransactions("PrimOp")
4326         def MakeThickSolid(self, theShape, theThickness,
4327                            theFacesIDs=[], theInside=False, theName=None):
4328             """
4329             Make a thick solid from a shape. If the input is a surface shape
4330             (face or shell) the result is a thick solid. If an input shape is
4331             a solid the result is a hollowed solid with removed faces.
4332
4333             Parameters:
4334                  theShape Face or Shell to get thick solid or solid to get
4335                           hollowed solid.
4336                  theThickness Thickness of the resulting solid
4337                  theFacesIDs the list of face IDs to be removed from the
4338                           result. It is ignored if theShape is a face or a
4339                           shell. It is empty by default. 
4340                  theInside If true the thickness is applied towards inside
4341                  theName Object name; when specified, this parameter is used
4342                          for result publication in the study. Otherwise, if automatic
4343                          publication is switched on, default value is used for result name.
4344
4345             Returns:
4346                 New GEOM.GEOM_Object, containing the created solid
4347             """
4348             # Example: see GEOM_TestAll.py
4349             theThickness,Parameters = ParseParameters(theThickness)
4350             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4351                                                theThickness, True, theInside)
4352             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4353             anObj.SetParameters(Parameters)
4354             self._autoPublish(anObj, theName, "thickSolid")
4355             return anObj
4356
4357
4358         ## Modifies a shape to make it a thick solid. If the input is a surface
4359         #  shape (face or shell) the result is a thick solid. If an input shape
4360         #  is a solid the result is a hollowed solid with removed faces.
4361         #  @param theShape Face or Shell to get thick solid or solid to get
4362         #         hollowed solid.
4363         #  @param theThickness Thickness of the resulting solid
4364         #  @param theFacesIDs the list of face IDs to be removed from the
4365         #         result. It is ignored if \a theShape is a face or a shell.
4366         #         It is empty by default. 
4367         #  @param theInside If true the thickness is applied towards inside
4368         #
4369         #  @return The modified shape
4370         #
4371         #  @ref tui_creation_thickness "Example"
4372         @ManageTransactions("PrimOp")
4373         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4374             """
4375             Modifies a shape to make it a thick solid. If the input is a
4376             surface shape (face or shell) the result is a thick solid. If
4377             an input shape is a solid the result is a hollowed solid with
4378             removed faces.
4379
4380             Parameters:
4381                 theShape Face or Shell to get thick solid or solid to get
4382                          hollowed solid.
4383                 theThickness Thickness of the resulting solid
4384                 theFacesIDs the list of face IDs to be removed from the
4385                          result. It is ignored if \a theShape is a face or
4386                          a shell. It is empty by default. 
4387                 theInside If true the thickness is applied towards inside
4388
4389             Returns:
4390                 The modified shape
4391             """
4392             # Example: see GEOM_TestAll.py
4393             theThickness,Parameters = ParseParameters(theThickness)
4394             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4395                                                theThickness, False, theInside)
4396             RaiseIfFailed("Thicken", self.PrimOp)
4397             anObj.SetParameters(Parameters)
4398             return anObj
4399
4400         ## Build a middle path of a pipe-like shape.
4401         #  The path shape can be a wire or an edge.
4402         #  @param theShape It can be closed or unclosed pipe-like shell
4403         #                  or a pipe-like solid.
4404         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4405         #                            should be wires or faces of theShape.
4406         #  @param theName Object name; when specified, this parameter is used
4407         #         for result publication in the study. Otherwise, if automatic
4408         #         publication is switched on, default value is used for result name.
4409         #
4410         #  @note It is not assumed that exact or approximate copy of theShape
4411         #        can be obtained by applying existing Pipe operation on the
4412         #        resulting "Path" wire taking theBase1 as the base - it is not
4413         #        always possible; though in some particular cases it might work
4414         #        it is not guaranteed. Thus, RestorePath function should not be
4415         #        considered as an exact reverse operation of the Pipe.
4416         #
4417         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4418         #                                source pipe's "path".
4419         #
4420         #  @ref tui_creation_pipe_path "Example"
4421         @ManageTransactions("PrimOp")
4422         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4423             """
4424             Build a middle path of a pipe-like shape.
4425             The path shape can be a wire or an edge.
4426
4427             Parameters:
4428                 theShape It can be closed or unclosed pipe-like shell
4429                          or a pipe-like solid.
4430                 theBase1, theBase2 Two bases of the supposed pipe. This
4431                                    should be wires or faces of theShape.
4432                 theName Object name; when specified, this parameter is used
4433                         for result publication in the study. Otherwise, if automatic
4434                         publication is switched on, default value is used for result name.
4435
4436             Returns:
4437                 New GEOM_Object, containing an edge or wire that represent
4438                                  source pipe's path.
4439             """
4440             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4441             RaiseIfFailed("RestorePath", self.PrimOp)
4442             self._autoPublish(anObj, theName, "path")
4443             return anObj
4444
4445         ## Build a middle path of a pipe-like shape.
4446         #  The path shape can be a wire or an edge.
4447         #  @param theShape It can be closed or unclosed pipe-like shell
4448         #                  or a pipe-like solid.
4449         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4450         #                                should be lists of edges of theShape.
4451         #  @param theName Object name; when specified, this parameter is used
4452         #         for result publication in the study. Otherwise, if automatic
4453         #         publication is switched on, default value is used for result name.
4454         #
4455         #  @note It is not assumed that exact or approximate copy of theShape
4456         #        can be obtained by applying existing Pipe operation on the
4457         #        resulting "Path" wire taking theBase1 as the base - it is not
4458         #        always possible; though in some particular cases it might work
4459         #        it is not guaranteed. Thus, RestorePath function should not be
4460         #        considered as an exact reverse operation of the Pipe.
4461         #
4462         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4463         #                                source pipe's "path".
4464         #
4465         #  @ref tui_creation_pipe_path "Example"
4466         @ManageTransactions("PrimOp")
4467         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4468             """
4469             Build a middle path of a pipe-like shape.
4470             The path shape can be a wire or an edge.
4471
4472             Parameters:
4473                 theShape It can be closed or unclosed pipe-like shell
4474                          or a pipe-like solid.
4475                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4476                                        should be lists of edges of theShape.
4477                 theName Object name; when specified, this parameter is used
4478                         for result publication in the study. Otherwise, if automatic
4479                         publication is switched on, default value is used for result name.
4480
4481             Returns:
4482                 New GEOM_Object, containing an edge or wire that represent
4483                                  source pipe's path.
4484             """
4485             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4486             RaiseIfFailed("RestorePath", self.PrimOp)
4487             self._autoPublish(anObj, theName, "path")
4488             return anObj
4489
4490         # end of l3_complex
4491         ## @}
4492
4493         ## @addtogroup l3_basic_go
4494         ## @{
4495
4496         ## Create a linear edge with specified ends.
4497         #  @param thePnt1 Point for the first end of edge.
4498         #  @param thePnt2 Point for the second end of edge.
4499         #  @param theName Object name; when specified, this parameter is used
4500         #         for result publication in the study. Otherwise, if automatic
4501         #         publication is switched on, default value is used for result name.
4502         #
4503         #  @return New GEOM.GEOM_Object, containing the created edge.
4504         #
4505         #  @ref tui_creation_edge "Example"
4506         @ManageTransactions("ShapesOp")
4507         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4508             """
4509             Create a linear edge with specified ends.
4510
4511             Parameters:
4512                 thePnt1 Point for the first end of edge.
4513                 thePnt2 Point for the second end of edge.
4514                 theName Object name; when specified, this parameter is used
4515                         for result publication in the study. Otherwise, if automatic
4516                         publication is switched on, default value is used for result name.
4517
4518             Returns:
4519                 New GEOM.GEOM_Object, containing the created edge.
4520             """
4521             # Example: see GEOM_TestAll.py
4522             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4523             RaiseIfFailed("MakeEdge", self.ShapesOp)
4524             self._autoPublish(anObj, theName, "edge")
4525             return anObj
4526
4527         ## Create a new edge, corresponding to the given length on the given curve.
4528         #  @param theRefCurve The referenced curve (edge).
4529         #  @param theLength Length on the referenced curve. It can be negative.
4530         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4531         #                       at the end of \a theRefCurve, close to the selected point.
4532         #                       If None, start from the first point of \a theRefCurve.
4533         #  @param theName Object name; when specified, this parameter is used
4534         #         for result publication in the study. Otherwise, if automatic
4535         #         publication is switched on, default value is used for result name.
4536         #
4537         #  @return New GEOM.GEOM_Object, containing the created edge.
4538         #
4539         #  @ref tui_creation_edge "Example"
4540         @ManageTransactions("ShapesOp")
4541         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4542             """
4543             Create a new edge, corresponding to the given length on the given curve.
4544
4545             Parameters:
4546                 theRefCurve The referenced curve (edge).
4547                 theLength Length on the referenced curve. It can be negative.
4548                 theStartPoint Any point can be selected for it, the new edge will begin
4549                               at the end of theRefCurve, close to the selected point.
4550                               If None, start from the first point of theRefCurve.
4551                 theName Object name; when specified, this parameter is used
4552                         for result publication in the study. Otherwise, if automatic
4553                         publication is switched on, default value is used for result name.
4554
4555             Returns:
4556                 New GEOM.GEOM_Object, containing the created edge.
4557             """
4558             # Example: see GEOM_TestAll.py
4559             theLength, Parameters = ParseParameters(theLength)
4560             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4561             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4562             anObj.SetParameters(Parameters)
4563             self._autoPublish(anObj, theName, "edge")
4564             return anObj
4565
4566         ## Create an edge from specified wire.
4567         #  @param theWire source Wire
4568         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4569         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4570         #  @param theName Object name; when specified, this parameter is used
4571         #         for result publication in the study. Otherwise, if automatic
4572         #         publication is switched on, default value is used for result name.
4573         #
4574         #  @return New GEOM.GEOM_Object, containing the created edge.
4575         #
4576         #  @ref tui_creation_edge "Example"
4577         @ManageTransactions("ShapesOp")
4578         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4579             """
4580             Create an edge from specified wire.
4581
4582             Parameters:
4583                 theWire source Wire
4584                 theLinearTolerance linear tolerance value (default = 1e-07)
4585                 theAngularTolerance angular tolerance value (default = 1e-12)
4586                 theName Object name; when specified, this parameter is used
4587                         for result publication in the study. Otherwise, if automatic
4588                         publication is switched on, default value is used for result name.
4589
4590             Returns:
4591                 New GEOM.GEOM_Object, containing the created edge.
4592             """
4593             # Example: see GEOM_TestAll.py
4594             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4595             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4596             self._autoPublish(anObj, theName, "edge")
4597             return anObj
4598
4599         ## Create a wire from the set of edges and wires.
4600         #  @param theEdgesAndWires List of edges and/or wires.
4601         #  @param theTolerance Maximum distance between vertices, that will be merged.
4602         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4603         #  @param theName Object name; when specified, this parameter is used
4604         #         for result publication in the study. Otherwise, if automatic
4605         #         publication is switched on, default value is used for result name.
4606         #
4607         #  @return New GEOM.GEOM_Object, containing the created wire.
4608         #
4609         #  @ref tui_creation_wire "Example"
4610         @ManageTransactions("ShapesOp")
4611         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4612             """
4613             Create a wire from the set of edges and wires.
4614
4615             Parameters:
4616                 theEdgesAndWires List of edges and/or wires.
4617                 theTolerance Maximum distance between vertices, that will be merged.
4618                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4619                 theName Object name; when specified, this parameter is used
4620                         for result publication in the study. Otherwise, if automatic
4621                         publication is switched on, default value is used for result name.
4622
4623             Returns:
4624                 New GEOM.GEOM_Object, containing the created wire.
4625             """
4626             # Example: see GEOM_TestAll.py
4627             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4628             RaiseIfFailed("MakeWire", self.ShapesOp)
4629             self._autoPublish(anObj, theName, "wire")
4630             return anObj
4631
4632         ## Create a face on the given wire.
4633         #  @param theWire closed Wire or Edge to build the face on.
4634         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4635         #                        If the tolerance of the obtained planar face is less
4636         #                        than 1e-06, this face will be returned, otherwise the
4637         #                        algorithm tries to build any suitable face on the given
4638         #                        wire and prints a warning message.
4639         #  @param theName Object name; when specified, this parameter is used
4640         #         for result publication in the study. Otherwise, if automatic
4641         #         publication is switched on, default value is used for result name.
4642         #
4643         #  @return New GEOM.GEOM_Object, containing the created face.
4644         #
4645         #  @ref tui_creation_face "Example"
4646         @ManageTransactions("ShapesOp")
4647         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4648             """
4649             Create a face on the given wire.
4650
4651             Parameters:
4652                 theWire closed Wire or Edge to build the face on.
4653                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4654                                If the tolerance of the obtained planar face is less
4655                                than 1e-06, this face will be returned, otherwise the
4656                                algorithm tries to build any suitable face on the given
4657                                wire and prints a warning message.
4658                 theName Object name; when specified, this parameter is used
4659                         for result publication in the study. Otherwise, if automatic
4660                         publication is switched on, default value is used for result name.
4661
4662             Returns:
4663                 New GEOM.GEOM_Object, containing the created face.
4664             """
4665             # Example: see GEOM_TestAll.py
4666             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4667             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4668                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4669             else:
4670                 RaiseIfFailed("MakeFace", self.ShapesOp)
4671             self._autoPublish(anObj, theName, "face")
4672             return anObj
4673
4674         ## Create a face on the given wires set.
4675         #  @param theWires List of closed wires or edges to build the face on.
4676         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4677         #                        If the tolerance of the obtained planar face is less
4678         #                        than 1e-06, this face will be returned, otherwise the
4679         #                        algorithm tries to build any suitable face on the given
4680         #                        wire and prints a warning message.
4681         #  @param theName Object name; when specified, this parameter is used
4682         #         for result publication in the study. Otherwise, if automatic
4683         #         publication is switched on, default value is used for result name.
4684         #
4685         #  @return New GEOM.GEOM_Object, containing the created face.
4686         #
4687         #  @ref tui_creation_face "Example"
4688         @ManageTransactions("ShapesOp")
4689         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4690             """
4691             Create a face on the given wires set.
4692
4693             Parameters:
4694                 theWires List of closed wires or edges to build the face on.
4695                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4696                                If the tolerance of the obtained planar face is less
4697                                than 1e-06, this face will be returned, otherwise the
4698                                algorithm tries to build any suitable face on the given
4699                                wire and prints a warning message.
4700                 theName Object name; when specified, this parameter is used
4701                         for result publication in the study. Otherwise, if automatic
4702                         publication is switched on, default value is used for result name.
4703
4704             Returns:
4705                 New GEOM.GEOM_Object, containing the created face.
4706             """
4707             # Example: see GEOM_TestAll.py
4708             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4709             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4710                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4711             else:
4712                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4713             self._autoPublish(anObj, theName, "face")
4714             return anObj
4715
4716         ## See MakeFaceWires() method for details.
4717         #
4718         #  @ref tui_creation_face "Example 1"
4719         #  \n @ref swig_MakeFaces  "Example 2"
4720         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4721             """
4722             See geompy.MakeFaceWires() method for details.
4723             """
4724             # Example: see GEOM_TestOthers.py
4725             # note: auto-publishing is done in self.MakeFaceWires()
4726             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4727             return anObj
4728
4729         ## Create a face based on a surface from given face bounded
4730         #  by given wire.
4731         #  @param theFace the face whose surface is used to create a new face.
4732         #  @param theWire the wire that will bound a new face.
4733         #  @param theName Object name; when specified, this parameter is used
4734         #         for result publication in the study. Otherwise, if automatic
4735         #         publication is switched on, default value is used for result name.
4736         #
4737         #  @return New GEOM.GEOM_Object, containing the created face.
4738         #
4739         #  @ref tui_creation_face "Example"
4740         @ManageTransactions("ShapesOp")
4741         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4742             """
4743             Create a face based on a surface from given face bounded
4744             by given wire.
4745
4746             Parameters:
4747                 theFace the face whose surface is used to create a new face.
4748                 theWire the wire that will bound a new face.
4749                 theName Object name; when specified, this parameter is used
4750                         for result publication in the study. Otherwise, if automatic
4751                         publication is switched on, default value is used for result name.
4752
4753             Returns:
4754                 New GEOM.GEOM_Object, containing the created face.
4755             """
4756             # Example: see GEOM_TestAll.py
4757             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4758             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4759             self._autoPublish(anObj, theName, "face")
4760             return anObj
4761           
4762         ## Create a face from a set of edges with the given constraints.
4763         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4764         #         - edges should form a closed wire;
4765         #         - for each edge, constraint face is optional: if a constraint face is missing
4766         #           for some edge, this means that there no constraint associated with this edge.
4767         #  @param theName Object name; when specified, this parameter is used
4768         #         for result publication in the study. Otherwise, if automatic
4769         #         publication is switched on, default value is used for result name.
4770         # 
4771         # @return New GEOM.GEOM_Object, containing the created face.
4772         # 
4773         # @ref tui_creation_face "Example"
4774         @ManageTransactions("ShapesOp")
4775         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4776             """
4777             Create a face from a set of edges with the given constraints.
4778
4779             Parameters:
4780                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4781                         - edges should form a closed wire;
4782                         - for each edge, constraint face is optional: if a constraint face is missing
4783                           for some edge, this means that there no constraint associated with this edge.
4784                 theName Object name; when specified, this parameter is used
4785                         for result publication in the study. Otherwise, if automatic
4786                         publication is switched on, default value is used for result name.
4787
4788             Returns:
4789                 New GEOM.GEOM_Object, containing the created face.
4790             """
4791             # Example: see GEOM_TestAll.py
4792             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4793             if anObj is None:
4794                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4795             self._autoPublish(anObj, theName, "face")
4796             return anObj
4797
4798         ## Create a shell from the set of faces and shells.
4799         #  @param theFacesAndShells List of faces and/or shells.
4800         #  @param theName Object name; when specified, this parameter is used
4801         #         for result publication in the study. Otherwise, if automatic
4802         #         publication is switched on, default value is used for result name.
4803         #
4804         #  @return New GEOM.GEOM_Object, containing the created shell.
4805         #
4806         #  @ref tui_creation_shell "Example"
4807         @ManageTransactions("ShapesOp")
4808         def MakeShell(self, theFacesAndShells, theName=None):
4809             """
4810             Create a shell from the set of faces and shells.
4811
4812             Parameters:
4813                 theFacesAndShells List of faces and/or shells.
4814                 theName Object name; when specified, this parameter is used
4815                         for result publication in the study. Otherwise, if automatic
4816                         publication is switched on, default value is used for result name.
4817
4818             Returns:
4819                 New GEOM.GEOM_Object, containing the created shell.
4820             """
4821             # Example: see GEOM_TestAll.py
4822             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4823             RaiseIfFailed("MakeShell", self.ShapesOp)
4824             self._autoPublish(anObj, theName, "shell")
4825             return anObj
4826
4827         ## Create a solid, bounded by the given shells.
4828         #  @param theShells Sequence of bounding shells.
4829         #  @param theName Object name; when specified, this parameter is used
4830         #         for result publication in the study. Otherwise, if automatic
4831         #         publication is switched on, default value is used for result name.
4832         #
4833         #  @return New GEOM.GEOM_Object, containing the created solid.
4834         #
4835         #  @ref tui_creation_solid "Example"
4836         @ManageTransactions("ShapesOp")
4837         def MakeSolid(self, theShells, theName=None):
4838             """
4839             Create a solid, bounded by the given shells.
4840
4841             Parameters:
4842                 theShells Sequence of bounding shells.
4843                 theName Object name; when specified, this parameter is used
4844                         for result publication in the study. Otherwise, if automatic
4845                         publication is switched on, default value is used for result name.
4846
4847             Returns:
4848                 New GEOM.GEOM_Object, containing the created solid.
4849             """
4850             # Example: see GEOM_TestAll.py
4851             theShells = ToList(theShells)
4852             if len(theShells) == 1:
4853                 descr = self._IsGoodForSolid(theShells[0])
4854                 #if len(descr) > 0:
4855                 #    raise RuntimeError, "MakeSolidShells : " + descr
4856                 if descr == "WRN_SHAPE_UNCLOSED":
4857                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4858             anObj = self.ShapesOp.MakeSolidShells(theShells)
4859             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4860             self._autoPublish(anObj, theName, "solid")
4861             return anObj
4862
4863         ## Create a compound of the given shapes.
4864         #  @param theShapes List of shapes to put in compound.
4865         #  @param theName Object name; when specified, this parameter is used
4866         #         for result publication in the study. Otherwise, if automatic
4867         #         publication is switched on, default value is used for result name.
4868         #
4869         #  @return New GEOM.GEOM_Object, containing the created compound.
4870         #
4871         #  @ref tui_creation_compound "Example"
4872         @ManageTransactions("ShapesOp")
4873         def MakeCompound(self, theShapes, theName=None):
4874             """
4875             Create a compound of the given shapes.
4876
4877             Parameters:
4878                 theShapes List of shapes to put in compound.
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                 New GEOM.GEOM_Object, containing the created compound.
4885             """
4886             # Example: see GEOM_TestAll.py
4887             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4888             RaiseIfFailed("MakeCompound", self.ShapesOp)
4889             self._autoPublish(anObj, theName, "compound")
4890             return anObj
4891         
4892         ## Create a solid (or solids) from the set of faces and/or shells.
4893         #  @param theFacesOrShells List of faces and/or shells.
4894         #  @param isIntersect If TRUE, forces performing intersections
4895         #         between arguments; otherwise (default) intersection is not performed.
4896         #  @param theName Object name; when specified, this parameter is used
4897         #         for result publication in the study. Otherwise, if automatic
4898         #         publication is switched on, default value is used for result name.
4899         #
4900         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4901         #
4902         #  @ref tui_creation_solid_from_faces "Example"
4903         @ManageTransactions("ShapesOp")
4904         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
4905             """
4906             Create a solid (or solids) from the set of connected faces and/or shells.
4907
4908             Parameters:
4909                 theFacesOrShells List of faces and/or shells.
4910                 isIntersect If TRUE, forces performing intersections
4911                         between arguments; otherwise (default) intersection is not performed
4912                 theName Object name; when specified, this parameter is used.
4913                         for result publication in the study. Otherwise, if automatic
4914                         publication is switched on, default value is used for result name.
4915
4916             Returns:
4917                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4918             """
4919             # Example: see GEOM_TestAll.py
4920             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
4921             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
4922             self._autoPublish(anObj, theName, "solid")
4923             return anObj
4924
4925         # end of l3_basic_go
4926         ## @}
4927
4928         ## @addtogroup l2_measure
4929         ## @{
4930
4931         ## Gives quantity of faces in the given shape.
4932         #  @param theShape Shape to count faces of.
4933         #  @return Quantity of faces.
4934         #
4935         #  @ref swig_NumberOf "Example"
4936         @ManageTransactions("ShapesOp")
4937         def NumberOfFaces(self, theShape):
4938             """
4939             Gives quantity of faces in the given shape.
4940
4941             Parameters:
4942                 theShape Shape to count faces of.
4943
4944             Returns:
4945                 Quantity of faces.
4946             """
4947             # Example: see GEOM_TestOthers.py
4948             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4949             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4950             return nb_faces
4951
4952         ## Gives quantity of edges in the given shape.
4953         #  @param theShape Shape to count edges of.
4954         #  @return Quantity of edges.
4955         #
4956         #  @ref swig_NumberOf "Example"
4957         @ManageTransactions("ShapesOp")
4958         def NumberOfEdges(self, theShape):
4959             """
4960             Gives quantity of edges in the given shape.
4961
4962             Parameters:
4963                 theShape Shape to count edges of.
4964
4965             Returns:
4966                 Quantity of edges.
4967             """
4968             # Example: see GEOM_TestOthers.py
4969             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4970             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4971             return nb_edges
4972
4973         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4974         #  @param theShape Shape to count sub-shapes of.
4975         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4976         #  @return Quantity of sub-shapes of given type.
4977         #
4978         #  @ref swig_NumberOf "Example"
4979         @ManageTransactions("ShapesOp")
4980         def NumberOfSubShapes(self, theShape, theShapeType):
4981             """
4982             Gives quantity of sub-shapes of type theShapeType in the given shape.
4983
4984             Parameters:
4985                 theShape Shape to count sub-shapes of.
4986                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4987
4988             Returns:
4989                 Quantity of sub-shapes of given type.
4990             """
4991             # Example: see GEOM_TestOthers.py
4992             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4993             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4994             return nb_ss
4995
4996         ## Gives quantity of solids in the given shape.
4997         #  @param theShape Shape to count solids in.
4998         #  @return Quantity of solids.
4999         #
5000         #  @ref swig_NumberOf "Example"
5001         @ManageTransactions("ShapesOp")
5002         def NumberOfSolids(self, theShape):
5003             """
5004             Gives quantity of solids in the given shape.
5005
5006             Parameters:
5007                 theShape Shape to count solids in.
5008
5009             Returns:
5010                 Quantity of solids.
5011             """
5012             # Example: see GEOM_TestOthers.py
5013             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5014             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5015             return nb_solids
5016
5017         # end of l2_measure
5018         ## @}
5019
5020         ## @addtogroup l3_healing
5021         ## @{
5022
5023         ## Reverses an orientation the given shape.
5024         #  @param theShape Shape to be reversed.
5025         #  @param theName Object name; when specified, this parameter is used
5026         #         for result publication in the study. Otherwise, if automatic
5027         #         publication is switched on, default value is used for result name.
5028         #
5029         #  @return The reversed copy of theShape.
5030         #
5031         #  @ref swig_ChangeOrientation "Example"
5032         @ManageTransactions("ShapesOp")
5033         def ChangeOrientation(self, theShape, theName=None):
5034             """
5035             Reverses an orientation the given shape.
5036
5037             Parameters:
5038                 theShape Shape to be reversed.
5039                 theName Object name; when specified, this parameter is used
5040                         for result publication in the study. Otherwise, if automatic
5041                         publication is switched on, default value is used for result name.
5042
5043             Returns:
5044                 The reversed copy of theShape.
5045             """
5046             # Example: see GEOM_TestAll.py
5047             anObj = self.ShapesOp.ChangeOrientation(theShape)
5048             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5049             self._autoPublish(anObj, theName, "reversed")
5050             return anObj
5051
5052         ## See ChangeOrientation() method for details.
5053         #
5054         #  @ref swig_OrientationChange "Example"
5055         def OrientationChange(self, theShape, theName=None):
5056             """
5057             See geompy.ChangeOrientation method for details.
5058             """
5059             # Example: see GEOM_TestOthers.py
5060             # note: auto-publishing is done in self.ChangeOrientation()
5061             anObj = self.ChangeOrientation(theShape, theName)
5062             return anObj
5063
5064         # end of l3_healing
5065         ## @}
5066
5067         ## @addtogroup l4_obtain
5068         ## @{
5069
5070         ## Retrieve all free faces from the given shape.
5071         #  Free face is a face, which is not shared between two shells of the shape.
5072         #  @param theShape Shape to find free faces in.
5073         #  @return List of IDs of all free faces, contained in theShape.
5074         #
5075         #  @ref tui_free_faces_page "Example"
5076         @ManageTransactions("ShapesOp")
5077         def GetFreeFacesIDs(self,theShape):
5078             """
5079             Retrieve all free faces from the given shape.
5080             Free face is a face, which is not shared between two shells of the shape.
5081
5082             Parameters:
5083                 theShape Shape to find free faces in.
5084
5085             Returns:
5086                 List of IDs of all free faces, contained in theShape.
5087             """
5088             # Example: see GEOM_TestOthers.py
5089             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5090             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5091             return anIDs
5092
5093         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5094         #  @param theShape1 Shape to find sub-shapes in.
5095         #  @param theShape2 Shape to find shared sub-shapes with.
5096         #  @param theShapeType Type of sub-shapes to be retrieved.
5097         #  @param theName Object name; when specified, this parameter is used
5098         #         for result publication in the study. Otherwise, if automatic
5099         #         publication is switched on, default value is used for result name.
5100         #
5101         #  @return List of sub-shapes of theShape1, shared with theShape2.
5102         #
5103         #  @ref swig_GetSharedShapes "Example"
5104         @ManageTransactions("ShapesOp")
5105         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5106             """
5107             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5108
5109             Parameters:
5110                 theShape1 Shape to find sub-shapes in.
5111                 theShape2 Shape to find shared sub-shapes with.
5112                 theShapeType Type of sub-shapes to be retrieved.
5113                 theName Object name; when specified, this parameter is used
5114                         for result publication in the study. Otherwise, if automatic
5115                         publication is switched on, default value is used for result name.
5116
5117             Returns:
5118                 List of sub-shapes of theShape1, shared with theShape2.
5119             """
5120             # Example: see GEOM_TestOthers.py
5121             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5122             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5123             self._autoPublish(aList, theName, "shared")
5124             return aList
5125
5126         ## Get sub-shapes, shared by input shapes.
5127         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5128         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5129         #  @param theMultiShare Specifies what type of shares should be checked:
5130         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5131         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5132         #  @param theName Object name; when specified, this parameter is used
5133         #         for result publication in the study. Otherwise, if automatic
5134         #         publication is switched on, default value is used for result name.
5135         #
5136         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5137         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5138         #        and all rest input shapes are returned.
5139         #
5140         #  @return List of all found sub-shapes.
5141         #
5142         #  Examples:
5143         #  - @ref tui_shared_shapes "Example 1"
5144         #  - @ref swig_GetSharedShapes "Example 2"
5145         @ManageTransactions("ShapesOp")
5146         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5147             """
5148             Get sub-shapes, shared by input shapes.
5149
5150             Parameters:
5151                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5152                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5153                 theMultiShare Specifies what type of shares should be checked:
5154                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5155                   - False: causes to search sub-shapes shared between couples of input shapes.
5156                 theName Object name; when specified, this parameter is used
5157                         for result publication in the study. Otherwise, if automatic
5158                         publication is switched on, default value is used for result name.
5159
5160             Note: if theShapes contains single compound, the shares between all possible couples of 
5161                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5162                   and all rest input shapes are returned.
5163
5164             Returns:
5165                 List of all found sub-shapes.
5166             """
5167             # Example: see GEOM_TestOthers.py
5168             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5169             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5170             self._autoPublish(aList, theName, "shared")
5171             return aList
5172
5173         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5174         #  situated relatively the specified plane by the certain way,
5175         #  defined through <VAR>theState</VAR> parameter.
5176         #  @param theShape Shape to find sub-shapes of.
5177         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5178         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5179         #                direction and location of the plane to find shapes on.
5180         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5181         #  @param theName Object name; when specified, this parameter is used
5182         #         for result publication in the study. Otherwise, if automatic
5183         #         publication is switched on, default value is used for result name.
5184         #
5185         #  @return List of all found sub-shapes.
5186         #
5187         #  @ref swig_GetShapesOnPlane "Example"
5188         @ManageTransactions("ShapesOp")
5189         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5190             """
5191             Find in theShape all sub-shapes of type theShapeType,
5192             situated relatively the specified plane by the certain way,
5193             defined through theState parameter.
5194
5195             Parameters:
5196                 theShape Shape to find sub-shapes of.
5197                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5198                 theAx1 Vector (or line, or linear edge), specifying normal
5199                        direction and location of the plane to find shapes on.
5200                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5201                 theName Object name; when specified, this parameter is used
5202                         for result publication in the study. Otherwise, if automatic
5203                         publication is switched on, default value is used for result name.
5204
5205             Returns:
5206                 List of all found sub-shapes.
5207             """
5208             # Example: see GEOM_TestOthers.py
5209             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5210             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5211             self._autoPublish(aList, theName, "shapeOnPlane")
5212             return aList
5213
5214         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5215         #  situated relatively the specified plane by the certain way,
5216         #  defined through <VAR>theState</VAR> parameter.
5217         #  @param theShape Shape to find sub-shapes of.
5218         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5219         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5220         #                direction and location of the plane to find shapes on.
5221         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5222         #
5223         #  @return List of all found sub-shapes indices.
5224         #
5225         #  @ref swig_GetShapesOnPlaneIDs "Example"
5226         @ManageTransactions("ShapesOp")
5227         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5228             """
5229             Find in theShape all sub-shapes of type theShapeType,
5230             situated relatively the specified plane by the certain way,
5231             defined through theState parameter.
5232
5233             Parameters:
5234                 theShape Shape to find sub-shapes of.
5235                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5236                 theAx1 Vector (or line, or linear edge), specifying normal
5237                        direction and location of the plane to find shapes on.
5238                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5239
5240             Returns:
5241                 List of all found sub-shapes indices.
5242             """
5243             # Example: see GEOM_TestOthers.py
5244             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5245             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5246             return aList
5247
5248         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5249         #  situated relatively the specified plane by the certain way,
5250         #  defined through <VAR>theState</VAR> parameter.
5251         #  @param theShape Shape to find sub-shapes of.
5252         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5253         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5254         #                direction of the plane to find shapes on.
5255         #  @param thePnt Point specifying location of the plane to find shapes on.
5256         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5257         #  @param theName Object name; when specified, this parameter is used
5258         #         for result publication in the study. Otherwise, if automatic
5259         #         publication is switched on, default value is used for result name.
5260         #
5261         #  @return List of all found sub-shapes.
5262         #
5263         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5264         @ManageTransactions("ShapesOp")
5265         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5266             """
5267             Find in theShape all sub-shapes of type theShapeType,
5268             situated relatively the specified plane by the certain way,
5269             defined through theState parameter.
5270
5271             Parameters:
5272                 theShape Shape to find sub-shapes of.
5273                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5274                 theAx1 Vector (or line, or linear edge), specifying normal
5275                        direction and location of the plane to find shapes on.
5276                 thePnt Point specifying location of the plane to find shapes on.
5277                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5278                 theName Object name; when specified, this parameter is used
5279                         for result publication in the study. Otherwise, if automatic
5280                         publication is switched on, default value is used for result name.
5281
5282             Returns:
5283                 List of all found sub-shapes.
5284             """
5285             # Example: see GEOM_TestOthers.py
5286             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5287                                                                theAx1, thePnt, theState)
5288             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5289             self._autoPublish(aList, theName, "shapeOnPlane")
5290             return aList
5291
5292         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5293         #  situated relatively the specified plane by the certain way,
5294         #  defined through <VAR>theState</VAR> parameter.
5295         #  @param theShape Shape to find sub-shapes of.
5296         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5297         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5298         #                direction of the plane to find shapes on.
5299         #  @param thePnt Point specifying location of the plane to find shapes on.
5300         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5301         #
5302         #  @return List of all found sub-shapes indices.
5303         #
5304         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5305         @ManageTransactions("ShapesOp")
5306         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5307             """
5308             Find in theShape all sub-shapes of type theShapeType,
5309             situated relatively the specified plane by the certain way,
5310             defined through theState parameter.
5311
5312             Parameters:
5313                 theShape Shape to find sub-shapes of.
5314                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5315                 theAx1 Vector (or line, or linear edge), specifying normal
5316                        direction and location of the plane to find shapes on.
5317                 thePnt Point specifying location of the plane to find shapes on.
5318                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5319
5320             Returns:
5321                 List of all found sub-shapes indices.
5322             """
5323             # Example: see GEOM_TestOthers.py
5324             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5325                                                                   theAx1, thePnt, theState)
5326             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5327             return aList
5328
5329         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5330         #  the specified cylinder by the certain way, defined through \a theState parameter.
5331         #  @param theShape Shape to find sub-shapes of.
5332         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5333         #  @param theAxis Vector (or line, or linear edge), specifying
5334         #                 axis of the cylinder to find shapes on.
5335         #  @param theRadius Radius of the cylinder to find shapes on.
5336         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5337         #  @param theName Object name; when specified, this parameter is used
5338         #         for result publication in the study. Otherwise, if automatic
5339         #         publication is switched on, default value is used for result name.
5340         #
5341         #  @return List of all found sub-shapes.
5342         #
5343         #  @ref swig_GetShapesOnCylinder "Example"
5344         @ManageTransactions("ShapesOp")
5345         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5346             """
5347             Find in theShape all sub-shapes of type theShapeType, situated relatively
5348             the specified cylinder by the certain way, defined through theState parameter.
5349
5350             Parameters:
5351                 theShape Shape to find sub-shapes of.
5352                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5353                 theAxis Vector (or line, or linear edge), specifying
5354                         axis of the cylinder to find shapes on.
5355                 theRadius Radius of the cylinder to find shapes on.
5356                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5357                 theName Object name; when specified, this parameter is used
5358                         for result publication in the study. Otherwise, if automatic
5359                         publication is switched on, default value is used for result name.
5360
5361             Returns:
5362                 List of all found sub-shapes.
5363             """
5364             # Example: see GEOM_TestOthers.py
5365             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5366             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5367             self._autoPublish(aList, theName, "shapeOnCylinder")
5368             return aList
5369
5370         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5371         #  the specified cylinder by the certain way, defined through \a theState parameter.
5372         #  @param theShape Shape to find sub-shapes of.
5373         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5374         #  @param theAxis Vector (or line, or linear edge), specifying
5375         #                 axis of the cylinder to find shapes on.
5376         #  @param theRadius Radius of the cylinder to find shapes on.
5377         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5378         #
5379         #  @return List of all found sub-shapes indices.
5380         #
5381         #  @ref swig_GetShapesOnCylinderIDs "Example"
5382         @ManageTransactions("ShapesOp")
5383         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5384             """
5385             Find in theShape all sub-shapes of type theShapeType, situated relatively
5386             the specified cylinder by the certain way, defined through theState parameter.
5387
5388             Parameters:
5389                 theShape Shape to find sub-shapes of.
5390                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5391                 theAxis Vector (or line, or linear edge), specifying
5392                         axis of the cylinder to find shapes on.
5393                 theRadius Radius of the cylinder to find shapes on.
5394                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5395
5396             Returns:
5397                 List of all found sub-shapes indices.
5398             """
5399             # Example: see GEOM_TestOthers.py
5400             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5401             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5402             return aList
5403
5404         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5405         #  the specified cylinder by the certain way, defined through \a theState parameter.
5406         #  @param theShape Shape to find sub-shapes of.
5407         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5408         #  @param theAxis Vector (or line, or linear edge), specifying
5409         #                 axis of the cylinder to find shapes on.
5410         #  @param thePnt Point specifying location of the bottom of the cylinder.
5411         #  @param theRadius Radius of the cylinder to find shapes on.
5412         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5413         #  @param theName Object name; when specified, this parameter is used
5414         #         for result publication in the study. Otherwise, if automatic
5415         #         publication is switched on, default value is used for result name.
5416         #
5417         #  @return List of all found sub-shapes.
5418         #
5419         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5420         @ManageTransactions("ShapesOp")
5421         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5422             """
5423             Find in theShape all sub-shapes of type theShapeType, situated relatively
5424             the specified cylinder by the certain way, defined through theState parameter.
5425
5426             Parameters:
5427                 theShape Shape to find sub-shapes of.
5428                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5429                 theAxis Vector (or line, or linear edge), specifying
5430                         axis of the cylinder to find shapes on.
5431                 theRadius Radius of the cylinder to find shapes on.
5432                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5433                 theName Object name; when specified, this parameter is used
5434                         for result publication in the study. Otherwise, if automatic
5435                         publication is switched on, default value is used for result name.
5436
5437             Returns:
5438                 List of all found sub-shapes.
5439             """
5440             # Example: see GEOM_TestOthers.py
5441             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5442             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5443             self._autoPublish(aList, theName, "shapeOnCylinder")
5444             return aList
5445
5446         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5447         #  the specified cylinder by the certain way, defined through \a theState parameter.
5448         #  @param theShape Shape to find sub-shapes of.
5449         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5450         #  @param theAxis Vector (or line, or linear edge), specifying
5451         #                 axis of the cylinder to find shapes on.
5452         #  @param thePnt Point specifying location of the bottom of the cylinder.
5453         #  @param theRadius Radius of the cylinder to find shapes on.
5454         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5455         #
5456         #  @return List of all found sub-shapes indices
5457         #
5458         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5459         @ManageTransactions("ShapesOp")
5460         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5461             """
5462             Find in theShape all sub-shapes of type theShapeType, situated relatively
5463             the specified cylinder by the certain way, defined through theState parameter.
5464
5465             Parameters:
5466                 theShape Shape to find sub-shapes of.
5467                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5468                 theAxis Vector (or line, or linear edge), specifying
5469                         axis of the cylinder to find shapes on.
5470                 theRadius Radius of the cylinder to find shapes on.
5471                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5472
5473             Returns:
5474                 List of all found sub-shapes indices.
5475             """
5476             # Example: see GEOM_TestOthers.py
5477             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5478             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5479             return aList
5480
5481         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5482         #  the specified sphere by the certain way, defined through \a theState parameter.
5483         #  @param theShape Shape to find sub-shapes of.
5484         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5485         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5486         #  @param theRadius Radius of the sphere to find shapes on.
5487         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5488         #  @param theName Object name; when specified, this parameter is used
5489         #         for result publication in the study. Otherwise, if automatic
5490         #         publication is switched on, default value is used for result name.
5491         #
5492         #  @return List of all found sub-shapes.
5493         #
5494         #  @ref swig_GetShapesOnSphere "Example"
5495         @ManageTransactions("ShapesOp")
5496         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5497             """
5498             Find in theShape all sub-shapes of type theShapeType, situated relatively
5499             the specified sphere by the certain way, defined through theState parameter.
5500
5501             Parameters:
5502                 theShape Shape to find sub-shapes of.
5503                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5504                 theCenter Point, specifying center of the sphere to find shapes on.
5505                 theRadius Radius of the sphere to find shapes on.
5506                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5507                 theName Object name; when specified, this parameter is used
5508                         for result publication in the study. Otherwise, if automatic
5509                         publication is switched on, default value is used for result name.
5510
5511             Returns:
5512                 List of all found sub-shapes.
5513             """
5514             # Example: see GEOM_TestOthers.py
5515             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5516             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5517             self._autoPublish(aList, theName, "shapeOnSphere")
5518             return aList
5519
5520         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5521         #  the specified sphere by the certain way, defined through \a theState parameter.
5522         #  @param theShape Shape to find sub-shapes of.
5523         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5524         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5525         #  @param theRadius Radius of the sphere to find shapes on.
5526         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5527         #
5528         #  @return List of all found sub-shapes indices.
5529         #
5530         #  @ref swig_GetShapesOnSphereIDs "Example"
5531         @ManageTransactions("ShapesOp")
5532         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5533             """
5534             Find in theShape all sub-shapes of type theShapeType, situated relatively
5535             the specified sphere by the certain way, defined through theState parameter.
5536
5537             Parameters:
5538                 theShape Shape to find sub-shapes of.
5539                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5540                 theCenter Point, specifying center of the sphere to find shapes on.
5541                 theRadius Radius of the sphere to find shapes on.
5542                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5543
5544             Returns:
5545                 List of all found sub-shapes indices.
5546             """
5547             # Example: see GEOM_TestOthers.py
5548             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5549             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5550             return aList
5551
5552         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5553         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5554         #  @param theShape Shape to find sub-shapes of.
5555         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5556         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5557         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5558         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5559         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5560         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5561         #  @param theName Object name; when specified, this parameter is used
5562         #         for result publication in the study. Otherwise, if automatic
5563         #         publication is switched on, default value is used for result name.
5564         #
5565         #  @return List of all found sub-shapes.
5566         #
5567         #  @ref swig_GetShapesOnQuadrangle "Example"
5568         @ManageTransactions("ShapesOp")
5569         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5570                                   theTopLeftPoint, theTopRigthPoint,
5571                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5572             """
5573             Find in theShape all sub-shapes of type theShapeType, situated relatively
5574             the specified quadrangle by the certain way, defined through theState parameter.
5575
5576             Parameters:
5577                 theShape Shape to find sub-shapes of.
5578                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5579                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5580                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5581                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5582                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5583                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5584                 theName Object name; when specified, this parameter is used
5585                         for result publication in the study. Otherwise, if automatic
5586                         publication is switched on, default value is used for result name.
5587
5588             Returns:
5589                 List of all found sub-shapes.
5590             """
5591             # Example: see GEOM_TestOthers.py
5592             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5593                                                         theTopLeftPoint, theTopRigthPoint,
5594                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5595             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5596             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5597             return aList
5598
5599         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5600         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5601         #  @param theShape Shape to find sub-shapes of.
5602         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5603         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5604         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5605         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5606         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5607         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5608         #
5609         #  @return List of all found sub-shapes indices.
5610         #
5611         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5612         @ManageTransactions("ShapesOp")
5613         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5614                                      theTopLeftPoint, theTopRigthPoint,
5615                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5616             """
5617             Find in theShape all sub-shapes of type theShapeType, situated relatively
5618             the specified quadrangle by the certain way, defined through theState parameter.
5619
5620             Parameters:
5621                 theShape Shape to find sub-shapes of.
5622                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5623                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5624                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5625                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5626                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5627                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5628
5629             Returns:
5630                 List of all found sub-shapes indices.
5631             """
5632
5633             # Example: see GEOM_TestOthers.py
5634             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5635                                                            theTopLeftPoint, theTopRigthPoint,
5636                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5637             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5638             return aList
5639
5640         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5641         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5642         #  @param theBox Shape for relative comparing.
5643         #  @param theShape Shape to find sub-shapes of.
5644         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5645         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5646         #  @param theName Object name; when specified, this parameter is used
5647         #         for result publication in the study. Otherwise, if automatic
5648         #         publication is switched on, default value is used for result name.
5649         #
5650         #  @return List of all found sub-shapes.
5651         #
5652         #  @ref swig_GetShapesOnBox "Example"
5653         @ManageTransactions("ShapesOp")
5654         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5655             """
5656             Find in theShape all sub-shapes of type theShapeType, situated relatively
5657             the specified theBox by the certain way, defined through theState parameter.
5658
5659             Parameters:
5660                 theBox Shape for relative comparing.
5661                 theShape Shape to find sub-shapes of.
5662                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5663                 theState The state of the sub-shapes to find (see GEOM::shape_state)
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 all found sub-shapes.
5670             """
5671             # Example: see GEOM_TestOthers.py
5672             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5673             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5674             self._autoPublish(aList, theName, "shapeOnBox")
5675             return aList
5676
5677         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5678         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5679         #  @param theBox Shape for relative comparing.
5680         #  @param theShape Shape to find sub-shapes of.
5681         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5682         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5683         #
5684         #  @return List of all found sub-shapes indices.
5685         #
5686         #  @ref swig_GetShapesOnBoxIDs "Example"
5687         @ManageTransactions("ShapesOp")
5688         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5689             """
5690             Find in theShape all sub-shapes of type theShapeType, situated relatively
5691             the specified theBox by the certain way, defined through theState parameter.
5692
5693             Parameters:
5694                 theBox Shape for relative comparing.
5695                 theShape Shape to find sub-shapes of.
5696                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5697                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5698
5699             Returns:
5700                 List of all found sub-shapes indices.
5701             """
5702             # Example: see GEOM_TestOthers.py
5703             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5704             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5705             return aList
5706
5707         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5708         #  situated relatively the specified \a theCheckShape by the
5709         #  certain way, defined through \a theState parameter.
5710         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5711         #  @param theShape Shape to find sub-shapes of.
5712         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5713         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5714         #  @param theName Object name; when specified, this parameter is used
5715         #         for result publication in the study. Otherwise, if automatic
5716         #         publication is switched on, default value is used for result name.
5717         #
5718         #  @return List of all found sub-shapes.
5719         #
5720         #  @ref swig_GetShapesOnShape "Example"
5721         @ManageTransactions("ShapesOp")
5722         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5723             """
5724             Find in theShape all sub-shapes of type theShapeType,
5725             situated relatively the specified theCheckShape by the
5726             certain way, defined through theState parameter.
5727
5728             Parameters:
5729                 theCheckShape Shape for relative comparing. It must be a solid.
5730                 theShape Shape to find sub-shapes of.
5731                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5732                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5733                 theName Object name; when specified, this parameter is used
5734                         for result publication in the study. Otherwise, if automatic
5735                         publication is switched on, default value is used for result name.
5736
5737             Returns:
5738                 List of all found sub-shapes.
5739             """
5740             # Example: see GEOM_TestOthers.py
5741             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5742                                                    theShapeType, theState)
5743             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5744             self._autoPublish(aList, theName, "shapeOnShape")
5745             return aList
5746
5747         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5748         #  situated relatively the specified \a theCheckShape by the
5749         #  certain way, defined through \a theState parameter.
5750         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5751         #  @param theShape Shape to find sub-shapes of.
5752         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5753         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5754         #  @param theName Object name; when specified, this parameter is used
5755         #         for result publication in the study. Otherwise, if automatic
5756         #         publication is switched on, default value is used for result name.
5757         #
5758         #  @return All found sub-shapes as compound.
5759         #
5760         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5761         @ManageTransactions("ShapesOp")
5762         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5763             """
5764             Find in theShape all sub-shapes of type theShapeType,
5765             situated relatively the specified theCheckShape by the
5766             certain way, defined through theState parameter.
5767
5768             Parameters:
5769                 theCheckShape Shape for relative comparing. It must be a solid.
5770                 theShape Shape to find sub-shapes of.
5771                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5772                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5773                 theName Object name; when specified, this parameter is used
5774                         for result publication in the study. Otherwise, if automatic
5775                         publication is switched on, default value is used for result name.
5776
5777             Returns:
5778                 All found sub-shapes as compound.
5779             """
5780             # Example: see GEOM_TestOthers.py
5781             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5782                                                              theShapeType, theState)
5783             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5784             self._autoPublish(anObj, theName, "shapeOnShape")
5785             return anObj
5786
5787         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5788         #  situated relatively the specified \a theCheckShape by the
5789         #  certain way, defined through \a theState parameter.
5790         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5791         #  @param theShape Shape to find sub-shapes of.
5792         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5793         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5794         #
5795         #  @return List of all found sub-shapes indices.
5796         #
5797         #  @ref swig_GetShapesOnShapeIDs "Example"
5798         @ManageTransactions("ShapesOp")
5799         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5800             """
5801             Find in theShape all sub-shapes of type theShapeType,
5802             situated relatively the specified theCheckShape by the
5803             certain way, defined through theState parameter.
5804
5805             Parameters:
5806                 theCheckShape Shape for relative comparing. It must be a solid.
5807                 theShape Shape to find sub-shapes of.
5808                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5809                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5810
5811             Returns:
5812                 List of all found sub-shapes indices.
5813             """
5814             # Example: see GEOM_TestOthers.py
5815             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5816                                                       theShapeType, theState)
5817             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5818             return aList
5819
5820         ## Get sub-shape(s) of theShapeWhere, which are
5821         #  coincident with \a theShapeWhat or could be a part of it.
5822         #  @param theShapeWhere Shape to find sub-shapes of.
5823         #  @param theShapeWhat Shape, specifying what to find.
5824         #  @param isNewImplementation implementation of GetInPlace functionality
5825         #             (default = False, old alghorithm based on shape properties)
5826         #  @param theName Object name; when specified, this parameter is used
5827         #         for result publication in the study. Otherwise, if automatic
5828         #         publication is switched on, default value is used for result name.
5829         #
5830         #  @return Group of all found sub-shapes or a single found sub-shape.
5831         #
5832         #  @note This function has a restriction on argument shapes.
5833         #        If \a theShapeWhere has curved parts with significantly
5834         #        outstanding centres (i.e. the mass centre of a part is closer to
5835         #        \a theShapeWhat than to the part), such parts will not be found.
5836         #        @image html get_in_place_lost_part.png
5837         #
5838         #  @ref swig_GetInPlace "Example"
5839         @ManageTransactions("ShapesOp")
5840         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5841             """
5842             Get sub-shape(s) of theShapeWhere, which are
5843             coincident with  theShapeWhat or could be a part of it.
5844
5845             Parameters:
5846                 theShapeWhere Shape to find sub-shapes of.
5847                 theShapeWhat Shape, specifying what to find.
5848                 isNewImplementation Implementation of GetInPlace functionality
5849                                     (default = False, old alghorithm based on shape properties)
5850                 theName Object name; when specified, this parameter is used
5851                         for result publication in the study. Otherwise, if automatic
5852                         publication is switched on, default value is used for result name.
5853
5854             Returns:
5855                 Group of all found sub-shapes or a single found sub-shape.
5856
5857
5858             Note:
5859                 This function has a restriction on argument shapes.
5860                 If theShapeWhere has curved parts with significantly
5861                 outstanding centres (i.e. the mass centre of a part is closer to
5862                 theShapeWhat than to the part), such parts will not be found.
5863             """
5864             # Example: see GEOM_TestOthers.py
5865             anObj = None
5866             if isNewImplementation:
5867                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5868             else:
5869                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5870                 pass
5871             RaiseIfFailed("GetInPlace", self.ShapesOp)
5872             self._autoPublish(anObj, theName, "inplace")
5873             return anObj
5874
5875         ## Get sub-shape(s) of \a theShapeWhere, which are
5876         #  coincident with \a theShapeWhat or could be a part of it.
5877         #
5878         #  Implementation of this method is based on a saved history of an operation,
5879         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5880         #  arguments (an argument shape or a sub-shape of an argument shape).
5881         #  The operation could be the Partition or one of boolean operations,
5882         #  performed on simple shapes (not on compounds).
5883         #
5884         #  @param theShapeWhere Shape to find sub-shapes of.
5885         #  @param theShapeWhat Shape, specifying what to find (must be in the
5886         #                      building history of the ShapeWhere).
5887         #  @param theName Object name; when specified, this parameter is used
5888         #         for result publication in the study. Otherwise, if automatic
5889         #         publication is switched on, default value is used for result name.
5890         #
5891         #  @return Group of all found sub-shapes or a single found sub-shape.
5892         #
5893         #  @ref swig_GetInPlace "Example"
5894         @ManageTransactions("ShapesOp")
5895         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5896             """
5897             Implementation of this method is based on a saved history of an operation,
5898             produced theShapeWhere. The theShapeWhat must be among this operation's
5899             arguments (an argument shape or a sub-shape of an argument shape).
5900             The operation could be the Partition or one of boolean operations,
5901             performed on simple shapes (not on compounds).
5902
5903             Parameters:
5904                 theShapeWhere Shape to find sub-shapes of.
5905                 theShapeWhat Shape, specifying what to find (must be in the
5906                                 building history of the ShapeWhere).
5907                 theName Object name; when specified, this parameter is used
5908                         for result publication in the study. Otherwise, if automatic
5909                         publication is switched on, default value is used for result name.
5910
5911             Returns:
5912                 Group of all found sub-shapes or a single found sub-shape.
5913             """
5914             # Example: see GEOM_TestOthers.py
5915             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5916             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5917             self._autoPublish(anObj, theName, "inplace")
5918             return anObj
5919
5920         ## Get sub-shape of theShapeWhere, which is
5921         #  equal to \a theShapeWhat.
5922         #  @param theShapeWhere Shape to find sub-shape of.
5923         #  @param theShapeWhat Shape, specifying what to find.
5924         #  @param theName Object name; when specified, this parameter is used
5925         #         for result publication in the study. Otherwise, if automatic
5926         #         publication is switched on, default value is used for result name.
5927         #
5928         #  @return New GEOM.GEOM_Object for found sub-shape.
5929         #
5930         #  @ref swig_GetSame "Example"
5931         @ManageTransactions("ShapesOp")
5932         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5933             """
5934             Get sub-shape of theShapeWhere, which is
5935             equal to theShapeWhat.
5936
5937             Parameters:
5938                 theShapeWhere Shape to find sub-shape of.
5939                 theShapeWhat Shape, specifying what to find.
5940                 theName Object name; when specified, this parameter is used
5941                         for result publication in the study. Otherwise, if automatic
5942                         publication is switched on, default value is used for result name.
5943
5944             Returns:
5945                 New GEOM.GEOM_Object for found sub-shape.
5946             """
5947             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5948             RaiseIfFailed("GetSame", self.ShapesOp)
5949             self._autoPublish(anObj, theName, "sameShape")
5950             return anObj
5951
5952
5953         ## Get sub-shape indices of theShapeWhere, which is
5954         #  equal to \a theShapeWhat.
5955         #  @param theShapeWhere Shape to find sub-shape of.
5956         #  @param theShapeWhat Shape, specifying what to find.
5957         #  @return List of all found sub-shapes indices.
5958         #
5959         #  @ref swig_GetSame "Example"
5960         @ManageTransactions("ShapesOp")
5961         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5962             """
5963             Get sub-shape indices of theShapeWhere, which is
5964             equal to theShapeWhat.
5965
5966             Parameters:
5967                 theShapeWhere Shape to find sub-shape of.
5968                 theShapeWhat Shape, specifying what to find.
5969
5970             Returns:
5971                 List of all found sub-shapes indices.
5972             """
5973             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5974             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5975             return anObj
5976
5977         ## Resize the input edge with the new Min and Max parameters.
5978         #  The input edge parameters range is [0, 1]. If theMin parameter is
5979         #  negative, the input edge is extended, otherwise it is shrinked by
5980         #  theMin parameter. If theMax is greater than 1, the edge is extended,
5981         #  otherwise it is shrinked by theMax parameter.
5982         #  @param theEdge the input edge to be resized.
5983         #  @param theMin the minimal parameter value.
5984         #  @param theMax the maximal parameter value.
5985         #  @param theName Object name; when specified, this parameter is used
5986         #         for result publication in the study. Otherwise, if automatic
5987         #         publication is switched on, default value is used for result name.
5988         #  @return New GEOM.GEOM_Object, containing the created edge.
5989         #
5990         #  @ref tui_extend "Example"
5991         @ManageTransactions("ShapesOp")
5992         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
5993             """
5994             Resize the input edge with the new Min and Max parameters.
5995             The input edge parameters range is [0, 1]. If theMin parameter is
5996             negative, the input edge is extended, otherwise it is shrinked by
5997             theMin parameter. If theMax is greater than 1, the edge is extended,
5998             otherwise it is shrinked by theMax parameter.
5999
6000             Parameters:
6001                 theEdge the input edge to be resized.
6002                 theMin the minimal parameter value.
6003                 theMax the maximal parameter value.
6004                 theName Object name; when specified, this parameter is used
6005                         for result publication in the study. Otherwise, if automatic
6006                         publication is switched on, default value is used for result name.
6007
6008             Returns:
6009                 New GEOM.GEOM_Object, containing the created edge.
6010             """
6011             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6012             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6013             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6014             anObj.SetParameters(Parameters)
6015             self._autoPublish(anObj, theName, "edge")
6016             return anObj
6017
6018         ## Resize the input face with the new UMin, UMax, VMin and VMax
6019         #  parameters. The input face U and V parameters range is [0, 1]. If
6020         #  theUMin parameter is negative, the input face is extended, otherwise
6021         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6022         #  greater than 1, the face is extended, otherwise it is shrinked along
6023         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6024         #  V direction of the input face.
6025         #  @param theFace the input face to be resized.
6026         #  @param theUMin the minimal U parameter value.
6027         #  @param theUMax the maximal U parameter value.
6028         #  @param theVMin the minimal V parameter value.
6029         #  @param theVMax the maximal V parameter value.
6030         #  @param theName Object name; when specified, this parameter is used
6031         #         for result publication in the study. Otherwise, if automatic
6032         #         publication is switched on, default value is used for result name.
6033         #  @return New GEOM.GEOM_Object, containing the created face.
6034         #
6035         #  @ref tui_extend "Example"
6036         @ManageTransactions("ShapesOp")
6037         def ExtendFace(self, theFace, theUMin, theUMax,
6038                        theVMin, theVMax, theName=None):
6039             """
6040             Resize the input face with the new UMin, UMax, VMin and VMax
6041             parameters. The input face U and V parameters range is [0, 1]. If
6042             theUMin parameter is negative, the input face is extended, otherwise
6043             it is shrinked along U direction by theUMin parameter. If theUMax is
6044             greater than 1, the face is extended, otherwise it is shrinked along
6045             U direction by theUMax parameter. So as for theVMin, theVMax and
6046             V direction of the input face.
6047
6048             Parameters:
6049                 theFace the input face to be resized.
6050                 theUMin the minimal U parameter value.
6051                 theUMax the maximal U parameter value.
6052                 theVMin the minimal V parameter value.
6053                 theVMax the maximal V parameter value.
6054                 theName Object name; when specified, this parameter is used
6055                         for result publication in the study. Otherwise, if automatic
6056                         publication is switched on, default value is used for result name.
6057
6058             Returns:
6059                 New GEOM.GEOM_Object, containing the created face.
6060             """
6061             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6062             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6063                                              theVMin, theVMax)
6064             RaiseIfFailed("ExtendFace", self.ShapesOp)
6065             anObj.SetParameters(Parameters)
6066             self._autoPublish(anObj, theName, "face")
6067             return anObj
6068
6069         ## This function takes some face as input parameter and creates new
6070         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6071         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6072         #  parameters of the source face (in the parametrical space).
6073         #  @param theFace the input face.
6074         #  @param theName Object name; when specified, this parameter is used
6075         #         for result publication in the study. Otherwise, if automatic
6076         #         publication is switched on, default value is used for result name.
6077         #  @return New GEOM.GEOM_Object, containing the created face.
6078         #
6079         #  @ref tui_creation_surface "Example"
6080         @ManageTransactions("ShapesOp")
6081         def MakeSurfaceFromFace(self, theFace, theName=None):
6082             """
6083             This function takes some face as input parameter and creates new
6084             GEOM_Object, i.e. topological shape by extracting underlying surface
6085             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6086             parameters of the source face (in the parametrical space).
6087
6088             Parameters:
6089                 theFace the input face.
6090                 theName Object name; when specified, this parameter is used
6091                         for result publication in the study. Otherwise, if automatic
6092                         publication is switched on, default value is used for result name.
6093
6094             Returns:
6095                 New GEOM.GEOM_Object, containing the created face.
6096             """
6097             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6098             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6099             self._autoPublish(anObj, theName, "surface")
6100             return anObj
6101
6102         # end of l4_obtain
6103         ## @}
6104
6105         ## @addtogroup l4_access
6106         ## @{
6107
6108         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6109         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6110         #  @param aShape Shape to get sub-shape of.
6111         #  @param ListOfID List of sub-shapes indices.
6112         #  @param theName Object name; when specified, this parameter is used
6113         #         for result publication in the study. Otherwise, if automatic
6114         #         publication is switched on, default value is used for result name.
6115         #
6116         #  @return Found sub-shape.
6117         #
6118         #  @ref swig_all_decompose "Example"
6119         def GetSubShape(self, aShape, ListOfID, theName=None):
6120             """
6121             Obtain a composite sub-shape of aShape, composed from sub-shapes
6122             of aShape, selected by their unique IDs inside aShape
6123
6124             Parameters:
6125                 aShape Shape to get sub-shape of.
6126                 ListOfID List of sub-shapes indices.
6127                 theName Object name; when specified, this parameter is used
6128                         for result publication in the study. Otherwise, if automatic
6129                         publication is switched on, default value is used for result name.
6130
6131             Returns:
6132                 Found sub-shape.
6133             """
6134             # Example: see GEOM_TestAll.py
6135             anObj = self.AddSubShape(aShape,ListOfID)
6136             self._autoPublish(anObj, theName, "subshape")
6137             return anObj
6138
6139         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6140         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6141         #  @param aShape Shape to get sub-shape of.
6142         #  @param aSubShape Sub-shapes of aShape.
6143         #  @return ID of found sub-shape.
6144         #
6145         #  @ref swig_all_decompose "Example"
6146         @ManageTransactions("LocalOp")
6147         def GetSubShapeID(self, aShape, aSubShape):
6148             """
6149             Obtain unique ID of sub-shape aSubShape inside aShape
6150             of aShape, selected by their unique IDs inside aShape
6151
6152             Parameters:
6153                aShape Shape to get sub-shape of.
6154                aSubShape Sub-shapes of aShape.
6155
6156             Returns:
6157                ID of found sub-shape.
6158             """
6159             # Example: see GEOM_TestAll.py
6160             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6161             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6162             return anID
6163
6164         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6165         #  This function is provided for performance purpose. The complexity is O(n) with n
6166         #  the number of subobjects of aShape
6167         #  @param aShape Shape to get sub-shape of.
6168         #  @param aSubShapes Sub-shapes of aShape.
6169         #  @return list of IDs of found sub-shapes.
6170         #
6171         #  @ref swig_all_decompose "Example"
6172         @ManageTransactions("ShapesOp")
6173         def GetSubShapesIDs(self, aShape, aSubShapes):
6174             """
6175             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6176             This function is provided for performance purpose. The complexity is O(n) with n
6177             the number of subobjects of aShape
6178
6179             Parameters:
6180                aShape Shape to get sub-shape of.
6181                aSubShapes Sub-shapes of aShape.
6182
6183             Returns:
6184                List of IDs of found sub-shape.
6185             """
6186             # Example: see GEOM_TestAll.py
6187             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6188             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6189             return anIDs
6190
6191         # end of l4_access
6192         ## @}
6193
6194         ## @addtogroup l4_decompose
6195         ## @{
6196
6197         ## Get all sub-shapes and groups of \a theShape,
6198         #  that were created already by any other methods.
6199         #  @param theShape Any shape.
6200         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6201         #                       returned, else all found sub-shapes and groups.
6202         #  @return List of existing sub-objects of \a theShape.
6203         #
6204         #  @ref swig_all_decompose "Example"
6205         @ManageTransactions("ShapesOp")
6206         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6207             """
6208             Get all sub-shapes and groups of theShape,
6209             that were created already by any other methods.
6210
6211             Parameters:
6212                 theShape Any shape.
6213                 theGroupsOnly If this parameter is TRUE, only groups will be
6214                                  returned, else all found sub-shapes and groups.
6215
6216             Returns:
6217                 List of existing sub-objects of theShape.
6218             """
6219             # Example: see GEOM_TestAll.py
6220             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6221             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6222             return ListObj
6223
6224         ## Get all groups of \a theShape,
6225         #  that were created already by any other methods.
6226         #  @param theShape Any shape.
6227         #  @return List of existing groups of \a theShape.
6228         #
6229         #  @ref swig_all_decompose "Example"
6230         @ManageTransactions("ShapesOp")
6231         def GetGroups(self, theShape):
6232             """
6233             Get all groups of theShape,
6234             that were created already by any other methods.
6235
6236             Parameters:
6237                 theShape Any shape.
6238
6239             Returns:
6240                 List of existing groups of theShape.
6241             """
6242             # Example: see GEOM_TestAll.py
6243             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6244             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6245             return ListObj
6246
6247         ## Explode a shape on sub-shapes of a given type.
6248         #  If the shape itself matches the type, it is also returned.
6249         #  @param aShape Shape to be exploded.
6250         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6251         #  @param theName Object name; when specified, this parameter is used
6252         #         for result publication in the study. Otherwise, if automatic
6253         #         publication is switched on, default value is used for result name.
6254         #
6255         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6256         #
6257         #  @ref swig_all_decompose "Example"
6258         @ManageTransactions("ShapesOp")
6259         def SubShapeAll(self, aShape, aType, theName=None):
6260             """
6261             Explode a shape on sub-shapes of a given type.
6262             If the shape itself matches the type, it is also returned.
6263
6264             Parameters:
6265                 aShape Shape to be exploded.
6266                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6267                 theName Object name; when specified, this parameter is used
6268                         for result publication in the study. Otherwise, if automatic
6269                         publication is switched on, default value is used for result name.
6270
6271             Returns:
6272                 List of sub-shapes of type theShapeType, contained in theShape.
6273             """
6274             # Example: see GEOM_TestAll.py
6275             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6276             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6277             self._autoPublish(ListObj, theName, "subshape")
6278             return ListObj
6279
6280         ## Explode a shape on sub-shapes of a given type.
6281         #  @param aShape Shape to be exploded.
6282         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6283         #  @return List of IDs of sub-shapes.
6284         #
6285         #  @ref swig_all_decompose "Example"
6286         @ManageTransactions("ShapesOp")
6287         def SubShapeAllIDs(self, aShape, aType):
6288             """
6289             Explode a shape on sub-shapes of a given type.
6290
6291             Parameters:
6292                 aShape Shape to be exploded (see geompy.ShapeType)
6293                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6294
6295             Returns:
6296                 List of IDs of sub-shapes.
6297             """
6298             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6299             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6300             return ListObj
6301
6302         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6303         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6304         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6305         #  @param aShape Shape to get sub-shape of.
6306         #  @param ListOfInd List of sub-shapes indices.
6307         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6308         #  @param theName Object name; when specified, this parameter is used
6309         #         for result publication in the study. Otherwise, if automatic
6310         #         publication is switched on, default value is used for result name.
6311         #
6312         #  @return A compound of sub-shapes of aShape.
6313         #
6314         #  @ref swig_all_decompose "Example"
6315         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6316             """
6317             Obtain a compound of sub-shapes of aShape,
6318             selected by their indices in list of all sub-shapes of type aType.
6319             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6320
6321             Parameters:
6322                 aShape Shape to get sub-shape of.
6323                 ListOfID List of sub-shapes indices.
6324                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6325                 theName Object name; when specified, this parameter is used
6326                         for result publication in the study. Otherwise, if automatic
6327                         publication is switched on, default value is used for result name.
6328
6329             Returns:
6330                 A compound of sub-shapes of aShape.
6331             """
6332             # Example: see GEOM_TestAll.py
6333             ListOfIDs = []
6334             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6335             for ind in ListOfInd:
6336                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6337             # note: auto-publishing is done in self.GetSubShape()
6338             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6339             return anObj
6340
6341         ## Explode a shape on sub-shapes of a given type.
6342         #  Sub-shapes will be sorted taking into account their gravity centers,
6343         #  to provide stable order of sub-shapes.
6344         #  If the shape itself matches the type, it is also returned.
6345         #  @param aShape Shape to be exploded.
6346         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6347         #  @param theName Object name; when specified, this parameter is used
6348         #         for result publication in the study. Otherwise, if automatic
6349         #         publication is switched on, default value is used for result name.
6350         #
6351         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6352         #
6353         #  @ref swig_SubShapeAllSorted "Example"
6354         @ManageTransactions("ShapesOp")
6355         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6356             """
6357             Explode a shape on sub-shapes of a given type.
6358             Sub-shapes will be sorted taking into account their gravity centers,
6359             to provide stable order of sub-shapes.
6360             If the shape itself matches the type, it is also returned.
6361
6362             Parameters:
6363                 aShape Shape to be exploded.
6364                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6365                 theName Object name; when specified, this parameter is used
6366                         for result publication in the study. Otherwise, if automatic
6367                         publication is switched on, default value is used for result name.
6368
6369             Returns:
6370                 List of sub-shapes of type theShapeType, contained in theShape.
6371             """
6372             # Example: see GEOM_TestAll.py
6373             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6374             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6375             self._autoPublish(ListObj, theName, "subshape")
6376             return ListObj
6377
6378         ## Explode a shape on sub-shapes of a given type.
6379         #  Sub-shapes will be sorted taking into account their gravity centers,
6380         #  to provide stable order of sub-shapes.
6381         #  @param aShape Shape to be exploded.
6382         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6383         #  @return List of IDs of sub-shapes.
6384         #
6385         #  @ref swig_all_decompose "Example"
6386         @ManageTransactions("ShapesOp")
6387         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6388             """
6389             Explode a shape on sub-shapes of a given type.
6390             Sub-shapes will be sorted taking into account their gravity centers,
6391             to provide stable order of sub-shapes.
6392
6393             Parameters:
6394                 aShape Shape to be exploded.
6395                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6396
6397             Returns:
6398                 List of IDs of sub-shapes.
6399             """
6400             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6401             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6402             return ListIDs
6403
6404         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6405         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6406         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6407         #  @param aShape Shape to get sub-shape of.
6408         #  @param ListOfInd List of sub-shapes indices.
6409         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6410         #  @param theName Object name; when specified, this parameter is used
6411         #         for result publication in the study. Otherwise, if automatic
6412         #         publication is switched on, default value is used for result name.
6413         #
6414         #  @return A compound of sub-shapes of aShape.
6415         #
6416         #  @ref swig_all_decompose "Example"
6417         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6418             """
6419             Obtain a compound of sub-shapes of aShape,
6420             selected by they indices in sorted list of all sub-shapes of type aType.
6421             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6422
6423             Parameters:
6424                 aShape Shape to get sub-shape of.
6425                 ListOfID List of sub-shapes indices.
6426                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6427                 theName Object name; when specified, this parameter is used
6428                         for result publication in the study. Otherwise, if automatic
6429                         publication is switched on, default value is used for result name.
6430
6431             Returns:
6432                 A compound of sub-shapes of aShape.
6433             """
6434             # Example: see GEOM_TestAll.py
6435             ListOfIDs = []
6436             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6437             for ind in ListOfInd:
6438                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6439             # note: auto-publishing is done in self.GetSubShape()
6440             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6441             return anObj
6442
6443         ## Extract shapes (excluding the main shape) of given type.
6444         #  @param aShape The shape.
6445         #  @param aType  The shape type (see ShapeType())
6446         #  @param isSorted Boolean flag to switch sorting on/off.
6447         #  @param theName Object name; when specified, this parameter is used
6448         #         for result publication in the study. Otherwise, if automatic
6449         #         publication is switched on, default value is used for result name.
6450         #
6451         #  @return List of sub-shapes of type aType, contained in aShape.
6452         #
6453         #  @ref swig_FilletChamfer "Example"
6454         @ManageTransactions("ShapesOp")
6455         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6456             """
6457             Extract shapes (excluding the main shape) of given type.
6458
6459             Parameters:
6460                 aShape The shape.
6461                 aType  The shape type (see geompy.ShapeType)
6462                 isSorted Boolean flag to switch sorting on/off.
6463                 theName Object name; when specified, this parameter is used
6464                         for result publication in the study. Otherwise, if automatic
6465                         publication is switched on, default value is used for result name.
6466
6467             Returns:
6468                 List of sub-shapes of type aType, contained in aShape.
6469             """
6470             # Example: see GEOM_TestAll.py
6471             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6472             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6473             self._autoPublish(ListObj, theName, "subshape")
6474             return ListObj
6475
6476         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6477         #  @param aShape Main shape.
6478         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6479         #  @param theName Object name; when specified, this parameter is used
6480         #         for result publication in the study. Otherwise, if automatic
6481         #         publication is switched on, default value is used for result name.
6482         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6483         #
6484         #  @ref swig_all_decompose "Example"
6485         @ManageTransactions("ShapesOp")
6486         def SubShapes(self, aShape, anIDs, theName=None):
6487             """
6488             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6489
6490             Parameters:
6491                 aShape Main shape.
6492                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6493                 theName Object name; when specified, this parameter is used
6494                         for result publication in the study. Otherwise, if automatic
6495                         publication is switched on, default value is used for result name.
6496
6497             Returns:
6498                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6499             """
6500             # Example: see GEOM_TestAll.py
6501             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6502             RaiseIfFailed("SubShapes", self.ShapesOp)
6503             self._autoPublish(ListObj, theName, "subshape")
6504             return ListObj
6505
6506         ## Explode a shape into edges sorted in a row from a starting point.
6507         #  @param theShape the shape to be exploded on edges.
6508         #  @param theStartPoint the starting point.
6509         #  @param theName Object name; when specified, this parameter is used
6510         #         for result publication in the study. Otherwise, if automatic
6511         #         publication is switched on, default value is used for result name.
6512         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6513         #          of edges sorted in a row from a starting point.
6514         #
6515         #  @ref swig_GetSubShapeEdgeSorted "Example"
6516         @ManageTransactions("ShapesOp")
6517         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6518             """
6519             Explode a shape into edges sorted in a row from a starting point.
6520
6521             Parameters:
6522                 theShape the shape to be exploded on edges.
6523                 theStartPoint the starting point.
6524                 theName Object name; when specified, this parameter is used
6525                         for result publication in the study. Otherwise, if automatic
6526                         publication is switched on, default value is used for result name.
6527
6528             Returns:
6529                 List of GEOM.GEOM_Object that is actually an ordered list
6530                 of edges sorted in a row from a starting point.
6531             """
6532             # Example: see GEOM_TestAll.py
6533             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6534             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6535             self._autoPublish(ListObj, theName, "SortedEdges")
6536             return ListObj
6537
6538         ## Check if the object is a sub-object of another GEOM object.
6539         #  @param aSubObject Checked sub-object (or its parent object, in case if
6540         #         \a theSubObjectIndex is non-zero).
6541         #  @param anObject An object that is checked for ownership (or its parent object,
6542         #         in case if \a theObjectIndex is non-zero).
6543         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6544         #         identifies a sub-object within its parent specified via \a theSubObject.
6545         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6546         #         identifies an object within its parent specified via \a theObject.
6547         #  @return TRUE, if the given object contains sub-object.
6548         @ManageTransactions("ShapesOp")
6549         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6550             """
6551             Check if the object is a sub-object of another GEOM object.
6552             
6553             Parameters:
6554                 aSubObject Checked sub-object (or its parent object, in case if
6555                     \a theSubObjectIndex is non-zero).
6556                 anObject An object that is checked for ownership (or its parent object,
6557                     in case if \a theObjectIndex is non-zero).
6558                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6559                     identifies a sub-object within its parent specified via \a theSubObject.
6560                 anObjectIndex When non-zero, specifies a sub-shape index that
6561                     identifies an object within its parent specified via \a theObject.
6562
6563             Returns
6564                 TRUE, if the given object contains sub-object.
6565             """
6566             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6567             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6568             return IsOk
6569
6570         # end of l4_decompose
6571         ## @}
6572
6573         ## @addtogroup l4_decompose_d
6574         ## @{
6575
6576         ## Deprecated method
6577         #  It works like SubShapeAllSortedCentres(), but wrongly
6578         #  defines centres of faces, shells and solids.
6579         @ManageTransactions("ShapesOp")
6580         def SubShapeAllSorted(self, aShape, aType, theName=None):
6581             """
6582             Deprecated method
6583             It works like geompy.SubShapeAllSortedCentres, but wrongly
6584             defines centres of faces, shells and solids.
6585             """
6586             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6587             RaiseIfFailed("MakeExplode", self.ShapesOp)
6588             self._autoPublish(ListObj, theName, "subshape")
6589             return ListObj
6590
6591         ## Deprecated method
6592         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6593         #  defines centres of faces, shells and solids.
6594         @ManageTransactions("ShapesOp")
6595         def SubShapeAllSortedIDs(self, aShape, aType):
6596             """
6597             Deprecated method
6598             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6599             defines centres of faces, shells and solids.
6600             """
6601             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6602             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6603             return ListIDs
6604
6605         ## Deprecated method
6606         #  It works like SubShapeSortedCentres(), but has a bug
6607         #  (wrongly defines centres of faces, shells and solids).
6608         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6609             """
6610             Deprecated method
6611             It works like geompy.SubShapeSortedCentres, but has a bug
6612             (wrongly defines centres of faces, shells and solids).
6613             """
6614             ListOfIDs = []
6615             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6616             for ind in ListOfInd:
6617                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6618             # note: auto-publishing is done in self.GetSubShape()
6619             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6620             return anObj
6621
6622         # end of l4_decompose_d
6623         ## @}
6624
6625         ## @addtogroup l3_healing
6626         ## @{
6627
6628         ## Apply a sequence of Shape Healing operators to the given object.
6629         #  @param theShape Shape to be processed.
6630         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6631         #  @param theParameters List of names of parameters
6632         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6633         #  @param theValues List of values of parameters, in the same order
6634         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6635         #  @param theName Object name; when specified, this parameter is used
6636         #         for result publication in the study. Otherwise, if automatic
6637         #         publication is switched on, default value is used for result name.
6638         #
6639         #  <b> Operators and Parameters: </b> \n
6640         #
6641         #  * \b FixShape - corrects invalid shapes. \n
6642         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6643         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6644         #
6645         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6646         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6647         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6648         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6649         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6650         #  - \b DropSmallSolids.WidthFactorThreshold - defines maximum value of <em>2V/S</em> of a solid which is considered small, where \a V is volume and \a S is surface area of the solid. \n
6651         #  - \b DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria. \n
6652         #  - \b DropSmallSolids.MergeSolids - if "1", small solids are removed; if "0" small solids are merged to adjacent non-small solids or left untouched if cannot be merged. \n
6653         #
6654         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6655         #    surfaces in segments using a certain angle. \n
6656         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6657         #    if Angle=180, four if Angle=90, etc). \n
6658         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6659         #
6660         #  * \b SplitClosedFaces - splits closed faces in segments.
6661         #    The number of segments depends on the number of splitting points.\n
6662         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6663         #
6664         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6665         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6666         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6667         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6668         #   This and the previous parameters can take the following values:\n
6669         #   \b Parametric \b Continuity \n
6670         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6671         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6672         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6673         #    ruling out sharp edges).\n
6674         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6675         #       are of the same magnitude).\n
6676         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6677         #    or surfaces (d/du C(u)) are the same at junction. \n
6678         #   \b Geometric \b Continuity \n
6679         #   \b G1: first derivatives are proportional at junction.\n
6680         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6681         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6682         #   \b G2: first and second derivatives are proportional at junction.
6683         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6684         #    continuity requires that the underlying parameterization was continuous as well.
6685         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6686         #
6687         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6688         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6689         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6690         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6691         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6692         #       with the specified parameters.\n
6693         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6694         #       with the specified parameters.\n
6695         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6696         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6697         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6698         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6699         #
6700         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6701         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6702         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6703         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6704         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6705         #
6706         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6707         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6708         #
6709         #
6710         #  @return New GEOM.GEOM_Object, containing processed shape.
6711         #
6712         #  \n @ref tui_shape_processing "Example"
6713         @ManageTransactions("HealOp")
6714         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6715             """
6716             Apply a sequence of Shape Healing operators to the given object.
6717
6718             Parameters:
6719                 theShape Shape to be processed.
6720                 theValues List of values of parameters, in the same order
6721                           as parameters are listed in theParameters list.
6722                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6723                 theParameters List of names of parameters
6724                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6725                 theName Object name; when specified, this parameter is used
6726                         for result publication in the study. Otherwise, if automatic
6727                         publication is switched on, default value is used for result name.
6728
6729                 Operators and Parameters:
6730
6731                  * FixShape - corrects invalid shapes.
6732                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6733                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6734                  * FixFaceSize - removes small faces, such as spots and strips.
6735                      * FixFaceSize.Tolerance - defines minimum possible face size.
6736                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6737                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6738                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6739                      * DropSmallSolids.WidthFactorThreshold - defines maximum value of 2V/S of a solid which is considered small, where V is volume and S is surface area of the solid.
6740                      * DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria.
6741                      * DropSmallSolids.MergeSolids - if '1', small solids are removed; if '0' small solids are merged to adjacent non-small solids or left untouched if cannot be merged.
6742
6743                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6744                                 in segments using a certain angle.
6745                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6746                                           if Angle=180, four if Angle=90, etc).
6747                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6748                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6749                                       splitting points.
6750                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6751                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6752                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6753                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6754                      * SplitContinuity.CurveContinuity - required continuity for curves.
6755                        This and the previous parameters can take the following values:
6756
6757                        Parametric Continuity:
6758                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6759                                                    coincidental. The curves or surfaces may still meet at an angle,
6760                                                    giving rise to a sharp corner or edge).
6761                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6762                                                    are parallel, ruling out sharp edges).
6763                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6764                                                   or surfaces are of the same magnitude).
6765                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6766                           curves or surfaces (d/du C(u)) are the same at junction.
6767
6768                        Geometric Continuity:
6769                        G1: first derivatives are proportional at junction.
6770                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6771                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6772                        G2: first and second derivatives are proportional at junction. As the names imply,
6773                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6774                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6775                            geometric continuity of order n, but not vice-versa.
6776                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6777                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6778                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6779                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6780                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6781                                                         the specified parameters.
6782                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6783                                                         the specified parameters.
6784                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6785                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6786                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6787                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6788                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6789                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6790                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6791                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6792                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6793                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6794                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6795
6796             Returns:
6797                 New GEOM.GEOM_Object, containing processed shape.
6798
6799             Note: For more information look through SALOME Geometry User's Guide->
6800                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6801             """
6802             # Example: see GEOM_TestHealing.py
6803             theValues,Parameters = ParseList(theValues)
6804             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6805             # To avoid script failure in case of good argument shape
6806             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6807                 return theShape
6808             RaiseIfFailed("ProcessShape", self.HealOp)
6809             for string in (theOperators + theParameters):
6810                 Parameters = ":" + Parameters
6811                 pass
6812             anObj.SetParameters(Parameters)
6813             self._autoPublish(anObj, theName, "healed")
6814             return anObj
6815
6816         ## Remove faces from the given object (shape).
6817         #  @param theObject Shape to be processed.
6818         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6819         #                  removes ALL faces of the given object.
6820         #  @param theName Object name; when specified, this parameter is used
6821         #         for result publication in the study. Otherwise, if automatic
6822         #         publication is switched on, default value is used for result name.
6823         #
6824         #  @return New GEOM.GEOM_Object, containing processed shape.
6825         #
6826         #  @ref tui_suppress_faces "Example"
6827         @ManageTransactions("HealOp")
6828         def SuppressFaces(self, theObject, theFaces, theName=None):
6829             """
6830             Remove faces from the given object (shape).
6831
6832             Parameters:
6833                 theObject Shape to be processed.
6834                 theFaces Indices of faces to be removed, if EMPTY then the method
6835                          removes ALL faces of the given object.
6836                 theName Object name; when specified, this parameter is used
6837                         for result publication in the study. Otherwise, if automatic
6838                         publication is switched on, default value is used for result name.
6839
6840             Returns:
6841                 New GEOM.GEOM_Object, containing processed shape.
6842             """
6843             # Example: see GEOM_TestHealing.py
6844             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6845             RaiseIfFailed("SuppressFaces", self.HealOp)
6846             self._autoPublish(anObj, theName, "suppressFaces")
6847             return anObj
6848
6849         ## Sewing of faces into a single shell.
6850         #  @param ListShape Shapes to be processed.
6851         #  @param theTolerance Required tolerance value.
6852         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6853         #  @param theName Object name; when specified, this parameter is used
6854         #         for result publication in the study. Otherwise, if automatic
6855         #         publication is switched on, default value is used for result name.
6856         #
6857         #  @return New GEOM.GEOM_Object, containing a result shell.
6858         #
6859         #  @ref tui_sewing "Example"
6860         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6861             """
6862             Sewing of faces into a single shell.
6863
6864             Parameters:
6865                 ListShape Shapes to be processed.
6866                 theTolerance Required tolerance value.
6867                 AllowNonManifold Flag that allows non-manifold sewing.
6868                 theName Object name; when specified, this parameter is used
6869                         for result publication in the study. Otherwise, if automatic
6870                         publication is switched on, default value is used for result name.
6871
6872             Returns:
6873                 New GEOM.GEOM_Object, containing containing a result shell.
6874             """
6875             # Example: see GEOM_TestHealing.py
6876             # note: auto-publishing is done in self.Sew()
6877             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6878             return anObj
6879
6880         ## Sewing of faces into a single shell.
6881         #  @param ListShape Shapes to be processed.
6882         #  @param theTolerance Required tolerance value.
6883         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6884         #  @param theName Object name; when specified, this parameter is used
6885         #         for result publication in the study. Otherwise, if automatic
6886         #         publication is switched on, default value is used for result name.
6887         #
6888         #  @return New GEOM.GEOM_Object, containing a result shell.
6889         @ManageTransactions("HealOp")
6890         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6891             """
6892             Sewing of faces into a single shell.
6893
6894             Parameters:
6895                 ListShape Shapes to be processed.
6896                 theTolerance Required tolerance value.
6897                 AllowNonManifold Flag that allows non-manifold sewing.
6898                 theName Object name; when specified, this parameter is used
6899                         for result publication in the study. Otherwise, if automatic
6900                         publication is switched on, default value is used for result name.
6901
6902             Returns:
6903                 New GEOM.GEOM_Object, containing a result shell.
6904             """
6905             # Example: see MakeSewing() above
6906             theTolerance,Parameters = ParseParameters(theTolerance)
6907             if AllowNonManifold:
6908                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6909             else:
6910                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6911             # To avoid script failure in case of good argument shape
6912             # (Fix of test cases geom/bugs11/L7,L8)
6913             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6914                 return anObj
6915             RaiseIfFailed("Sew", self.HealOp)
6916             anObj.SetParameters(Parameters)
6917             self._autoPublish(anObj, theName, "sewed")
6918             return anObj
6919
6920         ## Rebuild the topology of theSolids by removing
6921         #  the faces that are shared by several solids.
6922         #  @param theSolids A compound or a list of solids to be processed.
6923         #  @param 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         #  @return New GEOM.GEOM_Object, containing processed shape.
6928         #
6929         #  @ref tui_remove_webs "Example"
6930         @ManageTransactions("HealOp")
6931         def RemoveInternalFaces (self, theSolids, theName=None):
6932             """
6933             Rebuild the topology of theSolids by removing
6934             the faces that are shared by several solids.
6935
6936             Parameters:
6937                 theSolids A compound or a list of solids to be processed.
6938                 theName Object name; when specified, this parameter is used
6939                         for result publication in the study. Otherwise, if automatic
6940                         publication is switched on, default value is used for result name.
6941
6942             Returns:
6943                 New GEOM.GEOM_Object, containing processed shape.
6944             """
6945             # Example: see GEOM_TestHealing.py
6946             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
6947             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6948             self._autoPublish(anObj, theName, "removeWebs")
6949             return anObj
6950
6951         ## Remove internal wires and edges from the given object (face).
6952         #  @param theObject Shape to be processed.
6953         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6954         #                  removes ALL internal wires of the given object.
6955         #  @param theName Object name; when specified, this parameter is used
6956         #         for result publication in the study. Otherwise, if automatic
6957         #         publication is switched on, default value is used for result name.
6958         #
6959         #  @return New GEOM.GEOM_Object, containing processed shape.
6960         #
6961         #  @ref tui_suppress_internal_wires "Example"
6962         @ManageTransactions("HealOp")
6963         def SuppressInternalWires(self, theObject, theWires, theName=None):
6964             """
6965             Remove internal wires and edges from the given object (face).
6966
6967             Parameters:
6968                 theObject Shape to be processed.
6969                 theWires Indices of wires to be removed, if EMPTY then the method
6970                          removes ALL internal wires of the given object.
6971                 theName Object name; when specified, this parameter is used
6972                         for result publication in the study. Otherwise, if automatic
6973                         publication is switched on, default value is used for result name.
6974
6975             Returns:
6976                 New GEOM.GEOM_Object, containing processed shape.
6977             """
6978             # Example: see GEOM_TestHealing.py
6979             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6980             RaiseIfFailed("RemoveIntWires", self.HealOp)
6981             self._autoPublish(anObj, theName, "suppressWires")
6982             return anObj
6983
6984         ## Remove internal closed contours (holes) from the given object.
6985         #  @param theObject Shape to be processed.
6986         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6987         #                  removes ALL internal holes of the given object
6988         #  @param theName Object name; when specified, this parameter is used
6989         #         for result publication in the study. Otherwise, if automatic
6990         #         publication is switched on, default value is used for result name.
6991         #
6992         #  @return New GEOM.GEOM_Object, containing processed shape.
6993         #
6994         #  @ref tui_suppress_holes "Example"
6995         @ManageTransactions("HealOp")
6996         def SuppressHoles(self, theObject, theWires, theName=None):
6997             """
6998             Remove internal closed contours (holes) from the given object.
6999
7000             Parameters:
7001                 theObject Shape to be processed.
7002                 theWires Indices of wires to be removed, if EMPTY then the method
7003                          removes ALL internal holes of the given object
7004                 theName Object name; when specified, this parameter is used
7005                         for result publication in the study. Otherwise, if automatic
7006                         publication is switched on, default value is used for result name.
7007
7008             Returns:
7009                 New GEOM.GEOM_Object, containing processed shape.
7010             """
7011             # Example: see GEOM_TestHealing.py
7012             anObj = self.HealOp.FillHoles(theObject, theWires)
7013             RaiseIfFailed("FillHoles", self.HealOp)
7014             self._autoPublish(anObj, theName, "suppressHoles")
7015             return anObj
7016
7017         ## Close an open wire.
7018         #  @param theObject Shape to be processed.
7019         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7020         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7021         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7022         #                        If False : closure by creation of an edge between ends.
7023         #  @param theName Object name; when specified, this parameter is used
7024         #         for result publication in the study. Otherwise, if automatic
7025         #         publication is switched on, default value is used for result name.
7026         #
7027         #  @return New GEOM.GEOM_Object, containing processed shape.
7028         #
7029         #  @ref tui_close_contour "Example"
7030         @ManageTransactions("HealOp")
7031         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7032             """
7033             Close an open wire.
7034
7035             Parameters:
7036                 theObject Shape to be processed.
7037                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7038                          if [ ], then theObject itself is a wire.
7039                 isCommonVertex If True  : closure by creation of a common vertex,
7040                                If False : closure by creation of an edge between ends.
7041                 theName Object name; when specified, this parameter is used
7042                         for result publication in the study. Otherwise, if automatic
7043                         publication is switched on, default value is used for result name.
7044
7045             Returns:
7046                 New GEOM.GEOM_Object, containing processed shape.
7047             """
7048             # Example: see GEOM_TestHealing.py
7049             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7050             RaiseIfFailed("CloseContour", self.HealOp)
7051             self._autoPublish(anObj, theName, "closeContour")
7052             return anObj
7053
7054         ## Addition of a point to a given edge object.
7055         #  @param theObject Shape to be processed.
7056         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7057         #                      if -1, then theObject itself is the edge.
7058         #  @param theValue Value of parameter on edge or length parameter,
7059         #                  depending on \a isByParameter.
7060         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7061         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7062         #  @param theName Object name; when specified, this parameter is used
7063         #         for result publication in the study. Otherwise, if automatic
7064         #         publication is switched on, default value is used for result name.
7065         #
7066         #  @return New GEOM.GEOM_Object, containing processed shape.
7067         #
7068         #  @ref tui_add_point_on_edge "Example"
7069         @ManageTransactions("HealOp")
7070         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7071             """
7072             Addition of a point to a given edge object.
7073
7074             Parameters:
7075                 theObject Shape to be processed.
7076                 theEdgeIndex Index of edge to be divided within theObject's shape,
7077                              if -1, then theObject itself is the edge.
7078                 theValue Value of parameter on edge or length parameter,
7079                          depending on isByParameter.
7080                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7081                               if FALSE : theValue is treated as a length parameter [0..1]
7082                 theName Object name; when specified, this parameter is used
7083                         for result publication in the study. Otherwise, if automatic
7084                         publication is switched on, default value is used for result name.
7085
7086             Returns:
7087                 New GEOM.GEOM_Object, containing processed shape.
7088             """
7089             # Example: see GEOM_TestHealing.py
7090             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7091             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7092             RaiseIfFailed("DivideEdge", self.HealOp)
7093             anObj.SetParameters(Parameters)
7094             self._autoPublish(anObj, theName, "divideEdge")
7095             return anObj
7096
7097         ## Addition of points to a given edge of \a theObject by projecting
7098         #  other points to the given edge.
7099         #  @param theObject Shape to be processed.
7100         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7101         #                      if -1, then theObject itself is the edge.
7102         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7103         #  @param theName Object name; when specified, this parameter is used
7104         #         for result publication in the study. Otherwise, if automatic
7105         #         publication is switched on, default value is used for result name.
7106         #
7107         #  @return New GEOM.GEOM_Object, containing processed shape.
7108         #
7109         #  @ref tui_add_point_on_edge "Example"
7110         @ManageTransactions("HealOp")
7111         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7112             """
7113             Addition of points to a given edge of \a theObject by projecting
7114             other points to the given edge.
7115
7116             Parameters:
7117                 theObject Shape to be processed.
7118                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7119                              if -1, then theObject itself is the edge.
7120                 thePoints List of points to project to theEdgeIndex-th edge.
7121                 theName Object name; when specified, this parameter is used
7122                         for result publication in the study. Otherwise, if automatic
7123                         publication is switched on, default value is used for result name.
7124
7125             Returns:
7126                 New GEOM.GEOM_Object, containing processed shape.
7127             """
7128             # Example: see GEOM_TestHealing.py
7129             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7130                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7131             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7132             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7133             self._autoPublish(anObj, theName, "divideEdge")
7134             return anObj
7135
7136         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7137         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7138         #  @param theVertices A list of vertices to suppress. If the list
7139         #                     is empty, all vertices in a wire will be assumed.
7140         #  @param theName Object name; when specified, this parameter is used
7141         #         for result publication in the study. Otherwise, if automatic
7142         #         publication is switched on, default value is used for result name.
7143         #
7144         #  @return New GEOM.GEOM_Object with modified wire.
7145         #
7146         #  @ref tui_fuse_collinear_edges "Example"
7147         @ManageTransactions("HealOp")
7148         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7149             """
7150             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7151
7152             Parameters:
7153                 theWire Wire to minimize the number of C1 continuous edges in.
7154                 theVertices A list of vertices to suppress. If the list
7155                             is empty, all vertices in a wire will be assumed.
7156                 theName Object name; when specified, this parameter is used
7157                         for result publication in the study. Otherwise, if automatic
7158                         publication is switched on, default value is used for result name.
7159
7160             Returns:
7161                 New GEOM.GEOM_Object with modified wire.
7162             """
7163             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7164             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7165             self._autoPublish(anObj, theName, "fuseEdges")
7166             return anObj
7167
7168         ## Change orientation of the given object. Updates given shape.
7169         #  @param theObject Shape to be processed.
7170         #  @return Updated <var>theObject</var>
7171         #
7172         #  @ref swig_todo "Example"
7173         @ManageTransactions("HealOp")
7174         def ChangeOrientationShell(self,theObject):
7175             """
7176             Change orientation of the given object. Updates given shape.
7177
7178             Parameters:
7179                 theObject Shape to be processed.
7180
7181             Returns:
7182                 Updated theObject
7183             """
7184             theObject = self.HealOp.ChangeOrientation(theObject)
7185             RaiseIfFailed("ChangeOrientation", self.HealOp)
7186             pass
7187
7188         ## Change orientation of the given object.
7189         #  @param theObject Shape to be processed.
7190         #  @param theName Object name; when specified, this parameter is used
7191         #         for result publication in the study. Otherwise, if automatic
7192         #         publication is switched on, default value is used for result name.
7193         #
7194         #  @return New GEOM.GEOM_Object, containing processed shape.
7195         #
7196         #  @ref swig_todo "Example"
7197         @ManageTransactions("HealOp")
7198         def ChangeOrientationShellCopy(self, theObject, theName=None):
7199             """
7200             Change orientation of the given object.
7201
7202             Parameters:
7203                 theObject Shape to be processed.
7204                 theName Object name; when specified, this parameter is used
7205                         for result publication in the study. Otherwise, if automatic
7206                         publication is switched on, default value is used for result name.
7207
7208             Returns:
7209                 New GEOM.GEOM_Object, containing processed shape.
7210             """
7211             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7212             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7213             self._autoPublish(anObj, theName, "reversed")
7214             return anObj
7215
7216         ## Try to limit tolerance of the given object by value \a theTolerance.
7217         #  @param theObject Shape to be processed.
7218         #  @param theTolerance Required tolerance value.
7219         #  @param theName Object name; when specified, this parameter is used
7220         #         for result publication in the study. Otherwise, if automatic
7221         #         publication is switched on, default value is used for result name.
7222         #
7223         #  @return New GEOM.GEOM_Object, containing processed shape.
7224         #
7225         #  @ref tui_limit_tolerance "Example"
7226         @ManageTransactions("HealOp")
7227         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7228             """
7229             Try to limit tolerance of the given object by value theTolerance.
7230
7231             Parameters:
7232                 theObject Shape to be processed.
7233                 theTolerance Required tolerance value.
7234                 theName Object name; when specified, this parameter is used
7235                         for result publication in the study. Otherwise, if automatic
7236                         publication is switched on, default value is used for result name.
7237
7238             Returns:
7239                 New GEOM.GEOM_Object, containing processed shape.
7240             """
7241             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7242             RaiseIfFailed("LimitTolerance", self.HealOp)
7243             self._autoPublish(anObj, theName, "limitTolerance")
7244             return anObj
7245
7246         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7247         #  that constitute a free boundary of the given shape.
7248         #  @param theObject Shape to get free boundary of.
7249         #  @param theName Object name; when specified, this parameter is used
7250         #         for result publication in the study. Otherwise, if automatic
7251         #         publication is switched on, default value is used for result name.
7252         #
7253         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7254         #  \n \a status: FALSE, if an error(s) occured during the method execution.
7255         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7256         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7257         #
7258         #  @ref tui_free_boundaries_page "Example"
7259         @ManageTransactions("HealOp")
7260         def GetFreeBoundary(self, theObject, theName=None):
7261             """
7262             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7263             that constitute a free boundary of the given shape.
7264
7265             Parameters:
7266                 theObject Shape to get free boundary of.
7267                 theName Object name; when specified, this parameter is used
7268                         for result publication in the study. Otherwise, if automatic
7269                         publication is switched on, default value is used for result name.
7270
7271             Returns:
7272                 [status, theClosedWires, theOpenWires]
7273                  status: FALSE, if an error(s) occured during the method execution.
7274                  theClosedWires: Closed wires on the free boundary of the given shape.
7275                  theOpenWires: Open wires on the free boundary of the given shape.
7276             """
7277             # Example: see GEOM_TestHealing.py
7278             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7279             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7280             self._autoPublish(anObj[1], theName, "closedWire")
7281             self._autoPublish(anObj[2], theName, "openWire")
7282             return anObj
7283
7284         ## Replace coincident faces in \a theShapes by one face.
7285         #  @param theShapes Initial shapes, either a list or compound of shapes.
7286         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7287         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7288         #                         otherwise all initial shapes.
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         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7294         #
7295         #  @ref tui_glue_faces "Example"
7296         @ManageTransactions("ShapesOp")
7297         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7298             """
7299             Replace coincident faces in theShapes by one face.
7300
7301             Parameters:
7302                 theShapes Initial shapes, either a list or compound of shapes.
7303                 theTolerance Maximum distance between faces, which can be considered as coincident.
7304                 doKeepNonSolids If FALSE, only solids will present in the result,
7305                                 otherwise all initial shapes.
7306                 theName Object name; when specified, this parameter is used
7307                         for result publication in the study. Otherwise, if automatic
7308                         publication is switched on, default value is used for result name.
7309
7310             Returns:
7311                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7312             """
7313             # Example: see GEOM_Spanner.py
7314             theTolerance,Parameters = ParseParameters(theTolerance)
7315             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7316             if anObj is None:
7317                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
7318             anObj.SetParameters(Parameters)
7319             self._autoPublish(anObj, theName, "glueFaces")
7320             return anObj
7321
7322         ## Find coincident faces in \a theShapes for possible gluing.
7323         #  @param theShapes Initial shapes, either a list or compound of shapes.
7324         #  @param theTolerance Maximum distance between faces,
7325         #                      which can be considered as coincident.
7326         #  @param theName Object name; when specified, this parameter is used
7327         #         for result publication in the study. Otherwise, if automatic
7328         #         publication is switched on, default value is used for result name.
7329         #
7330         #  @return GEOM.ListOfGO
7331         #
7332         #  @ref tui_glue_faces "Example"
7333         @ManageTransactions("ShapesOp")
7334         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7335             """
7336             Find coincident faces in theShapes for possible gluing.
7337
7338             Parameters:
7339                 theShapes Initial shapes, either a list or compound of shapes.
7340                 theTolerance Maximum distance between faces,
7341                              which can be considered as coincident.
7342                 theName Object name; when specified, this parameter is used
7343                         for result publication in the study. Otherwise, if automatic
7344                         publication is switched on, default value is used for result name.
7345
7346             Returns:
7347                 GEOM.ListOfGO
7348             """
7349             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7350             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7351             self._autoPublish(anObj, theName, "facesToGlue")
7352             return anObj
7353
7354         ## Replace coincident faces in \a theShapes by one face
7355         #  in compliance with given list of faces
7356         #  @param theShapes Initial shapes, either a list or compound of shapes.
7357         #  @param theTolerance Maximum distance between faces,
7358         #                      which can be considered as coincident.
7359         #  @param theFaces List of faces for gluing.
7360         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7361         #                         otherwise all initial shapes.
7362         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7363         #                        will be glued, otherwise only the edges,
7364         #                        belonging to <VAR>theFaces</VAR>.
7365         #  @param theName Object name; when specified, this parameter is used
7366         #         for result publication in the study. Otherwise, if automatic
7367         #         publication is switched on, default value is used for result name.
7368         #
7369         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7370         #
7371         #  @ref tui_glue_faces "Example"
7372         @ManageTransactions("ShapesOp")
7373         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7374                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7375             """
7376             Replace coincident faces in theShapes by one face
7377             in compliance with given list of faces
7378
7379             Parameters:
7380                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7381                 theTolerance Maximum distance between faces,
7382                              which can be considered as coincident.
7383                 theFaces List of faces for gluing.
7384                 doKeepNonSolids If FALSE, only solids will present in the result,
7385                                 otherwise all initial shapes.
7386                 doGlueAllEdges If TRUE, all coincident edges of theShape
7387                                will be glued, otherwise only the edges,
7388                                belonging to theFaces.
7389                 theName Object name; when specified, this parameter is used
7390                         for result publication in the study. Otherwise, if automatic
7391                         publication is switched on, default value is used for result name.
7392
7393             Returns:
7394                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7395             """
7396             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7397                                                       doKeepNonSolids, doGlueAllEdges)
7398             if anObj is None:
7399                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
7400             self._autoPublish(anObj, theName, "glueFaces")
7401             return anObj
7402
7403         ## Replace coincident edges in \a theShapes by one edge.
7404         #  @param theShapes Initial shapes, either a list or compound of shapes.
7405         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7406         #  @param theName Object name; when specified, this parameter is used
7407         #         for result publication in the study. Otherwise, if automatic
7408         #         publication is switched on, default value is used for result name.
7409         #
7410         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7411         #
7412         #  @ref tui_glue_edges "Example"
7413         @ManageTransactions("ShapesOp")
7414         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7415             """
7416             Replace coincident edges in theShapes by one edge.
7417
7418             Parameters:
7419                 theShapes Initial shapes, either a list or compound of shapes.
7420                 theTolerance Maximum distance between edges, which can be considered as coincident.
7421                 theName Object name; when specified, this parameter is used
7422                         for result publication in the study. Otherwise, if automatic
7423                         publication is switched on, default value is used for result name.
7424
7425             Returns:
7426                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7427             """
7428             theTolerance,Parameters = ParseParameters(theTolerance)
7429             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7430             if anObj is None:
7431                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
7432             anObj.SetParameters(Parameters)
7433             self._autoPublish(anObj, theName, "glueEdges")
7434             return anObj
7435
7436         ## Find coincident edges in \a theShapes for possible gluing.
7437         #  @param theShapes Initial shapes, either a list or compound of shapes.
7438         #  @param theTolerance Maximum distance between edges,
7439         #                      which can be considered as coincident.
7440         #  @param theName Object name; when specified, this parameter is used
7441         #         for result publication in the study. Otherwise, if automatic
7442         #         publication is switched on, default value is used for result name.
7443         #
7444         #  @return GEOM.ListOfGO
7445         #
7446         #  @ref tui_glue_edges "Example"
7447         @ManageTransactions("ShapesOp")
7448         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7449             """
7450             Find coincident edges in theShapes for possible gluing.
7451
7452             Parameters:
7453                 theShapes Initial shapes, either a list or compound of shapes.
7454                 theTolerance Maximum distance between edges,
7455                              which can be considered as coincident.
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                 GEOM.ListOfGO
7462             """
7463             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7464             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7465             self._autoPublish(anObj, theName, "edgesToGlue")
7466             return anObj
7467
7468         ## Replace coincident edges in theShapes by one edge
7469         #  in compliance with given list of edges.
7470         #  @param theShapes Initial shapes, either a list or compound of shapes.
7471         #  @param theTolerance Maximum distance between edges,
7472         #                      which can be considered as coincident.
7473         #  @param theEdges List of edges for gluing.
7474         #  @param theName Object name; when specified, this parameter is used
7475         #         for result publication in the study. Otherwise, if automatic
7476         #         publication is switched on, default value is used for result name.
7477         #
7478         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7479         #
7480         #  @ref tui_glue_edges "Example"
7481         @ManageTransactions("ShapesOp")
7482         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7483             """
7484             Replace coincident edges in theShapes by one edge
7485             in compliance with given list of edges.
7486
7487             Parameters:
7488                 theShapes Initial shapes, either a list or compound of shapes.
7489                 theTolerance Maximum distance between edges,
7490                              which can be considered as coincident.
7491                 theEdges List of edges for gluing.
7492                 theName Object name; when specified, this parameter is used
7493                         for result publication in the study. Otherwise, if automatic
7494                         publication is switched on, default value is used for result name.
7495
7496             Returns:
7497                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7498             """
7499             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7500             if anObj is None:
7501                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7502             self._autoPublish(anObj, theName, "glueEdges")
7503             return anObj
7504
7505         # end of l3_healing
7506         ## @}
7507
7508         ## @addtogroup l3_boolean Boolean Operations
7509         ## @{
7510
7511         # -----------------------------------------------------------------------------
7512         # Boolean (Common, Cut, Fuse, Section)
7513         # -----------------------------------------------------------------------------
7514
7515         ## Perform one of boolean operations on two given shapes.
7516         #  @param theShape1 First argument for boolean operation.
7517         #  @param theShape2 Second argument for boolean operation.
7518         #  @param theOperation Indicates the operation to be done:\n
7519         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7520         #  @param checkSelfInte The flag that tells if the arguments should
7521         #         be checked for self-intersection prior to the operation.
7522         #  @param theName Object name; when specified, this parameter is used
7523         #         for result publication in the study. Otherwise, if automatic
7524         #         publication is switched on, default value is used for result name.
7525         #
7526         #  @note This algorithm doesn't find all types of self-intersections.
7527         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7528         #        vertex/face and edge/face intersections. Face/face
7529         #        intersections detection is switched off as it is a
7530         #        time-consuming operation that gives an impact on performance.
7531         #        To find all self-intersections please use
7532         #        CheckSelfIntersections() method.
7533         #
7534         #  @return New GEOM.GEOM_Object, containing the result shape.
7535         #
7536         #  @ref tui_fuse "Example"
7537         @ManageTransactions("BoolOp")
7538         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7539             """
7540             Perform one of boolean operations on two given shapes.
7541
7542             Parameters:
7543                 theShape1 First argument for boolean operation.
7544                 theShape2 Second argument for boolean operation.
7545                 theOperation Indicates the operation to be done:
7546                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7547                 checkSelfInte The flag that tells if the arguments should
7548                               be checked for self-intersection prior to
7549                               the operation.
7550                 theName Object name; when specified, this parameter is used
7551                         for result publication in the study. Otherwise, if automatic
7552                         publication is switched on, default value is used for result name.
7553
7554             Note:
7555                     This algorithm doesn't find all types of self-intersections.
7556                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7557                     vertex/face and edge/face intersections. Face/face
7558                     intersections detection is switched off as it is a
7559                     time-consuming operation that gives an impact on performance.
7560                     To find all self-intersections please use
7561                     CheckSelfIntersections() method.
7562
7563             Returns:
7564                 New GEOM.GEOM_Object, containing the result shape.
7565             """
7566             # Example: see GEOM_TestAll.py
7567             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7568             RaiseIfFailed("MakeBoolean", self.BoolOp)
7569             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7570             self._autoPublish(anObj, theName, def_names[theOperation])
7571             return anObj
7572
7573         ## Perform Common boolean operation on two given shapes.
7574         #  @param theShape1 First argument for boolean operation.
7575         #  @param theShape2 Second argument for boolean operation.
7576         #  @param checkSelfInte The flag that tells if the arguments should
7577         #         be checked for self-intersection prior to the operation.
7578         #  @param theName Object name; when specified, this parameter is used
7579         #         for result publication in the study. Otherwise, if automatic
7580         #         publication is switched on, default value is used for result name.
7581         #
7582         #  @note This algorithm doesn't find all types of self-intersections.
7583         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7584         #        vertex/face and edge/face intersections. Face/face
7585         #        intersections detection is switched off as it is a
7586         #        time-consuming operation that gives an impact on performance.
7587         #        To find all self-intersections please use
7588         #        CheckSelfIntersections() method.
7589         #
7590         #  @return New GEOM.GEOM_Object, containing the result shape.
7591         #
7592         #  @ref tui_common "Example 1"
7593         #  \n @ref swig_MakeCommon "Example 2"
7594         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7595             """
7596             Perform Common boolean operation on two given shapes.
7597
7598             Parameters:
7599                 theShape1 First argument for boolean operation.
7600                 theShape2 Second argument for boolean operation.
7601                 checkSelfInte The flag that tells if the arguments should
7602                               be checked for self-intersection prior to
7603                               the operation.
7604                 theName Object name; when specified, this parameter is used
7605                         for result publication in the study. Otherwise, if automatic
7606                         publication is switched on, default value is used for result name.
7607
7608             Note:
7609                     This algorithm doesn't find all types of self-intersections.
7610                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7611                     vertex/face and edge/face intersections. Face/face
7612                     intersections detection is switched off as it is a
7613                     time-consuming operation that gives an impact on performance.
7614                     To find all self-intersections please use
7615                     CheckSelfIntersections() method.
7616
7617             Returns:
7618                 New GEOM.GEOM_Object, containing the result shape.
7619             """
7620             # Example: see GEOM_TestOthers.py
7621             # note: auto-publishing is done in self.MakeBoolean()
7622             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7623
7624         ## Perform Cut boolean operation on two given shapes.
7625         #  @param theShape1 First argument for boolean operation.
7626         #  @param theShape2 Second argument for boolean operation.
7627         #  @param checkSelfInte The flag that tells if the arguments should
7628         #         be checked for self-intersection prior to the operation.
7629         #  @param theName Object name; when specified, this parameter is used
7630         #         for result publication in the study. Otherwise, if automatic
7631         #         publication is switched on, default value is used for result name.
7632         #
7633         #  @note This algorithm doesn't find all types of self-intersections.
7634         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7635         #        vertex/face and edge/face intersections. Face/face
7636         #        intersections detection is switched off as it is a
7637         #        time-consuming operation that gives an impact on performance.
7638         #        To find all self-intersections please use
7639         #        CheckSelfIntersections() method.
7640         #
7641         #  @return New GEOM.GEOM_Object, containing the result shape.
7642         #
7643         #  @ref tui_cut "Example 1"
7644         #  \n @ref swig_MakeCommon "Example 2"
7645         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7646             """
7647             Perform Cut boolean operation on two given shapes.
7648
7649             Parameters:
7650                 theShape1 First argument for boolean operation.
7651                 theShape2 Second argument for boolean operation.
7652                 checkSelfInte The flag that tells if the arguments should
7653                               be checked for self-intersection prior to
7654                               the operation.
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             Note:
7660                     This algorithm doesn't find all types of self-intersections.
7661                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7662                     vertex/face and edge/face intersections. Face/face
7663                     intersections detection is switched off as it is a
7664                     time-consuming operation that gives an impact on performance.
7665                     To find all self-intersections please use
7666                     CheckSelfIntersections() method.
7667
7668             Returns:
7669                 New GEOM.GEOM_Object, containing the result shape.
7670
7671             """
7672             # Example: see GEOM_TestOthers.py
7673             # note: auto-publishing is done in self.MakeBoolean()
7674             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7675
7676         ## Perform Fuse boolean operation on two given shapes.
7677         #  @param theShape1 First argument for boolean operation.
7678         #  @param theShape2 Second argument for boolean operation.
7679         #  @param checkSelfInte The flag that tells if the arguments should
7680         #         be checked for self-intersection prior to the operation.
7681         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7682         #         operation should be performed during the operation.
7683         #  @param theName Object name; when specified, this parameter is used
7684         #         for result publication in the study. Otherwise, if automatic
7685         #         publication is switched on, default value is used for result name.
7686         #
7687         #  @note This algorithm doesn't find all types of self-intersections.
7688         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7689         #        vertex/face and edge/face intersections. Face/face
7690         #        intersections detection is switched off as it is a
7691         #        time-consuming operation that gives an impact on performance.
7692         #        To find all self-intersections please use
7693         #        CheckSelfIntersections() method.
7694         #
7695         #  @return New GEOM.GEOM_Object, containing the result shape.
7696         #
7697         #  @ref tui_fuse "Example 1"
7698         #  \n @ref swig_MakeCommon "Example 2"
7699         @ManageTransactions("BoolOp")
7700         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7701                      rmExtraEdges=False, theName=None):
7702             """
7703             Perform Fuse boolean operation on two given shapes.
7704
7705             Parameters:
7706                 theShape1 First argument for boolean operation.
7707                 theShape2 Second argument for boolean operation.
7708                 checkSelfInte The flag that tells if the arguments should
7709                               be checked for self-intersection prior to
7710                               the operation.
7711                 rmExtraEdges The flag that tells if Remove Extra Edges
7712                              operation should be performed during the operation.
7713                 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             Note:
7718                     This algorithm doesn't find all types of self-intersections.
7719                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7720                     vertex/face and edge/face intersections. Face/face
7721                     intersections detection is switched off as it is a
7722                     time-consuming operation that gives an impact on performance.
7723                     To find all self-intersections please use
7724                     CheckSelfIntersections() method.
7725
7726             Returns:
7727                 New GEOM.GEOM_Object, containing the result shape.
7728
7729             """
7730             # Example: see GEOM_TestOthers.py
7731             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7732                                          checkSelfInte, rmExtraEdges)
7733             RaiseIfFailed("MakeFuse", self.BoolOp)
7734             self._autoPublish(anObj, theName, "fuse")
7735             return anObj
7736
7737         ## Perform Section boolean operation on two given shapes.
7738         #  @param theShape1 First argument for boolean operation.
7739         #  @param theShape2 Second argument for boolean operation.
7740         #  @param checkSelfInte The flag that tells if the arguments should
7741         #         be checked for self-intersection prior to the operation.
7742         #         If a self-intersection detected the operation fails.
7743         #  @param theName Object name; when specified, this parameter is used
7744         #         for result publication in the study. Otherwise, if automatic
7745         #         publication is switched on, default value is used for result name.
7746         #  @return New GEOM.GEOM_Object, containing the result shape.
7747         #
7748         #  @ref tui_section "Example 1"
7749         #  \n @ref swig_MakeCommon "Example 2"
7750         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7751             """
7752             Perform Section boolean operation on two given shapes.
7753
7754             Parameters:
7755                 theShape1 First argument for boolean operation.
7756                 theShape2 Second argument for boolean operation.
7757                 checkSelfInte The flag that tells if the arguments should
7758                               be checked for self-intersection prior to the operation.
7759                               If a self-intersection detected the operation fails.
7760                 theName Object name; when specified, this parameter is used
7761                         for result publication in the study. Otherwise, if automatic
7762                         publication is switched on, default value is used for result name.
7763             Returns:
7764                 New GEOM.GEOM_Object, containing the result shape.
7765
7766             """
7767             # Example: see GEOM_TestOthers.py
7768             # note: auto-publishing is done in self.MakeBoolean()
7769             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7770
7771         ## Perform Fuse boolean operation on the list of shapes.
7772         #  @param theShapesList Shapes to be fused.
7773         #  @param checkSelfInte The flag that tells if the arguments should
7774         #         be checked for self-intersection prior to the operation.
7775         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7776         #         operation should be performed during the operation.
7777         #  @param theName Object name; when specified, this parameter is used
7778         #         for result publication in the study. Otherwise, if automatic
7779         #         publication is switched on, default value is used for result name.
7780         #
7781         #  @note This algorithm doesn't find all types of self-intersections.
7782         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7783         #        vertex/face and edge/face intersections. Face/face
7784         #        intersections detection is switched off as it is a
7785         #        time-consuming operation that gives an impact on performance.
7786         #        To find all self-intersections please use
7787         #        CheckSelfIntersections() method.
7788         #
7789         #  @return New GEOM.GEOM_Object, containing the result shape.
7790         #
7791         #  @ref tui_fuse "Example 1"
7792         #  \n @ref swig_MakeCommon "Example 2"
7793         @ManageTransactions("BoolOp")
7794         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7795                          rmExtraEdges=False, theName=None):
7796             """
7797             Perform Fuse boolean operation on the list of shapes.
7798
7799             Parameters:
7800                 theShapesList Shapes to be fused.
7801                 checkSelfInte The flag that tells if the arguments should
7802                               be checked for self-intersection prior to
7803                               the operation.
7804                 rmExtraEdges The flag that tells if Remove Extra Edges
7805                              operation should be performed during the operation.
7806                 theName Object name; when specified, this parameter is used
7807                         for result publication in the study. Otherwise, if automatic
7808                         publication is switched on, default value is used for result name.
7809
7810             Note:
7811                     This algorithm doesn't find all types of self-intersections.
7812                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7813                     vertex/face and edge/face intersections. Face/face
7814                     intersections detection is switched off as it is a
7815                     time-consuming operation that gives an impact on performance.
7816                     To find all self-intersections please use
7817                     CheckSelfIntersections() method.
7818
7819             Returns:
7820                 New GEOM.GEOM_Object, containing the result shape.
7821
7822             """
7823             # Example: see GEOM_TestOthers.py
7824             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7825                                              rmExtraEdges)
7826             RaiseIfFailed("MakeFuseList", self.BoolOp)
7827             self._autoPublish(anObj, theName, "fuse")
7828             return anObj
7829
7830         ## Perform Common boolean operation on the list of shapes.
7831         #  @param theShapesList Shapes for Common operation.
7832         #  @param checkSelfInte The flag that tells if the arguments should
7833         #         be checked for self-intersection prior to the operation.
7834         #  @param theName Object name; when specified, this parameter is used
7835         #         for result publication in the study. Otherwise, if automatic
7836         #         publication is switched on, default value is used for result name.
7837         #
7838         #  @note This algorithm doesn't find all types of self-intersections.
7839         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7840         #        vertex/face and edge/face intersections. Face/face
7841         #        intersections detection is switched off as it is a
7842         #        time-consuming operation that gives an impact on performance.
7843         #        To find all self-intersections please use
7844         #        CheckSelfIntersections() method.
7845         #
7846         #  @return New GEOM.GEOM_Object, containing the result shape.
7847         #
7848         #  @ref tui_common "Example 1"
7849         #  \n @ref swig_MakeCommon "Example 2"
7850         @ManageTransactions("BoolOp")
7851         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7852             """
7853             Perform Common boolean operation on the list of shapes.
7854
7855             Parameters:
7856                 theShapesList Shapes for Common operation.
7857                 checkSelfInte The flag that tells if the arguments should
7858                               be checked for self-intersection prior to
7859                               the operation.
7860                 theName Object name; when specified, this parameter is used
7861                         for result publication in the study. Otherwise, if automatic
7862                         publication is switched on, default value is used for result name.
7863
7864             Note:
7865                     This algorithm doesn't find all types of self-intersections.
7866                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7867                     vertex/face and edge/face intersections. Face/face
7868                     intersections detection is switched off as it is a
7869                     time-consuming operation that gives an impact on performance.
7870                     To find all self-intersections please use
7871                     CheckSelfIntersections() method.
7872
7873             Returns:
7874                 New GEOM.GEOM_Object, containing the result shape.
7875
7876             """
7877             # Example: see GEOM_TestOthers.py
7878             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7879             RaiseIfFailed("MakeCommonList", self.BoolOp)
7880             self._autoPublish(anObj, theName, "common")
7881             return anObj
7882
7883         ## Perform Cut boolean operation on one object and the list of tools.
7884         #  @param theMainShape The object of the operation.
7885         #  @param theShapesList The list of tools of the operation.
7886         #  @param checkSelfInte The flag that tells if the arguments should
7887         #         be checked for self-intersection prior to the operation.
7888         #  @param theName Object name; when specified, this parameter is used
7889         #         for result publication in the study. Otherwise, if automatic
7890         #         publication is switched on, default value is used for result name.
7891         #
7892         #  @note This algorithm doesn't find all types of self-intersections.
7893         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7894         #        vertex/face and edge/face intersections. Face/face
7895         #        intersections detection is switched off as it is a
7896         #        time-consuming operation that gives an impact on performance.
7897         #        To find all self-intersections please use
7898         #        CheckSelfIntersections() method.
7899         #
7900         #  @return New GEOM.GEOM_Object, containing the result shape.
7901         #
7902         #  @ref tui_cut "Example 1"
7903         #  \n @ref swig_MakeCommon "Example 2"
7904         @ManageTransactions("BoolOp")
7905         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7906             """
7907             Perform Cut boolean operation on one object and the list of tools.
7908
7909             Parameters:
7910                 theMainShape The object of the operation.
7911                 theShapesList The list of tools of the operation.
7912                 checkSelfInte The flag that tells if the arguments should
7913                               be checked for self-intersection prior to
7914                               the operation.
7915                 theName Object name; when specified, this parameter is used
7916                         for result publication in the study. Otherwise, if automatic
7917                         publication is switched on, default value is used for result name.
7918
7919             Note:
7920                     This algorithm doesn't find all types of self-intersections.
7921                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7922                     vertex/face and edge/face intersections. Face/face
7923                     intersections detection is switched off as it is a
7924                     time-consuming operation that gives an impact on performance.
7925                     To find all self-intersections please use
7926                     CheckSelfIntersections() method.
7927
7928             Returns:
7929                 New GEOM.GEOM_Object, containing the result shape.
7930
7931             """
7932             # Example: see GEOM_TestOthers.py
7933             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7934             RaiseIfFailed("MakeCutList", self.BoolOp)
7935             self._autoPublish(anObj, theName, "cut")
7936             return anObj
7937
7938         # end of l3_boolean
7939         ## @}
7940
7941         ## @addtogroup l3_basic_op
7942         ## @{
7943
7944         ## Perform partition operation.
7945         #  @param ListShapes Shapes to be intersected.
7946         #  @param ListTools Shapes to intersect theShapes.
7947         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7948         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7949         #         type will be detected automatically.
7950         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7951         #                             target type (equal to Limit) are kept in the result,
7952         #                             else standalone shapes of lower dimension
7953         #                             are kept also (if they exist).
7954         #
7955         #  @param theName Object name; when specified, this parameter is used
7956         #         for result publication in the study. Otherwise, if automatic
7957         #         publication is switched on, default value is used for result name.
7958         #
7959         #  @note Each compound from ListShapes and ListTools will be exploded
7960         #        in order to avoid possible intersection between shapes from this compound.
7961         #
7962         #  After implementation new version of PartitionAlgo (October 2006)
7963         #  other parameters are ignored by current functionality. They are kept
7964         #  in this function only for support old versions.
7965         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7966         #         Each shape from theKeepInside must belong to theShapes also.
7967         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7968         #         Each shape from theRemoveInside must belong to theShapes also.
7969         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7970         #      @param ListMaterials Material indices for each shape. Make sence,
7971         #         only if theRemoveWebs is TRUE.
7972         #
7973         #  @return New GEOM.GEOM_Object, containing the result shapes.
7974         #
7975         #  @ref tui_partition "Example"
7976         @ManageTransactions("BoolOp")
7977         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7978                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7979                           KeepNonlimitShapes=0, theName=None):
7980             """
7981             Perform partition operation.
7982
7983             Parameters:
7984                 ListShapes Shapes to be intersected.
7985                 ListTools Shapes to intersect theShapes.
7986                 Limit Type of resulting shapes (see geompy.ShapeType)
7987                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7988                       type will be detected automatically.
7989                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7990                                     target type (equal to Limit) are kept in the result,
7991                                     else standalone shapes of lower dimension
7992                                     are kept also (if they exist).
7993
7994                 theName Object name; when specified, this parameter is used
7995                         for result publication in the study. Otherwise, if automatic
7996                         publication is switched on, default value is used for result name.
7997             Note:
7998                     Each compound from ListShapes and ListTools will be exploded
7999                     in order to avoid possible intersection between shapes from
8000                     this compound.
8001
8002             After implementation new version of PartitionAlgo (October 2006) other
8003             parameters are ignored by current functionality. They are kept in this
8004             function only for support old versions.
8005
8006             Ignored parameters:
8007                 ListKeepInside Shapes, outside which the results will be deleted.
8008                                Each shape from theKeepInside must belong to theShapes also.
8009                 ListRemoveInside Shapes, inside which the results will be deleted.
8010                                  Each shape from theRemoveInside must belong to theShapes also.
8011                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8012                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
8013
8014             Returns:
8015                 New GEOM.GEOM_Object, containing the result shapes.
8016             """
8017             # Example: see GEOM_TestAll.py
8018             if Limit == self.ShapeType["AUTO"]:
8019                 # automatic detection of the most appropriate shape limit type
8020                 lim = GEOM.SHAPE
8021                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
8022                 Limit = EnumToLong(lim)
8023                 pass
8024             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8025                                               ListKeepInside, ListRemoveInside,
8026                                               Limit, RemoveWebs, ListMaterials,
8027                                               KeepNonlimitShapes);
8028             RaiseIfFailed("MakePartition", self.BoolOp)
8029             self._autoPublish(anObj, theName, "partition")
8030             return anObj
8031
8032         ## Perform partition operation.
8033         #  This method may be useful if it is needed to make a partition for
8034         #  compound contains nonintersected shapes. Performance will be better
8035         #  since intersection between shapes from compound is not performed.
8036         #
8037         #  Description of all parameters as in previous method MakePartition().
8038         #  One additional parameter is provided:
8039         #  @param checkSelfInte The flag that tells if the arguments should
8040         #         be checked for self-intersection prior to the operation.
8041         #
8042         #  @note This algorithm doesn't find all types of self-intersections.
8043         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8044         #        vertex/face and edge/face intersections. Face/face
8045         #        intersections detection is switched off as it is a
8046         #        time-consuming operation that gives an impact on performance.
8047         #        To find all self-intersections please use
8048         #        CheckSelfIntersections() method.
8049         #
8050         #  @note Passed compounds (via ListShapes or via ListTools)
8051         #           have to consist of nonintersecting shapes.
8052         #
8053         #  @return New GEOM.GEOM_Object, containing the result shapes.
8054         #
8055         #  @ref swig_todo "Example"
8056         @ManageTransactions("BoolOp")
8057         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8058                                                  ListKeepInside=[], ListRemoveInside=[],
8059                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8060                                                  ListMaterials=[], KeepNonlimitShapes=0,
8061                                                  checkSelfInte=False, theName=None):
8062             """
8063             Perform partition operation.
8064             This method may be useful if it is needed to make a partition for
8065             compound contains nonintersected shapes. Performance will be better
8066             since intersection between shapes from compound is not performed.
8067
8068             Parameters:
8069                 Description of all parameters as in method geompy.MakePartition.
8070                 One additional parameter is provided:
8071                 checkSelfInte The flag that tells if the arguments should
8072                               be checked for self-intersection prior to
8073                               the operation.
8074
8075             Note:
8076                     This algorithm doesn't find all types of self-intersections.
8077                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8078                     vertex/face and edge/face intersections. Face/face
8079                     intersections detection is switched off as it is a
8080                     time-consuming operation that gives an impact on performance.
8081                     To find all self-intersections please use
8082                     CheckSelfIntersections() method.
8083
8084             NOTE:
8085                 Passed compounds (via ListShapes or via ListTools)
8086                 have to consist of nonintersecting shapes.
8087
8088             Returns:
8089                 New GEOM.GEOM_Object, containing the result shapes.
8090             """
8091             if Limit == self.ShapeType["AUTO"]:
8092                 # automatic detection of the most appropriate shape limit type
8093                 lim = GEOM.SHAPE
8094                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
8095                 Limit = EnumToLong(lim)
8096                 pass
8097             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8098                                                                      ListKeepInside, ListRemoveInside,
8099                                                                      Limit, RemoveWebs, ListMaterials,
8100                                                                      KeepNonlimitShapes, checkSelfInte);
8101             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8102             self._autoPublish(anObj, theName, "partition")
8103             return anObj
8104
8105         ## See method MakePartition() for more information.
8106         #
8107         #  @ref tui_partition "Example 1"
8108         #  \n @ref swig_Partition "Example 2"
8109         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8110                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8111                       KeepNonlimitShapes=0, theName=None):
8112             """
8113             See method geompy.MakePartition for more information.
8114             """
8115             # Example: see GEOM_TestOthers.py
8116             # note: auto-publishing is done in self.MakePartition()
8117             anObj = self.MakePartition(ListShapes, ListTools,
8118                                        ListKeepInside, ListRemoveInside,
8119                                        Limit, RemoveWebs, ListMaterials,
8120                                        KeepNonlimitShapes, theName);
8121             return anObj
8122
8123         ## Perform partition of the Shape with the Plane
8124         #  @param theShape Shape to be intersected.
8125         #  @param thePlane Tool shape, to intersect theShape.
8126         #  @param theName Object name; when specified, this parameter is used
8127         #         for result publication in the study. Otherwise, if automatic
8128         #         publication is switched on, default value is used for result name.
8129         #
8130         #  @return New GEOM.GEOM_Object, containing the result shape.
8131         #
8132         #  @note This operation is a shortcut to the more general @ref MakePartition
8133         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8134         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8135         #  @ref MakePartition operation have default values:
8136         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8137         #  - @a KeepNonlimitShapes: 0
8138         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8139         #    @a Materials (obsolete parameters): empty
8140         #
8141         #  @note I.e. the following two operations are equivalent:
8142         #  @code
8143         #  Result = geompy.MakeHalfPartition(Object, Plane)
8144         #  Result = geompy.MakePartition([Object], [Plane])
8145         #  @endcode
8146         #
8147         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8148         #
8149         #  @ref tui_partition "Example"
8150         @ManageTransactions("BoolOp")
8151         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8152             """
8153             Perform partition of the Shape with the Plane
8154
8155             Parameters:
8156                 theShape Shape to be intersected.
8157                 thePlane Tool shape, to intersect theShape.
8158                 theName Object name; when specified, this parameter is used
8159                         for result publication in the study. Otherwise, if automatic
8160                         publication is switched on, default value is used for result name.
8161
8162             Returns:
8163                 New GEOM.GEOM_Object, containing the result shape.
8164          
8165             Note: This operation is a shortcut to the more general MakePartition
8166             operation, where theShape specifies single "object" (shape being partitioned)
8167             and thePlane specifies single "tool" (intersector shape). Other parameters of
8168             MakePartition operation have default values:
8169             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8170             - KeepNonlimitShapes: 0
8171             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8172          
8173             I.e. the following two operations are equivalent:
8174               Result = geompy.MakeHalfPartition(Object, Plane)
8175               Result = geompy.MakePartition([Object], [Plane])
8176             """
8177             # Example: see GEOM_TestAll.py
8178             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8179             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8180             self._autoPublish(anObj, theName, "partition")
8181             return anObj
8182
8183         # end of l3_basic_op
8184         ## @}
8185
8186         ## @addtogroup l3_transform
8187         ## @{
8188
8189         ## Translate the given object along the vector, specified
8190         #  by its end points.
8191         #  @param theObject The object to be translated.
8192         #  @param thePoint1 Start point of translation vector.
8193         #  @param thePoint2 End point of translation vector.
8194         #  @param theCopy Flag used to translate object itself or create a copy.
8195         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8196         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8197         @ManageTransactions("TrsfOp")
8198         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8199             """
8200             Translate the given object along the vector, specified by its end points.
8201
8202             Parameters:
8203                 theObject The object to be translated.
8204                 thePoint1 Start point of translation vector.
8205                 thePoint2 End point of translation vector.
8206                 theCopy Flag used to translate object itself or create a copy.
8207
8208             Returns:
8209                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8210                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8211             """
8212             if theCopy:
8213                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8214             else:
8215                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8216             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8217             return anObj
8218
8219         ## Translate the given object along the vector, specified
8220         #  by its end points, creating its copy before the translation.
8221         #  @param theObject The object to be translated.
8222         #  @param thePoint1 Start point of translation vector.
8223         #  @param thePoint2 End point of translation vector.
8224         #  @param theName Object name; when specified, this parameter is used
8225         #         for result publication in the study. Otherwise, if automatic
8226         #         publication is switched on, default value is used for result name.
8227         #
8228         #  @return New GEOM.GEOM_Object, containing the translated object.
8229         #
8230         #  @ref tui_translation "Example 1"
8231         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8232         @ManageTransactions("TrsfOp")
8233         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8234             """
8235             Translate the given object along the vector, specified
8236             by its end points, creating its copy before the translation.
8237
8238             Parameters:
8239                 theObject The object to be translated.
8240                 thePoint1 Start point of translation vector.
8241                 thePoint2 End point of translation vector.
8242                 theName Object name; when specified, this parameter is used
8243                         for result publication in the study. Otherwise, if automatic
8244                         publication is switched on, default value is used for result name.
8245
8246             Returns:
8247                 New GEOM.GEOM_Object, containing the translated object.
8248             """
8249             # Example: see GEOM_TestAll.py
8250             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8251             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8252             self._autoPublish(anObj, theName, "translated")
8253             return anObj
8254
8255         ## Translate the given object along the vector, specified by its components.
8256         #  @param theObject The object to be translated.
8257         #  @param theDX,theDY,theDZ Components of translation vector.
8258         #  @param theCopy Flag used to translate object itself or create a copy.
8259         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8260         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8261         #
8262         #  @ref tui_translation "Example"
8263         @ManageTransactions("TrsfOp")
8264         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8265             """
8266             Translate the given object along the vector, specified by its components.
8267
8268             Parameters:
8269                 theObject The object to be translated.
8270                 theDX,theDY,theDZ Components of translation vector.
8271                 theCopy Flag used to translate object itself or create a copy.
8272
8273             Returns:
8274                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8275                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8276             """
8277             # Example: see GEOM_TestAll.py
8278             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8279             if theCopy:
8280                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8281             else:
8282                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8283             anObj.SetParameters(Parameters)
8284             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8285             return anObj
8286
8287         ## Translate the given object along the vector, specified
8288         #  by its components, creating its copy before the translation.
8289         #  @param theObject The object to be translated.
8290         #  @param theDX,theDY,theDZ Components of translation vector.
8291         #  @param 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         #  @return New GEOM.GEOM_Object, containing the translated object.
8296         #
8297         #  @ref tui_translation "Example"
8298         @ManageTransactions("TrsfOp")
8299         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8300             """
8301             Translate the given object along the vector, specified
8302             by its components, creating its copy before the translation.
8303
8304             Parameters:
8305                 theObject The object to be translated.
8306                 theDX,theDY,theDZ Components of translation vector.
8307                 theName Object name; when specified, this parameter is used
8308                         for result publication in the study. Otherwise, if automatic
8309                         publication is switched on, default value is used for result name.
8310
8311             Returns:
8312                 New GEOM.GEOM_Object, containing the translated object.
8313             """
8314             # Example: see GEOM_TestAll.py
8315             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8316             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8317             anObj.SetParameters(Parameters)
8318             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8319             self._autoPublish(anObj, theName, "translated")
8320             return anObj
8321
8322         ## Translate the given object along the given vector.
8323         #  @param theObject The object to be translated.
8324         #  @param theVector The translation vector.
8325         #  @param theCopy Flag used to translate object itself or create a copy.
8326         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8327         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8328         @ManageTransactions("TrsfOp")
8329         def TranslateVector(self, theObject, theVector, theCopy=False):
8330             """
8331             Translate the given object along the given vector.
8332
8333             Parameters:
8334                 theObject The object to be translated.
8335                 theVector The translation vector.
8336                 theCopy Flag used to translate object itself or create a copy.
8337
8338             Returns:
8339                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8340                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8341             """
8342             if theCopy:
8343                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8344             else:
8345                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8346             RaiseIfFailed("TranslateVector", self.TrsfOp)
8347             return anObj
8348
8349         ## Translate the given object along the given vector,
8350         #  creating its copy before the translation.
8351         #  @param theObject The object to be translated.
8352         #  @param theVector The translation vector.
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 the translated object.
8358         #
8359         #  @ref tui_translation "Example"
8360         @ManageTransactions("TrsfOp")
8361         def MakeTranslationVector(self, theObject, theVector, theName=None):
8362             """
8363             Translate the given object along the given vector,
8364             creating its copy before the translation.
8365
8366             Parameters:
8367                 theObject The object to be translated.
8368                 theVector The translation vector.
8369                 theName Object name; when specified, this parameter is used
8370                         for result publication in the study. Otherwise, if automatic
8371                         publication is switched on, default value is used for result name.
8372
8373             Returns:
8374                 New GEOM.GEOM_Object, containing the translated object.
8375             """
8376             # Example: see GEOM_TestAll.py
8377             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8378             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8379             self._autoPublish(anObj, theName, "translated")
8380             return anObj
8381
8382         ## Translate the given object along the given vector on given distance.
8383         #  @param theObject The object to be translated.
8384         #  @param theVector The translation vector.
8385         #  @param theDistance The translation distance.
8386         #  @param theCopy Flag used to translate object itself or create a copy.
8387         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8388         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8389         #
8390         #  @ref tui_translation "Example"
8391         @ManageTransactions("TrsfOp")
8392         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8393             """
8394             Translate the given object along the given vector on given distance.
8395
8396             Parameters:
8397                 theObject The object to be translated.
8398                 theVector The translation vector.
8399                 theDistance The translation distance.
8400                 theCopy Flag used to translate object itself or create a copy.
8401
8402             Returns:
8403                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8404                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8405             """
8406             # Example: see GEOM_TestAll.py
8407             theDistance,Parameters = ParseParameters(theDistance)
8408             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8409             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8410             anObj.SetParameters(Parameters)
8411             return anObj
8412
8413         ## Translate the given object along the given vector on given distance,
8414         #  creating its copy before the translation.
8415         #  @param theObject The object to be translated.
8416         #  @param theVector The translation vector.
8417         #  @param theDistance The translation distance.
8418         #  @param 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         #  @return New GEOM.GEOM_Object, containing the translated object.
8423         #
8424         #  @ref tui_translation "Example"
8425         @ManageTransactions("TrsfOp")
8426         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8427             """
8428             Translate the given object along the given vector on given distance,
8429             creating its copy before the translation.
8430
8431             Parameters:
8432                 theObject The object to be translated.
8433                 theVector The translation vector.
8434                 theDistance The translation distance.
8435                 theName Object name; when specified, this parameter is used
8436                         for result publication in the study. Otherwise, if automatic
8437                         publication is switched on, default value is used for result name.
8438
8439             Returns:
8440                 New GEOM.GEOM_Object, containing the translated object.
8441             """
8442             # Example: see GEOM_TestAll.py
8443             theDistance,Parameters = ParseParameters(theDistance)
8444             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8445             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8446             anObj.SetParameters(Parameters)
8447             self._autoPublish(anObj, theName, "translated")
8448             return anObj
8449
8450         ## Rotate the given object around the given axis on the given angle.
8451         #  @param theObject The object to be rotated.
8452         #  @param theAxis Rotation axis.
8453         #  @param theAngle Rotation angle in radians.
8454         #  @param theCopy Flag used to rotate object itself or create a copy.
8455         #
8456         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8457         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8458         #
8459         #  @ref tui_rotation "Example"
8460         @ManageTransactions("TrsfOp")
8461         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8462             """
8463             Rotate the given object around the given axis on the given angle.
8464
8465             Parameters:
8466                 theObject The object to be rotated.
8467                 theAxis Rotation axis.
8468                 theAngle Rotation angle in radians.
8469                 theCopy Flag used to rotate object itself or create a copy.
8470
8471             Returns:
8472                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8473                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8474             """
8475             # Example: see GEOM_TestAll.py
8476             flag = False
8477             if isinstance(theAngle,str):
8478                 flag = True
8479             theAngle, Parameters = ParseParameters(theAngle)
8480             if flag:
8481                 theAngle = theAngle*math.pi/180.0
8482             if theCopy:
8483                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8484             else:
8485                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8486             RaiseIfFailed("Rotate", self.TrsfOp)
8487             anObj.SetParameters(Parameters)
8488             return anObj
8489
8490         ## Rotate the given object around the given axis
8491         #  on the given angle, creating its copy before the rotation.
8492         #  @param theObject The object to be rotated.
8493         #  @param theAxis Rotation axis.
8494         #  @param theAngle Rotation angle in radians.
8495         #  @param theName Object name; when specified, this parameter is used
8496         #         for result publication in the study. Otherwise, if automatic
8497         #         publication is switched on, default value is used for result name.
8498         #
8499         #  @return New GEOM.GEOM_Object, containing the rotated object.
8500         #
8501         #  @ref tui_rotation "Example"
8502         @ManageTransactions("TrsfOp")
8503         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8504             """
8505             Rotate the given object around the given axis
8506             on the given angle, creating its copy before the rotatation.
8507
8508             Parameters:
8509                 theObject The object to be rotated.
8510                 theAxis Rotation axis.
8511                 theAngle Rotation angle in radians.
8512                 theName Object name; when specified, this parameter is used
8513                         for result publication in the study. Otherwise, if automatic
8514                         publication is switched on, default value is used for result name.
8515
8516             Returns:
8517                 New GEOM.GEOM_Object, containing the rotated object.
8518             """
8519             # Example: see GEOM_TestAll.py
8520             flag = False
8521             if isinstance(theAngle,str):
8522                 flag = True
8523             theAngle, Parameters = ParseParameters(theAngle)
8524             if flag:
8525                 theAngle = theAngle*math.pi/180.0
8526             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8527             RaiseIfFailed("RotateCopy", self.TrsfOp)
8528             anObj.SetParameters(Parameters)
8529             self._autoPublish(anObj, theName, "rotated")
8530             return anObj
8531
8532         ## Rotate given object around vector perpendicular to plane
8533         #  containing three points.
8534         #  @param theObject The object to be rotated.
8535         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8536         #  containing the three points.
8537         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8538         #  @param theCopy Flag used to rotate object itself or create a copy.
8539         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8540         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8541         @ManageTransactions("TrsfOp")
8542         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8543             """
8544             Rotate given object around vector perpendicular to plane
8545             containing three points.
8546
8547             Parameters:
8548                 theObject The object to be rotated.
8549                 theCentPoint central point  the axis is the vector perpendicular to the plane
8550                              containing the three points.
8551                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8552                 theCopy Flag used to rotate object itself or create a copy.
8553
8554             Returns:
8555                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8556                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8557             """
8558             if theCopy:
8559                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8560             else:
8561                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8562             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8563             return anObj
8564
8565         ## Rotate given object around vector perpendicular to plane
8566         #  containing three points, creating its copy before the rotatation.
8567         #  @param theObject The object to be rotated.
8568         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8569         #  containing the three points.
8570         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8571         #  @param theName Object name; when specified, this parameter is used
8572         #         for result publication in the study. Otherwise, if automatic
8573         #         publication is switched on, default value is used for result name.
8574         #
8575         #  @return New GEOM.GEOM_Object, containing the rotated object.
8576         #
8577         #  @ref tui_rotation "Example"
8578         @ManageTransactions("TrsfOp")
8579         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8580             """
8581             Rotate given object around vector perpendicular to plane
8582             containing three points, creating its copy before the rotatation.
8583
8584             Parameters:
8585                 theObject The object to be rotated.
8586                 theCentPoint central point  the axis is the vector perpendicular to the plane
8587                              containing the three points.
8588                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8589                 theName Object name; when specified, this parameter is used
8590                         for result publication in the study. Otherwise, if automatic
8591                         publication is switched on, default value is used for result name.
8592
8593             Returns:
8594                 New GEOM.GEOM_Object, containing the rotated object.
8595             """
8596             # Example: see GEOM_TestAll.py
8597             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8598             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8599             self._autoPublish(anObj, theName, "rotated")
8600             return anObj
8601
8602         ## Scale the given object by the specified factor.
8603         #  @param theObject The object to be scaled.
8604         #  @param thePoint Center point for scaling.
8605         #                  Passing None for it means scaling relatively the origin of global CS.
8606         #  @param theFactor Scaling factor value.
8607         #  @param theCopy Flag used to scale object itself or create a copy.
8608         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8609         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8610         @ManageTransactions("TrsfOp")
8611         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8612             """
8613             Scale the given object by the specified factor.
8614
8615             Parameters:
8616                 theObject The object to be scaled.
8617                 thePoint Center point for scaling.
8618                          Passing None for it means scaling relatively the origin of global CS.
8619                 theFactor Scaling factor value.
8620                 theCopy Flag used to scale object itself or create a copy.
8621
8622             Returns:
8623                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8624                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8625             """
8626             # Example: see GEOM_TestAll.py
8627             theFactor, Parameters = ParseParameters(theFactor)
8628             if theCopy:
8629                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8630             else:
8631                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8632             RaiseIfFailed("Scale", self.TrsfOp)
8633             anObj.SetParameters(Parameters)
8634             return anObj
8635
8636         ## Scale the given object by the factor, creating its copy before the scaling.
8637         #  @param theObject The object to be scaled.
8638         #  @param thePoint Center point for scaling.
8639         #                  Passing None for it means scaling relatively the origin of global CS.
8640         #  @param theFactor Scaling factor value.
8641         #  @param theName Object name; when specified, this parameter is used
8642         #         for result publication in the study. Otherwise, if automatic
8643         #         publication is switched on, default value is used for result name.
8644         #
8645         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8646         #
8647         #  @ref tui_scale "Example"
8648         @ManageTransactions("TrsfOp")
8649         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8650             """
8651             Scale the given object by the factor, creating its copy before the scaling.
8652
8653             Parameters:
8654                 theObject The object to be scaled.
8655                 thePoint Center point for scaling.
8656                          Passing None for it means scaling relatively the origin of global CS.
8657                 theFactor Scaling factor value.
8658                 theName Object name; when specified, this parameter is used
8659                         for result publication in the study. Otherwise, if automatic
8660                         publication is switched on, default value is used for result name.
8661
8662             Returns:
8663                 New GEOM.GEOM_Object, containing the scaled shape.
8664             """
8665             # Example: see GEOM_TestAll.py
8666             theFactor, Parameters = ParseParameters(theFactor)
8667             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8668             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8669             anObj.SetParameters(Parameters)
8670             self._autoPublish(anObj, theName, "scaled")
8671             return anObj
8672
8673         ## Scale the given object by different factors along coordinate axes.
8674         #  @param theObject The object to be scaled.
8675         #  @param thePoint Center point for scaling.
8676         #                  Passing None for it means scaling relatively the origin of global CS.
8677         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8678         #  @param theCopy Flag used to scale object itself or create a copy.
8679         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8680         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8681         @ManageTransactions("TrsfOp")
8682         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8683             """
8684             Scale the given object by different factors along coordinate axes.
8685
8686             Parameters:
8687                 theObject The object to be scaled.
8688                 thePoint Center point for scaling.
8689                             Passing None for it means scaling relatively the origin of global CS.
8690                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8691                 theCopy Flag used to scale object itself or create a copy.
8692
8693             Returns:
8694                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8695                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8696             """
8697             # Example: see GEOM_TestAll.py
8698             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8699             if theCopy:
8700                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8701                                                             theFactorX, theFactorY, theFactorZ)
8702             else:
8703                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8704                                                         theFactorX, theFactorY, theFactorZ)
8705             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8706             anObj.SetParameters(Parameters)
8707             return anObj
8708
8709         ## Scale the given object by different factors along coordinate axes,
8710         #  creating its copy before the scaling.
8711         #  @param theObject The object to be scaled.
8712         #  @param thePoint Center point for scaling.
8713         #                  Passing None for it means scaling relatively the origin of global CS.
8714         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8715         #  @param theName Object name; when specified, this parameter is used
8716         #         for result publication in the study. Otherwise, if automatic
8717         #         publication is switched on, default value is used for result name.
8718         #
8719         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8720         #
8721         #  @ref swig_scale "Example"
8722         @ManageTransactions("TrsfOp")
8723         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8724             """
8725             Scale the given object by different factors along coordinate axes,
8726             creating its copy before the scaling.
8727
8728             Parameters:
8729                 theObject The object to be scaled.
8730                 thePoint Center point for scaling.
8731                             Passing None for it means scaling relatively the origin of global CS.
8732                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8733                 theName Object name; when specified, this parameter is used
8734                         for result publication in the study. Otherwise, if automatic
8735                         publication is switched on, default value is used for result name.
8736
8737             Returns:
8738                 New GEOM.GEOM_Object, containing the scaled shape.
8739             """
8740             # Example: see GEOM_TestAll.py
8741             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8742             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8743                                                         theFactorX, theFactorY, theFactorZ)
8744             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8745             anObj.SetParameters(Parameters)
8746             self._autoPublish(anObj, theName, "scaled")
8747             return anObj
8748
8749         ## Mirror an object relatively the given plane.
8750         #  @param theObject The object to be mirrored.
8751         #  @param thePlane Plane of symmetry.
8752         #  @param theCopy Flag used to mirror object itself or create a copy.
8753         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8754         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8755         @ManageTransactions("TrsfOp")
8756         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8757             """
8758             Mirror an object relatively the given plane.
8759
8760             Parameters:
8761                 theObject The object to be mirrored.
8762                 thePlane Plane of symmetry.
8763                 theCopy Flag used to mirror object itself or create a copy.
8764
8765             Returns:
8766                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8767                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8768             """
8769             if theCopy:
8770                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8771             else:
8772                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8773             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8774             return anObj
8775
8776         ## Create an object, symmetrical
8777         #  to the given one relatively the given plane.
8778         #  @param theObject The object to be mirrored.
8779         #  @param thePlane Plane of symmetry.
8780         #  @param theName Object name; when specified, this parameter is used
8781         #         for result publication in the study. Otherwise, if automatic
8782         #         publication is switched on, default value is used for result name.
8783         #
8784         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8785         #
8786         #  @ref tui_mirror "Example"
8787         @ManageTransactions("TrsfOp")
8788         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8789             """
8790             Create an object, symmetrical to the given one relatively the given plane.
8791
8792             Parameters:
8793                 theObject The object to be mirrored.
8794                 thePlane Plane of symmetry.
8795                 theName Object name; when specified, this parameter is used
8796                         for result publication in the study. Otherwise, if automatic
8797                         publication is switched on, default value is used for result name.
8798
8799             Returns:
8800                 New GEOM.GEOM_Object, containing the mirrored shape.
8801             """
8802             # Example: see GEOM_TestAll.py
8803             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8804             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8805             self._autoPublish(anObj, theName, "mirrored")
8806             return anObj
8807
8808         ## Mirror an object relatively the given axis.
8809         #  @param theObject The object to be mirrored.
8810         #  @param theAxis Axis of symmetry.
8811         #  @param theCopy Flag used to mirror object itself or create a copy.
8812         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8813         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8814         @ManageTransactions("TrsfOp")
8815         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8816             """
8817             Mirror an object relatively the given axis.
8818
8819             Parameters:
8820                 theObject The object to be mirrored.
8821                 theAxis Axis of symmetry.
8822                 theCopy Flag used to mirror object itself or create a copy.
8823
8824             Returns:
8825                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8826                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8827             """
8828             if theCopy:
8829                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8830             else:
8831                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8832             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8833             return anObj
8834
8835         ## Create an object, symmetrical
8836         #  to the given one relatively the given axis.
8837         #  @param theObject The object to be mirrored.
8838         #  @param theAxis Axis of symmetry.
8839         #  @param theName Object name; when specified, this parameter is used
8840         #         for result publication in the study. Otherwise, if automatic
8841         #         publication is switched on, default value is used for result name.
8842         #
8843         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8844         #
8845         #  @ref tui_mirror "Example"
8846         @ManageTransactions("TrsfOp")
8847         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8848             """
8849             Create an object, symmetrical to the given one relatively the given axis.
8850
8851             Parameters:
8852                 theObject The object to be mirrored.
8853                 theAxis Axis of symmetry.
8854                 theName Object name; when specified, this parameter is used
8855                         for result publication in the study. Otherwise, if automatic
8856                         publication is switched on, default value is used for result name.
8857
8858             Returns:
8859                 New GEOM.GEOM_Object, containing the mirrored shape.
8860             """
8861             # Example: see GEOM_TestAll.py
8862             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8863             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8864             self._autoPublish(anObj, theName, "mirrored")
8865             return anObj
8866
8867         ## Mirror an object relatively the given point.
8868         #  @param theObject The object to be mirrored.
8869         #  @param thePoint Point of symmetry.
8870         #  @param theCopy Flag used to mirror object itself or create a copy.
8871         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8872         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8873         @ManageTransactions("TrsfOp")
8874         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8875             """
8876             Mirror an object relatively the given point.
8877
8878             Parameters:
8879                 theObject The object to be mirrored.
8880                 thePoint Point of symmetry.
8881                 theCopy Flag used to mirror object itself or create a copy.
8882
8883             Returns:
8884                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8885                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8886             """
8887             # Example: see GEOM_TestAll.py
8888             if theCopy:
8889                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8890             else:
8891                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8892             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8893             return anObj
8894
8895         ## Create an object, symmetrical
8896         #  to the given one relatively the given point.
8897         #  @param theObject The object to be mirrored.
8898         #  @param thePoint Point of symmetry.
8899         #  @param theName Object name; when specified, this parameter is used
8900         #         for result publication in the study. Otherwise, if automatic
8901         #         publication is switched on, default value is used for result name.
8902         #
8903         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8904         #
8905         #  @ref tui_mirror "Example"
8906         @ManageTransactions("TrsfOp")
8907         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8908             """
8909             Create an object, symmetrical
8910             to the given one relatively the given point.
8911
8912             Parameters:
8913                 theObject The object to be mirrored.
8914                 thePoint Point of symmetry.
8915                 theName Object name; when specified, this parameter is used
8916                         for result publication in the study. Otherwise, if automatic
8917                         publication is switched on, default value is used for result name.
8918
8919             Returns:
8920                 New GEOM.GEOM_Object, containing the mirrored shape.
8921             """
8922             # Example: see GEOM_TestAll.py
8923             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8924             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8925             self._autoPublish(anObj, theName, "mirrored")
8926             return anObj
8927
8928         ## Modify the location of the given object.
8929         #  @param theObject The object to be displaced.
8930         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8931         #                     If \a theStartLCS is NULL, displacement
8932         #                     will be performed from global CS.\n
8933         #                     If \a theObject itself is used as \a theStartLCS,
8934         #                     its location will be changed to \a theEndLCS.
8935         #  @param theEndLCS Coordinate system to perform displacement to it.
8936         #  @param theCopy Flag used to displace object itself or create a copy.
8937         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8938         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8939         @ManageTransactions("TrsfOp")
8940         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8941             """
8942             Modify the Location of the given object by LCS, creating its copy before the setting.
8943
8944             Parameters:
8945                 theObject The object to be displaced.
8946                 theStartLCS Coordinate system to perform displacement from it.
8947                             If theStartLCS is NULL, displacement
8948                             will be performed from global CS.
8949                             If theObject itself is used as theStartLCS,
8950                             its location will be changed to theEndLCS.
8951                 theEndLCS Coordinate system to perform displacement to it.
8952                 theCopy Flag used to displace object itself or create a copy.
8953
8954             Returns:
8955                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8956                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8957             """
8958             # Example: see GEOM_TestAll.py
8959             if theCopy:
8960                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8961             else:
8962                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8963             RaiseIfFailed("Displace", self.TrsfOp)
8964             return anObj
8965
8966         ## Modify the Location of the given object by LCS,
8967         #  creating its copy before the setting.
8968         #  @param theObject The object to be displaced.
8969         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8970         #                     If \a theStartLCS is NULL, displacement
8971         #                     will be performed from global CS.\n
8972         #                     If \a theObject itself is used as \a theStartLCS,
8973         #                     its location will be changed to \a theEndLCS.
8974         #  @param theEndLCS Coordinate system to perform displacement to it.
8975         #  @param theName Object name; when specified, this parameter is used
8976         #         for result publication in the study. Otherwise, if automatic
8977         #         publication is switched on, default value is used for result name.
8978         #
8979         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8980         #
8981         #  @ref tui_modify_location "Example"
8982         @ManageTransactions("TrsfOp")
8983         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8984             """
8985             Modify the Location of the given object by LCS, creating its copy before the setting.
8986
8987             Parameters:
8988                 theObject The object to be displaced.
8989                 theStartLCS Coordinate system to perform displacement from it.
8990                             If theStartLCS is NULL, displacement
8991                             will be performed from global CS.
8992                             If theObject itself is used as theStartLCS,
8993                             its location will be changed to theEndLCS.
8994                 theEndLCS Coordinate system to perform displacement to it.
8995                 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             Returns:
9000                 New GEOM.GEOM_Object, containing the displaced shape.
9001
9002             Example of usage:
9003                 # create local coordinate systems
9004                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9005                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9006                 # modify the location of the given object
9007                 position = geompy.MakePosition(cylinder, cs1, cs2)
9008             """
9009             # Example: see GEOM_TestAll.py
9010             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9011             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9012             self._autoPublish(anObj, theName, "displaced")
9013             return anObj
9014
9015         ## Modify the Location of the given object by Path.
9016         #  @param  theObject The object to be displaced.
9017         #  @param  thePath Wire or Edge along that the object will be translated.
9018         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9019         #  @param  theCopy is to create a copy objects if true.
9020         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9021         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9022         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9023         #
9024         #  @ref tui_modify_location "Example"
9025         @ManageTransactions("TrsfOp")
9026         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9027             """
9028             Modify the Location of the given object by Path.
9029
9030             Parameters:
9031                  theObject The object to be displaced.
9032                  thePath Wire or Edge along that the object will be translated.
9033                  theDistance progress of Path (0 = start location, 1 = end of path location).
9034                  theCopy is to create a copy objects if true.
9035                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9036
9037             Returns:
9038                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9039                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9040
9041             Example of usage:
9042                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9043             """
9044             # Example: see GEOM_TestAll.py
9045             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9046             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9047             return anObj
9048
9049         ## Modify the Location of the given object by Path, creating its copy before the operation.
9050         #  @param theObject The object to be displaced.
9051         #  @param thePath Wire or Edge along that the object will be translated.
9052         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9053         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9054         #  @param theName Object name; when specified, this parameter is used
9055         #         for result publication in the study. Otherwise, if automatic
9056         #         publication is switched on, default value is used for result name.
9057         #
9058         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9059         @ManageTransactions("TrsfOp")
9060         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9061             """
9062             Modify the Location of the given object by Path, creating its copy before the operation.
9063
9064             Parameters:
9065                  theObject The object to be displaced.
9066                  thePath Wire or Edge along that the object will be translated.
9067                  theDistance progress of Path (0 = start location, 1 = end of path location).
9068                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9069                  theName Object name; when specified, this parameter is used
9070                          for result publication in the study. Otherwise, if automatic
9071                          publication is switched on, default value is used for result name.
9072
9073             Returns:
9074                 New GEOM.GEOM_Object, containing the displaced shape.
9075             """
9076             # Example: see GEOM_TestAll.py
9077             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9078             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9079             self._autoPublish(anObj, theName, "displaced")
9080             return anObj
9081
9082         ## Offset given shape.
9083         #  @param theObject The base object for the offset.
9084         #  @param theOffset Offset value.
9085         #  @param theCopy Flag used to offset object itself or create a copy.
9086         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9087         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9088         @ManageTransactions("TrsfOp")
9089         def Offset(self, theObject, theOffset, theCopy=False):
9090             """
9091             Offset given shape.
9092
9093             Parameters:
9094                 theObject The base object for the offset.
9095                 theOffset Offset value.
9096                 theCopy Flag used to offset object itself or create a copy.
9097
9098             Returns:
9099                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9100                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9101             """
9102             theOffset, Parameters = ParseParameters(theOffset)
9103             if theCopy:
9104                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
9105             else:
9106                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
9107             RaiseIfFailed("Offset", self.TrsfOp)
9108             anObj.SetParameters(Parameters)
9109             return anObj
9110
9111         ## Create new object as offset of the given one.
9112         #  @param theObject The base object for the offset.
9113         #  @param theOffset Offset value.
9114         #  @param theName Object name; when specified, this parameter is used
9115         #         for result publication in the study. Otherwise, if automatic
9116         #         publication is switched on, default value is used for result name.
9117         #
9118         #  @return New GEOM.GEOM_Object, containing the offset object.
9119         #
9120         #  @ref tui_offset "Example"
9121         @ManageTransactions("TrsfOp")
9122         def MakeOffset(self, theObject, theOffset, theName=None):
9123             """
9124             Create new object as offset of the given one.
9125
9126             Parameters:
9127                 theObject The base object for the offset.
9128                 theOffset Offset value.
9129                 theName Object name; when specified, this parameter is used
9130                         for result publication in the study. Otherwise, if automatic
9131                         publication is switched on, default value is used for result name.
9132
9133             Returns:
9134                 New GEOM.GEOM_Object, containing the offset object.
9135
9136             Example of usage:
9137                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9138                  # create a new object as offset of the given object
9139                  offset = geompy.MakeOffset(box, 70.)
9140             """
9141             # Example: see GEOM_TestAll.py
9142             theOffset, Parameters = ParseParameters(theOffset)
9143             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
9144             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9145             anObj.SetParameters(Parameters)
9146             self._autoPublish(anObj, theName, "offset")
9147             return anObj
9148
9149         ## Create new object as projection of the given one on another.
9150         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9151         #         Edge and wire are acceptable if @a theTarget is a face.
9152         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9153         #  @param theName Object name; when specified, this parameter is used
9154         #         for result publication in the study. Otherwise, if automatic
9155         #         publication is switched on, default value is used for result name.
9156         #
9157         #  @return New GEOM.GEOM_Object, containing the projection.
9158         #
9159         #  @ref tui_projection "Example"
9160         @ManageTransactions("TrsfOp")
9161         def MakeProjection(self, theSource, theTarget, theName=None):
9162             """
9163             Create new object as projection of the given one on another.
9164
9165             Parameters:
9166                 theSource The source object for the projection. It can be a point, edge or wire.
9167                           Edge and wire are acceptable if theTarget is a face.
9168                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9169                 theName Object name; when specified, this parameter is used
9170                         for result publication in the study. Otherwise, if automatic
9171                         publication is switched on, default value is used for result name.
9172
9173             Returns:
9174                 New GEOM.GEOM_Object, containing the projection.
9175             """
9176             # Example: see GEOM_TestAll.py
9177             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9178             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9179             self._autoPublish(anObj, theName, "projection")
9180             return anObj
9181
9182         ## Create a projection of the given point on a wire or an edge.
9183         #  If there are no solutions or there are 2 or more solutions It throws an
9184         #  exception.
9185         #  @param thePoint the point to be projected.
9186         #  @param theWire the wire. The edge is accepted as well.
9187         #  @param theName Object name; when specified, this parameter is used
9188         #         for result publication in the study. Otherwise, if automatic
9189         #         publication is switched on, default value is used for result name.
9190         #
9191         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9192         #  \n \a u: The parameter of projection point on edge.
9193         #  \n \a PointOnEdge: The projection point.
9194         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9195         #
9196         #  @ref tui_projection "Example"
9197         @ManageTransactions("TrsfOp")
9198         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9199             """
9200             Create a projection of the given point on a wire or an edge.
9201             If there are no solutions or there are 2 or more solutions It throws an
9202             exception.
9203
9204             Parameters:
9205                 thePoint the point to be projected.
9206                 theWire the wire. The edge is accepted as well.
9207                 theName Object name; when specified, this parameter is used
9208                         for result publication in the study. Otherwise, if automatic
9209                         publication is switched on, default value is used for result name.
9210
9211             Returns:
9212                 [u, PointOnEdge, EdgeInWireIndex]
9213                  u: The parameter of projection point on edge.
9214                  PointOnEdge: The projection point.
9215                  EdgeInWireIndex: The index of an edge in a wire.
9216             """
9217             # Example: see GEOM_TestAll.py
9218             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9219             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9220             self._autoPublish(anObj[1], theName, "projection")
9221             return anObj
9222
9223         # -----------------------------------------------------------------------------
9224         # Patterns
9225         # -----------------------------------------------------------------------------
9226
9227         ## Translate the given object along the given vector a given number times
9228         #  @param theObject The object to be translated.
9229         #  @param theVector Direction of the translation. DX if None.
9230         #  @param theStep Distance to translate on.
9231         #  @param theNbTimes Quantity of translations to be done.
9232         #  @param theName Object name; when specified, this parameter is used
9233         #         for result publication in the study. Otherwise, if automatic
9234         #         publication is switched on, default value is used for result name.
9235         #
9236         #  @return New GEOM.GEOM_Object, containing compound of all
9237         #          the shapes, obtained after each translation.
9238         #
9239         #  @ref tui_multi_translation "Example"
9240         @ManageTransactions("TrsfOp")
9241         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9242             """
9243             Translate the given object along the given vector a given number times
9244
9245             Parameters:
9246                 theObject The object to be translated.
9247                 theVector Direction of the translation. DX if None.
9248                 theStep Distance to translate on.
9249                 theNbTimes Quantity of translations to be done.
9250                 theName Object name; when specified, this parameter is used
9251                         for result publication in the study. Otherwise, if automatic
9252                         publication is switched on, default value is used for result name.
9253
9254             Returns:
9255                 New GEOM.GEOM_Object, containing compound of all
9256                 the shapes, obtained after each translation.
9257
9258             Example of usage:
9259                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9260             """
9261             # Example: see GEOM_TestAll.py
9262             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9263             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9264             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9265             anObj.SetParameters(Parameters)
9266             self._autoPublish(anObj, theName, "multitranslation")
9267             return anObj
9268
9269         ## Conseqently apply two specified translations to theObject specified number of times.
9270         #  @param theObject The object to be translated.
9271         #  @param theVector1 Direction of the first translation. DX if None.
9272         #  @param theStep1 Step of the first translation.
9273         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9274         #  @param theVector2 Direction of the second translation. DY if None.
9275         #  @param theStep2 Step of the second translation.
9276         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9277         #  @param theName Object name; when specified, this parameter is used
9278         #         for result publication in the study. Otherwise, if automatic
9279         #         publication is switched on, default value is used for result name.
9280         #
9281         #  @return New GEOM.GEOM_Object, containing compound of all
9282         #          the shapes, obtained after each translation.
9283         #
9284         #  @ref tui_multi_translation "Example"
9285         @ManageTransactions("TrsfOp")
9286         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9287                                    theVector2, theStep2, theNbTimes2, theName=None):
9288             """
9289             Conseqently apply two specified translations to theObject specified number of times.
9290
9291             Parameters:
9292                 theObject The object to be translated.
9293                 theVector1 Direction of the first translation. DX if None.
9294                 theStep1 Step of the first translation.
9295                 theNbTimes1 Quantity of translations to be done along theVector1.
9296                 theVector2 Direction of the second translation. DY if None.
9297                 theStep2 Step of the second translation.
9298                 theNbTimes2 Quantity of translations to be done along theVector2.
9299                 theName Object name; when specified, this parameter is used
9300                         for result publication in the study. Otherwise, if automatic
9301                         publication is switched on, default value is used for result name.
9302
9303             Returns:
9304                 New GEOM.GEOM_Object, containing compound of all
9305                 the shapes, obtained after each translation.
9306
9307             Example of usage:
9308                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9309             """
9310             # Example: see GEOM_TestAll.py
9311             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9312             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9313                                                  theVector2, theStep2, theNbTimes2)
9314             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9315             anObj.SetParameters(Parameters)
9316             self._autoPublish(anObj, theName, "multitranslation")
9317             return anObj
9318
9319         ## Rotate the given object around the given axis a given number times.
9320         #  Rotation angle will be 2*PI/theNbTimes.
9321         #  @param theObject The object to be rotated.
9322         #  @param theAxis The rotation axis. DZ if None.
9323         #  @param theNbTimes Quantity of rotations to be done.
9324         #  @param theName Object name; when specified, this parameter is used
9325         #         for result publication in the study. Otherwise, if automatic
9326         #         publication is switched on, default value is used for result name.
9327         #
9328         #  @return New GEOM.GEOM_Object, containing compound of all the
9329         #          shapes, obtained after each rotation.
9330         #
9331         #  @ref tui_multi_rotation "Example"
9332         @ManageTransactions("TrsfOp")
9333         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9334             """
9335             Rotate the given object around the given axis a given number times.
9336             Rotation angle will be 2*PI/theNbTimes.
9337
9338             Parameters:
9339                 theObject The object to be rotated.
9340                 theAxis The rotation axis. DZ if None.
9341                 theNbTimes Quantity of rotations to be done.
9342                 theName Object name; when specified, this parameter is used
9343                         for result publication in the study. Otherwise, if automatic
9344                         publication is switched on, default value is used for result name.
9345
9346             Returns:
9347                 New GEOM.GEOM_Object, containing compound of all the
9348                 shapes, obtained after each rotation.
9349
9350             Example of usage:
9351                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9352             """
9353             # Example: see GEOM_TestAll.py
9354             theNbTimes, Parameters = ParseParameters(theNbTimes)
9355             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9356             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9357             anObj.SetParameters(Parameters)
9358             self._autoPublish(anObj, theName, "multirotation")
9359             return anObj
9360
9361         ## Rotate the given object around the given axis
9362         #  a given number times on the given angle.
9363         #  @param theObject The object to be rotated.
9364         #  @param theAxis The rotation axis. DZ if None.
9365         #  @param theAngleStep Rotation angle in radians.
9366         #  @param theNbTimes Quantity of rotations to be done.
9367         #  @param theName Object name; when specified, this parameter is used
9368         #         for result publication in the study. Otherwise, if automatic
9369         #         publication is switched on, default value is used for result name.
9370         #
9371         #  @return New GEOM.GEOM_Object, containing compound of all the
9372         #          shapes, obtained after each rotation.
9373         #
9374         #  @ref tui_multi_rotation "Example"
9375         @ManageTransactions("TrsfOp")
9376         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9377             """
9378             Rotate the given object around the given axis
9379             a given number times on the given angle.
9380
9381             Parameters:
9382                 theObject The object to be rotated.
9383                 theAxis The rotation axis. DZ if None.
9384                 theAngleStep Rotation angle in radians.
9385                 theNbTimes Quantity of rotations to be done.
9386                 theName Object name; when specified, this parameter is used
9387                         for result publication in the study. Otherwise, if automatic
9388                         publication is switched on, default value is used for result name.
9389
9390             Returns:
9391                 New GEOM.GEOM_Object, containing compound of all the
9392                 shapes, obtained after each rotation.
9393
9394             Example of usage:
9395                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9396             """
9397             # Example: see GEOM_TestAll.py
9398             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9399             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9400             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9401             anObj.SetParameters(Parameters)
9402             self._autoPublish(anObj, theName, "multirotation")
9403             return anObj
9404
9405         ## Rotate the given object around the given axis a given
9406         #  number times and multi-translate each rotation result.
9407         #  Rotation angle will be 2*PI/theNbTimes1.
9408         #  Translation direction passes through center of gravity
9409         #  of rotated shape and its projection on the rotation axis.
9410         #  @param theObject The object to be rotated.
9411         #  @param theAxis Rotation axis. DZ if None.
9412         #  @param theNbTimes1 Quantity of rotations to be done.
9413         #  @param theRadialStep Translation distance.
9414         #  @param theNbTimes2 Quantity of translations to be done.
9415         #  @param theName Object name; when specified, this parameter is used
9416         #         for result publication in the study. Otherwise, if automatic
9417         #         publication is switched on, default value is used for result name.
9418         #
9419         #  @return New GEOM.GEOM_Object, containing compound of all the
9420         #          shapes, obtained after each transformation.
9421         #
9422         #  @ref tui_multi_rotation "Example"
9423         @ManageTransactions("TrsfOp")
9424         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9425             """
9426             Rotate the given object around the
9427             given axis on the given angle a given number
9428             times and multi-translate each rotation result.
9429             Translation direction passes through center of gravity
9430             of rotated shape and its projection on the rotation axis.
9431
9432             Parameters:
9433                 theObject The object to be rotated.
9434                 theAxis Rotation axis. DZ if None.
9435                 theNbTimes1 Quantity of rotations to be done.
9436                 theRadialStep Translation distance.
9437                 theNbTimes2 Quantity of translations to be done.
9438                 theName Object name; when specified, this parameter is used
9439                         for result publication in the study. Otherwise, if automatic
9440                         publication is switched on, default value is used for result name.
9441
9442             Returns:
9443                 New GEOM.GEOM_Object, containing compound of all the
9444                 shapes, obtained after each transformation.
9445
9446             Example of usage:
9447                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9448             """
9449             # Example: see GEOM_TestAll.py
9450             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9451             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9452             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9453             anObj.SetParameters(Parameters)
9454             self._autoPublish(anObj, theName, "multirotation")
9455             return anObj
9456
9457         ## Rotate the given object around the
9458         #  given axis on the given angle a given number
9459         #  times and multi-translate each rotation result.
9460         #  Translation direction passes through center of gravity
9461         #  of rotated shape and its projection on the rotation axis.
9462         #  @param theObject The object to be rotated.
9463         #  @param theAxis Rotation axis. DZ if None.
9464         #  @param theAngleStep Rotation angle in radians.
9465         #  @param theNbTimes1 Quantity of rotations to be done.
9466         #  @param theRadialStep Translation distance.
9467         #  @param theNbTimes2 Quantity of translations to be done.
9468         #  @param theName Object name; when specified, this parameter is used
9469         #         for result publication in the study. Otherwise, if automatic
9470         #         publication is switched on, default value is used for result name.
9471         #
9472         #  @return New GEOM.GEOM_Object, containing compound of all the
9473         #          shapes, obtained after each transformation.
9474         #
9475         #  @ref tui_multi_rotation "Example"
9476         @ManageTransactions("TrsfOp")
9477         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9478             """
9479             Rotate the given object around the
9480             given axis on the given angle a given number
9481             times and multi-translate each rotation result.
9482             Translation direction passes through center of gravity
9483             of rotated shape and its projection on the rotation axis.
9484
9485             Parameters:
9486                 theObject The object to be rotated.
9487                 theAxis Rotation axis. DZ if None.
9488                 theAngleStep Rotation angle in radians.
9489                 theNbTimes1 Quantity of rotations to be done.
9490                 theRadialStep Translation distance.
9491                 theNbTimes2 Quantity of translations to be done.
9492                 theName Object name; when specified, this parameter is used
9493                         for result publication in the study. Otherwise, if automatic
9494                         publication is switched on, default value is used for result name.
9495
9496             Returns:
9497                 New GEOM.GEOM_Object, containing compound of all the
9498                 shapes, obtained after each transformation.
9499
9500             Example of usage:
9501                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9502             """
9503             # Example: see GEOM_TestAll.py
9504             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9505             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9506             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9507             anObj.SetParameters(Parameters)
9508             self._autoPublish(anObj, theName, "multirotation")
9509             return anObj
9510
9511         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9512         #
9513         #  @ref swig_MakeMultiRotation "Example"
9514         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9515             """
9516             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9517
9518             Example of usage:
9519                 pz = geompy.MakeVertex(0, 0, 100)
9520                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9521                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9522             """
9523             # Example: see GEOM_TestOthers.py
9524             aVec = self.MakeLine(aPoint,aDir)
9525             # note: auto-publishing is done in self.MultiRotate1D()
9526             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9527             return anObj
9528
9529         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9530         #
9531         #  @ref swig_MakeMultiRotation "Example"
9532         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9533             """
9534             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9535
9536             Example of usage:
9537                 pz = geompy.MakeVertex(0, 0, 100)
9538                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9539                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9540             """
9541             # Example: see GEOM_TestOthers.py
9542             aVec = self.MakeLine(aPoint,aDir)
9543             # note: auto-publishing is done in self.MultiRotate1D()
9544             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9545             return anObj
9546
9547         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9548         #
9549         #  @ref swig_MakeMultiRotation "Example"
9550         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9551             """
9552             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9553
9554             Example of usage:
9555                 pz = geompy.MakeVertex(0, 0, 100)
9556                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9557                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9558             """
9559             # Example: see GEOM_TestOthers.py
9560             aVec = self.MakeLine(aPoint,aDir)
9561             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9562             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9563             return anObj
9564
9565         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9566         #
9567         #  @ref swig_MakeMultiRotation "Example"
9568         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9569             """
9570             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9571
9572             Example of usage:
9573                 pz = geompy.MakeVertex(0, 0, 100)
9574                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9575                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9576             """
9577             # Example: see GEOM_TestOthers.py
9578             aVec = self.MakeLine(aPoint,aDir)
9579             # note: auto-publishing is done in self.MultiRotate2D()
9580             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9581             return anObj
9582
9583         ##
9584         #  Compute a wire or a face that represents a projection of the source
9585         #  shape onto cylinder. The cylinder's coordinate system is the same
9586         #  as the global coordinate system.
9587         #
9588         #  @param theObject The object to be projected. It can be either
9589         #         a planar wire or a face.
9590         #  @param theRadius The radius of the cylinder.
9591         #  @param theStartAngle The starting angle in radians from
9592         #         the cylinder's X axis around Z axis. The angle from which
9593         #         the projection is started.
9594         #  @param theAngleLength The projection length angle in radians.
9595         #         The angle in which to project the total length of the wire.
9596         #         If it is negative the projection is not scaled and natural
9597         #         wire length is kept for the projection.
9598         #  @param theAngleRotation The desired angle in radians between
9599         #         the tangent vector to the first curve at the first point of
9600         #         the theObject's projection in 2D space and U-direction of
9601         #         cylinder's 2D space.
9602         #  @param theName Object name; when specified, this parameter is used
9603         #         for result publication in the study. Otherwise, if automatic
9604         #         publication is switched on, default value is used for result name.
9605         #
9606         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9607         #         represents a wire or a face that represents a projection of
9608         #         the source shape onto a cylinder.
9609         #
9610         #  @ref tui_projection "Example"
9611         def MakeProjectionOnCylinder (self, theObject, theRadius,
9612                                       theStartAngle=0.0, theAngleLength=-1.0,
9613                                       theAngleRotation=0.0,
9614                                       theName=None):
9615             """
9616             Compute a wire or a face that represents a projection of the source
9617             shape onto cylinder. The cylinder's coordinate system is the same
9618             as the global coordinate system.
9619
9620             Parameters:
9621                 theObject The object to be projected. It can be either
9622                         a planar wire or a face.
9623                 theRadius The radius of the cylinder.
9624                 theStartAngle The starting angle in radians from the cylinder's X axis
9625                         around Z axis. The angle from which the projection is started.
9626                 theAngleLength The projection length angle in radians. The angle in which
9627                         to project the total length of the wire. If it is negative the
9628                         projection is not scaled and natural wire length is kept for
9629                         the projection.
9630                 theAngleRotation The desired angle in radians between
9631                         the tangent vector to the first curve at the first
9632                         point of the theObject's projection in 2D space and
9633                         U-direction of cylinder's 2D space.
9634                 theName Object name; when specified, this parameter is used
9635                         for result publication in the study. Otherwise, if automatic
9636                         publication is switched on, default value is used for result name.
9637
9638             Returns:
9639                 New GEOM.GEOM_Object, containing the result shape. The result
9640                 represents a wire or a face that represents a projection of
9641                 the source shape onto a cylinder.
9642             """
9643             # Example: see GEOM_TestAll.py
9644             flagStartAngle = False
9645             if isinstance(theStartAngle,str):
9646                 flagStartAngle = True
9647             flagAngleLength = False
9648             if isinstance(theAngleLength,str):
9649                 flagAngleLength = True
9650             flagAngleRotation = False
9651             if isinstance(theAngleRotation,str):
9652                 flagAngleRotation = True
9653             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9654               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9655             if flagStartAngle:
9656                 theStartAngle = theStartAngle*math.pi/180.
9657             if flagAngleLength:
9658                 theAngleLength = theAngleLength*math.pi/180.
9659             if flagAngleRotation:
9660                 theAngleRotation = theAngleRotation*math.pi/180.
9661             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9662                 theStartAngle, theAngleLength, theAngleRotation)
9663             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9664             anObj.SetParameters(Parameters)
9665             self._autoPublish(anObj, theName, "projection")
9666             return anObj
9667
9668         # end of l3_transform
9669         ## @}
9670
9671         ## @addtogroup l3_transform_d
9672         ## @{
9673
9674         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9675         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9676             """
9677             Deprecated method. Use MultiRotate1DNbTimes instead.
9678             """
9679             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9680             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9681
9682         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9683         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9684         @ManageTransactions("TrsfOp")
9685         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9686             """
9687             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9688             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9689
9690             Example of usage:
9691                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9692             """
9693             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9694             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9695             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9696             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9697             anObj.SetParameters(Parameters)
9698             self._autoPublish(anObj, theName, "multirotation")
9699             return anObj
9700
9701         ## The same, as MultiRotate1D(), but axis is given by direction and point
9702         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9703         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9704             """
9705             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9706             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9707
9708             Example of usage:
9709                 pz = geompy.MakeVertex(0, 0, 100)
9710                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9711                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9712             """
9713             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9714             aVec = self.MakeLine(aPoint,aDir)
9715             # note: auto-publishing is done in self.MultiRotate1D()
9716             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9717             return anObj
9718
9719         ## The same, as MultiRotate2D(), but axis is given by direction and point
9720         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9721         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9722             """
9723             The same, as MultiRotate2D(), but axis is given by direction and point
9724             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9725
9726             Example of usage:
9727                 pz = geompy.MakeVertex(0, 0, 100)
9728                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9729                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9730             """
9731             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9732             aVec = self.MakeLine(aPoint,aDir)
9733             # note: auto-publishing is done in self.MultiRotate2D()
9734             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9735             return anObj
9736
9737         # end of l3_transform_d
9738         ## @}
9739
9740         ## @addtogroup l3_local
9741         ## @{
9742
9743         ## Perform a fillet on all edges of the given shape.
9744         #  @param theShape Shape, to perform fillet on.
9745         #  @param theR Fillet radius.
9746         #  @param theName Object name; when specified, this parameter is used
9747         #         for result publication in the study. Otherwise, if automatic
9748         #         publication is switched on, default value is used for result name.
9749         #
9750         #  @return New GEOM.GEOM_Object, containing the result shape.
9751         #
9752         #  @ref tui_fillet "Example 1"
9753         #  \n @ref swig_MakeFilletAll "Example 2"
9754         @ManageTransactions("LocalOp")
9755         def MakeFilletAll(self, theShape, theR, theName=None):
9756             """
9757             Perform a fillet on all edges of the given shape.
9758
9759             Parameters:
9760                 theShape Shape, to perform fillet on.
9761                 theR Fillet radius.
9762                 theName Object name; when specified, this parameter is used
9763                         for result publication in the study. Otherwise, if automatic
9764                         publication is switched on, default value is used for result name.
9765
9766             Returns:
9767                 New GEOM.GEOM_Object, containing the result shape.
9768
9769             Example of usage:
9770                filletall = geompy.MakeFilletAll(prism, 10.)
9771             """
9772             # Example: see GEOM_TestOthers.py
9773             theR,Parameters = ParseParameters(theR)
9774             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9775             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9776             anObj.SetParameters(Parameters)
9777             self._autoPublish(anObj, theName, "fillet")
9778             return anObj
9779
9780         ## Perform a fillet on the specified edges/faces of the given shape
9781         #  @param theShape Shape, to perform fillet on.
9782         #  @param theR Fillet radius.
9783         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9784         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9785         #  @param theName Object name; when specified, this parameter is used
9786         #         for result publication in the study. Otherwise, if automatic
9787         #         publication is switched on, default value is used for result name.
9788         #
9789         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9790         #
9791         #  @return New GEOM.GEOM_Object, containing the result shape.
9792         #
9793         #  @ref tui_fillet "Example"
9794         @ManageTransactions("LocalOp")
9795         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9796             """
9797             Perform a fillet on the specified edges/faces of the given shape
9798
9799             Parameters:
9800                 theShape Shape, to perform fillet on.
9801                 theR Fillet radius.
9802                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9803                 theListShapes Global indices of edges/faces to perform fillet on.
9804                 theName Object name; when specified, this parameter is used
9805                         for result publication in the study. Otherwise, if automatic
9806                         publication is switched on, default value is used for result name.
9807
9808             Note:
9809                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9810
9811             Returns:
9812                 New GEOM.GEOM_Object, containing the result shape.
9813
9814             Example of usage:
9815                 # get the list of IDs (IDList) for the fillet
9816                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9817                 IDlist_e = []
9818                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9819                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9820                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9821                 # make a fillet on the specified edges of the given shape
9822                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9823             """
9824             # Example: see GEOM_TestAll.py
9825             theR,Parameters = ParseParameters(theR)
9826             anObj = None
9827             if theShapeType == self.ShapeType["EDGE"]:
9828                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9829                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9830             else:
9831                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9832                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9833             anObj.SetParameters(Parameters)
9834             self._autoPublish(anObj, theName, "fillet")
9835             return anObj
9836
9837         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9838         @ManageTransactions("LocalOp")
9839         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9840             """
9841             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9842
9843             Example of usage:
9844                 # get the list of IDs (IDList) for the fillet
9845                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9846                 IDlist_e = []
9847                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9848                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9849                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9850                 # make a fillet on the specified edges of the given shape
9851                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9852             """
9853             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9854             anObj = None
9855             if theShapeType == self.ShapeType["EDGE"]:
9856                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9857                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9858             else:
9859                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9860                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9861             anObj.SetParameters(Parameters)
9862             self._autoPublish(anObj, theName, "fillet")
9863             return anObj
9864
9865         ## Perform a fillet on the specified edges of the given shape
9866         #  @param theShape  Wire Shape to perform fillet on.
9867         #  @param theR  Fillet radius.
9868         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9869         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9870         #    \note The list of vertices could be empty,
9871         #          in this case fillet will done done at all vertices in wire
9872         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9873         #         by the length of the edges, nearest to the fillet vertex.
9874         #         But sometimes the next edge is C1 continuous with the one, nearest to
9875         #         the fillet point, and such two (or more) edges can be united to allow
9876         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9877         #         thus ignoring the secant vertex (vertices).
9878         #  @param theName Object name; when specified, this parameter is used
9879         #         for result publication in the study. Otherwise, if automatic
9880         #         publication is switched on, default value is used for result name.
9881         #
9882         #  @return New GEOM.GEOM_Object, containing the result shape.
9883         #
9884         #  @ref tui_fillet2d "Example"
9885         @ManageTransactions("LocalOp")
9886         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9887             """
9888             Perform a fillet on the specified edges of the given shape
9889
9890             Parameters:
9891                 theShape  Wire Shape to perform fillet on.
9892                 theR  Fillet radius.
9893                 theListOfVertexes Global indices of vertexes to perform fillet on.
9894                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9895                     by the length of the edges, nearest to the fillet vertex.
9896                     But sometimes the next edge is C1 continuous with the one, nearest to
9897                     the fillet point, and such two (or more) edges can be united to allow
9898                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9899                     thus ignoring the secant vertex (vertices).
9900                 theName Object name; when specified, this parameter is used
9901                         for result publication in the study. Otherwise, if automatic
9902                         publication is switched on, default value is used for result name.
9903             Note:
9904                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9905
9906                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9907
9908             Returns:
9909                 New GEOM.GEOM_Object, containing the result shape.
9910
9911             Example of usage:
9912                 # create wire
9913                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9914                 # make fillet at given wire vertices with giver radius
9915                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9916             """
9917             # Example: see GEOM_TestAll.py
9918             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9919             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9920             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9921             anObj.SetParameters(Parameters)
9922             self._autoPublish(anObj, theName, "fillet")
9923             return anObj
9924
9925         ## Perform a fillet at the specified vertices of the given face/shell.
9926         #  @param theShape Face or Shell shape to perform fillet on.
9927         #  @param theR Fillet radius.
9928         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9929         #  @param theName Object name; when specified, this parameter is used
9930         #         for result publication in the study. Otherwise, if automatic
9931         #         publication is switched on, default value is used for result name.
9932         #
9933         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9934         #
9935         #  @return New GEOM.GEOM_Object, containing the result shape.
9936         #
9937         #  @ref tui_fillet2d "Example"
9938         @ManageTransactions("LocalOp")
9939         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9940             """
9941             Perform a fillet at the specified vertices of the given face/shell.
9942
9943             Parameters:
9944                 theShape  Face or Shell shape to perform fillet on.
9945                 theR  Fillet radius.
9946                 theListOfVertexes Global indices of vertexes to perform fillet on.
9947                 theName Object name; when specified, this parameter is used
9948                         for result publication in the study. Otherwise, if automatic
9949                         publication is switched on, default value is used for result name.
9950             Note:
9951                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9952
9953             Returns:
9954                 New GEOM.GEOM_Object, containing the result shape.
9955
9956             Example of usage:
9957                 face = geompy.MakeFaceHW(100, 100, 1)
9958                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9959             """
9960             # Example: see GEOM_TestAll.py
9961             theR,Parameters = ParseParameters(theR)
9962             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9963             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9964             anObj.SetParameters(Parameters)
9965             self._autoPublish(anObj, theName, "fillet")
9966             return anObj
9967
9968         ## Perform a symmetric chamfer on all edges of the given shape.
9969         #  @param theShape Shape, to perform chamfer on.
9970         #  @param theD Chamfer size along each face.
9971         #  @param theName Object name; when specified, this parameter is used
9972         #         for result publication in the study. Otherwise, if automatic
9973         #         publication is switched on, default value is used for result name.
9974         #
9975         #  @return New GEOM.GEOM_Object, containing the result shape.
9976         #
9977         #  @ref tui_chamfer "Example 1"
9978         #  \n @ref swig_MakeChamferAll "Example 2"
9979         @ManageTransactions("LocalOp")
9980         def MakeChamferAll(self, theShape, theD, theName=None):
9981             """
9982             Perform a symmetric chamfer on all edges of the given shape.
9983
9984             Parameters:
9985                 theShape Shape, to perform chamfer on.
9986                 theD Chamfer size along each face.
9987                 theName Object name; when specified, this parameter is used
9988                         for result publication in the study. Otherwise, if automatic
9989                         publication is switched on, default value is used for result name.
9990
9991             Returns:
9992                 New GEOM.GEOM_Object, containing the result shape.
9993
9994             Example of usage:
9995                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9996             """
9997             # Example: see GEOM_TestOthers.py
9998             theD,Parameters = ParseParameters(theD)
9999             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10000             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10001             anObj.SetParameters(Parameters)
10002             self._autoPublish(anObj, theName, "chamfer")
10003             return anObj
10004
10005         ## Perform a chamfer on edges, common to the specified faces,
10006         #  with distance D1 on the Face1
10007         #  @param theShape Shape, to perform chamfer on.
10008         #  @param theD1 Chamfer size along \a theFace1.
10009         #  @param theD2 Chamfer size along \a theFace2.
10010         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10011         #  @param theName Object name; when specified, this parameter is used
10012         #         for result publication in the study. Otherwise, if automatic
10013         #         publication is switched on, default value is used for result name.
10014         #
10015         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10016         #
10017         #  @return New GEOM.GEOM_Object, containing the result shape.
10018         #
10019         #  @ref tui_chamfer "Example"
10020         @ManageTransactions("LocalOp")
10021         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10022             """
10023             Perform a chamfer on edges, common to the specified faces,
10024             with distance D1 on the Face1
10025
10026             Parameters:
10027                 theShape Shape, to perform chamfer on.
10028                 theD1 Chamfer size along theFace1.
10029                 theD2 Chamfer size along theFace2.
10030                 theFace1,theFace2 Global indices of two faces of theShape.
10031                 theName Object name; when specified, this parameter is used
10032                         for result publication in the study. Otherwise, if automatic
10033                         publication is switched on, default value is used for result name.
10034
10035             Note:
10036                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10037
10038             Returns:
10039                 New GEOM.GEOM_Object, containing the result shape.
10040
10041             Example of usage:
10042                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10043                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10044                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10045                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10046             """
10047             # Example: see GEOM_TestAll.py
10048             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10049             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10050             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10051             anObj.SetParameters(Parameters)
10052             self._autoPublish(anObj, theName, "chamfer")
10053             return anObj
10054
10055         ## Perform a chamfer on edges
10056         #  @param theShape Shape, to perform chamfer on.
10057         #  @param theD Chamfer length
10058         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10059         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10060         #  @param theName Object name; when specified, this parameter is used
10061         #         for result publication in the study. Otherwise, if automatic
10062         #         publication is switched on, default value is used for result name.
10063         #
10064         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10065         #
10066         #  @return New GEOM.GEOM_Object, containing the result shape.
10067         @ManageTransactions("LocalOp")
10068         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10069             """
10070             Perform a chamfer on edges
10071
10072             Parameters:
10073                 theShape Shape, to perform chamfer on.
10074                 theD1 Chamfer size along theFace1.
10075                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10076                 theFace1,theFace2 Global indices of two faces of theShape.
10077                 theName Object name; when specified, this parameter is used
10078                         for result publication in the study. Otherwise, if automatic
10079                         publication is switched on, default value is used for result name.
10080
10081             Note:
10082                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10083
10084             Returns:
10085                 New GEOM.GEOM_Object, containing the result shape.
10086
10087             Example of usage:
10088                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10089                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10090                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10091                 ang = 30
10092                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10093             """
10094             flag = False
10095             if isinstance(theAngle,str):
10096                 flag = True
10097             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10098             if flag:
10099                 theAngle = theAngle*math.pi/180.0
10100             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10101             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10102             anObj.SetParameters(Parameters)
10103             self._autoPublish(anObj, theName, "chamfer")
10104             return anObj
10105
10106         ## Perform a chamfer on all edges of the specified faces,
10107         #  with distance D1 on the first specified face (if several for one edge)
10108         #  @param theShape Shape, to perform chamfer on.
10109         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10110         #               connected to the edge, are in \a theFaces, \a theD1
10111         #               will be get along face, which is nearer to \a theFaces beginning.
10112         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10113         #  @param theFaces Sequence of global indices of faces of \a theShape.
10114         #  @param theName Object name; when specified, this parameter is used
10115         #         for result publication in the study. Otherwise, if automatic
10116         #         publication is switched on, default value is used for result name.
10117         #
10118         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10119         #
10120         #  @return New GEOM.GEOM_Object, containing the result shape.
10121         #
10122         #  @ref tui_chamfer "Example"
10123         @ManageTransactions("LocalOp")
10124         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10125             """
10126             Perform a chamfer on all edges of the specified faces,
10127             with distance D1 on the first specified face (if several for one edge)
10128
10129             Parameters:
10130                 theShape Shape, to perform chamfer on.
10131                 theD1 Chamfer size along face from  theFaces. If both faces,
10132                       connected to the edge, are in theFaces, theD1
10133                       will be get along face, which is nearer to theFaces beginning.
10134                 theD2 Chamfer size along another of two faces, connected to the edge.
10135                 theFaces Sequence of global indices of faces of theShape.
10136                 theName Object name; when specified, this parameter is used
10137                         for result publication in the study. Otherwise, if automatic
10138                         publication is switched on, default value is used for result name.
10139
10140             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10141
10142             Returns:
10143                 New GEOM.GEOM_Object, containing the result shape.
10144             """
10145             # Example: see GEOM_TestAll.py
10146             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10147             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10148             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10149             anObj.SetParameters(Parameters)
10150             self._autoPublish(anObj, theName, "chamfer")
10151             return anObj
10152
10153         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
10154         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10155         #
10156         #  @ref swig_FilletChamfer "Example"
10157         @ManageTransactions("LocalOp")
10158         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10159             """
10160             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
10161             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10162             """
10163             flag = False
10164             if isinstance(theAngle,str):
10165                 flag = True
10166             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10167             if flag:
10168                 theAngle = theAngle*math.pi/180.0
10169             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10170             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10171             anObj.SetParameters(Parameters)
10172             self._autoPublish(anObj, theName, "chamfer")
10173             return anObj
10174
10175         ## Perform a chamfer on edges,
10176         #  with distance D1 on the first specified face (if several for one edge)
10177         #  @param theShape Shape, to perform chamfer on.
10178         #  @param theD1,theD2 Chamfer size
10179         #  @param theEdges Sequence of edges of \a theShape.
10180         #  @param theName Object name; when specified, this parameter is used
10181         #         for result publication in the study. Otherwise, if automatic
10182         #         publication is switched on, default value is used for result name.
10183         #
10184         #  @return New GEOM.GEOM_Object, containing the result shape.
10185         #
10186         #  @ref swig_FilletChamfer "Example"
10187         @ManageTransactions("LocalOp")
10188         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10189             """
10190             Perform a chamfer on edges,
10191             with distance D1 on the first specified face (if several for one edge)
10192
10193             Parameters:
10194                 theShape Shape, to perform chamfer on.
10195                 theD1,theD2 Chamfer size
10196                 theEdges Sequence of edges of theShape.
10197                 theName Object name; when specified, this parameter is used
10198                         for result publication in the study. Otherwise, if automatic
10199                         publication is switched on, default value is used for result name.
10200
10201             Returns:
10202                 New GEOM.GEOM_Object, containing the result shape.
10203             """
10204             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10205             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10206             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10207             anObj.SetParameters(Parameters)
10208             self._autoPublish(anObj, theName, "chamfer")
10209             return anObj
10210
10211         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
10212         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10213         @ManageTransactions("LocalOp")
10214         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10215             """
10216             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
10217             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10218             """
10219             flag = False
10220             if isinstance(theAngle,str):
10221                 flag = True
10222             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10223             if flag:
10224                 theAngle = theAngle*math.pi/180.0
10225             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10226             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10227             anObj.SetParameters(Parameters)
10228             self._autoPublish(anObj, theName, "chamfer")
10229             return anObj
10230
10231         ## @sa MakeChamferEdge(), MakeChamferFaces()
10232         #
10233         #  @ref swig_MakeChamfer "Example"
10234         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10235             """
10236             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10237             """
10238             # Example: see GEOM_TestOthers.py
10239             anObj = None
10240             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10241             if aShapeType == self.ShapeType["EDGE"]:
10242                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10243             else:
10244                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10245             return anObj
10246
10247         ## Remove material from a solid by extrusion of the base shape on the given distance.
10248         #  @param theInit Shape to remove material from. It must be a solid or
10249         #  a compound made of a single solid.
10250         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10251         #  @param theH Prism dimension along the normal to theBase
10252         #  @param theAngle Draft angle in degrees.
10253         #  @param theInvert If true material changes the direction
10254         #  @param theName Object name; when specified, this parameter is used
10255         #         for result publication in the study. Otherwise, if automatic
10256         #         publication is switched on, default value is used for result name.
10257         #
10258         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10259         #
10260         #  @ref tui_creation_prism "Example"
10261         @ManageTransactions("PrimOp")
10262         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10263             """
10264             Add material to a solid by extrusion of the base shape on the given distance.
10265
10266             Parameters:
10267                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10268                 theBase Closed edge or wire defining the base shape to be extruded.
10269                 theH Prism dimension along the normal  to theBase
10270                 theAngle Draft angle in degrees.
10271                 theInvert If true material changes the direction.
10272                 theName Object name; when specified, this parameter is used
10273                         for result publication in the study. Otherwise, if automatic
10274                         publication is switched on, default value is used for result name.
10275
10276             Returns:
10277                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10278             """
10279             # Example: see GEOM_TestAll.py
10280             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10281             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10282             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10283             anObj.SetParameters(Parameters)
10284             self._autoPublish(anObj, theName, "extrudedCut")
10285             return anObj
10286
10287         ## Add material to a solid by extrusion of the base shape on the given distance.
10288         #  @param theInit Shape to add material to. It must be a solid or
10289         #  a compound made of a single solid.
10290         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10291         #  @param theH Prism dimension along the normal to theBase
10292         #  @param theAngle Draft angle in degrees.
10293         #  @param theInvert If true material changes the direction
10294         #  @param theName Object name; when specified, this parameter is used
10295         #         for result publication in the study. Otherwise, if automatic
10296         #         publication is switched on, default value is used for result name.
10297         #
10298         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10299         #
10300         #  @ref tui_creation_prism "Example"
10301         @ManageTransactions("PrimOp")
10302         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10303             """
10304             Add material to a solid by extrusion of the base shape on the given distance.
10305
10306             Parameters:
10307                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10308                 theBase Closed edge or wire defining the base shape to be extruded.
10309                 theH Prism dimension along the normal  to theBase
10310                 theAngle Draft angle in degrees.
10311                 theInvert If true material changes the direction.
10312                 theName Object name; when specified, this parameter is used
10313                         for result publication in the study. Otherwise, if automatic
10314                         publication is switched on, default value is used for result name.
10315
10316             Returns:
10317                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10318             """
10319             # Example: see GEOM_TestAll.py
10320             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10321             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10322             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10323             anObj.SetParameters(Parameters)
10324             self._autoPublish(anObj, theName, "extrudedBoss")
10325             return anObj
10326
10327         # end of l3_local
10328         ## @}
10329
10330         ## @addtogroup l3_basic_op
10331         ## @{
10332
10333         ## Perform an Archimde operation on the given shape with given parameters.
10334         #  The object presenting the resulting face is returned.
10335         #  @param theShape Shape to be put in water.
10336         #  @param theWeight Weight of the shape.
10337         #  @param theWaterDensity Density of the water.
10338         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10339         #  @param theName Object name; when specified, this parameter is used
10340         #         for result publication in the study. Otherwise, if automatic
10341         #         publication is switched on, default value is used for result name.
10342         #
10343         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10344         #          by a plane, corresponding to water level.
10345         #
10346         #  @ref tui_archimede "Example"
10347         @ManageTransactions("LocalOp")
10348         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10349             """
10350             Perform an Archimde operation on the given shape with given parameters.
10351             The object presenting the resulting face is returned.
10352
10353             Parameters:
10354                 theShape Shape to be put in water.
10355                 theWeight Weight of the shape.
10356                 theWaterDensity Density of the water.
10357                 theMeshDeflection Deflection of the mesh, using to compute the section.
10358                 theName Object name; when specified, this parameter is used
10359                         for result publication in the study. Otherwise, if automatic
10360                         publication is switched on, default value is used for result name.
10361
10362             Returns:
10363                 New GEOM.GEOM_Object, containing a section of theShape
10364                 by a plane, corresponding to water level.
10365             """
10366             # Example: see GEOM_TestAll.py
10367             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10368               theWeight,theWaterDensity,theMeshDeflection)
10369             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10370             RaiseIfFailed("MakeArchimede", self.LocalOp)
10371             anObj.SetParameters(Parameters)
10372             self._autoPublish(anObj, theName, "archimede")
10373             return anObj
10374
10375         # end of l3_basic_op
10376         ## @}
10377
10378         ## @addtogroup l2_measure
10379         ## @{
10380
10381         ## Get point coordinates
10382         #  @return [x, y, z]
10383         #
10384         #  @ref tui_point_coordinates_page "Example"
10385         @ManageTransactions("MeasuOp")
10386         def PointCoordinates(self,Point):
10387             """
10388             Get point coordinates
10389
10390             Returns:
10391                 [x, y, z]
10392             """
10393             # Example: see GEOM_TestMeasures.py
10394             aTuple = self.MeasuOp.PointCoordinates(Point)
10395             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10396             return aTuple
10397
10398         ## Get vector coordinates
10399         #  @return [x, y, z]
10400         #
10401         #  @ref tui_measurement_tools_page "Example"
10402         def VectorCoordinates(self,Vector):
10403             """
10404             Get vector coordinates
10405
10406             Returns:
10407                 [x, y, z]
10408             """
10409
10410             p1=self.GetFirstVertex(Vector)
10411             p2=self.GetLastVertex(Vector)
10412
10413             X1=self.PointCoordinates(p1)
10414             X2=self.PointCoordinates(p2)
10415
10416             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10417
10418
10419         ## Compute cross product
10420         #  @return vector w=u^v
10421         #
10422         #  @ref tui_measurement_tools_page "Example"
10423         def CrossProduct(self, Vector1, Vector2):
10424             """
10425             Compute cross product
10426
10427             Returns: vector w=u^v
10428             """
10429             u=self.VectorCoordinates(Vector1)
10430             v=self.VectorCoordinates(Vector2)
10431             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])
10432
10433             return w
10434
10435         ## Compute cross product
10436         #  @return dot product  p=u.v
10437         #
10438         #  @ref tui_measurement_tools_page "Example"
10439         def DotProduct(self, Vector1, Vector2):
10440             """
10441             Compute cross product
10442
10443             Returns: dot product  p=u.v
10444             """
10445             u=self.VectorCoordinates(Vector1)
10446             v=self.VectorCoordinates(Vector2)
10447             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10448
10449             return p
10450
10451
10452         ## Get summarized length of all wires,
10453         #  area of surface and volume of the given shape.
10454         #  @param theShape Shape to define properties of.
10455         #  @return [theLength, theSurfArea, theVolume]\n
10456         #  theLength:   Summarized length of all wires of the given shape.\n
10457         #  theSurfArea: Area of surface of the given shape.\n
10458         #  theVolume:   Volume of the given shape.
10459         #
10460         #  @ref tui_basic_properties_page "Example"
10461         @ManageTransactions("MeasuOp")
10462         def BasicProperties(self,theShape):
10463             """
10464             Get summarized length of all wires,
10465             area of surface and volume of the given shape.
10466
10467             Parameters:
10468                 theShape Shape to define properties of.
10469
10470             Returns:
10471                 [theLength, theSurfArea, theVolume]
10472                  theLength:   Summarized length of all wires of the given shape.
10473                  theSurfArea: Area of surface of the given shape.
10474                  theVolume:   Volume of the given shape.
10475             """
10476             # Example: see GEOM_TestMeasures.py
10477             aTuple = self.MeasuOp.GetBasicProperties(theShape)
10478             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10479             return aTuple
10480
10481         ## Get parameters of bounding box of the given shape
10482         #  @param theShape Shape to obtain bounding box of.
10483         #  @param precise TRUE for precise computation; FALSE for fast one.
10484         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10485         #  Xmin,Xmax: Limits of shape along OX axis.
10486         #  Ymin,Ymax: Limits of shape along OY axis.
10487         #  Zmin,Zmax: Limits of shape along OZ axis.
10488         #
10489         #  @ref tui_bounding_box_page "Example"
10490         @ManageTransactions("MeasuOp")
10491         def BoundingBox (self, theShape, precise=False):
10492             """
10493             Get parameters of bounding box of the given shape
10494
10495             Parameters:
10496                 theShape Shape to obtain bounding box of.
10497                 precise TRUE for precise computation; FALSE for fast one.
10498
10499             Returns:
10500                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10501                  Xmin,Xmax: Limits of shape along OX axis.
10502                  Ymin,Ymax: Limits of shape along OY axis.
10503                  Zmin,Zmax: Limits of shape along OZ axis.
10504             """
10505             # Example: see GEOM_TestMeasures.py
10506             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10507             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10508             return aTuple
10509
10510         ## Get bounding box of the given shape
10511         #  @param theShape Shape to obtain bounding box of.
10512         #  @param precise TRUE for precise computation; FALSE for fast one.
10513         #  @param theName Object name; when specified, this parameter is used
10514         #         for result publication in the study. Otherwise, if automatic
10515         #         publication is switched on, default value is used for result name.
10516         #
10517         #  @return New GEOM.GEOM_Object, containing the created box.
10518         #
10519         #  @ref tui_bounding_box_page "Example"
10520         @ManageTransactions("MeasuOp")
10521         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10522             """
10523             Get bounding box of the given shape
10524
10525             Parameters:
10526                 theShape Shape to obtain bounding box of.
10527                 precise TRUE for precise computation; FALSE for fast one.
10528                 theName Object name; when specified, this parameter is used
10529                         for result publication in the study. Otherwise, if automatic
10530                         publication is switched on, default value is used for result name.
10531
10532             Returns:
10533                 New GEOM.GEOM_Object, containing the created box.
10534             """
10535             # Example: see GEOM_TestMeasures.py
10536             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10537             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10538             self._autoPublish(anObj, theName, "bndbox")
10539             return anObj
10540
10541         ## Get inertia matrix and moments of inertia of theShape.
10542         #  @param theShape Shape to calculate inertia of.
10543         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10544         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10545         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10546         #
10547         #  @ref tui_inertia_page "Example"
10548         @ManageTransactions("MeasuOp")
10549         def Inertia(self,theShape):
10550             """
10551             Get inertia matrix and moments of inertia of theShape.
10552
10553             Parameters:
10554                 theShape Shape to calculate inertia of.
10555
10556             Returns:
10557                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10558                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10559                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10560             """
10561             # Example: see GEOM_TestMeasures.py
10562             aTuple = self.MeasuOp.GetInertia(theShape)
10563             RaiseIfFailed("GetInertia", self.MeasuOp)
10564             return aTuple
10565
10566         ## Get if coords are included in the shape (ST_IN or ST_ON)
10567         #  @param theShape Shape
10568         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10569         #  @param tolerance to be used (default is 1.0e-7)
10570         #  @return list_of_boolean = [res1, res2, ...]
10571         @ManageTransactions("MeasuOp")
10572         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10573             """
10574             Get if coords are included in the shape (ST_IN or ST_ON)
10575
10576             Parameters:
10577                 theShape Shape
10578                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10579                 tolerance to be used (default is 1.0e-7)
10580
10581             Returns:
10582                 list_of_boolean = [res1, res2, ...]
10583             """
10584             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10585
10586         ## Get minimal distance between the given shapes.
10587         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10588         #  @return Value of the minimal distance between the given shapes.
10589         #
10590         #  @ref tui_min_distance_page "Example"
10591         @ManageTransactions("MeasuOp")
10592         def MinDistance(self, theShape1, theShape2):
10593             """
10594             Get minimal distance between the given shapes.
10595
10596             Parameters:
10597                 theShape1,theShape2 Shapes to find minimal distance between.
10598
10599             Returns:
10600                 Value of the minimal distance between the given shapes.
10601             """
10602             # Example: see GEOM_TestMeasures.py
10603             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10604             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10605             return aTuple[0]
10606
10607         ## Get minimal distance between the given shapes.
10608         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10609         #  @return Value of the minimal distance between the given shapes, in form of list
10610         #          [Distance, DX, DY, DZ].
10611         #
10612         #  @ref tui_min_distance_page "Example"
10613         @ManageTransactions("MeasuOp")
10614         def MinDistanceComponents(self, theShape1, theShape2):
10615             """
10616             Get minimal distance between the given shapes.
10617
10618             Parameters:
10619                 theShape1,theShape2 Shapes to find minimal distance between.
10620
10621             Returns:
10622                 Value of the minimal distance between the given shapes, in form of list
10623                 [Distance, DX, DY, DZ]
10624             """
10625             # Example: see GEOM_TestMeasures.py
10626             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10627             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10628             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10629             return aRes
10630
10631         ## Get closest points of the given shapes.
10632         #  @param theShape1,theShape2 Shapes to find closest points of.
10633         #  @return The number of found solutions (-1 in case of infinite number of
10634         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10635         #
10636         #  @ref tui_min_distance_page "Example"
10637         @ManageTransactions("MeasuOp")
10638         def ClosestPoints (self, theShape1, theShape2):
10639             """
10640             Get closest points of the given shapes.
10641
10642             Parameters:
10643                 theShape1,theShape2 Shapes to find closest points of.
10644
10645             Returns:
10646                 The number of found solutions (-1 in case of infinite number of
10647                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10648             """
10649             # Example: see GEOM_TestMeasures.py
10650             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10651             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10652             return aTuple
10653
10654         ## Get angle between the given shapes in degrees.
10655         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10656         #  @note If both arguments are vectors, the angle is computed in accordance
10657         #        with their orientations, otherwise the minimum angle is computed.
10658         #  @return Value of the angle between the given shapes in degrees.
10659         #
10660         #  @ref tui_angle_page "Example"
10661         @ManageTransactions("MeasuOp")
10662         def GetAngle(self, theShape1, theShape2):
10663             """
10664             Get angle between the given shapes in degrees.
10665
10666             Parameters:
10667                 theShape1,theShape2 Lines or linear edges to find angle between.
10668
10669             Note:
10670                 If both arguments are vectors, the angle is computed in accordance
10671                 with their orientations, otherwise the minimum angle is computed.
10672
10673             Returns:
10674                 Value of the angle between the given shapes in degrees.
10675             """
10676             # Example: see GEOM_TestMeasures.py
10677             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10678             RaiseIfFailed("GetAngle", self.MeasuOp)
10679             return anAngle
10680
10681         ## Get angle between the given shapes in radians.
10682         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10683         #  @note If both arguments are vectors, the angle is computed in accordance
10684         #        with their orientations, otherwise the minimum angle is computed.
10685         #  @return Value of the angle between the given shapes in radians.
10686         #
10687         #  @ref tui_angle_page "Example"
10688         @ManageTransactions("MeasuOp")
10689         def GetAngleRadians(self, theShape1, theShape2):
10690             """
10691             Get angle between the given shapes in radians.
10692
10693             Parameters:
10694                 theShape1,theShape2 Lines or linear edges to find angle between.
10695
10696
10697             Note:
10698                 If both arguments are vectors, the angle is computed in accordance
10699                 with their orientations, otherwise the minimum angle is computed.
10700
10701             Returns:
10702                 Value of the angle between the given shapes in radians.
10703             """
10704             # Example: see GEOM_TestMeasures.py
10705             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10706             RaiseIfFailed("GetAngle", self.MeasuOp)
10707             return anAngle
10708
10709         ## Get angle between the given vectors in degrees.
10710         #  @param theShape1,theShape2 Vectors to find angle between.
10711         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10712         #                 if False, the opposite vector to the normal vector is used.
10713         #  @return Value of the angle between the given vectors in degrees.
10714         #
10715         #  @ref tui_angle_page "Example"
10716         @ManageTransactions("MeasuOp")
10717         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10718             """
10719             Get angle between the given vectors in degrees.
10720
10721             Parameters:
10722                 theShape1,theShape2 Vectors to find angle between.
10723                 theFlag If True, the normal vector is defined by the two vectors cross,
10724                         if False, the opposite vector to the normal vector is used.
10725
10726             Returns:
10727                 Value of the angle between the given vectors in degrees.
10728             """
10729             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10730             if not theFlag:
10731                 anAngle = 360. - anAngle
10732             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10733             return anAngle
10734
10735         ## The same as GetAngleVectors, but the result is in radians.
10736         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10737             """
10738             Get angle between the given vectors in radians.
10739
10740             Parameters:
10741                 theShape1,theShape2 Vectors to find angle between.
10742                 theFlag If True, the normal vector is defined by the two vectors cross,
10743                         if False, the opposite vector to the normal vector is used.
10744
10745             Returns:
10746                 Value of the angle between the given vectors in radians.
10747             """
10748             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10749             return anAngle
10750
10751         ## @name Curve Curvature Measurement
10752         #  Methods for receiving radius of curvature of curves
10753         #  in the given point
10754         ## @{
10755
10756         ## Measure curvature of a curve at a point, set by parameter.
10757         #  @param theCurve a curve.
10758         #  @param theParam parameter.
10759         #  @return radius of curvature of \a theCurve.
10760         #
10761         #  @ref swig_todo "Example"
10762         @ManageTransactions("MeasuOp")
10763         def CurveCurvatureByParam(self, theCurve, theParam):
10764             """
10765             Measure curvature of a curve at a point, set by parameter.
10766
10767             Parameters:
10768                 theCurve a curve.
10769                 theParam parameter.
10770
10771             Returns:
10772                 radius of curvature of theCurve.
10773             """
10774             # Example: see GEOM_TestMeasures.py
10775             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10776             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10777             return aCurv
10778
10779         ## Measure curvature of a curve at a point.
10780         #  @param theCurve a curve.
10781         #  @param thePoint given point.
10782         #  @return radius of curvature of \a theCurve.
10783         #
10784         #  @ref swig_todo "Example"
10785         @ManageTransactions("MeasuOp")
10786         def CurveCurvatureByPoint(self, theCurve, thePoint):
10787             """
10788             Measure curvature of a curve at a point.
10789
10790             Parameters:
10791                 theCurve a curve.
10792                 thePoint given point.
10793
10794             Returns:
10795                 radius of curvature of theCurve.
10796             """
10797             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10798             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10799             return aCurv
10800         ## @}
10801
10802         ## @name Surface Curvature Measurement
10803         #  Methods for receiving max and min radius of curvature of surfaces
10804         #  in the given point
10805         ## @{
10806
10807         ## Measure max radius of curvature of surface.
10808         #  @param theSurf the given surface.
10809         #  @param theUParam Value of U-parameter on the referenced surface.
10810         #  @param theVParam Value of V-parameter on the referenced surface.
10811         #  @return max radius of curvature of theSurf.
10812         #
10813         ## @ref swig_todo "Example"
10814         @ManageTransactions("MeasuOp")
10815         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10816             """
10817             Measure max radius of curvature of surface.
10818
10819             Parameters:
10820                 theSurf the given surface.
10821                 theUParam Value of U-parameter on the referenced surface.
10822                 theVParam Value of V-parameter on the referenced surface.
10823
10824             Returns:
10825                 max radius of curvature of theSurf.
10826             """
10827             # Example: see GEOM_TestMeasures.py
10828             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10829             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10830             return aSurf
10831
10832         ## Measure max radius of curvature of surface in the given point
10833         #  @param theSurf the given surface.
10834         #  @param thePoint given point.
10835         #  @return max radius of curvature of theSurf.
10836         #
10837         ## @ref swig_todo "Example"
10838         @ManageTransactions("MeasuOp")
10839         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10840             """
10841             Measure max radius of curvature of surface in the given point.
10842
10843             Parameters:
10844                 theSurf the given surface.
10845                 thePoint given point.
10846
10847             Returns:
10848                 max radius of curvature of theSurf.
10849             """
10850             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10851             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10852             return aSurf
10853
10854         ## Measure min radius of curvature of surface.
10855         #  @param theSurf the given surface.
10856         #  @param theUParam Value of U-parameter on the referenced surface.
10857         #  @param theVParam Value of V-parameter on the referenced surface.
10858         #  @return min radius of curvature of theSurf.
10859         #
10860         ## @ref swig_todo "Example"
10861         @ManageTransactions("MeasuOp")
10862         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10863             """
10864             Measure min radius of curvature of surface.
10865
10866             Parameters:
10867                 theSurf the given surface.
10868                 theUParam Value of U-parameter on the referenced surface.
10869                 theVParam Value of V-parameter on the referenced surface.
10870
10871             Returns:
10872                 Min radius of curvature of theSurf.
10873             """
10874             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10875             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10876             return aSurf
10877
10878         ## Measure min radius of curvature of surface in the given point
10879         #  @param theSurf the given surface.
10880         #  @param thePoint given point.
10881         #  @return min radius of curvature of theSurf.
10882         #
10883         ## @ref swig_todo "Example"
10884         @ManageTransactions("MeasuOp")
10885         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10886             """
10887             Measure min radius of curvature of surface in the given point.
10888
10889             Parameters:
10890                 theSurf the given surface.
10891                 thePoint given point.
10892
10893             Returns:
10894                 Min radius of curvature of theSurf.
10895             """
10896             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10897             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10898             return aSurf
10899         ## @}
10900
10901         ## Get min and max tolerances of sub-shapes of theShape
10902         #  @param theShape Shape, to get tolerances of.
10903         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10904         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10905         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10906         #  VertMin,VertMax: Min and max tolerances of the vertices.
10907         #
10908         #  @ref tui_tolerance_page "Example"
10909         @ManageTransactions("MeasuOp")
10910         def Tolerance(self,theShape):
10911             """
10912             Get min and max tolerances of sub-shapes of theShape
10913
10914             Parameters:
10915                 theShape Shape, to get tolerances of.
10916
10917             Returns:
10918                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10919                  FaceMin,FaceMax: Min and max tolerances of the faces.
10920                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10921                  VertMin,VertMax: Min and max tolerances of the vertices.
10922             """
10923             # Example: see GEOM_TestMeasures.py
10924             aTuple = self.MeasuOp.GetTolerance(theShape)
10925             RaiseIfFailed("GetTolerance", self.MeasuOp)
10926             return aTuple
10927
10928         ## Obtain description of the given shape (number of sub-shapes of each type)
10929         #  @param theShape Shape to be described.
10930         #  @return Description of the given shape.
10931         #
10932         #  @ref tui_whatis_page "Example"
10933         @ManageTransactions("MeasuOp")
10934         def WhatIs(self,theShape):
10935             """
10936             Obtain description of the given shape (number of sub-shapes of each type)
10937
10938             Parameters:
10939                 theShape Shape to be described.
10940
10941             Returns:
10942                 Description of the given shape.
10943             """
10944             # Example: see GEOM_TestMeasures.py
10945             aDescr = self.MeasuOp.WhatIs(theShape)
10946             RaiseIfFailed("WhatIs", self.MeasuOp)
10947             return aDescr
10948
10949         ## Obtain quantity of shapes of the given type in \a theShape.
10950         #  If \a theShape is of type \a theType, it is also counted.
10951         #  @param theShape Shape to be described.
10952         #  @param theType the given ShapeType().
10953         #  @return Quantity of shapes of type \a theType in \a theShape.
10954         #
10955         #  @ref tui_measurement_tools_page "Example"
10956         def NbShapes (self, theShape, theType):
10957             """
10958             Obtain quantity of shapes of the given type in theShape.
10959             If theShape is of type theType, it is also counted.
10960
10961             Parameters:
10962                 theShape Shape to be described.
10963                 theType the given geompy.ShapeType
10964
10965             Returns:
10966                 Quantity of shapes of type theType in theShape.
10967             """
10968             # Example: see GEOM_TestMeasures.py
10969             listSh = self.SubShapeAllIDs(theShape, theType)
10970             Nb = len(listSh)
10971             return Nb
10972
10973         ## Obtain quantity of shapes of each type in \a theShape.
10974         #  The \a theShape is also counted.
10975         #  @param theShape Shape to be described.
10976         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10977         #
10978         #  @ref tui_measurement_tools_page "Example"
10979         def ShapeInfo (self, theShape):
10980             """
10981             Obtain quantity of shapes of each type in theShape.
10982             The theShape is also counted.
10983
10984             Parameters:
10985                 theShape Shape to be described.
10986
10987             Returns:
10988                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10989             """
10990             # Example: see GEOM_TestMeasures.py
10991             aDict = {}
10992             for typeSh in self.ShapeType:
10993                 if typeSh in ( "AUTO", "SHAPE" ): continue
10994                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10995                 Nb = len(listSh)
10996                 aDict[typeSh] = Nb
10997                 pass
10998             return aDict
10999
11000         def GetCreationInformation(self, theShape):
11001             res = ''
11002             infos = theShape.GetCreationInformation()
11003             for info in infos:
11004                 # operationName
11005                 opName = info.operationName
11006                 if not opName: opName = "no info available"
11007                 if res: res += "\n"
11008                 res += "Operation: " + opName
11009                 # parameters
11010                 for parVal in info.params:
11011                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11012             return res
11013
11014         ## Get a point, situated at the centre of mass of theShape.
11015         #  @param theShape Shape to define centre of mass of.
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 created point.
11021         #
11022         #  @ref tui_center_of_mass_page "Example"
11023         @ManageTransactions("MeasuOp")
11024         def MakeCDG(self, theShape, theName=None):
11025             """
11026             Get a point, situated at the centre of mass of theShape.
11027
11028             Parameters:
11029                 theShape Shape to define centre of mass of.
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 created point.
11036             """
11037             # Example: see GEOM_TestMeasures.py
11038             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11039             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11040             self._autoPublish(anObj, theName, "centerOfMass")
11041             return anObj
11042
11043         ## Get a vertex sub-shape by index depended with orientation.
11044         #  @param theShape Shape to find sub-shape.
11045         #  @param theIndex Index to find vertex by this index (starting from zero)
11046         #  @param theName Object name; when specified, this parameter is used
11047         #         for result publication in the study. Otherwise, if automatic
11048         #         publication is switched on, default value is used for result name.
11049         #
11050         #  @return New GEOM.GEOM_Object, containing the created vertex.
11051         #
11052         #  @ref tui_measurement_tools_page "Example"
11053         @ManageTransactions("MeasuOp")
11054         def GetVertexByIndex(self, theShape, theIndex, theName=None):
11055             """
11056             Get a vertex sub-shape by index depended with orientation.
11057
11058             Parameters:
11059                 theShape Shape to find sub-shape.
11060                 theIndex Index to find vertex by this index (starting from zero)
11061                 theName Object name; when specified, this parameter is used
11062                         for result publication in the study. Otherwise, if automatic
11063                         publication is switched on, default value is used for result name.
11064
11065             Returns:
11066                 New GEOM.GEOM_Object, containing the created vertex.
11067             """
11068             # Example: see GEOM_TestMeasures.py
11069             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
11070             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11071             self._autoPublish(anObj, theName, "vertex")
11072             return anObj
11073
11074         ## Get the first vertex of wire/edge depended orientation.
11075         #  @param theShape Shape to find first vertex.
11076         #  @param theName Object name; when specified, this parameter is used
11077         #         for result publication in the study. Otherwise, if automatic
11078         #         publication is switched on, default value is used for result name.
11079         #
11080         #  @return New GEOM.GEOM_Object, containing the created vertex.
11081         #
11082         #  @ref tui_measurement_tools_page "Example"
11083         def GetFirstVertex(self, theShape, theName=None):
11084             """
11085             Get the first vertex of wire/edge depended orientation.
11086
11087             Parameters:
11088                 theShape Shape to find first vertex.
11089                 theName Object name; when specified, this parameter is used
11090                         for result publication in the study. Otherwise, if automatic
11091                         publication is switched on, default value is used for result name.
11092
11093             Returns:
11094                 New GEOM.GEOM_Object, containing the created vertex.
11095             """
11096             # Example: see GEOM_TestMeasures.py
11097             # note: auto-publishing is done in self.GetVertexByIndex()
11098             return self.GetVertexByIndex(theShape, 0, theName)
11099
11100         ## Get the last vertex of wire/edge depended orientation.
11101         #  @param theShape Shape to find last vertex.
11102         #  @param theName Object name; when specified, this parameter is used
11103         #         for result publication in the study. Otherwise, if automatic
11104         #         publication is switched on, default value is used for result name.
11105         #
11106         #  @return New GEOM.GEOM_Object, containing the created vertex.
11107         #
11108         #  @ref tui_measurement_tools_page "Example"
11109         def GetLastVertex(self, theShape, theName=None):
11110             """
11111             Get the last vertex of wire/edge depended orientation.
11112
11113             Parameters:
11114                 theShape Shape to find last vertex.
11115                 theName Object name; when specified, this parameter is used
11116                         for result publication in the study. Otherwise, if automatic
11117                         publication is switched on, default value is used for result name.
11118
11119             Returns:
11120                 New GEOM.GEOM_Object, containing the created vertex.
11121             """
11122             # Example: see GEOM_TestMeasures.py
11123             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11124             # note: auto-publishing is done in self.GetVertexByIndex()
11125             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
11126
11127         ## Get a normale to the given face. If the point is not given,
11128         #  the normale is calculated at the center of mass.
11129         #  @param theFace Face to define normale of.
11130         #  @param theOptionalPoint Point to compute the normale at.
11131         #  @param theName Object name; when specified, this parameter is used
11132         #         for result publication in the study. Otherwise, if automatic
11133         #         publication is switched on, default value is used for result name.
11134         #
11135         #  @return New GEOM.GEOM_Object, containing the created vector.
11136         #
11137         #  @ref swig_todo "Example"
11138         @ManageTransactions("MeasuOp")
11139         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11140             """
11141             Get a normale to the given face. If the point is not given,
11142             the normale is calculated at the center of mass.
11143
11144             Parameters:
11145                 theFace Face to define normale of.
11146                 theOptionalPoint Point to compute the normale at.
11147                 theName Object name; when specified, this parameter is used
11148                         for result publication in the study. Otherwise, if automatic
11149                         publication is switched on, default value is used for result name.
11150
11151             Returns:
11152                 New GEOM.GEOM_Object, containing the created vector.
11153             """
11154             # Example: see GEOM_TestMeasures.py
11155             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11156             RaiseIfFailed("GetNormal", self.MeasuOp)
11157             self._autoPublish(anObj, theName, "normal")
11158             return anObj
11159
11160         ## Print shape errors obtained from CheckShape.
11161         #  @param theShape Shape that was checked.
11162         #  @param theShapeErrors the shape errors obtained by CheckShape.
11163         #  @param theReturnStatus If 0 the description of problem is printed.
11164         #                         If 1 the description of problem is returned.
11165         #  @return If theReturnStatus is equal to 1 the description is returned.
11166         #          Otherwise doesn't return anything.
11167         #
11168         #  @ref tui_check_shape_page "Example"
11169         @ManageTransactions("MeasuOp")
11170         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11171             """
11172             Print shape errors obtained from CheckShape.
11173
11174             Parameters:
11175                 theShape Shape that was checked.
11176                 theShapeErrors the shape errors obtained by CheckShape.
11177                 theReturnStatus If 0 the description of problem is printed.
11178                                 If 1 the description of problem is returned.
11179
11180             Returns:
11181                 If theReturnStatus is equal to 1 the description is returned.
11182                   Otherwise doesn't return anything.
11183             """
11184             # Example: see GEOM_TestMeasures.py
11185             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11186             if theReturnStatus == 1:
11187                 return Descr
11188             print Descr
11189             pass
11190
11191         ## Check a topology of the given shape.
11192         #  @param theShape Shape to check validity of.
11193         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11194         #                        if TRUE, the shape's geometry will be checked also.
11195         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11196         #                         of problem is printed.
11197         #                         If 1 isValid flag and the description of
11198         #                         problem is returned.
11199         #                         If 2 isValid flag and the list of error data
11200         #                         is returned.
11201         #  @return TRUE, if the shape "seems to be valid".
11202         #          If theShape is invalid, prints a description of problem.
11203         #          If theReturnStatus is equal to 1 the description is returned
11204         #          along with IsValid flag.
11205         #          If theReturnStatus is equal to 2 the list of error data is
11206         #          returned along with IsValid flag.
11207         #
11208         #  @ref tui_check_shape_page "Example"
11209         @ManageTransactions("MeasuOp")
11210         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11211             """
11212             Check a topology of the given shape.
11213
11214             Parameters:
11215                 theShape Shape to check validity of.
11216                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11217                                if TRUE, the shape's geometry will be checked also.
11218                 theReturnStatus If 0 and if theShape is invalid, a description
11219                                 of problem is printed.
11220                                 If 1 IsValid flag and the description of
11221                                 problem is returned.
11222                                 If 2 IsValid flag and the list of error data
11223                                 is returned.
11224
11225             Returns:
11226                 TRUE, if the shape "seems to be valid".
11227                 If theShape is invalid, prints a description of problem.
11228                 If theReturnStatus is equal to 1 the description is returned
11229                 along with IsValid flag.
11230                 If theReturnStatus is equal to 2 the list of error data is
11231                 returned along with IsValid flag.
11232             """
11233             # Example: see GEOM_TestMeasures.py
11234             if theIsCheckGeom:
11235                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11236                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11237             else:
11238                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11239                 RaiseIfFailed("CheckShape", self.MeasuOp)
11240             if IsValid == 0:
11241                 if theReturnStatus == 0:
11242                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11243                     print Descr
11244             if theReturnStatus == 1:
11245               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11246               return (IsValid, Descr)
11247             elif theReturnStatus == 2:
11248               return (IsValid, ShapeErrors)
11249             return IsValid
11250
11251         ## Detect self-intersections in the given shape.
11252         #  @param theShape Shape to check.
11253         #  @param theCheckLevel is the level of self-intersection check.
11254         #         Possible input values are:
11255         #         - GEOM.SI_V_V(0) - only V/V interferences
11256         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11257         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11258         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11259         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11260         #         - GEOM.SI_ALL(5) - all interferences.
11261         #  @return TRUE, if the shape contains no self-intersections.
11262         #
11263         #  @ref tui_check_self_intersections_page "Example"
11264         @ManageTransactions("MeasuOp")
11265         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11266             """
11267             Detect self-intersections in the given shape.
11268
11269             Parameters:
11270                 theShape Shape to check.
11271                 theCheckLevel is the level of self-intersection check.
11272                   Possible input values are:
11273                    - GEOM.SI_V_V(0) - only V/V interferences
11274                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11275                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11276                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11277                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11278                    - GEOM.SI_ALL(5) - all interferences.
11279  
11280             Returns:
11281                 TRUE, if the shape contains no self-intersections.
11282             """
11283             # Example: see GEOM_TestMeasures.py
11284             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11285             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11286             return IsValid
11287
11288         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11289         #  @param theShape Shape to check.
11290         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
11291         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11292         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11293         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11294         #         - if \a theTolerance > 0, algorithm detects gaps
11295         #  @return TRUE, if the shape contains no self-intersections.
11296         #
11297         #  @ref tui_check_self_intersections_fast_page "Example"
11298         @ManageTransactions("MeasuOp")
11299         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11300             """
11301             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11302
11303             Parameters:
11304                 theShape Shape to check.
11305                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11306                     - if theDeflection <= 0, default deflection 0.001 is used
11307                 theTolerance Specifies a distance between shapes used for detecting gaps:
11308                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11309                     - if theTolerance > 0, algorithm detects gaps
11310  
11311             Returns:
11312                 TRUE, if the shape contains no self-intersections.
11313             """
11314             # Example: see GEOM_TestMeasures.py
11315             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11316             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11317             return IsValid
11318
11319         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11320         #  @param theShape1 First source object
11321         #  @param theShape2 Second source object
11322         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11323         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11324         #         - if \a theTolerance > 0, algorithm detects gaps
11325         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
11326         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11327         #  @return TRUE, if there are intersections (gaps) between source shapes
11328         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11329         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11330         #
11331         #  @ref tui_fast_intersection_page "Example"
11332         @ManageTransactions("MeasuOp")
11333         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11334             """
11335             Detect intersections of the given shapes with algorithm based on mesh intersections.
11336
11337             Parameters:
11338                 theShape1 First source object
11339                 theShape2 Second source object
11340                 theTolerance Specifies a distance between shapes used for detecting gaps:
11341                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11342                     - if theTolerance > 0, algorithm detects gaps
11343                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11344                     - if theDeflection <= 0, default deflection 0.001 is used
11345  
11346             Returns:
11347                 TRUE, if there are intersections (gaps) between source shapes
11348                 List of sub-shapes IDs from 1st shape that localize intersection.
11349                 List of sub-shapes IDs from 2nd shape that localize intersection.
11350             """
11351             # Example: see GEOM_TestMeasures.py
11352             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11353             RaiseIfFailed("FastIntersect", self.MeasuOp)
11354             return IsOk, Res1, Res2
11355
11356         ## Get position (LCS) of theShape.
11357         #
11358         #  Origin of the LCS is situated at the shape's center of mass.
11359         #  Axes of the LCS are obtained from shape's location or,
11360         #  if the shape is a planar face, from position of its plane.
11361         #
11362         #  @param theShape Shape to calculate position of.
11363         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11364         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11365         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11366         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11367         #
11368         #  @ref swig_todo "Example"
11369         @ManageTransactions("MeasuOp")
11370         def GetPosition(self,theShape):
11371             """
11372             Get position (LCS) of theShape.
11373             Origin of the LCS is situated at the shape's center of mass.
11374             Axes of the LCS are obtained from shape's location or,
11375             if the shape is a planar face, from position of its plane.
11376
11377             Parameters:
11378                 theShape Shape to calculate position of.
11379
11380             Returns:
11381                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11382                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11383                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11384                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11385             """
11386             # Example: see GEOM_TestMeasures.py
11387             aTuple = self.MeasuOp.GetPosition(theShape)
11388             RaiseIfFailed("GetPosition", self.MeasuOp)
11389             return aTuple
11390
11391         ## Get kind of theShape.
11392         #
11393         #  @param theShape Shape to get a kind of.
11394         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11395         #          and a list of parameters, describing the shape.
11396         #  @note  Concrete meaning of each value, returned via \a theIntegers
11397         #         or \a theDoubles list depends on the kind() of the shape.
11398         #
11399         #  @ref swig_todo "Example"
11400         @ManageTransactions("MeasuOp")
11401         def KindOfShape(self,theShape):
11402             """
11403             Get kind of theShape.
11404
11405             Parameters:
11406                 theShape Shape to get a kind of.
11407
11408             Returns:
11409                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11410                     and a list of parameters, describing the shape.
11411             Note:
11412                 Concrete meaning of each value, returned via theIntegers
11413                 or theDoubles list depends on the geompy.kind of the shape
11414             """
11415             # Example: see GEOM_TestMeasures.py
11416             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11417             RaiseIfFailed("KindOfShape", self.MeasuOp)
11418
11419             aKind  = aRoughTuple[0]
11420             anInts = aRoughTuple[1]
11421             aDbls  = aRoughTuple[2]
11422
11423             # Now there is no exception from this rule:
11424             aKindTuple = [aKind] + aDbls + anInts
11425
11426             # If they are we will regroup parameters for such kind of shape.
11427             # For example:
11428             #if aKind == kind.SOME_KIND:
11429             #    #  SOME_KIND     int int double int double double
11430             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11431
11432             return aKindTuple
11433
11434         ## Returns the string that describes if the shell is good for solid.
11435         #  This is a support method for MakeSolid.
11436         #
11437         #  @param theShell the shell to be checked.
11438         #  @return Returns a string that describes the shell validity for
11439         #          solid construction.
11440         @ManageTransactions("MeasuOp")
11441         def _IsGoodForSolid(self, theShell):
11442             """
11443             Returns the string that describes if the shell is good for solid.
11444             This is a support method for MakeSolid.
11445
11446             Parameter:
11447                 theShell the shell to be checked.
11448
11449             Returns:
11450                 Returns a string that describes the shell validity for
11451                 solid construction.
11452             """
11453             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11454             return aDescr
11455
11456         # end of l2_measure
11457         ## @}
11458
11459         ## @addtogroup l2_import_export
11460         ## @{
11461
11462         ## Import a shape from the BREP, IGES, STEP or other file
11463         #  (depends on given format) with given name.
11464         #
11465         #  Note: this function is deprecated, it is kept for backward compatibility only
11466         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11467         #
11468         #  @param theFileName The file, containing the shape.
11469         #  @param theFormatName Specify format for the file reading.
11470         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11471         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11472         #            format 'STEP_SCALE' is used instead of 'STEP',
11473         #            length unit will be set to 'meter' and result model will be scaled.
11474         #  @param theName Object name; when specified, this parameter is used
11475         #         for result publication in the study. Otherwise, if automatic
11476         #         publication is switched on, default value is used for result name.
11477         #
11478         #  @return New GEOM.GEOM_Object, containing the imported shape.
11479         #          If material names are imported it returns the list of
11480         #          objects. The first one is the imported object followed by
11481         #          material groups.
11482         #  @note Auto publishing is allowed for the shape itself. Imported
11483         #        material groups are not automatically published.
11484         #
11485         #  @ref swig_Import_Export "Example"
11486         @ManageTransactions("InsertOp")
11487         def ImportFile(self, theFileName, theFormatName, theName=None):
11488             """
11489             Import a shape from the BREP, IGES, STEP or other file
11490             (depends on given format) with given name.
11491
11492             Note: this function is deprecated, it is kept for backward compatibility only
11493             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11494
11495             Parameters: 
11496                 theFileName The file, containing the shape.
11497                 theFormatName Specify format for the file reading.
11498                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11499                     If format 'IGES_SCALE' is used instead of 'IGES' or
11500                        format 'STEP_SCALE' is used instead of 'STEP',
11501                        length unit will be set to 'meter' and result model will be scaled.
11502                 theName Object name; when specified, this parameter is used
11503                         for result publication in the study. Otherwise, if automatic
11504                         publication is switched on, default value is used for result name.
11505
11506             Returns:
11507                 New GEOM.GEOM_Object, containing the imported shape.
11508                 If material names are imported it returns the list of
11509                 objects. The first one is the imported object followed by
11510                 material groups.
11511             Note:
11512                 Auto publishing is allowed for the shape itself. Imported
11513                 material groups are not automatically published.
11514             """
11515             # Example: see GEOM_TestOthers.py
11516             print """
11517             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11518             where <FormatName> is a name of desirable format for importing.
11519             """
11520             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11521             RaiseIfFailed("ImportFile", self.InsertOp)
11522             aNbObj = len(aListObj)
11523             if aNbObj > 0:
11524                 self._autoPublish(aListObj[0], theName, "imported")
11525             if aNbObj == 1:
11526                 return aListObj[0]
11527             return aListObj
11528
11529         ## Deprecated analog of ImportFile()
11530         def Import(self, theFileName, theFormatName, theName=None):
11531             """
11532             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11533             """
11534             # note: auto-publishing is done in self.ImportFile()
11535             return self.ImportFile(theFileName, theFormatName, theName)
11536
11537         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11538         #  @note This method will not be dumped to the python script by DumpStudy functionality.
11539         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
11540         #  @param theStream The BRep binary stream.
11541         #  @param theName Object name; when specified, this parameter is used
11542         #         for result publication in the study. Otherwise, if automatic
11543         #         publication is switched on, default value is used for result name.
11544         #
11545         #  @return New GEOM_Object, containing the shape, read from theStream.
11546         #
11547         #  @ref swig_Import_Export "Example"
11548         @ManageTransactions("InsertOp")
11549         def RestoreShape (self, theStream, theName=None):
11550             """
11551             Read a shape from the binary stream, containing its bounding representation (BRep).
11552
11553             Note:
11554                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11555
11556             Parameters:
11557                 theStream The BRep binary stream.
11558                 theName Object name; when specified, this parameter is used
11559                         for result publication in the study. Otherwise, if automatic
11560                         publication is switched on, default value is used for result name.
11561
11562             Returns:
11563                 New GEOM_Object, containing the shape, read from theStream.
11564             """
11565             # Example: see GEOM_TestOthers.py
11566             anObj = self.InsertOp.RestoreShape(theStream)
11567             RaiseIfFailed("RestoreShape", self.InsertOp)
11568             self._autoPublish(anObj, theName, "restored")
11569             return anObj
11570
11571         ## Export the given shape into a file with given name.
11572         #
11573         #  Note: this function is deprecated, it is kept for backward compatibility only
11574         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11575         #
11576         #  @param theObject Shape to be stored in the file.
11577         #  @param theFileName Name of the file to store the given shape in.
11578         #  @param theFormatName Specify format for the shape storage.
11579         #         Available formats can be obtained with
11580         #         geompy.InsertOp.ExportTranslators()[0] method.
11581         #
11582         #  @ref swig_Import_Export "Example"
11583         @ManageTransactions("InsertOp")
11584         def Export(self, theObject, theFileName, theFormatName):
11585             """
11586             Export the given shape into a file with given name.
11587
11588             Note: this function is deprecated, it is kept for backward compatibility only
11589             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11590             
11591             Parameters: 
11592                 theObject Shape to be stored in the file.
11593                 theFileName Name of the file to store the given shape in.
11594                 theFormatName Specify format for the shape storage.
11595                               Available formats can be obtained with
11596                               geompy.InsertOp.ExportTranslators()[0] method.
11597             """
11598             # Example: see GEOM_TestOthers.py
11599             print """
11600             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11601             where <FormatName> is a name of desirable format for exporting.
11602             """
11603             self.InsertOp.Export(theObject, theFileName, theFormatName)
11604             if self.InsertOp.IsDone() == 0:
11605                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11606                 pass
11607             pass
11608
11609         # end of l2_import_export
11610         ## @}
11611
11612         ## @addtogroup l3_blocks
11613         ## @{
11614
11615         ## Create a quadrangle face from four edges. Order of Edges is not
11616         #  important. It is  not necessary that edges share the same vertex.
11617         #  @param E1,E2,E3,E4 Edges for the face bound.
11618         #  @param theName Object name; when specified, this parameter is used
11619         #         for result publication in the study. Otherwise, if automatic
11620         #         publication is switched on, default value is used for result name.
11621         #
11622         #  @return New GEOM.GEOM_Object, containing the created face.
11623         #
11624         #  @ref tui_building_by_blocks_page "Example"
11625         @ManageTransactions("BlocksOp")
11626         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11627             """
11628             Create a quadrangle face from four edges. Order of Edges is not
11629             important. It is  not necessary that edges share the same vertex.
11630
11631             Parameters:
11632                 E1,E2,E3,E4 Edges for the face bound.
11633                 theName Object name; when specified, this parameter is used
11634                         for result publication in the study. Otherwise, if automatic
11635                         publication is switched on, default value is used for result name.
11636
11637             Returns:
11638                 New GEOM.GEOM_Object, containing the created face.
11639
11640             Example of usage:
11641                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11642             """
11643             # Example: see GEOM_Spanner.py
11644             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11645             RaiseIfFailed("MakeQuad", self.BlocksOp)
11646             self._autoPublish(anObj, theName, "quad")
11647             return anObj
11648
11649         ## Create a quadrangle face on two edges.
11650         #  The missing edges will be built by creating the shortest ones.
11651         #  @param E1,E2 Two opposite edges for the face.
11652         #  @param theName Object name; when specified, this parameter is used
11653         #         for result publication in the study. Otherwise, if automatic
11654         #         publication is switched on, default value is used for result name.
11655         #
11656         #  @return New GEOM.GEOM_Object, containing the created face.
11657         #
11658         #  @ref tui_building_by_blocks_page "Example"
11659         @ManageTransactions("BlocksOp")
11660         def MakeQuad2Edges(self, E1, E2, theName=None):
11661             """
11662             Create a quadrangle face on two edges.
11663             The missing edges will be built by creating the shortest ones.
11664
11665             Parameters:
11666                 E1,E2 Two opposite edges for the face.
11667                 theName Object name; when specified, this parameter is used
11668                         for result publication in the study. Otherwise, if automatic
11669                         publication is switched on, default value is used for result name.
11670
11671             Returns:
11672                 New GEOM.GEOM_Object, containing the created face.
11673
11674             Example of usage:
11675                 # create vertices
11676                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11677                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11678                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11679                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11680                 # create edges
11681                 edge1 = geompy.MakeEdge(p1, p2)
11682                 edge2 = geompy.MakeEdge(p3, p4)
11683                 # create a quadrangle face from two edges
11684                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11685             """
11686             # Example: see GEOM_Spanner.py
11687             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11688             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11689             self._autoPublish(anObj, theName, "quad")
11690             return anObj
11691
11692         ## Create a quadrangle face with specified corners.
11693         #  The missing edges will be built by creating the shortest ones.
11694         #  @param V1,V2,V3,V4 Corner vertices for the face.
11695         #  @param theName Object name; when specified, this parameter is used
11696         #         for result publication in the study. Otherwise, if automatic
11697         #         publication is switched on, default value is used for result name.
11698         #
11699         #  @return New GEOM.GEOM_Object, containing the created face.
11700         #
11701         #  @ref tui_building_by_blocks_page "Example 1"
11702         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11703         @ManageTransactions("BlocksOp")
11704         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11705             """
11706             Create a quadrangle face with specified corners.
11707             The missing edges will be built by creating the shortest ones.
11708
11709             Parameters:
11710                 V1,V2,V3,V4 Corner vertices for the face.
11711                 theName Object name; when specified, this parameter is used
11712                         for result publication in the study. Otherwise, if automatic
11713                         publication is switched on, default value is used for result name.
11714
11715             Returns:
11716                 New GEOM.GEOM_Object, containing the created face.
11717
11718             Example of usage:
11719                 # create vertices
11720                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11721                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11722                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11723                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11724                 # create a quadrangle from four points in its corners
11725                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11726             """
11727             # Example: see GEOM_Spanner.py
11728             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11729             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11730             self._autoPublish(anObj, theName, "quad")
11731             return anObj
11732
11733         ## Create a hexahedral solid, bounded by the six given faces. Order of
11734         #  faces is not important. It is  not necessary that Faces share the same edge.
11735         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11736         #  @param theName Object name; when specified, this parameter is used
11737         #         for result publication in the study. Otherwise, if automatic
11738         #         publication is switched on, default value is used for result name.
11739         #
11740         #  @return New GEOM.GEOM_Object, containing the created solid.
11741         #
11742         #  @ref tui_building_by_blocks_page "Example 1"
11743         #  \n @ref swig_MakeHexa "Example 2"
11744         @ManageTransactions("BlocksOp")
11745         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11746             """
11747             Create a hexahedral solid, bounded by the six given faces. Order of
11748             faces is not important. It is  not necessary that Faces share the same edge.
11749
11750             Parameters:
11751                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11752                 theName Object name; when specified, this parameter is used
11753                         for result publication in the study. Otherwise, if automatic
11754                         publication is switched on, default value is used for result name.
11755
11756             Returns:
11757                 New GEOM.GEOM_Object, containing the created solid.
11758
11759             Example of usage:
11760                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11761             """
11762             # Example: see GEOM_Spanner.py
11763             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11764             RaiseIfFailed("MakeHexa", self.BlocksOp)
11765             self._autoPublish(anObj, theName, "hexa")
11766             return anObj
11767
11768         ## Create a hexahedral solid between two given faces.
11769         #  The missing faces will be built by creating the smallest ones.
11770         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11771         #  @param theName Object name; when specified, this parameter is used
11772         #         for result publication in the study. Otherwise, if automatic
11773         #         publication is switched on, default value is used for result name.
11774         #
11775         #  @return New GEOM.GEOM_Object, containing the created solid.
11776         #
11777         #  @ref tui_building_by_blocks_page "Example 1"
11778         #  \n @ref swig_MakeHexa2Faces "Example 2"
11779         @ManageTransactions("BlocksOp")
11780         def MakeHexa2Faces(self, F1, F2, theName=None):
11781             """
11782             Create a hexahedral solid between two given faces.
11783             The missing faces will be built by creating the smallest ones.
11784
11785             Parameters:
11786                 F1,F2 Two opposite faces for the hexahedral solid.
11787                 theName Object name; when specified, this parameter is used
11788                         for result publication in the study. Otherwise, if automatic
11789                         publication is switched on, default value is used for result name.
11790
11791             Returns:
11792                 New GEOM.GEOM_Object, containing the created solid.
11793
11794             Example of usage:
11795                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11796             """
11797             # Example: see GEOM_Spanner.py
11798             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11799             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11800             self._autoPublish(anObj, theName, "hexa")
11801             return anObj
11802
11803         # end of l3_blocks
11804         ## @}
11805
11806         ## @addtogroup l3_blocks_op
11807         ## @{
11808
11809         ## Get a vertex, found in the given shape by its coordinates.
11810         #  @param theShape Block or a compound of blocks.
11811         #  @param theX,theY,theZ Coordinates of the sought vertex.
11812         #  @param theEpsilon Maximum allowed distance between the resulting
11813         #                    vertex and point with the given coordinates.
11814         #  @param theName Object name; when specified, this parameter is used
11815         #         for result publication in the study. Otherwise, if automatic
11816         #         publication is switched on, default value is used for result name.
11817         #
11818         #  @return New GEOM.GEOM_Object, containing the found vertex.
11819         #
11820         #  @ref swig_GetPoint "Example"
11821         @ManageTransactions("BlocksOp")
11822         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11823             """
11824             Get a vertex, found in the given shape by its coordinates.
11825
11826             Parameters:
11827                 theShape Block or a compound of blocks.
11828                 theX,theY,theZ Coordinates of the sought vertex.
11829                 theEpsilon Maximum allowed distance between the resulting
11830                            vertex and point with the given coordinates.
11831                 theName Object name; when specified, this parameter is used
11832                         for result publication in the study. Otherwise, if automatic
11833                         publication is switched on, default value is used for result name.
11834
11835             Returns:
11836                 New GEOM.GEOM_Object, containing the found vertex.
11837
11838             Example of usage:
11839                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11840             """
11841             # Example: see GEOM_TestOthers.py
11842             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11843             RaiseIfFailed("GetPoint", self.BlocksOp)
11844             self._autoPublish(anObj, theName, "vertex")
11845             return anObj
11846
11847         ## Find a vertex of the given shape, which has minimal distance to the given point.
11848         #  @param theShape Any shape.
11849         #  @param thePoint Point, close to the desired vertex.
11850         #  @param theName Object name; when specified, this parameter is used
11851         #         for result publication in the study. Otherwise, if automatic
11852         #         publication is switched on, default value is used for result name.
11853         #
11854         #  @return New GEOM.GEOM_Object, containing the found vertex.
11855         #
11856         #  @ref swig_GetVertexNearPoint "Example"
11857         @ManageTransactions("BlocksOp")
11858         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11859             """
11860             Find a vertex of the given shape, which has minimal distance to the given point.
11861
11862             Parameters:
11863                 theShape Any shape.
11864                 thePoint Point, close to the desired vertex.
11865                 theName Object name; when specified, this parameter is used
11866                         for result publication in the study. Otherwise, if automatic
11867                         publication is switched on, default value is used for result name.
11868
11869             Returns:
11870                 New GEOM.GEOM_Object, containing the found vertex.
11871
11872             Example of usage:
11873                 pmidle = geompy.MakeVertex(50, 0, 50)
11874                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11875             """
11876             # Example: see GEOM_TestOthers.py
11877             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11878             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11879             self._autoPublish(anObj, theName, "vertex")
11880             return anObj
11881
11882         ## Get an edge, found in the given shape by two given vertices.
11883         #  @param theShape Block or a compound of blocks.
11884         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11885         #  @param theName Object name; when specified, this parameter is used
11886         #         for result publication in the study. Otherwise, if automatic
11887         #         publication is switched on, default value is used for result name.
11888         #
11889         #  @return New GEOM.GEOM_Object, containing the found edge.
11890         #
11891         #  @ref swig_GetEdge "Example"
11892         @ManageTransactions("BlocksOp")
11893         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11894             """
11895             Get an edge, found in the given shape by two given vertices.
11896
11897             Parameters:
11898                 theShape Block or a compound of blocks.
11899                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11900                 theName Object name; when specified, this parameter is used
11901                         for result publication in the study. Otherwise, if automatic
11902                         publication is switched on, default value is used for result name.
11903
11904             Returns:
11905                 New GEOM.GEOM_Object, containing the found edge.
11906             """
11907             # Example: see GEOM_Spanner.py
11908             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11909             RaiseIfFailed("GetEdge", self.BlocksOp)
11910             self._autoPublish(anObj, theName, "edge")
11911             return anObj
11912
11913         ## Find an edge of the given shape, which has minimal distance to the given point.
11914         #  @param theShape Block or a compound of blocks.
11915         #  @param thePoint Point, close to the desired edge.
11916         #  @param theName Object name; when specified, this parameter is used
11917         #         for result publication in the study. Otherwise, if automatic
11918         #         publication is switched on, default value is used for result name.
11919         #
11920         #  @return New GEOM.GEOM_Object, containing the found edge.
11921         #
11922         #  @ref swig_GetEdgeNearPoint "Example"
11923         @ManageTransactions("BlocksOp")
11924         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11925             """
11926             Find an edge of the given shape, which has minimal distance to the given point.
11927
11928             Parameters:
11929                 theShape Block or a compound of blocks.
11930                 thePoint Point, close to the desired edge.
11931                 theName Object name; when specified, this parameter is used
11932                         for result publication in the study. Otherwise, if automatic
11933                         publication is switched on, default value is used for result name.
11934
11935             Returns:
11936                 New GEOM.GEOM_Object, containing the found edge.
11937             """
11938             # Example: see GEOM_TestOthers.py
11939             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11940             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11941             self._autoPublish(anObj, theName, "edge")
11942             return anObj
11943
11944         ## Returns a face, found in the given shape by four given corner vertices.
11945         #  @param theShape Block or a compound of blocks.
11946         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11947         #  @param theName Object name; when specified, this parameter is used
11948         #         for result publication in the study. Otherwise, if automatic
11949         #         publication is switched on, default value is used for result name.
11950         #
11951         #  @return New GEOM.GEOM_Object, containing the found face.
11952         #
11953         #  @ref swig_todo "Example"
11954         @ManageTransactions("BlocksOp")
11955         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11956             """
11957             Returns a face, found in the given shape by four given corner vertices.
11958
11959             Parameters:
11960                 theShape Block or a compound of blocks.
11961                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11962                 theName Object name; when specified, this parameter is used
11963                         for result publication in the study. Otherwise, if automatic
11964                         publication is switched on, default value is used for result name.
11965
11966             Returns:
11967                 New GEOM.GEOM_Object, containing the found face.
11968             """
11969             # Example: see GEOM_Spanner.py
11970             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11971             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11972             self._autoPublish(anObj, theName, "face")
11973             return anObj
11974
11975         ## Get a face of block, found in the given shape by two given edges.
11976         #  @param theShape Block or a compound of blocks.
11977         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11978         #  @param theName Object name; when specified, this parameter is used
11979         #         for result publication in the study. Otherwise, if automatic
11980         #         publication is switched on, default value is used for result name.
11981         #
11982         #  @return New GEOM.GEOM_Object, containing the found face.
11983         #
11984         #  @ref swig_todo "Example"
11985         @ManageTransactions("BlocksOp")
11986         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11987             """
11988             Get a face of block, found in the given shape by two given edges.
11989
11990             Parameters:
11991                 theShape Block or a compound of blocks.
11992                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11993                 theName Object name; when specified, this parameter is used
11994                         for result publication in the study. Otherwise, if automatic
11995                         publication is switched on, default value is used for result name.
11996
11997             Returns:
11998                 New GEOM.GEOM_Object, containing the found face.
11999             """
12000             # Example: see GEOM_Spanner.py
12001             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12002             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12003             self._autoPublish(anObj, theName, "face")
12004             return anObj
12005
12006         ## Find a face, opposite to the given one in the given block.
12007         #  @param theBlock Must be a hexahedral solid.
12008         #  @param theFace Face of \a theBlock, opposite to the desired face.
12009         #  @param theName Object name; when specified, this parameter is used
12010         #         for result publication in the study. Otherwise, if automatic
12011         #         publication is switched on, default value is used for result name.
12012         #
12013         #  @return New GEOM.GEOM_Object, containing the found face.
12014         #
12015         #  @ref swig_GetOppositeFace "Example"
12016         @ManageTransactions("BlocksOp")
12017         def GetOppositeFace(self, theBlock, theFace, theName=None):
12018             """
12019             Find a face, opposite to the given one in the given block.
12020
12021             Parameters:
12022                 theBlock Must be a hexahedral solid.
12023                 theFace Face of theBlock, opposite to the desired face.
12024                 theName Object name; when specified, this parameter is used
12025                         for result publication in the study. Otherwise, if automatic
12026                         publication is switched on, default value is used for result name.
12027
12028             Returns:
12029                 New GEOM.GEOM_Object, containing the found face.
12030             """
12031             # Example: see GEOM_Spanner.py
12032             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12033             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12034             self._autoPublish(anObj, theName, "face")
12035             return anObj
12036
12037         ## Find a face of the given shape, which has minimal distance to the given point.
12038         #  @param theShape Block or a compound of blocks.
12039         #  @param thePoint Point, close to the desired face.
12040         #  @param theName Object name; when specified, this parameter is used
12041         #         for result publication in the study. Otherwise, if automatic
12042         #         publication is switched on, default value is used for result name.
12043         #
12044         #  @return New GEOM.GEOM_Object, containing the found face.
12045         #
12046         #  @ref swig_GetFaceNearPoint "Example"
12047         @ManageTransactions("BlocksOp")
12048         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12049             """
12050             Find a face of the given shape, which has minimal distance to the given point.
12051
12052             Parameters:
12053                 theShape Block or a compound of blocks.
12054                 thePoint Point, close to the desired face.
12055                 theName Object name; when specified, this parameter is used
12056                         for result publication in the study. Otherwise, if automatic
12057                         publication is switched on, default value is used for result name.
12058
12059             Returns:
12060                 New GEOM.GEOM_Object, containing the found face.
12061             """
12062             # Example: see GEOM_Spanner.py
12063             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12064             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12065             self._autoPublish(anObj, theName, "face")
12066             return anObj
12067
12068         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12069         #  @param theBlock Block or a compound of blocks.
12070         #  @param theVector Vector, close to the normale of the desired face.
12071         #  @param theName Object name; when specified, this parameter is used
12072         #         for result publication in the study. Otherwise, if automatic
12073         #         publication is switched on, default value is used for result name.
12074         #
12075         #  @return New GEOM.GEOM_Object, containing the found face.
12076         #
12077         #  @ref swig_todo "Example"
12078         @ManageTransactions("BlocksOp")
12079         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12080             """
12081             Find a face of block, whose outside normale has minimal angle with the given vector.
12082
12083             Parameters:
12084                 theBlock Block or a compound of blocks.
12085                 theVector Vector, close to the normale of the desired face.
12086                 theName Object name; when specified, this parameter is used
12087                         for result publication in the study. Otherwise, if automatic
12088                         publication is switched on, default value is used for result name.
12089
12090             Returns:
12091                 New GEOM.GEOM_Object, containing the found face.
12092             """
12093             # Example: see GEOM_Spanner.py
12094             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12095             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12096             self._autoPublish(anObj, theName, "face")
12097             return anObj
12098
12099         ## Find all sub-shapes of type \a theShapeType of the given shape,
12100         #  which have minimal distance to the given point.
12101         #  @param theShape Any shape.
12102         #  @param thePoint Point, close to the desired shape.
12103         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12104         #  @param theTolerance The tolerance for distances comparison. All shapes
12105         #                      with distances to the given point in interval
12106         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12107         #  @param theName Object name; when specified, this parameter is used
12108         #         for result publication in the study. Otherwise, if automatic
12109         #         publication is switched on, default value is used for result name.
12110         #
12111         #  @return New GEOM_Object, containing a group of all found shapes.
12112         #
12113         #  @ref swig_GetShapesNearPoint "Example"
12114         @ManageTransactions("BlocksOp")
12115         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12116             """
12117             Find all sub-shapes of type theShapeType of the given shape,
12118             which have minimal distance to the given point.
12119
12120             Parameters:
12121                 theShape Any shape.
12122                 thePoint Point, close to the desired shape.
12123                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12124                 theTolerance The tolerance for distances comparison. All shapes
12125                                 with distances to the given point in interval
12126                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12127                 theName Object name; when specified, this parameter is used
12128                         for result publication in the study. Otherwise, if automatic
12129                         publication is switched on, default value is used for result name.
12130
12131             Returns:
12132                 New GEOM_Object, containing a group of all found shapes.
12133             """
12134             # Example: see GEOM_TestOthers.py
12135             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12136             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12137             self._autoPublish(anObj, theName, "group")
12138             return anObj
12139
12140         # end of l3_blocks_op
12141         ## @}
12142
12143         ## @addtogroup l4_blocks_measure
12144         ## @{
12145
12146         ## Check, if the compound of blocks is given.
12147         #  To be considered as a compound of blocks, the
12148         #  given shape must satisfy the following conditions:
12149         #  - Each element of the compound should be a Block (6 faces).
12150         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12151         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12152         #       there are more than 4 edges in the only wire of a face,
12153         #       this face is considered to be quadrangle if it has 4 bounds
12154         #       (1 or more edge) of C1 continuity.
12155         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12156         #  - The compound should be connexe.
12157         #  - The glue between two quadrangle faces should be applied.
12158         #  @param theCompound The compound to check.
12159         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12160         #         taking into account C1 continuity.
12161         #  @param theAngTolerance the angular tolerance to check if two neighbor
12162         #         edges are codirectional in the common vertex with this
12163         #         tolerance. This parameter is used only if
12164         #         <VAR>theIsUseC1</VAR> is set to True.
12165         #  @return TRUE, if the given shape is a compound of blocks.
12166         #  If theCompound is not valid, prints all discovered errors.
12167         #
12168         #  @ref tui_check_compound_of_blocks_page "Example 1"
12169         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12170         @ManageTransactions("BlocksOp")
12171         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12172                                   theAngTolerance = 1.e-12):
12173             """
12174             Check, if the compound of blocks is given.
12175             To be considered as a compound of blocks, the
12176             given shape must satisfy the following conditions:
12177             - Each element of the compound should be a Block (6 faces).
12178             - Each face should be a quadrangle, i.e. it should have only 1 wire
12179                  with 4 edges. If theIsUseC1 is set to True and
12180                  there are more than 4 edges in the only wire of a face,
12181                  this face is considered to be quadrangle if it has 4 bounds
12182                  (1 or more edge) of C1 continuity.
12183             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12184             - The compound should be connexe.
12185             - The glue between two quadrangle faces should be applied.
12186
12187             Parameters:
12188                 theCompound The compound to check.
12189                 theIsUseC1 Flag to check if there are 4 bounds on a face
12190                            taking into account C1 continuity.
12191                 theAngTolerance the angular tolerance to check if two neighbor
12192                            edges are codirectional in the common vertex with this
12193                            tolerance. This parameter is used only if
12194                            theIsUseC1 is set to True.
12195
12196             Returns:
12197                 TRUE, if the given shape is a compound of blocks.
12198                 If theCompound is not valid, prints all discovered errors.
12199             """
12200             # Example: see GEOM_Spanner.py
12201             aTolerance = -1.0
12202             if theIsUseC1:
12203                 aTolerance = theAngTolerance
12204             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12205             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12206             if IsValid == 0:
12207                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12208                 print Descr
12209             return IsValid
12210
12211         ## Retrieve all non blocks solids and faces from \a theShape.
12212         #  @param theShape The shape to explore.
12213         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12214         #         taking into account C1 continuity.
12215         #  @param theAngTolerance the angular tolerance to check if two neighbor
12216         #         edges are codirectional in the common vertex with this
12217         #         tolerance. This parameter is used only if
12218         #         <VAR>theIsUseC1</VAR> is set to True.
12219         #  @param theName Object name; when specified, this parameter is used
12220         #         for result publication in the study. Otherwise, if automatic
12221         #         publication is switched on, default value is used for result name.
12222         #
12223         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12224         #          non block solids (= not 6 faces, or with 6 faces, but with the
12225         #          presence of non-quadrangular faces). The second object is a
12226         #          group of all non quadrangular faces (= faces with more then
12227         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12228         #          with 1 wire with not 4 edges that do not form 4 bounds of
12229         #          C1 continuity).
12230         #
12231         #  @ref tui_get_non_blocks_page "Example 1"
12232         #  \n @ref swig_GetNonBlocks "Example 2"
12233         @ManageTransactions("BlocksOp")
12234         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12235                           theAngTolerance = 1.e-12, theName=None):
12236             """
12237             Retrieve all non blocks solids and faces from theShape.
12238
12239             Parameters:
12240                 theShape The shape to explore.
12241                 theIsUseC1 Flag to check if there are 4 bounds on a face
12242                            taking into account C1 continuity.
12243                 theAngTolerance the angular tolerance to check if two neighbor
12244                            edges are codirectional in the common vertex with this
12245                            tolerance. This parameter is used only if
12246                            theIsUseC1 is set to True.
12247                 theName Object name; when specified, this parameter is used
12248                         for result publication in the study. Otherwise, if automatic
12249                         publication is switched on, default value is used for result name.
12250
12251             Returns:
12252                 A tuple of two GEOM_Objects. The first object is a group of all
12253                 non block solids (= not 6 faces, or with 6 faces, but with the
12254                 presence of non-quadrangular faces). The second object is a
12255                 group of all non quadrangular faces (= faces with more then
12256                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12257                 with 1 wire with not 4 edges that do not form 4 bounds of
12258                 C1 continuity).
12259
12260             Usage:
12261                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12262             """
12263             # Example: see GEOM_Spanner.py
12264             aTolerance = -1.0
12265             if theIsUseC1:
12266                 aTolerance = theAngTolerance
12267             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12268             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12269             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12270             return aTuple
12271
12272         ## Remove all seam and degenerated edges from \a theShape.
12273         #  Unite faces and edges, sharing one surface. It means that
12274         #  this faces must have references to one C++ surface object (handle).
12275         #  @param theShape The compound or single solid to remove irregular edges from.
12276         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12277         #         do not unite faces.
12278         #  @param theName Object name; when specified, this parameter is used
12279         #         for result publication in the study. Otherwise, if automatic
12280         #         publication is switched on, default value is used for result name.
12281         #
12282         #  @return Improved shape.
12283         #
12284         #  @ref swig_RemoveExtraEdges "Example"
12285         @ManageTransactions("BlocksOp")
12286         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12287             """
12288             Remove all seam and degenerated edges from theShape.
12289             Unite faces and edges, sharing one surface. It means that
12290             this faces must have references to one C++ surface object (handle).
12291
12292             Parameters:
12293                 theShape The compound or single solid to remove irregular edges from.
12294                 doUnionFaces If True, then unite faces. If False (the default value),
12295                              do not unite faces.
12296                 theName Object name; when specified, this parameter is used
12297                         for result publication in the study. Otherwise, if automatic
12298                         publication is switched on, default value is used for result name.
12299
12300             Returns:
12301                 Improved shape.
12302             """
12303             # Example: see GEOM_TestOthers.py
12304             nbFacesOptimum = -1 # -1 means do not unite faces
12305             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12306             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12307             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12308             self._autoPublish(anObj, theName, "removeExtraEdges")
12309             return anObj
12310
12311         ## Performs union faces of \a theShape
12312         #  Unite faces sharing one surface. It means that
12313         #  these faces must have references to one C++ surface object (handle).
12314         #  @param theShape The compound or single solid that contains faces
12315         #         to perform union.
12316         #  @param theName Object name; when specified, this parameter is used
12317         #         for result publication in the study. Otherwise, if automatic
12318         #         publication is switched on, default value is used for result name.
12319         #
12320         #  @return Improved shape.
12321         #
12322         #  @ref swig_UnionFaces "Example"
12323         @ManageTransactions("BlocksOp")
12324         def UnionFaces(self, theShape, theName=None):
12325             """
12326             Performs union faces of theShape.
12327             Unite faces sharing one surface. It means that
12328             these faces must have references to one C++ surface object (handle).
12329
12330             Parameters:
12331                 theShape The compound or single solid that contains faces
12332                          to perform union.
12333                 theName Object name; when specified, this parameter is used
12334                         for result publication in the study. Otherwise, if automatic
12335                         publication is switched on, default value is used for result name.
12336
12337             Returns:
12338                 Improved shape.
12339             """
12340             # Example: see GEOM_TestOthers.py
12341             anObj = self.BlocksOp.UnionFaces(theShape)
12342             RaiseIfFailed("UnionFaces", self.BlocksOp)
12343             self._autoPublish(anObj, theName, "unionFaces")
12344             return anObj
12345
12346         ## Check, if the given shape is a blocks compound.
12347         #  Fix all detected errors.
12348         #    \note Single block can be also fixed by this method.
12349         #  @param theShape The compound to check and improve.
12350         #  @param theName Object name; when specified, this parameter is used
12351         #         for result publication in the study. Otherwise, if automatic
12352         #         publication is switched on, default value is used for result name.
12353         #
12354         #  @return Improved compound.
12355         #
12356         #  @ref swig_CheckAndImprove "Example"
12357         @ManageTransactions("BlocksOp")
12358         def CheckAndImprove(self, theShape, theName=None):
12359             """
12360             Check, if the given shape is a blocks compound.
12361             Fix all detected errors.
12362
12363             Note:
12364                 Single block can be also fixed by this method.
12365
12366             Parameters:
12367                 theShape The compound to check and improve.
12368                 theName Object name; when specified, this parameter is used
12369                         for result publication in the study. Otherwise, if automatic
12370                         publication is switched on, default value is used for result name.
12371
12372             Returns:
12373                 Improved compound.
12374             """
12375             # Example: see GEOM_TestOthers.py
12376             anObj = self.BlocksOp.CheckAndImprove(theShape)
12377             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12378             self._autoPublish(anObj, theName, "improved")
12379             return anObj
12380
12381         # end of l4_blocks_measure
12382         ## @}
12383
12384         ## @addtogroup l3_blocks_op
12385         ## @{
12386
12387         ## Get all the blocks, contained in the given compound.
12388         #  @param theCompound The compound to explode.
12389         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12390         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12391         #  @param theName Object name; when specified, this parameter is used
12392         #         for result publication in the study. Otherwise, if automatic
12393         #         publication is switched on, default value is used for result name.
12394         #
12395         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12396         #
12397         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12398         #
12399         #  @ref tui_explode_on_blocks "Example 1"
12400         #  \n @ref swig_MakeBlockExplode "Example 2"
12401         @ManageTransactions("BlocksOp")
12402         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12403             """
12404             Get all the blocks, contained in the given compound.
12405
12406             Parameters:
12407                 theCompound The compound to explode.
12408                 theMinNbFaces If solid has lower number of faces, it is not a block.
12409                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12410                 theName Object name; when specified, this parameter is used
12411                         for result publication in the study. Otherwise, if automatic
12412                         publication is switched on, default value is used for result name.
12413
12414             Note:
12415                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12416
12417             Returns:
12418                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12419             """
12420             # Example: see GEOM_TestOthers.py
12421             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12422             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12423             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12424             for anObj in aList:
12425                 anObj.SetParameters(Parameters)
12426                 pass
12427             self._autoPublish(aList, theName, "block")
12428             return aList
12429
12430         ## Find block, containing the given point inside its volume or on boundary.
12431         #  @param theCompound Compound, to find block in.
12432         #  @param thePoint Point, close to the desired block. If the point lays on
12433         #         boundary between some blocks, we return block with nearest center.
12434         #  @param theName Object name; when specified, this parameter is used
12435         #         for result publication in the study. Otherwise, if automatic
12436         #         publication is switched on, default value is used for result name.
12437         #
12438         #  @return New GEOM.GEOM_Object, containing the found block.
12439         #
12440         #  @ref swig_todo "Example"
12441         @ManageTransactions("BlocksOp")
12442         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12443             """
12444             Find block, containing the given point inside its volume or on boundary.
12445
12446             Parameters:
12447                 theCompound Compound, to find block in.
12448                 thePoint Point, close to the desired block. If the point lays on
12449                          boundary between some blocks, we return block with nearest center.
12450                 theName Object name; when specified, this parameter is used
12451                         for result publication in the study. Otherwise, if automatic
12452                         publication is switched on, default value is used for result name.
12453
12454             Returns:
12455                 New GEOM.GEOM_Object, containing the found block.
12456             """
12457             # Example: see GEOM_Spanner.py
12458             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12459             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12460             self._autoPublish(anObj, theName, "block")
12461             return anObj
12462
12463         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12464         #  @param theCompound Compound, to find block in.
12465         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12466         #  @param theName Object name; when specified, this parameter is used
12467         #         for result publication in the study. Otherwise, if automatic
12468         #         publication is switched on, default value is used for result name.
12469         #
12470         #  @return New GEOM.GEOM_Object, containing the found block.
12471         #
12472         #  @ref swig_GetBlockByParts "Example"
12473         @ManageTransactions("BlocksOp")
12474         def GetBlockByParts(self, theCompound, theParts, theName=None):
12475             """
12476              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12477
12478              Parameters:
12479                 theCompound Compound, to find block in.
12480                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
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                 New GEOM_Object, containing the found block.
12487             """
12488             # Example: see GEOM_TestOthers.py
12489             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12490             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12491             self._autoPublish(anObj, theName, "block")
12492             return anObj
12493
12494         ## Return all blocks, containing all the elements, passed as the parts.
12495         #  @param theCompound Compound, to find blocks in.
12496         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12497         #  @param theName Object name; when specified, this parameter is used
12498         #         for result publication in the study. Otherwise, if automatic
12499         #         publication is switched on, default value is used for result name.
12500         #
12501         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12502         #
12503         #  @ref swig_todo "Example"
12504         @ManageTransactions("BlocksOp")
12505         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12506             """
12507             Return all blocks, containing all the elements, passed as the parts.
12508
12509             Parameters:
12510                 theCompound Compound, to find blocks in.
12511                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12512                 theName Object name; when specified, this parameter is used
12513                         for result publication in the study. Otherwise, if automatic
12514                         publication is switched on, default value is used for result name.
12515
12516             Returns:
12517                 List of GEOM.GEOM_Object, containing the found blocks.
12518             """
12519             # Example: see GEOM_Spanner.py
12520             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12521             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12522             self._autoPublish(aList, theName, "block")
12523             return aList
12524
12525         ## Multi-transformate block and glue the result.
12526         #  Transformation is defined so, as to superpose direction faces.
12527         #  @param Block Hexahedral solid to be multi-transformed.
12528         #  @param DirFace1 ID of First direction face.
12529         #  @param DirFace2 ID of Second direction face.
12530         #  @param NbTimes Quantity of transformations to be done.
12531         #  @param theName Object name; when specified, this parameter is used
12532         #         for result publication in the study. Otherwise, if automatic
12533         #         publication is switched on, default value is used for result name.
12534         #
12535         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12536         #
12537         #  @return New GEOM.GEOM_Object, containing the result shape.
12538         #
12539         #  @ref tui_multi_transformation "Example"
12540         @ManageTransactions("BlocksOp")
12541         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12542             """
12543             Multi-transformate block and glue the result.
12544             Transformation is defined so, as to superpose direction faces.
12545
12546             Parameters:
12547                 Block Hexahedral solid to be multi-transformed.
12548                 DirFace1 ID of First direction face.
12549                 DirFace2 ID of Second direction face.
12550                 NbTimes Quantity of transformations to be done.
12551                 theName Object name; when specified, this parameter is used
12552                         for result publication in the study. Otherwise, if automatic
12553                         publication is switched on, default value is used for result name.
12554
12555             Note:
12556                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12557
12558             Returns:
12559                 New GEOM.GEOM_Object, containing the result shape.
12560             """
12561             # Example: see GEOM_Spanner.py
12562             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12563             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12564             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12565             anObj.SetParameters(Parameters)
12566             self._autoPublish(anObj, theName, "transformed")
12567             return anObj
12568
12569         ## Multi-transformate block and glue the result.
12570         #  @param Block Hexahedral solid to be multi-transformed.
12571         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12572         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12573         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12574         #  @param theName Object name; when specified, this parameter is used
12575         #         for result publication in the study. Otherwise, if automatic
12576         #         publication is switched on, default value is used for result name.
12577         #
12578         #  @return New GEOM.GEOM_Object, containing the result shape.
12579         #
12580         #  @ref tui_multi_transformation "Example"
12581         @ManageTransactions("BlocksOp")
12582         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12583                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12584             """
12585             Multi-transformate block and glue the result.
12586
12587             Parameters:
12588                 Block Hexahedral solid to be multi-transformed.
12589                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12590                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12591                 NbTimesU,NbTimesV Quantity of transformations to be done.
12592                 theName Object name; when specified, this parameter is used
12593                         for result publication in the study. Otherwise, if automatic
12594                         publication is switched on, default value is used for result name.
12595
12596             Returns:
12597                 New GEOM.GEOM_Object, containing the result shape.
12598             """
12599             # Example: see GEOM_Spanner.py
12600             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12601               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12602             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12603                                                             DirFace1V, DirFace2V, NbTimesV)
12604             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12605             anObj.SetParameters(Parameters)
12606             self._autoPublish(anObj, theName, "transformed")
12607             return anObj
12608
12609         ## Build all possible propagation groups.
12610         #  Propagation group is a set of all edges, opposite to one (main)
12611         #  edge of this group directly or through other opposite edges.
12612         #  Notion of Opposite Edge make sence only on quadrangle face.
12613         #  @param theShape Shape to build propagation groups on.
12614         #  @param theName Object name; when specified, this parameter is used
12615         #         for result publication in the study. Otherwise, if automatic
12616         #         publication is switched on, default value is used for result name.
12617         #
12618         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12619         #
12620         #  @ref swig_Propagate "Example"
12621         @ManageTransactions("BlocksOp")
12622         def Propagate(self, theShape, theName=None):
12623             """
12624             Build all possible propagation groups.
12625             Propagation group is a set of all edges, opposite to one (main)
12626             edge of this group directly or through other opposite edges.
12627             Notion of Opposite Edge make sence only on quadrangle face.
12628
12629             Parameters:
12630                 theShape Shape to build propagation groups on.
12631                 theName Object name; when specified, this parameter is used
12632                         for result publication in the study. Otherwise, if automatic
12633                         publication is switched on, default value is used for result name.
12634
12635             Returns:
12636                 List of GEOM.GEOM_Object, each of them is a propagation group.
12637             """
12638             # Example: see GEOM_TestOthers.py
12639             listChains = self.BlocksOp.Propagate(theShape)
12640             RaiseIfFailed("Propagate", self.BlocksOp)
12641             self._autoPublish(listChains, theName, "propagate")
12642             return listChains
12643
12644         # end of l3_blocks_op
12645         ## @}
12646
12647         ## @addtogroup l3_groups
12648         ## @{
12649
12650         ## Creates a new group which will store sub-shapes of theMainShape
12651         #  @param theMainShape is a GEOM object on which the group is selected
12652         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12653         #  @param theName Object name; when specified, this parameter is used
12654         #         for result publication in the study. Otherwise, if automatic
12655         #         publication is switched on, default value is used for result name.
12656         #
12657         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12658         #
12659         #  @ref tui_working_with_groups_page "Example 1"
12660         #  \n @ref swig_CreateGroup "Example 2"
12661         @ManageTransactions("GroupOp")
12662         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12663             """
12664             Creates a new group which will store sub-shapes of theMainShape
12665
12666             Parameters:
12667                theMainShape is a GEOM object on which the group is selected
12668                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12669                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12670                 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             Returns:
12675                a newly created GEOM group
12676
12677             Example of usage:
12678                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12679
12680             """
12681             # Example: see GEOM_TestOthers.py
12682             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12683             RaiseIfFailed("CreateGroup", self.GroupOp)
12684             self._autoPublish(anObj, theName, "group")
12685             return anObj
12686
12687         ## Adds a sub-object with ID theSubShapeId to the group
12688         #  @param theGroup is a GEOM group to which the new sub-shape is added
12689         #  @param theSubShapeID is a sub-shape ID in the main object.
12690         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12691         #
12692         #  @ref tui_working_with_groups_page "Example"
12693         @ManageTransactions("GroupOp")
12694         def AddObject(self,theGroup, theSubShapeID):
12695             """
12696             Adds a sub-object with ID theSubShapeId to the group
12697
12698             Parameters:
12699                 theGroup       is a GEOM group to which the new sub-shape is added
12700                 theSubShapeID  is a sub-shape ID in the main object.
12701
12702             Note:
12703                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12704             """
12705             # Example: see GEOM_TestOthers.py
12706             self.GroupOp.AddObject(theGroup, theSubShapeID)
12707             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12708                 RaiseIfFailed("AddObject", self.GroupOp)
12709                 pass
12710             pass
12711
12712         ## Removes a sub-object with ID \a theSubShapeId from the group
12713         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12714         #  @param theSubShapeID is a sub-shape ID in the main object.
12715         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12716         #
12717         #  @ref tui_working_with_groups_page "Example"
12718         @ManageTransactions("GroupOp")
12719         def RemoveObject(self,theGroup, theSubShapeID):
12720             """
12721             Removes a sub-object with ID theSubShapeId from the group
12722
12723             Parameters:
12724                 theGroup is a GEOM group from which the new sub-shape is removed
12725                 theSubShapeID is a sub-shape ID in the main object.
12726
12727             Note:
12728                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12729             """
12730             # Example: see GEOM_TestOthers.py
12731             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12732             RaiseIfFailed("RemoveObject", self.GroupOp)
12733             pass
12734
12735         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12736         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12737         #  @param theSubShapes is a list of sub-shapes to be added.
12738         #
12739         #  @ref tui_working_with_groups_page "Example"
12740         @ManageTransactions("GroupOp")
12741         def UnionList (self,theGroup, theSubShapes):
12742             """
12743             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12744
12745             Parameters:
12746                 theGroup is a GEOM group to which the new sub-shapes are added.
12747                 theSubShapes is a list of sub-shapes to be added.
12748             """
12749             # Example: see GEOM_TestOthers.py
12750             self.GroupOp.UnionList(theGroup, theSubShapes)
12751             RaiseIfFailed("UnionList", self.GroupOp)
12752             pass
12753
12754         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12755         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12756         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12757         #
12758         #  @ref swig_UnionIDs "Example"
12759         @ManageTransactions("GroupOp")
12760         def UnionIDs(self,theGroup, theSubShapes):
12761             """
12762             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12763
12764             Parameters:
12765                 theGroup is a GEOM group to which the new sub-shapes are added.
12766                 theSubShapes is a list of indices of sub-shapes to be added.
12767             """
12768             # Example: see GEOM_TestOthers.py
12769             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12770             RaiseIfFailed("UnionIDs", self.GroupOp)
12771             pass
12772
12773         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12774         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12775         #  @param theSubShapes is a list of sub-shapes to be removed.
12776         #
12777         #  @ref tui_working_with_groups_page "Example"
12778         @ManageTransactions("GroupOp")
12779         def DifferenceList (self,theGroup, theSubShapes):
12780             """
12781             Removes from the group all the given shapes. No errors, if some shapes are not included.
12782
12783             Parameters:
12784                 theGroup is a GEOM group from which the sub-shapes are removed.
12785                 theSubShapes is a list of sub-shapes to be removed.
12786             """
12787             # Example: see GEOM_TestOthers.py
12788             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12789             RaiseIfFailed("DifferenceList", self.GroupOp)
12790             pass
12791
12792         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12793         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12794         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12795         #
12796         #  @ref swig_DifferenceIDs "Example"
12797         @ManageTransactions("GroupOp")
12798         def DifferenceIDs(self,theGroup, theSubShapes):
12799             """
12800             Removes from the group all the given shapes. No errors, if some shapes are not included.
12801
12802             Parameters:
12803                 theGroup is a GEOM group from which the sub-shapes are removed.
12804                 theSubShapes is a list of indices of sub-shapes to be removed.
12805             """
12806             # Example: see GEOM_TestOthers.py
12807             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12808             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12809             pass
12810
12811         ## Union of two groups.
12812         #  New group is created. It will contain all entities
12813         #  which are present in groups theGroup1 and theGroup2.
12814         #  @param theGroup1, theGroup2 are the initial GEOM groups
12815         #                              to create the united group from.
12816         #  @param theName Object name; when specified, this parameter is used
12817         #         for result publication in the study. Otherwise, if automatic
12818         #         publication is switched on, default value is used for result name.
12819         #
12820         #  @return a newly created GEOM group.
12821         #
12822         #  @ref tui_union_groups_anchor "Example"
12823         @ManageTransactions("GroupOp")
12824         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12825             """
12826             Union of two groups.
12827             New group is created. It will contain all entities
12828             which are present in groups theGroup1 and theGroup2.
12829
12830             Parameters:
12831                 theGroup1, theGroup2 are the initial GEOM groups
12832                                      to create the united group from.
12833                 theName Object name; when specified, this parameter is used
12834                         for result publication in the study. Otherwise, if automatic
12835                         publication is switched on, default value is used for result name.
12836
12837             Returns:
12838                 a newly created GEOM group.
12839             """
12840             # Example: see GEOM_TestOthers.py
12841             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12842             RaiseIfFailed("UnionGroups", self.GroupOp)
12843             self._autoPublish(aGroup, theName, "group")
12844             return aGroup
12845
12846         ## Intersection of two groups.
12847         #  New group is created. It will contain only those entities
12848         #  which are present in both groups theGroup1 and theGroup2.
12849         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12850         #  @param theName Object name; when specified, this parameter is used
12851         #         for result publication in the study. Otherwise, if automatic
12852         #         publication is switched on, default value is used for result name.
12853         #
12854         #  @return a newly created GEOM group.
12855         #
12856         #  @ref tui_intersect_groups_anchor "Example"
12857         @ManageTransactions("GroupOp")
12858         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12859             """
12860             Intersection of two groups.
12861             New group is created. It will contain only those entities
12862             which are present in both groups theGroup1 and theGroup2.
12863
12864             Parameters:
12865                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12866                 theName Object name; when specified, this parameter is used
12867                         for result publication in the study. Otherwise, if automatic
12868                         publication is switched on, default value is used for result name.
12869
12870             Returns:
12871                 a newly created GEOM group.
12872             """
12873             # Example: see GEOM_TestOthers.py
12874             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12875             RaiseIfFailed("IntersectGroups", self.GroupOp)
12876             self._autoPublish(aGroup, theName, "group")
12877             return aGroup
12878
12879         ## Cut of two groups.
12880         #  New group is created. It will contain entities which are
12881         #  present in group theGroup1 but are not present in group theGroup2.
12882         #  @param theGroup1 is a GEOM group to include elements of.
12883         #  @param theGroup2 is a GEOM group to exclude elements of.
12884         #  @param theName Object name; when specified, this parameter is used
12885         #         for result publication in the study. Otherwise, if automatic
12886         #         publication is switched on, default value is used for result name.
12887         #
12888         #  @return a newly created GEOM group.
12889         #
12890         #  @ref tui_cut_groups_anchor "Example"
12891         @ManageTransactions("GroupOp")
12892         def CutGroups (self, theGroup1, theGroup2, theName=None):
12893             """
12894             Cut of two groups.
12895             New group is created. It will contain entities which are
12896             present in group theGroup1 but are not present in group theGroup2.
12897
12898             Parameters:
12899                 theGroup1 is a GEOM group to include elements of.
12900                 theGroup2 is a GEOM group to exclude elements of.
12901                 theName Object name; when specified, this parameter is used
12902                         for result publication in the study. Otherwise, if automatic
12903                         publication is switched on, default value is used for result name.
12904
12905             Returns:
12906                 a newly created GEOM group.
12907             """
12908             # Example: see GEOM_TestOthers.py
12909             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12910             RaiseIfFailed("CutGroups", self.GroupOp)
12911             self._autoPublish(aGroup, theName, "group")
12912             return aGroup
12913
12914         ## Union of list of groups.
12915         #  New group is created. It will contain all entities that are
12916         #  present in groups listed in theGList.
12917         #  @param theGList is a list of GEOM groups to create the united group from.
12918         #  @param theName Object name; when specified, this parameter is used
12919         #         for result publication in the study. Otherwise, if automatic
12920         #         publication is switched on, default value is used for result name.
12921         #
12922         #  @return a newly created GEOM group.
12923         #
12924         #  @ref tui_union_groups_anchor "Example"
12925         @ManageTransactions("GroupOp")
12926         def UnionListOfGroups (self, theGList, theName=None):
12927             """
12928             Union of list of groups.
12929             New group is created. It will contain all entities that are
12930             present in groups listed in theGList.
12931
12932             Parameters:
12933                 theGList is a list of GEOM groups to create the united group from.
12934                 theName Object name; when specified, this parameter is used
12935                         for result publication in the study. Otherwise, if automatic
12936                         publication is switched on, default value is used for result name.
12937
12938             Returns:
12939                 a newly created GEOM group.
12940             """
12941             # Example: see GEOM_TestOthers.py
12942             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12943             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12944             self._autoPublish(aGroup, theName, "group")
12945             return aGroup
12946
12947         ## Cut of lists of groups.
12948         #  New group is created. It will contain only entities
12949         #  which are present in groups listed in theGList.
12950         #  @param theGList is a list of GEOM groups to include elements of.
12951         #  @param theName Object name; when specified, this parameter is used
12952         #         for result publication in the study. Otherwise, if automatic
12953         #         publication is switched on, default value is used for result name.
12954         #
12955         #  @return a newly created GEOM group.
12956         #
12957         #  @ref tui_intersect_groups_anchor "Example"
12958         @ManageTransactions("GroupOp")
12959         def IntersectListOfGroups (self, theGList, theName=None):
12960             """
12961             Cut of lists of groups.
12962             New group is created. It will contain only entities
12963             which are present in groups listed in theGList.
12964
12965             Parameters:
12966                 theGList is a list of GEOM groups to include elements of.
12967                 theName Object name; when specified, this parameter is used
12968                         for result publication in the study. Otherwise, if automatic
12969                         publication is switched on, default value is used for result name.
12970
12971             Returns:
12972                 a newly created GEOM group.
12973             """
12974             # Example: see GEOM_TestOthers.py
12975             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12976             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12977             self._autoPublish(aGroup, theName, "group")
12978             return aGroup
12979
12980         ## Cut of lists of groups.
12981         #  New group is created. It will contain only entities
12982         #  which are present in groups listed in theGList1 but
12983         #  are not present in groups from theGList2.
12984         #  @param theGList1 is a list of GEOM groups to include elements of.
12985         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12986         #  @param theName Object name; when specified, this parameter is used
12987         #         for result publication in the study. Otherwise, if automatic
12988         #         publication is switched on, default value is used for result name.
12989         #
12990         #  @return a newly created GEOM group.
12991         #
12992         #  @ref tui_cut_groups_anchor "Example"
12993         @ManageTransactions("GroupOp")
12994         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12995             """
12996             Cut of lists of groups.
12997             New group is created. It will contain only entities
12998             which are present in groups listed in theGList1 but
12999             are not present in groups from theGList2.
13000
13001             Parameters:
13002                 theGList1 is a list of GEOM groups to include elements of.
13003                 theGList2 is a list of GEOM groups to exclude elements of.
13004                 theName Object name; when specified, this parameter is used
13005                         for result publication in the study. Otherwise, if automatic
13006                         publication is switched on, default value is used for result name.
13007
13008             Returns:
13009                 a newly created GEOM group.
13010             """
13011             # Example: see GEOM_TestOthers.py
13012             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13013             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13014             self._autoPublish(aGroup, theName, "group")
13015             return aGroup
13016
13017         ## Returns a list of sub-objects ID stored in the group
13018         #  @param theGroup is a GEOM group for which a list of IDs is requested
13019         #
13020         #  @ref swig_GetObjectIDs "Example"
13021         @ManageTransactions("GroupOp")
13022         def GetObjectIDs(self,theGroup):
13023             """
13024             Returns a list of sub-objects ID stored in the group
13025
13026             Parameters:
13027                 theGroup is a GEOM group for which a list of IDs is requested
13028             """
13029             # Example: see GEOM_TestOthers.py
13030             ListIDs = self.GroupOp.GetObjects(theGroup)
13031             RaiseIfFailed("GetObjects", self.GroupOp)
13032             return ListIDs
13033
13034         ## Returns a type of sub-objects stored in the group
13035         #  @param theGroup is a GEOM group which type is returned.
13036         #
13037         #  @ref swig_GetType "Example"
13038         @ManageTransactions("GroupOp")
13039         def GetType(self,theGroup):
13040             """
13041             Returns a type of sub-objects stored in the group
13042
13043             Parameters:
13044                 theGroup is a GEOM group which type is returned.
13045             """
13046             # Example: see GEOM_TestOthers.py
13047             aType = self.GroupOp.GetType(theGroup)
13048             RaiseIfFailed("GetType", self.GroupOp)
13049             return aType
13050
13051         ## Convert a type of geom object from id to string value
13052         #  @param theId is a GEOM obect type id.
13053         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13054         #  @ref swig_GetType "Example"
13055         def ShapeIdToType(self, theId):
13056             """
13057             Convert a type of geom object from id to string value
13058
13059             Parameters:
13060                 theId is a GEOM obect type id.
13061
13062             Returns:
13063                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13064             """
13065             if theId == 0:
13066                 return "COPY"
13067             if theId == 1:
13068                 return "IMPORT"
13069             if theId == 2:
13070                 return "POINT"
13071             if theId == 3:
13072                 return "VECTOR"
13073             if theId == 4:
13074                 return "PLANE"
13075             if theId == 5:
13076                 return "LINE"
13077             if theId == 6:
13078                 return "TORUS"
13079             if theId == 7:
13080                 return "BOX"
13081             if theId == 8:
13082                 return "CYLINDER"
13083             if theId == 9:
13084                 return "CONE"
13085             if theId == 10:
13086                 return "SPHERE"
13087             if theId == 11:
13088                 return "PRISM"
13089             if theId == 12:
13090                 return "REVOLUTION"
13091             if theId == 13:
13092                 return "BOOLEAN"
13093             if theId == 14:
13094                 return "PARTITION"
13095             if theId == 15:
13096                 return "POLYLINE"
13097             if theId == 16:
13098                 return "CIRCLE"
13099             if theId == 17:
13100                 return "SPLINE"
13101             if theId == 18:
13102                 return "ELLIPSE"
13103             if theId == 19:
13104                 return "CIRC_ARC"
13105             if theId == 20:
13106                 return "FILLET"
13107             if theId == 21:
13108                 return "CHAMFER"
13109             if theId == 22:
13110                 return "EDGE"
13111             if theId == 23:
13112                 return "WIRE"
13113             if theId == 24:
13114                 return "FACE"
13115             if theId == 25:
13116                 return "SHELL"
13117             if theId == 26:
13118                 return "SOLID"
13119             if theId == 27:
13120                 return "COMPOUND"
13121             if theId == 28:
13122                 return "SUBSHAPE"
13123             if theId == 29:
13124                 return "PIPE"
13125             if theId == 30:
13126                 return "ARCHIMEDE"
13127             if theId == 31:
13128                 return "FILLING"
13129             if theId == 32:
13130                 return "EXPLODE"
13131             if theId == 33:
13132                 return "GLUED"
13133             if theId == 34:
13134                 return "SKETCHER"
13135             if theId == 35:
13136                 return "CDG"
13137             if theId == 36:
13138                 return "FREE_BOUNDS"
13139             if theId == 37:
13140                 return "GROUP"
13141             if theId == 38:
13142                 return "BLOCK"
13143             if theId == 39:
13144                 return "MARKER"
13145             if theId == 40:
13146                 return "THRUSECTIONS"
13147             if theId == 41:
13148                 return "COMPOUNDFILTER"
13149             if theId == 42:
13150                 return "SHAPES_ON_SHAPE"
13151             if theId == 43:
13152                 return "ELLIPSE_ARC"
13153             if theId == 44:
13154                 return "3DSKETCHER"
13155             if theId == 45:
13156                 return "FILLET_2D"
13157             if theId == 46:
13158                 return "FILLET_1D"
13159             if theId == 201:
13160                 return "PIPETSHAPE"
13161             return "Shape Id not exist."
13162
13163         ## Returns a main shape associated with the group
13164         #  @param theGroup is a GEOM group for which a main shape object is requested
13165         #  @return a GEOM object which is a main shape for theGroup
13166         #
13167         #  @ref swig_GetMainShape "Example"
13168         @ManageTransactions("GroupOp")
13169         def GetMainShape(self,theGroup):
13170             """
13171             Returns a main shape associated with the group
13172
13173             Parameters:
13174                 theGroup is a GEOM group for which a main shape object is requested
13175
13176             Returns:
13177                 a GEOM object which is a main shape for theGroup
13178
13179             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13180             """
13181             # Example: see GEOM_TestOthers.py
13182             anObj = self.GroupOp.GetMainShape(theGroup)
13183             RaiseIfFailed("GetMainShape", self.GroupOp)
13184             return anObj
13185
13186         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13187         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13188         #  @param theShape given shape (see GEOM.GEOM_Object)
13189         #  @param min_length minimum length of edges of theShape
13190         #  @param max_length maximum length of edges of theShape
13191         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13192         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13193         #  @param theName Object name; when specified, this parameter is used
13194         #         for result publication in the study. Otherwise, if automatic
13195         #         publication is switched on, default value is used for result name.
13196         #
13197         #  @return a newly created GEOM group of edges
13198         #
13199         #  @@ref swig_todo "Example"
13200         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13201             """
13202             Create group of edges of theShape, whose length is in range [min_length, max_length].
13203             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13204
13205             Parameters:
13206                 theShape given shape
13207                 min_length minimum length of edges of theShape
13208                 max_length maximum length of edges of theShape
13209                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13210                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13211                 theName Object name; when specified, this parameter is used
13212                         for result publication in the study. Otherwise, if automatic
13213                         publication is switched on, default value is used for result name.
13214
13215              Returns:
13216                 a newly created GEOM group of edges.
13217             """
13218             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13219             edges_in_range = []
13220             for edge in edges:
13221                 Props = self.BasicProperties(edge)
13222                 if min_length <= Props[0] and Props[0] <= max_length:
13223                     if (not include_min) and (min_length == Props[0]):
13224                         skip = 1
13225                     else:
13226                         if (not include_max) and (Props[0] == max_length):
13227                             skip = 1
13228                         else:
13229                             edges_in_range.append(edge)
13230
13231             if len(edges_in_range) <= 0:
13232                 print "No edges found by given criteria"
13233                 return None
13234
13235             # note: auto-publishing is done in self.CreateGroup()
13236             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13237             self.UnionList(group_edges, edges_in_range)
13238
13239             return group_edges
13240
13241         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13242         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13243         #  @param min_length minimum length of edges of selected shape
13244         #  @param max_length maximum length of edges of selected shape
13245         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13246         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13247         #  @return a newly created GEOM group of edges
13248         #  @ref swig_todo "Example"
13249         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13250             """
13251             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13252             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13253
13254             Parameters:
13255                 min_length minimum length of edges of selected shape
13256                 max_length maximum length of edges of selected shape
13257                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13258                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13259
13260              Returns:
13261                 a newly created GEOM group of edges.
13262             """
13263             nb_selected = sg.SelectedCount()
13264             if nb_selected < 1:
13265                 print "Select a shape before calling this function, please."
13266                 return 0
13267             if nb_selected > 1:
13268                 print "Only one shape must be selected"
13269                 return 0
13270
13271             id_shape = sg.getSelected(0)
13272             shape = IDToObject( id_shape )
13273
13274             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13275
13276             left_str  = " < "
13277             right_str = " < "
13278             if include_min: left_str  = " <= "
13279             if include_max: right_str  = " <= "
13280
13281             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
13282                                     + left_str + "length" + right_str + `max_length`)
13283
13284             sg.updateObjBrowser(1)
13285
13286             return group_edges
13287
13288         # end of l3_groups
13289         ## @}
13290
13291         #@@ insert new functions before this line @@ do not remove this line @@#
13292
13293         ## Create a copy of the given object
13294         #
13295         #  @param theOriginal geometry object for copy
13296         #  @param theName Object name; when specified, this parameter is used
13297         #         for result publication in the study. Otherwise, if automatic
13298         #         publication is switched on, default value is used for result name.
13299         #
13300         #  @return New GEOM_Object, containing the copied shape.
13301         #
13302         #  @ingroup l1_geomBuilder_auxiliary
13303         #  @ref swig_MakeCopy "Example"
13304         @ManageTransactions("InsertOp")
13305         def MakeCopy(self, theOriginal, theName=None):
13306             """
13307             Create a copy of the given object
13308
13309             Parameters:
13310                 theOriginal geometry object for copy
13311                 theName Object name; when specified, this parameter is used
13312                         for result publication in the study. Otherwise, if automatic
13313                         publication is switched on, default value is used for result name.
13314
13315             Returns:
13316                 New GEOM_Object, containing the copied shape.
13317
13318             Example of usage: Copy = geompy.MakeCopy(Box)
13319             """
13320             # Example: see GEOM_TestAll.py
13321             anObj = self.InsertOp.MakeCopy(theOriginal)
13322             RaiseIfFailed("MakeCopy", self.InsertOp)
13323             self._autoPublish(anObj, theName, "copy")
13324             return anObj
13325
13326         ## Add Path to load python scripts from
13327         #  @param Path a path to load python scripts from
13328         #  @ingroup l1_geomBuilder_auxiliary
13329         def addPath(self,Path):
13330             """
13331             Add Path to load python scripts from
13332
13333             Parameters:
13334                 Path a path to load python scripts from
13335             """
13336             if (sys.path.count(Path) < 1):
13337                 sys.path.append(Path)
13338                 pass
13339             pass
13340
13341         ## Load marker texture from the file
13342         #  @param Path a path to the texture file
13343         #  @return unique texture identifier
13344         #  @ingroup l1_geomBuilder_auxiliary
13345         @ManageTransactions("InsertOp")
13346         def LoadTexture(self, Path):
13347             """
13348             Load marker texture from the file
13349
13350             Parameters:
13351                 Path a path to the texture file
13352
13353             Returns:
13354                 unique texture identifier
13355             """
13356             # Example: see GEOM_TestAll.py
13357             ID = self.InsertOp.LoadTexture(Path)
13358             RaiseIfFailed("LoadTexture", self.InsertOp)
13359             return ID
13360
13361         ## Get internal name of the object based on its study entry
13362         #  @note This method does not provide an unique identifier of the geometry object.
13363         #  @note This is internal function of GEOM component, though it can be used outside it for
13364         #  appropriate reason (e.g. for identification of geometry object).
13365         #  @param obj geometry object
13366         #  @return unique object identifier
13367         #  @ingroup l1_geomBuilder_auxiliary
13368         def getObjectID(self, obj):
13369             """
13370             Get internal name of the object based on its study entry.
13371             Note: this method does not provide an unique identifier of the geometry object.
13372             It is an internal function of GEOM component, though it can be used outside GEOM for
13373             appropriate reason (e.g. for identification of geometry object).
13374
13375             Parameters:
13376                 obj geometry object
13377
13378             Returns:
13379                 unique object identifier
13380             """
13381             ID = ""
13382             entry = salome.ObjectToID(obj)
13383             if entry is not None:
13384                 lst = entry.split(":")
13385                 if len(lst) > 0:
13386                     ID = lst[-1] # -1 means last item in the list
13387                     return "GEOM_" + ID
13388             return ID
13389
13390
13391
13392         ## Add marker texture. @a Width and @a Height parameters
13393         #  specify width and height of the texture in pixels.
13394         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13395         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13396         #  parameter should be unpacked string, in which '1' symbols represent opaque
13397         #  pixels and '0' represent transparent pixels of the texture bitmap.
13398         #
13399         #  @param Width texture width in pixels
13400         #  @param Height texture height in pixels
13401         #  @param Texture texture data
13402         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13403         #  @return unique texture identifier
13404         #  @ingroup l1_geomBuilder_auxiliary
13405         @ManageTransactions("InsertOp")
13406         def AddTexture(self, Width, Height, Texture, RowData=False):
13407             """
13408             Add marker texture. Width and Height parameters
13409             specify width and height of the texture in pixels.
13410             If RowData is True, Texture parameter should represent texture data
13411             packed into the byte array. If RowData is False (default), Texture
13412             parameter should be unpacked string, in which '1' symbols represent opaque
13413             pixels and '0' represent transparent pixels of the texture bitmap.
13414
13415             Parameters:
13416                 Width texture width in pixels
13417                 Height texture height in pixels
13418                 Texture texture data
13419                 RowData if True, Texture data are packed in the byte stream
13420
13421             Returns:
13422                 return unique texture identifier
13423             """
13424             if not RowData: Texture = PackData(Texture)
13425             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13426             RaiseIfFailed("AddTexture", self.InsertOp)
13427             return ID
13428
13429         ## Transfer not topological data from one GEOM object to another.
13430         #
13431         #  @param theObjectFrom the source object of non-topological data
13432         #  @param theObjectTo the destination object of non-topological data
13433         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13434         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13435         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13436         #         Other values of GEOM.find_shape_method are not supported.
13437         #
13438         #  @return True in case of success; False otherwise.
13439         #
13440         #  @ingroup l1_geomBuilder_auxiliary
13441         #
13442         #  @ref swig_TransferData "Example"
13443         @ManageTransactions("InsertOp")
13444         def TransferData(self, theObjectFrom, theObjectTo,
13445                          theFindMethod=GEOM.FSM_GetInPlace):
13446             """
13447             Transfer not topological data from one GEOM object to another.
13448
13449             Parameters:
13450                 theObjectFrom the source object of non-topological data
13451                 theObjectTo the destination object of non-topological data
13452                 theFindMethod method to search sub-shapes of theObjectFrom
13453                               in shape theObjectTo. Possible values are:
13454                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13455                               and GEOM.FSM_GetInPlace_Old. Other values of
13456                               GEOM.find_shape_method are not supported.
13457
13458             Returns:
13459                 True in case of success; False otherwise.
13460
13461             # Example: see GEOM_TestOthers.py
13462             """
13463             # Example: see GEOM_TestAll.py
13464             isOk = self.InsertOp.TransferData(theObjectFrom,
13465                                                theObjectTo, theFindMethod)
13466             RaiseIfFailed("TransferData", self.InsertOp)
13467             return isOk
13468
13469         ## Creates a new folder object. It is a container for any GEOM objects.
13470         #  @param Name name of the container
13471         #  @param Father parent object. If None,
13472         #         folder under 'Geometry' root object will be created.
13473         #  @return a new created folder
13474         #  @ingroup l1_publish_data
13475         def NewFolder(self, Name, Father=None):
13476             """
13477             Create a new folder object. It is an auxiliary container for any GEOM objects.
13478
13479             Parameters:
13480                 Name name of the container
13481                 Father parent object. If None,
13482                 folder under 'Geometry' root object will be created.
13483
13484             Returns:
13485                 a new created folder
13486             """
13487             if not Father: Father = self.father
13488             return self.CreateFolder(Name, Father)
13489
13490         ## Move object to the specified folder
13491         #  @param Object object to move
13492         #  @param Folder target folder
13493         #  @ingroup l1_publish_data
13494         def PutToFolder(self, Object, Folder):
13495             """
13496             Move object to the specified folder
13497
13498             Parameters:
13499                 Object object to move
13500                 Folder target folder
13501             """
13502             self.MoveToFolder(Object, Folder)
13503             pass
13504
13505         ## Move list of objects to the specified folder
13506         #  @param ListOfSO list of objects to move
13507         #  @param Folder target folder
13508         #  @ingroup l1_publish_data
13509         def PutListToFolder(self, ListOfSO, Folder):
13510             """
13511             Move list of objects to the specified folder
13512
13513             Parameters:
13514                 ListOfSO list of objects to move
13515                 Folder target folder
13516             """
13517             self.MoveListToFolder(ListOfSO, Folder)
13518             pass
13519
13520         ## @addtogroup l2_field
13521         ## @{
13522
13523         ## Creates a field
13524         #  @param shape the shape the field lies on
13525         #  @param name the field name
13526         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13527         #  @param dimension dimension of the shape the field lies on
13528         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13529         #  @param componentNames names of components
13530         #  @return a created field
13531         @ManageTransactions("FieldOp")
13532         def CreateField(self, shape, name, type, dimension, componentNames):
13533             """
13534             Creates a field
13535
13536             Parameters:
13537                 shape the shape the field lies on
13538                 name  the field name
13539                 type  type of field data
13540                 dimension dimension of the shape the field lies on
13541                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13542                 componentNames names of components
13543
13544             Returns:
13545                 a created field
13546             """
13547             if isinstance( type, int ):
13548                 if type < 0 or type > 3:
13549                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13550                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13551
13552             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13553             RaiseIfFailed("CreateField", self.FieldOp)
13554             global geom
13555             geom._autoPublish( f, "", name)
13556             return f
13557
13558         ## Removes a field from the GEOM component
13559         #  @param field the field to remove
13560         def RemoveField(self, field):
13561             "Removes a field from the GEOM component"
13562             global geom
13563             if isinstance( field, GEOM._objref_GEOM_Field ):
13564                 geom.RemoveObject( field )
13565             elif isinstance( field, geomField ):
13566                 geom.RemoveObject( field.field )
13567             else:
13568                 raise RuntimeError, "RemoveField() : the object is not a field"
13569             return
13570
13571         ## Returns number of fields on a shape
13572         @ManageTransactions("FieldOp")
13573         def CountFields(self, shape):
13574             "Returns number of fields on a shape"
13575             nb = self.FieldOp.CountFields( shape )
13576             RaiseIfFailed("CountFields", self.FieldOp)
13577             return nb
13578
13579         ## Returns all fields on a shape
13580         @ManageTransactions("FieldOp")
13581         def GetFields(self, shape):
13582             "Returns all fields on a shape"
13583             ff = self.FieldOp.GetFields( shape )
13584             RaiseIfFailed("GetFields", self.FieldOp)
13585             return ff
13586
13587         ## Returns a field on a shape by its name
13588         @ManageTransactions("FieldOp")
13589         def GetField(self, shape, name):
13590             "Returns a field on a shape by its name"
13591             f = self.FieldOp.GetField( shape, name )
13592             RaiseIfFailed("GetField", self.FieldOp)
13593             return f
13594
13595         # end of l2_field
13596         ## @}
13597
13598
13599 import omniORB
13600 # Register the new proxy for GEOM_Gen
13601 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13602
13603
13604 ## Field on Geometry
13605 #  @ingroup l2_field
13606 class geomField( GEOM._objref_GEOM_Field ):
13607
13608     def __init__(self):
13609         GEOM._objref_GEOM_Field.__init__(self)
13610         self.field = GEOM._objref_GEOM_Field
13611         return
13612
13613     ## Returns the shape the field lies on
13614     def getShape(self):
13615         "Returns the shape the field lies on"
13616         return self.field.GetShape(self)
13617
13618     ## Returns the field name
13619     def getName(self):
13620         "Returns the field name"
13621         return self.field.GetName(self)
13622
13623     ## Returns type of field data as integer [0-3]
13624     def getType(self):
13625         "Returns type of field data"
13626         return self.field.GetDataType(self)._v
13627
13628     ## Returns type of field data:
13629     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13630     def getTypeEnum(self):
13631         "Returns type of field data"
13632         return self.field.GetDataType(self)
13633
13634     ## Returns dimension of the shape the field lies on:
13635     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13636     def getDimension(self):
13637         """Returns dimension of the shape the field lies on:
13638         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13639         return self.field.GetDimension(self)
13640
13641     ## Returns names of components
13642     def getComponents(self):
13643         "Returns names of components"
13644         return self.field.GetComponents(self)
13645
13646     ## Adds a time step to the field
13647     #  @param step the time step number further used as the step identifier
13648     #  @param stamp the time step time
13649     #  @param values the values of the time step
13650     def addStep(self, step, stamp, values):
13651         "Adds a time step to the field"
13652         stp = self.field.AddStep( self, step, stamp )
13653         if not stp:
13654             raise RuntimeError, \
13655                   "Field.addStep() : Error: step %s already exists in this field"%step
13656         global geom
13657         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13658         self.setValues( step, values )
13659         return stp
13660
13661     ## Remove a time step from the field
13662     def removeStep(self,step):
13663         "Remove a time step from the field"
13664         stepSO = None
13665         try:
13666             stepObj = self.field.GetStep( self, step )
13667             if stepObj:
13668                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13669         except:
13670             #import traceback
13671             #traceback.print_exc()
13672             pass
13673         self.field.RemoveStep( self, step )
13674         if stepSO:
13675             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13676         return
13677
13678     ## Returns number of time steps in the field
13679     def countSteps(self):
13680         "Returns number of time steps in the field"
13681         return self.field.CountSteps(self)
13682
13683     ## Returns a list of time step IDs in the field
13684     def getSteps(self):
13685         "Returns a list of time step IDs in the field"
13686         return self.field.GetSteps(self)
13687
13688     ## Returns a time step by its ID
13689     def getStep(self,step):
13690         "Returns a time step by its ID"
13691         stp = self.field.GetStep(self, step)
13692         if not stp:
13693             raise RuntimeError, "Step %s is missing from this field"%step
13694         return stp
13695
13696     ## Returns the time of the field step
13697     def getStamp(self,step):
13698         "Returns the time of the field step"
13699         return self.getStep(step).GetStamp()
13700
13701     ## Changes the time of the field step
13702     def setStamp(self, step, stamp):
13703         "Changes the time of the field step"
13704         return self.getStep(step).SetStamp(stamp)
13705
13706     ## Returns values of the field step
13707     def getValues(self, step):
13708         "Returns values of the field step"
13709         return self.getStep(step).GetValues()
13710
13711     ## Changes values of the field step
13712     def setValues(self, step, values):
13713         "Changes values of the field step"
13714         stp = self.getStep(step)
13715         errBeg = "Field.setValues(values) : Error: "
13716         try:
13717             ok = stp.SetValues( values )
13718         except Exception, e:
13719             excStr = str(e)
13720             if excStr.find("WrongPythonType") > 0:
13721                 raise RuntimeError, errBeg +\
13722                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13723             raise RuntimeError, errBeg + str(e)
13724         if not ok:
13725             nbOK = self.field.GetArraySize(self)
13726             nbKO = len(values)
13727             if nbOK != nbKO:
13728                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13729             else:
13730                 raise RuntimeError, errBeg + "failed"
13731         return
13732
13733     pass # end of class geomField
13734
13735 # Register the new proxy for GEOM_Field
13736 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13737
13738
13739 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13740 #  interface to GEOM operations.
13741 #
13742 #  Typical use is:
13743 #  \code
13744 #    import salome
13745 #    salome.salome_init()
13746 #    from salome.geom import geomBuilder
13747 #    geompy = geomBuilder.New(salome.myStudy)
13748 #  \endcode
13749 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13750 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13751 #  @return geomBuilder instance
13752 def New( study, instance=None):
13753     """
13754     Create a new geomBuilder instance.The geomBuilder class provides the Python
13755     interface to GEOM operations.
13756
13757     Typical use is:
13758         import salome
13759         salome.salome_init()
13760         from salome.geom import geomBuilder
13761         geompy = geomBuilder.New(salome.myStudy)
13762
13763     Parameters:
13764         study     SALOME study, generally obtained by salome.myStudy.
13765         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13766     Returns:
13767         geomBuilder instance
13768     """
13769     #print "New geomBuilder ", study, instance
13770     global engine
13771     global geom
13772     global doLcc
13773     engine = instance
13774     if engine is None:
13775       doLcc = True
13776     geom = geomBuilder()
13777     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13778     geom.init_geom(study)
13779     return geom
13780
13781
13782 # Register methods from the plug-ins in the geomBuilder class 
13783 plugins_var = os.environ.get( "GEOM_PluginsList" )
13784
13785 plugins = None
13786 if plugins_var is not None:
13787     plugins = plugins_var.split( ":" )
13788     plugins=filter(lambda x: len(x)>0, plugins)
13789 if plugins is not None:
13790     for pluginName in plugins:
13791         pluginBuilderName = pluginName + "Builder"
13792         try:
13793             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13794         except Exception, e:
13795             from salome_utils import verbose
13796             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13797             continue
13798         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13799         plugin = eval( pluginBuilderName )
13800         
13801         # add methods from plugin module to the geomBuilder class
13802         for k in dir( plugin ):
13803             if k[0] == '_': continue
13804             method = getattr( plugin, k )
13805             if type( method ).__name__ == 'function':
13806                 if not hasattr( geomBuilder, k ):
13807                     setattr( geomBuilder, k, method )
13808                 pass
13809             pass
13810         del pluginName
13811         pass
13812     pass