Salome HOME
Merge multi-study removal branch.
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2016  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()
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()
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()
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 not Operation.IsDone() 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()
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()
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         #
604         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
605         #  @ingroup l1_geomBuilder_auxiliary
606         kind = GEOM.GEOM_IKindOfShape
607
608         def __new__(cls):
609             global engine
610             global geom
611             global doLcc
612             global created
613             #print "==== __new__ ", engine, geom, doLcc, created
614             if geom is None:
615                 # geom engine is either retrieved from engine, or created
616                 geom = engine
617                 # Following test avoids a recursive loop
618                 if doLcc:
619                     if geom is not None:
620                         # geom engine not created: existing engine found
621                         doLcc = False
622                     if doLcc and not created:
623                         doLcc = False
624                         # FindOrLoadComponent called:
625                         # 1. CORBA resolution of server
626                         # 2. the __new__ method is called again
627                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
628                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
629                         #print "====1 ",geom
630                 else:
631                     # FindOrLoadComponent not called
632                     if geom is None:
633                         # geomBuilder instance is created from lcc.FindOrLoadComponent
634                         #print "==== super ", engine, geom, doLcc, created
635                         geom = super(geomBuilder,cls).__new__(cls)
636                         #print "====2 ",geom
637                     else:
638                         # geom engine not created: existing engine found
639                         #print "==== existing ", engine, geom, doLcc, created
640                         pass
641                 #print "return geom 1 ", geom
642                 return geom
643
644             #print "return geom 2 ", geom
645             return geom
646
647         def __init__(self):
648             global created
649             #print "-------- geomBuilder __init__ --- ", created, self
650             if not created:
651               created = True
652               GEOM._objref_GEOM_Gen.__init__(self)
653               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
654               self.myBuilder = None
655               self.father    = None
656
657               self.BasicOp  = None
658               self.CurvesOp = None
659               self.PrimOp   = None
660               self.ShapesOp = None
661               self.HealOp   = None
662               self.InsertOp = None
663               self.BoolOp   = None
664               self.TrsfOp   = None
665               self.LocalOp  = None
666               self.MeasuOp  = None
667               self.BlocksOp = None
668               self.GroupOp  = None
669               self.FieldOp  = None
670             pass
671
672         ## Process object publication in the study, as follows:
673         #  - if @a theName is specified (not None), the object is published in the study
674         #    with this name, not taking into account "auto-publishing" option;
675         #  - if @a theName is NOT specified, the object is published in the study
676         #    (using default name, which can be customized using @a theDefaultName parameter)
677         #    only if auto-publishing is switched on.
678         #
679         #  @param theObj  object, a subject for publishing
680         #  @param theName object name for study
681         #  @param theDefaultName default name for the auto-publishing
682         #
683         #  @sa addToStudyAuto()
684         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
685             # ---
686             def _item_name(_names, _defname, _idx=-1):
687                 if not _names: _names = _defname
688                 if type(_names) in [types.ListType, types.TupleType]:
689                     if _idx >= 0:
690                         if _idx >= len(_names) or not _names[_idx]:
691                             if type(_defname) not in [types.ListType, types.TupleType]:
692                                 _name = "%s_%d"%(_defname, _idx+1)
693                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
694                                 _name = _defname[_idx]
695                             else:
696                                 _name = "%noname_%d"%(dn, _idx+1)
697                             pass
698                         else:
699                             _name = _names[_idx]
700                         pass
701                     else:
702                         # must be wrong  usage
703                         _name = _names[0]
704                     pass
705                 else:
706                     if _idx >= 0:
707                         _name = "%s_%d"%(_names, _idx+1)
708                     else:
709                         _name = _names
710                     pass
711                 return _name
712             # ---
713             def _publish( _name, _obj ):
714                 fatherObj = None
715                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
716                     fatherObj = _obj.GetShape()
717                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
718                     fatherObj = _obj.GetField()
719                 elif not _obj.IsMainShape():
720                     fatherObj = _obj.GetMainShape()
721                     pass
722                 if fatherObj and fatherObj.GetStudyEntry():
723                     self.addToStudyInFather(fatherObj, _obj, _name)
724                 else:
725                     self.addToStudy(_obj, _name)
726                     pass
727                 return
728             # ---
729             if not theObj:
730                 return # null object
731             if not theName and not self.myMaxNbSubShapesAllowed:
732                 return # nothing to do: auto-publishing is disabled
733             if not theName and not theDefaultName:
734                 return # neither theName nor theDefaultName is given
735             import types
736             if type(theObj) in [types.ListType, types.TupleType]:
737                 # list of objects is being published
738                 idx = 0
739                 for obj in theObj:
740                     if not obj: continue # bad object
741                     name = _item_name(theName, theDefaultName, idx)
742                     _publish( name, obj )
743                     idx = idx+1
744                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
745                     pass
746                 pass
747             else:
748                 # single object is published
749                 name = _item_name(theName, theDefaultName)
750                 _publish( name, theObj )
751             pass
752
753         ## @addtogroup l1_geomBuilder_auxiliary
754         ## @{
755         def init_geom(self):
756             self.myStudy = salome.myStudy
757             self.myBuilder = self.myStudy.NewBuilder()
758             self.father = self.myStudy.FindComponent("GEOM")
759             notebook.myStudy = salome.myStudy
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    ()
771             self.CurvesOp = self.GetICurvesOperations   ()
772             self.PrimOp   = self.GetI3DPrimOperations   ()
773             self.ShapesOp = self.GetIShapesOperations   ()
774             self.HealOp   = self.GetIHealingOperations  ()
775             self.InsertOp = self.GetIInsertOperations   ()
776             self.BoolOp   = self.GetIBooleanOperations  ()
777             self.TrsfOp   = self.GetITransformOperations()
778             self.LocalOp  = self.GetILocalOperations    ()
779             self.MeasuOp  = self.GetIMeasureOperations  ()
780             self.BlocksOp = self.GetIBlocksOperations   ()
781             self.GroupOp  = self.GetIGroupOperations    ()
782             self.FieldOp  = self.GetIFieldOperations    ()
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, libraryName):
794             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, 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, 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, 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(aShape, aName, None)
895                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
896                 if doRestoreSubShapes:
897                     self.RestoreSubShapesSO(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(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(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(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("MakeCurveParametric", 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 a
3921         #          list of GEOM.GEOM_Object. 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 a
3961                 list of GEOM.GEOM_Object. 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                                                               False, 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. This function is a version of
4052         #  MakePipeWithDifferentSections() with the same parameters, except
4053         #  eliminated theWithContact and theWithCorrection. So it is
4054         #  possible to find the description of all parameters is in this
4055         #  method. The difference is that this method performs the operation
4056         #  step by step, i.e. it creates pipes between each pair of neighbor
4057         #  sections and fuses them into a single shape.
4058         #
4059         #  @ref tui_creation_pipe_with_diff_sec "Example"
4060         @ManageTransactions("PrimOp")
4061         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4062                                                  theLocations, thePath,
4063                                                  IsGenerateGroups=False, theName=None):
4064             """
4065             Create a shape by extrusion of the profile shape along
4066             the path shape. This function is a version of
4067             MakePipeWithDifferentSections() with the same parameters, except
4068             eliminated theWithContact and theWithCorrection. So it is
4069             possible to find the description of all parameters is in this
4070             method. The difference is that this method performs the operation
4071             step by step, i.e. it creates pipes between each pair of neighbor
4072             sections and fuses them into a single shape.
4073             """
4074             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4075                                                               theLocations, thePath,
4076                                                               False, False,
4077                                                               True, IsGenerateGroups)
4078             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4079
4080             if IsGenerateGroups:
4081               self._autoPublish(aList, theName, "pipe")
4082               return aList
4083
4084             self._autoPublish(aList[0], theName, "pipe")
4085             return aList[0]
4086
4087         ## Create a shape by extrusion of the profile shape along
4088         #  the path shape. The path shape can be a wire or an edge.
4089         #  the several profiles can be specified in the several locations of path.
4090         #  It is possible to generate groups along with the result by means of
4091         #  setting the flag \a IsGenerateGroups. For detailed information on
4092         #  groups that can be created please see the method MakePipe().
4093         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4094         #                       shell or face. If number of faces in neighbour sections
4095         #                       aren't coincided result solid between such sections will
4096         #                       be created using external boundaries of this shells.
4097         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4098         #                          This list is used for searching correspondences between
4099         #                          faces in the sections. Size of this list must be equal
4100         #                          to size of list of base shapes.
4101         #  @param theLocations - list of locations on the path corresponding
4102         #                        specified list of the Bases shapes. Number of locations
4103         #                        should be equal to number of bases. First and last
4104         #                        locations must be coincided with first and last vertexes
4105         #                        of path correspondingly.
4106         #  @param thePath - Path shape to extrude the base shape along it.
4107         #  @param theWithContact - the mode defining that the section is translated to be in
4108         #                          contact with the spine.
4109         #  @param theWithCorrection - defining that the section is rotated to be
4110         #                             orthogonal to the spine tangent in the correspondent point
4111         #  @param IsGenerateGroups - flag that tells if it is necessary to
4112         #                          create groups. It is equal to False by default.
4113         #  @param theName Object name; when specified, this parameter is used
4114         #         for result publication in the study. Otherwise, if automatic
4115         #         publication is switched on, default value is used for result name.
4116         #
4117         #  @return New GEOM.GEOM_Object, containing the created solids if 
4118         #          \a IsGenerateGroups is not set. Otherwise it returns new
4119         #          GEOM.ListOfGO. Its first element is the created solids, the
4120         #          remaining ones are created groups.
4121         #
4122         #  @ref tui_creation_pipe_with_shell_sec "Example"
4123         @ManageTransactions("PrimOp")
4124         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4125                                       theLocations, thePath,
4126                                       theWithContact, theWithCorrection,
4127                                       IsGenerateGroups=False, theName=None):
4128             """
4129             Create a shape by extrusion of the profile shape along
4130             the path shape. The path shape can be a wire or an edge.
4131             the several profiles can be specified in the several locations of path.
4132             It is possible to generate groups along with the result by means of
4133             setting the flag IsGenerateGroups. For detailed information on
4134             groups that can be created please see the method geompy.MakePipe().
4135
4136             Parameters:
4137                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4138                               shell or face. If number of faces in neighbour sections
4139                               aren't coincided result solid between such sections will
4140                               be created using external boundaries of this shells.
4141                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4142                                  This list is used for searching correspondences between
4143                                  faces in the sections. Size of this list must be equal
4144                                  to size of list of base shapes.
4145                 theLocations - list of locations on the path corresponding
4146                                specified list of the Bases shapes. Number of locations
4147                                should be equal to number of bases. First and last
4148                                locations must be coincided with first and last vertexes
4149                                of path correspondingly.
4150                 thePath - Path shape to extrude the base shape along it.
4151                 theWithContact - the mode defining that the section is translated to be in
4152                                  contact with the spine (0/1)
4153                 theWithCorrection - defining that the section is rotated to be
4154                                     orthogonal to the spine tangent in the correspondent point (0/1)
4155                 IsGenerateGroups - flag that tells if it is necessary to
4156                                  create groups. It is equal to False by default.
4157                 theName Object name; when specified, this parameter is used
4158                         for result publication in the study. Otherwise, if automatic
4159                         publication is switched on, default value is used for result name.
4160
4161             Returns:
4162                 New GEOM.GEOM_Object, containing the created solids if 
4163                 IsGenerateGroups is not set. Otherwise it returns new
4164                 GEOM.ListOfGO. Its first element is the created solids, the
4165                 remaining ones are created groups.
4166             """
4167             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4168                                                           theLocations, thePath,
4169                                                           theWithContact, theWithCorrection,
4170                                                           IsGenerateGroups)
4171             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4172
4173             if IsGenerateGroups:
4174               self._autoPublish(aList, theName, "pipe")
4175               return aList
4176
4177             self._autoPublish(aList[0], theName, "pipe")
4178             return aList[0]
4179
4180         ## Create a shape by extrusion of the profile shape along
4181         #  the path shape. This function is used only for debug pipe
4182         #  functionality - it is a version of function MakePipeWithShellSections()
4183         #  which give a possibility to recieve information about
4184         #  creating pipe between each pair of sections step by step.
4185         @ManageTransactions("PrimOp")
4186         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4187                                              theLocations, thePath,
4188                                              theWithContact, theWithCorrection,
4189                                              IsGenerateGroups=False, theName=None):
4190             """
4191             Create a shape by extrusion of the profile shape along
4192             the path shape. This function is used only for debug pipe
4193             functionality - it is a version of previous function
4194             geompy.MakePipeWithShellSections() which give a possibility to
4195             recieve information about creating pipe between each pair of
4196             sections step by step.
4197             """
4198             res = []
4199             nbsect = len(theSeqBases)
4200             nbsubsect = len(theSeqSubBases)
4201             #print "nbsect = ",nbsect
4202             for i in range(1,nbsect):
4203                 #print "  i = ",i
4204                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4205                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4206                 tmpSeqSubBases = []
4207                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4208                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4209                                                               tmpLocations, thePath,
4210                                                               theWithContact, theWithCorrection,
4211                                                               IsGenerateGroups)
4212                 if self.PrimOp.IsDone() == 0:
4213                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4214                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4215                     break
4216                 else:
4217                     print "Pipe between ",i," and ",i+1," sections is OK"
4218                     res.append(aList[0])
4219                     pass
4220                 pass
4221
4222             resc = self.MakeCompound(res)
4223             #resc = self.MakeSewing(res, 0.001)
4224             #print "resc: ",resc
4225             self._autoPublish(resc, theName, "pipe")
4226             return resc
4227
4228         ## Create solids between given sections.
4229         #  It is possible to generate groups along with the result by means of
4230         #  setting the flag \a IsGenerateGroups. For detailed information on
4231         #  groups that can be created please see the method MakePipe().
4232         #  @param theSeqBases - list of sections (shell or face).
4233         #  @param theLocations - list of corresponding vertexes
4234         #  @param IsGenerateGroups - flag that tells if it is necessary to
4235         #         create groups. It is equal to False by default.
4236         #  @param theName Object name; when specified, this parameter is used
4237         #         for result publication in the study. Otherwise, if automatic
4238         #         publication is switched on, default value is used for result name.
4239         #
4240         #  @return New GEOM.GEOM_Object, containing the created solids if 
4241         #          \a IsGenerateGroups is not set. Otherwise it returns new
4242         #          GEOM.ListOfGO. Its first element is the created solids, the
4243         #          remaining ones are created groups.
4244         #
4245         #  @ref tui_creation_pipe_without_path "Example"
4246         @ManageTransactions("PrimOp")
4247         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4248                                       IsGenerateGroups=False, theName=None):
4249             """
4250             Create solids between given sections.
4251             It is possible to generate groups along with the result by means of
4252             setting the flag IsGenerateGroups. For detailed information on
4253             groups that can be created please see the method geompy.MakePipe().
4254
4255             Parameters:
4256                 theSeqBases - list of sections (shell or face).
4257                 theLocations - list of corresponding vertexes
4258                 IsGenerateGroups - flag that tells if it is necessary to
4259                                  create groups. It is equal to False by default.
4260                 theName Object name; when specified, this parameter is used
4261                         for result publication in the study. Otherwise, if automatic
4262                         publication is switched on, default value is used for result name.
4263
4264             Returns:
4265                 New GEOM.GEOM_Object, containing the created solids if 
4266                 IsGenerateGroups is not set. Otherwise it returns new
4267                 GEOM.ListOfGO. Its first element is the created solids, the
4268                 remaining ones are created groups.
4269             """
4270             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4271                                                           IsGenerateGroups)
4272             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4273
4274             if IsGenerateGroups:
4275               self._autoPublish(aList, theName, "pipe")
4276               return aList
4277
4278             self._autoPublish(aList[0], theName, "pipe")
4279             return aList[0]
4280
4281         ## Create a shape by extrusion of the base shape along
4282         #  the path shape with constant bi-normal direction along the given vector.
4283         #  The path shape can be a wire or an edge.
4284         #  It is possible to generate groups along with the result by means of
4285         #  setting the flag \a IsGenerateGroups. For detailed information on
4286         #  groups that can be created please see the method MakePipe().
4287         #  @param theBase Base shape to be extruded.
4288         #  @param thePath Path shape to extrude the base shape along it.
4289         #  @param theVec Vector defines a constant binormal direction to keep the
4290         #                same angle beetween the direction and the sections
4291         #                along the sweep surface.
4292         #  @param IsGenerateGroups flag that tells if it is necessary to
4293         #         create groups. It is equal to False by default.
4294         #  @param theName Object name; when specified, this parameter is used
4295         #         for result publication in the study. Otherwise, if automatic
4296         #         publication is switched on, default value is used for result name.
4297         #
4298         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4299         #          \a IsGenerateGroups is not set. Otherwise it returns new
4300         #          GEOM.ListOfGO. Its first element is the created pipe, the
4301         #          remaining ones are created groups.
4302         #
4303         #  @ref tui_creation_pipe "Example"
4304         @ManageTransactions("PrimOp")
4305         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4306                                         IsGenerateGroups=False, theName=None):
4307             """
4308             Create a shape by extrusion of the base shape along
4309             the path shape with constant bi-normal direction along the given vector.
4310             The path shape can be a wire or an edge.
4311             It is possible to generate groups along with the result by means of
4312             setting the flag IsGenerateGroups. For detailed information on
4313             groups that can be created please see the method geompy.MakePipe().
4314
4315             Parameters:
4316                 theBase Base shape to be extruded.
4317                 thePath Path shape to extrude the base shape along it.
4318                 theVec Vector defines a constant binormal direction to keep the
4319                        same angle beetween the direction and the sections
4320                        along the sweep surface.
4321                 IsGenerateGroups flag that tells if it is necessary to
4322                                  create groups. It is equal to False by default.
4323                 theName Object name; when specified, this parameter is used
4324                         for result publication in the study. Otherwise, if automatic
4325                         publication is switched on, default value is used for result name.
4326
4327             Returns:
4328                 New GEOM.GEOM_Object, containing the created pipe if 
4329                 IsGenerateGroups is not set. Otherwise it returns new
4330                 GEOM.ListOfGO. Its first element is the created pipe, the
4331                 remaining ones are created groups.
4332             """
4333             # Example: see GEOM_TestAll.py
4334             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4335                           theVec, IsGenerateGroups)
4336             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4337
4338             if IsGenerateGroups:
4339               self._autoPublish(aList, theName, "pipe")
4340               return aList
4341
4342             self._autoPublish(aList[0], theName, "pipe")
4343             return aList[0]
4344
4345         ## Makes a thick solid from a shape. If the input is a surface shape
4346         #  (face or shell) the result is a thick solid. If an input shape is
4347         #  a solid the result is a hollowed solid with removed faces.
4348         #  @param theShape Face or Shell to get thick solid or solid to get
4349         #         hollowed solid.
4350         #  @param theThickness Thickness of the resulting solid
4351         #  @param theFacesIDs the list of face IDs to be removed from the
4352         #         result. It is ignored if \a theShape is a face or a shell.
4353         #         It is empty by default. 
4354         #  @param theInside If true the thickness is applied towards inside
4355         #  @param theName Object name; when specified, this parameter is used
4356         #         for result publication in the study. Otherwise, if automatic
4357         #         publication is switched on, default value is used for result name.
4358         #
4359         #  @return New GEOM.GEOM_Object, containing the created solid
4360         #
4361         #  @ref tui_creation_thickness "Example"
4362         @ManageTransactions("PrimOp")
4363         def MakeThickSolid(self, theShape, theThickness,
4364                            theFacesIDs=[], theInside=False, theName=None):
4365             """
4366             Make a thick solid from a shape. If the input is a surface shape
4367             (face or shell) the result is a thick solid. If an input shape is
4368             a solid the result is a hollowed solid with removed faces.
4369
4370             Parameters:
4371                  theShape Face or Shell to get thick solid or solid to get
4372                           hollowed solid.
4373                  theThickness Thickness of the resulting solid
4374                  theFacesIDs the list of face IDs to be removed from the
4375                           result. It is ignored if theShape is a face or a
4376                           shell. It is empty by default. 
4377                  theInside If true the thickness is applied towards inside
4378                  theName Object name; when specified, this parameter is used
4379                          for result publication in the study. Otherwise, if automatic
4380                          publication is switched on, default value is used for result name.
4381
4382             Returns:
4383                 New GEOM.GEOM_Object, containing the created solid
4384             """
4385             # Example: see GEOM_TestAll.py
4386             theThickness,Parameters = ParseParameters(theThickness)
4387             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4388                                                theThickness, True, theInside)
4389             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4390             anObj.SetParameters(Parameters)
4391             self._autoPublish(anObj, theName, "thickSolid")
4392             return anObj
4393
4394
4395         ## Modifies a shape to make it a thick solid. If the input is a surface
4396         #  shape (face or shell) the result is a thick solid. If an input shape
4397         #  is a solid the result is a hollowed solid with removed faces.
4398         #  @param theShape Face or Shell to get thick solid or solid to get
4399         #         hollowed solid.
4400         #  @param theThickness Thickness of the resulting solid
4401         #  @param theFacesIDs the list of face IDs to be removed from the
4402         #         result. It is ignored if \a theShape is a face or a shell.
4403         #         It is empty by default. 
4404         #  @param theInside If true the thickness is applied towards inside
4405         #
4406         #  @return The modified shape
4407         #
4408         #  @ref tui_creation_thickness "Example"
4409         @ManageTransactions("PrimOp")
4410         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4411             """
4412             Modifies a shape to make it a thick solid. If the input is a
4413             surface shape (face or shell) the result is a thick solid. If
4414             an input shape is a solid the result is a hollowed solid with
4415             removed faces.
4416
4417             Parameters:
4418                 theShape Face or Shell to get thick solid or solid to get
4419                          hollowed solid.
4420                 theThickness Thickness of the resulting solid
4421                 theFacesIDs the list of face IDs to be removed from the
4422                          result. It is ignored if \a theShape is a face or
4423                          a shell. It is empty by default. 
4424                 theInside If true the thickness is applied towards inside
4425
4426             Returns:
4427                 The modified shape
4428             """
4429             # Example: see GEOM_TestAll.py
4430             theThickness,Parameters = ParseParameters(theThickness)
4431             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4432                                                theThickness, False, theInside)
4433             RaiseIfFailed("Thicken", self.PrimOp)
4434             anObj.SetParameters(Parameters)
4435             return anObj
4436
4437         ## Build a middle path of a pipe-like shape.
4438         #  The path shape can be a wire or an edge.
4439         #  @param theShape It can be closed or unclosed pipe-like shell
4440         #                  or a pipe-like solid.
4441         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4442         #                            should be wires or faces of theShape.
4443         #  @param theName Object name; when specified, this parameter is used
4444         #         for result publication in the study. Otherwise, if automatic
4445         #         publication is switched on, default value is used for result name.
4446         #
4447         #  @note It is not assumed that exact or approximate copy of theShape
4448         #        can be obtained by applying existing Pipe operation on the
4449         #        resulting "Path" wire taking theBase1 as the base - it is not
4450         #        always possible; though in some particular cases it might work
4451         #        it is not guaranteed. Thus, RestorePath function should not be
4452         #        considered as an exact reverse operation of the Pipe.
4453         #
4454         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4455         #                                source pipe's "path".
4456         #
4457         #  @ref tui_creation_pipe_path "Example"
4458         @ManageTransactions("PrimOp")
4459         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4460             """
4461             Build a middle path of a pipe-like shape.
4462             The path shape can be a wire or an edge.
4463
4464             Parameters:
4465                 theShape It can be closed or unclosed pipe-like shell
4466                          or a pipe-like solid.
4467                 theBase1, theBase2 Two bases of the supposed pipe. This
4468                                    should be wires or faces of theShape.
4469                 theName Object name; when specified, this parameter is used
4470                         for result publication in the study. Otherwise, if automatic
4471                         publication is switched on, default value is used for result name.
4472
4473             Returns:
4474                 New GEOM_Object, containing an edge or wire that represent
4475                                  source pipe's path.
4476             """
4477             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4478             RaiseIfFailed("RestorePath", self.PrimOp)
4479             self._autoPublish(anObj, theName, "path")
4480             return anObj
4481
4482         ## Build a middle path of a pipe-like shape.
4483         #  The path shape can be a wire or an edge.
4484         #  @param theShape It can be closed or unclosed pipe-like shell
4485         #                  or a pipe-like solid.
4486         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4487         #                                should be lists of edges of theShape.
4488         #  @param theName Object name; when specified, this parameter is used
4489         #         for result publication in the study. Otherwise, if automatic
4490         #         publication is switched on, default value is used for result name.
4491         #
4492         #  @note It is not assumed that exact or approximate copy of theShape
4493         #        can be obtained by applying existing Pipe operation on the
4494         #        resulting "Path" wire taking theBase1 as the base - it is not
4495         #        always possible; though in some particular cases it might work
4496         #        it is not guaranteed. Thus, RestorePath function should not be
4497         #        considered as an exact reverse operation of the Pipe.
4498         #
4499         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4500         #                                source pipe's "path".
4501         #
4502         #  @ref tui_creation_pipe_path "Example"
4503         @ManageTransactions("PrimOp")
4504         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4505             """
4506             Build a middle path of a pipe-like shape.
4507             The path shape can be a wire or an edge.
4508
4509             Parameters:
4510                 theShape It can be closed or unclosed pipe-like shell
4511                          or a pipe-like solid.
4512                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4513                                        should be lists of edges of theShape.
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_Object, containing an edge or wire that represent
4520                                  source pipe's path.
4521             """
4522             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4523             RaiseIfFailed("RestorePath", self.PrimOp)
4524             self._autoPublish(anObj, theName, "path")
4525             return anObj
4526
4527         # end of l3_complex
4528         ## @}
4529
4530         ## @addtogroup l3_basic_go
4531         ## @{
4532
4533         ## Create a linear edge with specified ends.
4534         #  @param thePnt1 Point for the first end of edge.
4535         #  @param thePnt2 Point for the second end of edge.
4536         #  @param theName Object name; when specified, this parameter is used
4537         #         for result publication in the study. Otherwise, if automatic
4538         #         publication is switched on, default value is used for result name.
4539         #
4540         #  @return New GEOM.GEOM_Object, containing the created edge.
4541         #
4542         #  @ref tui_creation_edge "Example"
4543         @ManageTransactions("ShapesOp")
4544         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4545             """
4546             Create a linear edge with specified ends.
4547
4548             Parameters:
4549                 thePnt1 Point for the first end of edge.
4550                 thePnt2 Point for the second end of edge.
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             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4560             RaiseIfFailed("MakeEdge", self.ShapesOp)
4561             self._autoPublish(anObj, theName, "edge")
4562             return anObj
4563
4564         ## Create a new edge, corresponding to the given length on the given curve.
4565         #  @param theRefCurve The referenced curve (edge).
4566         #  @param theLength Length on the referenced curve. It can be negative.
4567         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4568         #                       at the end of \a theRefCurve, close to the selected point.
4569         #                       If None, start from the first point of \a theRefCurve.
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 MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4579             """
4580             Create a new edge, corresponding to the given length on the given curve.
4581
4582             Parameters:
4583                 theRefCurve The referenced curve (edge).
4584                 theLength Length on the referenced curve. It can be negative.
4585                 theStartPoint Any point can be selected for it, the new edge will begin
4586                               at the end of theRefCurve, close to the selected point.
4587                               If None, start from the first point of theRefCurve.
4588                 theName Object name; when specified, this parameter is used
4589                         for result publication in the study. Otherwise, if automatic
4590                         publication is switched on, default value is used for result name.
4591
4592             Returns:
4593                 New GEOM.GEOM_Object, containing the created edge.
4594             """
4595             # Example: see GEOM_TestAll.py
4596             theLength, Parameters = ParseParameters(theLength)
4597             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4598             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4599             anObj.SetParameters(Parameters)
4600             self._autoPublish(anObj, theName, "edge")
4601             return anObj
4602
4603         ## Create an edge from specified wire.
4604         #  @param theWire source Wire
4605         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4606         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4607         #  @param theName Object name; when specified, this parameter is used
4608         #         for result publication in the study. Otherwise, if automatic
4609         #         publication is switched on, default value is used for result name.
4610         #
4611         #  @return New GEOM.GEOM_Object, containing the created edge.
4612         #
4613         #  @ref tui_creation_edge "Example"
4614         @ManageTransactions("ShapesOp")
4615         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4616             """
4617             Create an edge from specified wire.
4618
4619             Parameters:
4620                 theWire source Wire
4621                 theLinearTolerance linear tolerance value (default = 1e-07)
4622                 theAngularTolerance angular tolerance value (default = 1e-12)
4623                 theName Object name; when specified, this parameter is used
4624                         for result publication in the study. Otherwise, if automatic
4625                         publication is switched on, default value is used for result name.
4626
4627             Returns:
4628                 New GEOM.GEOM_Object, containing the created edge.
4629             """
4630             # Example: see GEOM_TestAll.py
4631             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4632             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4633             self._autoPublish(anObj, theName, "edge")
4634             return anObj
4635
4636         ## Create a wire from the set of edges and wires.
4637         #  @param theEdgesAndWires List of edges and/or wires.
4638         #  @param theTolerance Maximum distance between vertices, that will be merged.
4639         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4640         #  @param theName Object name; when specified, this parameter is used
4641         #         for result publication in the study. Otherwise, if automatic
4642         #         publication is switched on, default value is used for result name.
4643         #
4644         #  @return New GEOM.GEOM_Object, containing the created wire.
4645         #
4646         #  @ref tui_creation_wire "Example"
4647         @ManageTransactions("ShapesOp")
4648         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4649             """
4650             Create a wire from the set of edges and wires.
4651
4652             Parameters:
4653                 theEdgesAndWires List of edges and/or wires.
4654                 theTolerance Maximum distance between vertices, that will be merged.
4655                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4656                 theName Object name; when specified, this parameter is used
4657                         for result publication in the study. Otherwise, if automatic
4658                         publication is switched on, default value is used for result name.
4659
4660             Returns:
4661                 New GEOM.GEOM_Object, containing the created wire.
4662             """
4663             # Example: see GEOM_TestAll.py
4664             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4665             RaiseIfFailed("MakeWire", self.ShapesOp)
4666             self._autoPublish(anObj, theName, "wire")
4667             return anObj
4668
4669         ## Create a face on the given wire.
4670         #  @param theWire closed Wire or Edge to build the face on.
4671         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4672         #                        If the tolerance of the obtained planar face is less
4673         #                        than 1e-06, this face will be returned, otherwise the
4674         #                        algorithm tries to build any suitable face on the given
4675         #                        wire and prints a warning message.
4676         #  @param theName Object name; when specified, this parameter is used
4677         #         for result publication in the study. Otherwise, if automatic
4678         #         publication is switched on, default value is used for result name.
4679         #
4680         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4681         #
4682         #  @ref tui_creation_face "Example"
4683         @ManageTransactions("ShapesOp")
4684         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4685             """
4686             Create a face on the given wire.
4687
4688             Parameters:
4689                 theWire closed Wire or Edge to build the face on.
4690                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4691                                If the tolerance of the obtained planar face is less
4692                                than 1e-06, this face will be returned, otherwise the
4693                                algorithm tries to build any suitable face on the given
4694                                wire and prints a warning message.
4695                 theName Object name; when specified, this parameter is used
4696                         for result publication in the study. Otherwise, if automatic
4697                         publication is switched on, default value is used for result name.
4698
4699             Returns:
4700                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4701             """
4702             # Example: see GEOM_TestAll.py
4703             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4704             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4705                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4706             else:
4707                 RaiseIfFailed("MakeFace", self.ShapesOp)
4708             self._autoPublish(anObj, theName, "face")
4709             return anObj
4710
4711         ## Create a face on the given wires set.
4712         #  @param theWires List of closed wires or edges to build the face on.
4713         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4714         #                        If the tolerance of the obtained planar face is less
4715         #                        than 1e-06, this face will be returned, otherwise the
4716         #                        algorithm tries to build any suitable face on the given
4717         #                        wire and prints a warning message.
4718         #  @param theName Object name; when specified, this parameter is used
4719         #         for result publication in the study. Otherwise, if automatic
4720         #         publication is switched on, default value is used for result name.
4721         #
4722         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4723         #
4724         #  @ref tui_creation_face "Example"
4725         @ManageTransactions("ShapesOp")
4726         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4727             """
4728             Create a face on the given wires set.
4729
4730             Parameters:
4731                 theWires List of closed wires or edges to build the face on.
4732                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4733                                If the tolerance of the obtained planar face is less
4734                                than 1e-06, this face will be returned, otherwise the
4735                                algorithm tries to build any suitable face on the given
4736                                wire and prints a warning message.
4737                 theName Object name; when specified, this parameter is used
4738                         for result publication in the study. Otherwise, if automatic
4739                         publication is switched on, default value is used for result name.
4740
4741             Returns:
4742                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4743             """
4744             # Example: see GEOM_TestAll.py
4745             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4746             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4747                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4748             else:
4749                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4750             self._autoPublish(anObj, theName, "face")
4751             return anObj
4752
4753         ## See MakeFaceWires() method for details.
4754         #
4755         #  @ref tui_creation_face "Example 1"
4756         #  \n @ref swig_MakeFaces  "Example 2"
4757         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4758             """
4759             See geompy.MakeFaceWires() method for details.
4760             """
4761             # Example: see GEOM_TestOthers.py
4762             # note: auto-publishing is done in self.MakeFaceWires()
4763             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4764             return anObj
4765
4766         ## Create a face based on a surface from given face bounded
4767         #  by given wire.
4768         #  @param theFace the face whose surface is used to create a new face.
4769         #  @param theWire the wire that will bound a new face.
4770         #  @param theName Object name; when specified, this parameter is used
4771         #         for result publication in the study. Otherwise, if automatic
4772         #         publication is switched on, default value is used for result name.
4773         #
4774         #  @return New GEOM.GEOM_Object, containing the created face.
4775         #
4776         #  @ref tui_creation_face "Example"
4777         @ManageTransactions("ShapesOp")
4778         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4779             """
4780             Create a face based on a surface from given face bounded
4781             by given wire.
4782
4783             Parameters:
4784                 theFace the face whose surface is used to create a new face.
4785                 theWire the wire that will bound a new face.
4786                 theName Object name; when specified, this parameter is used
4787                         for result publication in the study. Otherwise, if automatic
4788                         publication is switched on, default value is used for result name.
4789
4790             Returns:
4791                 New GEOM.GEOM_Object, containing the created face.
4792             """
4793             # Example: see GEOM_TestAll.py
4794             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4795             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4796             self._autoPublish(anObj, theName, "face")
4797             return anObj
4798           
4799         ## Create a face from a set of edges with the given constraints.
4800         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4801         #         - edges should form a closed wire;
4802         #         - for each edge, constraint face is optional: if a constraint face is missing
4803         #           for some edge, this means that there no constraint associated with this edge.
4804         #  @param theName Object name; when specified, this parameter is used
4805         #         for result publication in the study. Otherwise, if automatic
4806         #         publication is switched on, default value is used for result name.
4807         # 
4808         # @return New GEOM.GEOM_Object, containing the created face.
4809         # 
4810         # @ref tui_creation_face "Example"
4811         @ManageTransactions("ShapesOp")
4812         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4813             """
4814             Create a face from a set of edges with the given constraints.
4815
4816             Parameters:
4817                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4818                         - edges should form a closed wire;
4819                         - for each edge, constraint face is optional: if a constraint face is missing
4820                           for some edge, this means that there no constraint associated with this edge.
4821                 theName Object name; when specified, this parameter is used
4822                         for result publication in the study. Otherwise, if automatic
4823                         publication is switched on, default value is used for result name.
4824
4825             Returns:
4826                 New GEOM.GEOM_Object, containing the created face.
4827             """
4828             # Example: see GEOM_TestAll.py
4829             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4830             if anObj is None:
4831                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4832             self._autoPublish(anObj, theName, "face")
4833             return anObj
4834
4835         ## Create a shell from the set of faces, shells and/or compounds of faces.
4836         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4837         #  @param theName Object name; when specified, this parameter is used
4838         #         for result publication in the study. Otherwise, if automatic
4839         #         publication is switched on, default value is used for result name.
4840         #
4841         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4842         #
4843         #  @ref tui_creation_shell "Example"
4844         @ManageTransactions("ShapesOp")
4845         def MakeShell(self, theFacesAndShells, theName=None):
4846             """
4847             Create a shell from the set of faces and shells.
4848
4849             Parameters:
4850                 theFacesAndShells List of faces and/or shells.
4851                 theName Object name; when specified, this parameter is used
4852                         for result publication in the study. Otherwise, if automatic
4853                         publication is switched on, default value is used for result name.
4854
4855             Returns:
4856                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4857             """
4858             # Example: see GEOM_TestAll.py
4859             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4860             RaiseIfFailed("MakeShell", self.ShapesOp)
4861             self._autoPublish(anObj, theName, "shell")
4862             return anObj
4863
4864         ## Create a solid, bounded by the given shells.
4865         #  @param theShells Sequence of bounding shells.
4866         #  @param theName Object name; when specified, this parameter is used
4867         #         for result publication in the study. Otherwise, if automatic
4868         #         publication is switched on, default value is used for result name.
4869         #
4870         #  @return New GEOM.GEOM_Object, containing the created solid.
4871         #
4872         #  @ref tui_creation_solid "Example"
4873         @ManageTransactions("ShapesOp")
4874         def MakeSolid(self, theShells, theName=None):
4875             """
4876             Create a solid, bounded by the given shells.
4877
4878             Parameters:
4879                 theShells Sequence of bounding shells.
4880                 theName Object name; when specified, this parameter is used
4881                         for result publication in the study. Otherwise, if automatic
4882                         publication is switched on, default value is used for result name.
4883
4884             Returns:
4885                 New GEOM.GEOM_Object, containing the created solid.
4886             """
4887             # Example: see GEOM_TestAll.py
4888             theShells = ToList(theShells)
4889             if len(theShells) == 1:
4890                 descr = self._IsGoodForSolid(theShells[0])
4891                 #if len(descr) > 0:
4892                 #    raise RuntimeError, "MakeSolidShells : " + descr
4893                 if descr == "WRN_SHAPE_UNCLOSED":
4894                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4895             anObj = self.ShapesOp.MakeSolidShells(theShells)
4896             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4897             self._autoPublish(anObj, theName, "solid")
4898             return anObj
4899
4900         ## Create a compound of the given shapes.
4901         #  @param theShapes List of shapes to put in compound.
4902         #  @param theName Object name; when specified, this parameter is used
4903         #         for result publication in the study. Otherwise, if automatic
4904         #         publication is switched on, default value is used for result name.
4905         #
4906         #  @return New GEOM.GEOM_Object, containing the created compound.
4907         #
4908         #  @ref tui_creation_compound "Example"
4909         @ManageTransactions("ShapesOp")
4910         def MakeCompound(self, theShapes, theName=None):
4911             """
4912             Create a compound of the given shapes.
4913
4914             Parameters:
4915                 theShapes List of shapes to put in compound.
4916                 theName Object name; when specified, this parameter is used
4917                         for result publication in the study. Otherwise, if automatic
4918                         publication is switched on, default value is used for result name.
4919
4920             Returns:
4921                 New GEOM.GEOM_Object, containing the created compound.
4922             """
4923             # Example: see GEOM_TestAll.py
4924             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4925             RaiseIfFailed("MakeCompound", self.ShapesOp)
4926             self._autoPublish(anObj, theName, "compound")
4927             return anObj
4928         
4929         ## Create a solid (or solids) from the set of faces and/or shells.
4930         #  @param theFacesOrShells List of faces and/or shells.
4931         #  @param isIntersect If TRUE, forces performing intersections
4932         #         between arguments; otherwise (default) intersection is not performed.
4933         #  @param theName Object name; when specified, this parameter is used
4934         #         for result publication in the study. Otherwise, if automatic
4935         #         publication is switched on, default value is used for result name.
4936         #
4937         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4938         #
4939         #  @ref tui_creation_solid_from_faces "Example"
4940         @ManageTransactions("ShapesOp")
4941         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
4942             """
4943             Create a solid (or solids) from the set of connected faces and/or shells.
4944
4945             Parameters:
4946                 theFacesOrShells List of faces and/or shells.
4947                 isIntersect If TRUE, forces performing intersections
4948                         between arguments; otherwise (default) intersection is not performed
4949                 theName Object name; when specified, this parameter is used.
4950                         for result publication in the study. Otherwise, if automatic
4951                         publication is switched on, default value is used for result name.
4952
4953             Returns:
4954                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4955             """
4956             # Example: see GEOM_TestAll.py
4957             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
4958             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
4959             self._autoPublish(anObj, theName, "solid")
4960             return anObj
4961
4962         # end of l3_basic_go
4963         ## @}
4964
4965         ## @addtogroup l2_measure
4966         ## @{
4967
4968         ## Gives quantity of faces in the given shape.
4969         #  @param theShape Shape to count faces of.
4970         #  @return Quantity of faces.
4971         #
4972         #  @ref swig_NumberOf "Example"
4973         @ManageTransactions("ShapesOp")
4974         def NumberOfFaces(self, theShape):
4975             """
4976             Gives quantity of faces in the given shape.
4977
4978             Parameters:
4979                 theShape Shape to count faces of.
4980
4981             Returns:
4982                 Quantity of faces.
4983             """
4984             # Example: see GEOM_TestOthers.py
4985             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4986             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4987             return nb_faces
4988
4989         ## Gives quantity of edges in the given shape.
4990         #  @param theShape Shape to count edges of.
4991         #  @return Quantity of edges.
4992         #
4993         #  @ref swig_NumberOf "Example"
4994         @ManageTransactions("ShapesOp")
4995         def NumberOfEdges(self, theShape):
4996             """
4997             Gives quantity of edges in the given shape.
4998
4999             Parameters:
5000                 theShape Shape to count edges of.
5001
5002             Returns:
5003                 Quantity of edges.
5004             """
5005             # Example: see GEOM_TestOthers.py
5006             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5007             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5008             return nb_edges
5009
5010         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5011         #  @param theShape Shape to count sub-shapes of.
5012         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5013         #  @return Quantity of sub-shapes of given type.
5014         #
5015         #  @ref swig_NumberOf "Example"
5016         @ManageTransactions("ShapesOp")
5017         def NumberOfSubShapes(self, theShape, theShapeType):
5018             """
5019             Gives quantity of sub-shapes of type theShapeType in the given shape.
5020
5021             Parameters:
5022                 theShape Shape to count sub-shapes of.
5023                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5024
5025             Returns:
5026                 Quantity of sub-shapes of given type.
5027             """
5028             # Example: see GEOM_TestOthers.py
5029             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5030             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5031             return nb_ss
5032
5033         ## Gives quantity of solids in the given shape.
5034         #  @param theShape Shape to count solids in.
5035         #  @return Quantity of solids.
5036         #
5037         #  @ref swig_NumberOf "Example"
5038         @ManageTransactions("ShapesOp")
5039         def NumberOfSolids(self, theShape):
5040             """
5041             Gives quantity of solids in the given shape.
5042
5043             Parameters:
5044                 theShape Shape to count solids in.
5045
5046             Returns:
5047                 Quantity of solids.
5048             """
5049             # Example: see GEOM_TestOthers.py
5050             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5051             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5052             return nb_solids
5053
5054         # end of l2_measure
5055         ## @}
5056
5057         ## @addtogroup l3_healing
5058         ## @{
5059
5060         ## Reverses an orientation the given shape.
5061         #  @param theShape Shape to be reversed.
5062         #  @param theName Object name; when specified, this parameter is used
5063         #         for result publication in the study. Otherwise, if automatic
5064         #         publication is switched on, default value is used for result name.
5065         #
5066         #  @return The reversed copy of theShape.
5067         #
5068         #  @ref swig_ChangeOrientation "Example"
5069         @ManageTransactions("ShapesOp")
5070         def ChangeOrientation(self, theShape, theName=None):
5071             """
5072             Reverses an orientation the given shape.
5073
5074             Parameters:
5075                 theShape Shape to be reversed.
5076                 theName Object name; when specified, this parameter is used
5077                         for result publication in the study. Otherwise, if automatic
5078                         publication is switched on, default value is used for result name.
5079
5080             Returns:
5081                 The reversed copy of theShape.
5082             """
5083             # Example: see GEOM_TestAll.py
5084             anObj = self.ShapesOp.ChangeOrientation(theShape)
5085             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5086             self._autoPublish(anObj, theName, "reversed")
5087             return anObj
5088
5089         ## See ChangeOrientation() method for details.
5090         #
5091         #  @ref swig_OrientationChange "Example"
5092         def OrientationChange(self, theShape, theName=None):
5093             """
5094             See geompy.ChangeOrientation method for details.
5095             """
5096             # Example: see GEOM_TestOthers.py
5097             # note: auto-publishing is done in self.ChangeOrientation()
5098             anObj = self.ChangeOrientation(theShape, theName)
5099             return anObj
5100
5101         # end of l3_healing
5102         ## @}
5103
5104         ## @addtogroup l4_obtain
5105         ## @{
5106
5107         ## Retrieve all free faces from the given shape.
5108         #  Free face is a face, which is not shared between two shells of the shape.
5109         #  @param theShape Shape to find free faces in.
5110         #  @return List of IDs of all free faces, contained in theShape.
5111         #
5112         #  @ref tui_free_faces_page "Example"
5113         @ManageTransactions("ShapesOp")
5114         def GetFreeFacesIDs(self,theShape):
5115             """
5116             Retrieve all free faces from the given shape.
5117             Free face is a face, which is not shared between two shells of the shape.
5118
5119             Parameters:
5120                 theShape Shape to find free faces in.
5121
5122             Returns:
5123                 List of IDs of all free faces, contained in theShape.
5124             """
5125             # Example: see GEOM_TestOthers.py
5126             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5127             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5128             return anIDs
5129
5130         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5131         #  @param theShape1 Shape to find sub-shapes in.
5132         #  @param theShape2 Shape to find shared sub-shapes with.
5133         #  @param theShapeType Type of sub-shapes to be retrieved.
5134         #  @param theName Object name; when specified, this parameter is used
5135         #         for result publication in the study. Otherwise, if automatic
5136         #         publication is switched on, default value is used for result name.
5137         #
5138         #  @return List of sub-shapes of theShape1, shared with theShape2.
5139         #
5140         #  @ref swig_GetSharedShapes "Example"
5141         @ManageTransactions("ShapesOp")
5142         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5143             """
5144             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5145
5146             Parameters:
5147                 theShape1 Shape to find sub-shapes in.
5148                 theShape2 Shape to find shared sub-shapes with.
5149                 theShapeType Type of sub-shapes to be retrieved.
5150                 theName Object name; when specified, this parameter is used
5151                         for result publication in the study. Otherwise, if automatic
5152                         publication is switched on, default value is used for result name.
5153
5154             Returns:
5155                 List of sub-shapes of theShape1, shared with theShape2.
5156             """
5157             # Example: see GEOM_TestOthers.py
5158             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5159             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5160             self._autoPublish(aList, theName, "shared")
5161             return aList
5162
5163         ## Get sub-shapes, shared by input shapes.
5164         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5165         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5166         #  @param theMultiShare Specifies what type of shares should be checked:
5167         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5168         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5169         #  @param theName Object name; when specified, this parameter is used
5170         #         for result publication in the study. Otherwise, if automatic
5171         #         publication is switched on, default value is used for result name.
5172         #
5173         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5174         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5175         #        and all rest input shapes are returned.
5176         #
5177         #  @return List of all found sub-shapes.
5178         #
5179         #  Examples:
5180         #  - @ref tui_shared_shapes "Example 1"
5181         #  - @ref swig_GetSharedShapes "Example 2"
5182         @ManageTransactions("ShapesOp")
5183         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5184             """
5185             Get sub-shapes, shared by input shapes.
5186
5187             Parameters:
5188                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5189                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5190                 theMultiShare Specifies what type of shares should be checked:
5191                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5192                   - False: causes to search sub-shapes shared between couples of input shapes.
5193                 theName Object name; when specified, this parameter is used
5194                         for result publication in the study. Otherwise, if automatic
5195                         publication is switched on, default value is used for result name.
5196
5197             Note: if theShapes contains single compound, the shares between all possible couples of 
5198                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5199                   and all rest input shapes are returned.
5200
5201             Returns:
5202                 List of all found sub-shapes.
5203             """
5204             # Example: see GEOM_TestOthers.py
5205             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5206             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5207             self._autoPublish(aList, theName, "shared")
5208             return aList
5209
5210         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5211         #  situated relatively the specified plane by the certain way,
5212         #  defined through <VAR>theState</VAR> parameter.
5213         #  @param theShape Shape to find sub-shapes of.
5214         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5215         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5216         #                direction and location of the plane to find shapes on.
5217         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5218         #  @param theName Object name; when specified, this parameter is used
5219         #         for result publication in the study. Otherwise, if automatic
5220         #         publication is switched on, default value is used for result name.
5221         #
5222         #  @return List of all found sub-shapes.
5223         #
5224         #  @ref swig_GetShapesOnPlane "Example"
5225         @ManageTransactions("ShapesOp")
5226         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5227             """
5228             Find in theShape all sub-shapes of type theShapeType,
5229             situated relatively the specified plane by the certain way,
5230             defined through theState parameter.
5231
5232             Parameters:
5233                 theShape Shape to find sub-shapes of.
5234                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5235                 theAx1 Vector (or line, or linear edge), specifying normal
5236                        direction and location of the plane to find shapes on.
5237                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5238                 theName Object name; when specified, this parameter is used
5239                         for result publication in the study. Otherwise, if automatic
5240                         publication is switched on, default value is used for result name.
5241
5242             Returns:
5243                 List of all found sub-shapes.
5244             """
5245             # Example: see GEOM_TestOthers.py
5246             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5247             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5248             self._autoPublish(aList, theName, "shapeOnPlane")
5249             return aList
5250
5251         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5252         #  situated relatively the specified plane by the certain way,
5253         #  defined through <VAR>theState</VAR> parameter.
5254         #  @param theShape Shape to find sub-shapes of.
5255         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5256         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5257         #                direction and location of the plane to find shapes on.
5258         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5259         #
5260         #  @return List of all found sub-shapes indices.
5261         #
5262         #  @ref swig_GetShapesOnPlaneIDs "Example"
5263         @ManageTransactions("ShapesOp")
5264         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5265             """
5266             Find in theShape all sub-shapes of type theShapeType,
5267             situated relatively the specified plane by the certain way,
5268             defined through theState parameter.
5269
5270             Parameters:
5271                 theShape Shape to find sub-shapes of.
5272                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5273                 theAx1 Vector (or line, or linear edge), specifying normal
5274                        direction and location of the plane to find shapes on.
5275                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5276
5277             Returns:
5278                 List of all found sub-shapes indices.
5279             """
5280             # Example: see GEOM_TestOthers.py
5281             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5282             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5283             return aList
5284
5285         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5286         #  situated relatively the specified plane by the certain way,
5287         #  defined through <VAR>theState</VAR> parameter.
5288         #  @param theShape Shape to find sub-shapes of.
5289         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5290         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5291         #                direction of the plane to find shapes on.
5292         #  @param thePnt Point specifying location of the plane to find shapes on.
5293         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5294         #  @param theName Object name; when specified, this parameter is used
5295         #         for result publication in the study. Otherwise, if automatic
5296         #         publication is switched on, default value is used for result name.
5297         #
5298         #  @return List of all found sub-shapes.
5299         #
5300         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5301         @ManageTransactions("ShapesOp")
5302         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5303             """
5304             Find in theShape all sub-shapes of type theShapeType,
5305             situated relatively the specified plane by the certain way,
5306             defined through theState parameter.
5307
5308             Parameters:
5309                 theShape Shape to find sub-shapes of.
5310                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5311                 theAx1 Vector (or line, or linear edge), specifying normal
5312                        direction and location of the plane to find shapes on.
5313                 thePnt Point specifying location of the plane to find shapes on.
5314                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5315                 theName Object name; when specified, this parameter is used
5316                         for result publication in the study. Otherwise, if automatic
5317                         publication is switched on, default value is used for result name.
5318
5319             Returns:
5320                 List of all found sub-shapes.
5321             """
5322             # Example: see GEOM_TestOthers.py
5323             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5324                                                                theAx1, thePnt, theState)
5325             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5326             self._autoPublish(aList, theName, "shapeOnPlane")
5327             return aList
5328
5329         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5330         #  situated relatively the specified plane by the certain way,
5331         #  defined through <VAR>theState</VAR> parameter.
5332         #  @param theShape Shape to find sub-shapes of.
5333         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5334         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5335         #                direction of the plane to find shapes on.
5336         #  @param thePnt Point specifying location of the plane to find shapes on.
5337         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5338         #
5339         #  @return List of all found sub-shapes indices.
5340         #
5341         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5342         @ManageTransactions("ShapesOp")
5343         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5344             """
5345             Find in theShape all sub-shapes of type theShapeType,
5346             situated relatively the specified plane by the certain way,
5347             defined through theState parameter.
5348
5349             Parameters:
5350                 theShape Shape to find sub-shapes of.
5351                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5352                 theAx1 Vector (or line, or linear edge), specifying normal
5353                        direction and location of the plane to find shapes on.
5354                 thePnt Point specifying location of the plane to find shapes on.
5355                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5356
5357             Returns:
5358                 List of all found sub-shapes indices.
5359             """
5360             # Example: see GEOM_TestOthers.py
5361             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5362                                                                   theAx1, thePnt, theState)
5363             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5364             return aList
5365
5366         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5367         #  the specified cylinder by the certain way, defined through \a theState parameter.
5368         #  @param theShape Shape to find sub-shapes of.
5369         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5370         #  @param theAxis Vector (or line, or linear edge), specifying
5371         #                 axis of the cylinder to find shapes on.
5372         #  @param theRadius Radius of the cylinder to find shapes on.
5373         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5374         #  @param theName Object name; when specified, this parameter is used
5375         #         for result publication in the study. Otherwise, if automatic
5376         #         publication is switched on, default value is used for result name.
5377         #
5378         #  @return List of all found sub-shapes.
5379         #
5380         #  @ref swig_GetShapesOnCylinder "Example"
5381         @ManageTransactions("ShapesOp")
5382         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5383             """
5384             Find in theShape all sub-shapes of type theShapeType, situated relatively
5385             the specified cylinder by the certain way, defined through theState parameter.
5386
5387             Parameters:
5388                 theShape Shape to find sub-shapes of.
5389                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5390                 theAxis Vector (or line, or linear edge), specifying
5391                         axis of the cylinder to find shapes on.
5392                 theRadius Radius of the cylinder to find shapes on.
5393                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5394                 theName Object name; when specified, this parameter is used
5395                         for result publication in the study. Otherwise, if automatic
5396                         publication is switched on, default value is used for result name.
5397
5398             Returns:
5399                 List of all found sub-shapes.
5400             """
5401             # Example: see GEOM_TestOthers.py
5402             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5403             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5404             self._autoPublish(aList, theName, "shapeOnCylinder")
5405             return aList
5406
5407         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5408         #  the specified cylinder by the certain way, defined through \a theState parameter.
5409         #  @param theShape Shape to find sub-shapes of.
5410         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5411         #  @param theAxis Vector (or line, or linear edge), specifying
5412         #                 axis of the cylinder to find shapes on.
5413         #  @param theRadius Radius of the cylinder to find shapes on.
5414         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5415         #
5416         #  @return List of all found sub-shapes indices.
5417         #
5418         #  @ref swig_GetShapesOnCylinderIDs "Example"
5419         @ManageTransactions("ShapesOp")
5420         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5421             """
5422             Find in theShape all sub-shapes of type theShapeType, situated relatively
5423             the specified cylinder by the certain way, defined through theState parameter.
5424
5425             Parameters:
5426                 theShape Shape to find sub-shapes of.
5427                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5428                 theAxis Vector (or line, or linear edge), specifying
5429                         axis of the cylinder to find shapes on.
5430                 theRadius Radius of the cylinder to find shapes on.
5431                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5432
5433             Returns:
5434                 List of all found sub-shapes indices.
5435             """
5436             # Example: see GEOM_TestOthers.py
5437             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5438             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5439             return aList
5440
5441         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5442         #  the specified cylinder by the certain way, defined through \a theState parameter.
5443         #  @param theShape Shape to find sub-shapes of.
5444         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5445         #  @param theAxis Vector (or line, or linear edge), specifying
5446         #                 axis of the cylinder to find shapes on.
5447         #  @param thePnt Point specifying location of the bottom of the cylinder.
5448         #  @param theRadius Radius of the cylinder to find shapes on.
5449         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5450         #  @param theName Object name; when specified, this parameter is used
5451         #         for result publication in the study. Otherwise, if automatic
5452         #         publication is switched on, default value is used for result name.
5453         #
5454         #  @return List of all found sub-shapes.
5455         #
5456         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5457         @ManageTransactions("ShapesOp")
5458         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5459             """
5460             Find in theShape all sub-shapes of type theShapeType, situated relatively
5461             the specified cylinder by the certain way, defined through theState parameter.
5462
5463             Parameters:
5464                 theShape Shape to find sub-shapes of.
5465                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5466                 theAxis Vector (or line, or linear edge), specifying
5467                         axis of the cylinder to find shapes on.
5468                 theRadius Radius of the cylinder to find shapes on.
5469                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5470                 theName Object name; when specified, this parameter is used
5471                         for result publication in the study. Otherwise, if automatic
5472                         publication is switched on, default value is used for result name.
5473
5474             Returns:
5475                 List of all found sub-shapes.
5476             """
5477             # Example: see GEOM_TestOthers.py
5478             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5479             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5480             self._autoPublish(aList, theName, "shapeOnCylinder")
5481             return aList
5482
5483         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5484         #  the specified cylinder by the certain way, defined through \a theState parameter.
5485         #  @param theShape Shape to find sub-shapes of.
5486         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5487         #  @param theAxis Vector (or line, or linear edge), specifying
5488         #                 axis of the cylinder to find shapes on.
5489         #  @param thePnt Point specifying location of the bottom of the cylinder.
5490         #  @param theRadius Radius of the cylinder to find shapes on.
5491         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5492         #
5493         #  @return List of all found sub-shapes indices
5494         #
5495         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5496         @ManageTransactions("ShapesOp")
5497         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5498             """
5499             Find in theShape all sub-shapes of type theShapeType, situated relatively
5500             the specified cylinder by the certain way, defined through theState parameter.
5501
5502             Parameters:
5503                 theShape Shape to find sub-shapes of.
5504                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5505                 theAxis Vector (or line, or linear edge), specifying
5506                         axis of the cylinder to find shapes on.
5507                 theRadius Radius of the cylinder to find shapes on.
5508                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5509
5510             Returns:
5511                 List of all found sub-shapes indices.
5512             """
5513             # Example: see GEOM_TestOthers.py
5514             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5515             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5516             return aList
5517
5518         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5519         #  the specified sphere by the certain way, defined through \a theState parameter.
5520         #  @param theShape Shape to find sub-shapes of.
5521         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5522         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5523         #  @param theRadius Radius of the sphere to find shapes on.
5524         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5525         #  @param theName Object name; when specified, this parameter is used
5526         #         for result publication in the study. Otherwise, if automatic
5527         #         publication is switched on, default value is used for result name.
5528         #
5529         #  @return List of all found sub-shapes.
5530         #
5531         #  @ref swig_GetShapesOnSphere "Example"
5532         @ManageTransactions("ShapesOp")
5533         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5534             """
5535             Find in theShape all sub-shapes of type theShapeType, situated relatively
5536             the specified sphere by the certain way, defined through theState parameter.
5537
5538             Parameters:
5539                 theShape Shape to find sub-shapes of.
5540                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5541                 theCenter Point, specifying center of the sphere to find shapes on.
5542                 theRadius Radius of the sphere to find shapes on.
5543                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5544                 theName Object name; when specified, this parameter is used
5545                         for result publication in the study. Otherwise, if automatic
5546                         publication is switched on, default value is used for result name.
5547
5548             Returns:
5549                 List of all found sub-shapes.
5550             """
5551             # Example: see GEOM_TestOthers.py
5552             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5553             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5554             self._autoPublish(aList, theName, "shapeOnSphere")
5555             return aList
5556
5557         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5558         #  the specified sphere by the certain way, defined through \a theState parameter.
5559         #  @param theShape Shape to find sub-shapes of.
5560         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5561         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5562         #  @param theRadius Radius of the sphere to find shapes on.
5563         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5564         #
5565         #  @return List of all found sub-shapes indices.
5566         #
5567         #  @ref swig_GetShapesOnSphereIDs "Example"
5568         @ManageTransactions("ShapesOp")
5569         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5570             """
5571             Find in theShape all sub-shapes of type theShapeType, situated relatively
5572             the specified sphere by the certain way, defined through theState parameter.
5573
5574             Parameters:
5575                 theShape Shape to find sub-shapes of.
5576                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5577                 theCenter Point, specifying center of the sphere to find shapes on.
5578                 theRadius Radius of the sphere to find shapes on.
5579                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5580
5581             Returns:
5582                 List of all found sub-shapes indices.
5583             """
5584             # Example: see GEOM_TestOthers.py
5585             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5586             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5587             return aList
5588
5589         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5590         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5591         #  @param theShape Shape to find sub-shapes of.
5592         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5593         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5594         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5595         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5596         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5597         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5598         #  @param theName Object name; when specified, this parameter is used
5599         #         for result publication in the study. Otherwise, if automatic
5600         #         publication is switched on, default value is used for result name.
5601         #
5602         #  @return List of all found sub-shapes.
5603         #
5604         #  @ref swig_GetShapesOnQuadrangle "Example"
5605         @ManageTransactions("ShapesOp")
5606         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5607                                   theTopLeftPoint, theTopRigthPoint,
5608                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5609             """
5610             Find in theShape all sub-shapes of type theShapeType, situated relatively
5611             the specified quadrangle by the certain way, defined through theState parameter.
5612
5613             Parameters:
5614                 theShape Shape to find sub-shapes of.
5615                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5616                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5617                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5618                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5619                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5620                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5621                 theName Object name; when specified, this parameter is used
5622                         for result publication in the study. Otherwise, if automatic
5623                         publication is switched on, default value is used for result name.
5624
5625             Returns:
5626                 List of all found sub-shapes.
5627             """
5628             # Example: see GEOM_TestOthers.py
5629             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5630                                                         theTopLeftPoint, theTopRigthPoint,
5631                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5632             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5633             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5634             return aList
5635
5636         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5637         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5638         #  @param theShape Shape to find sub-shapes of.
5639         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5640         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5641         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5642         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5643         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5644         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5645         #
5646         #  @return List of all found sub-shapes indices.
5647         #
5648         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5649         @ManageTransactions("ShapesOp")
5650         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5651                                      theTopLeftPoint, theTopRigthPoint,
5652                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5653             """
5654             Find in theShape all sub-shapes of type theShapeType, situated relatively
5655             the specified quadrangle by the certain way, defined through theState parameter.
5656
5657             Parameters:
5658                 theShape Shape to find sub-shapes of.
5659                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5660                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5661                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5662                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5663                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5664                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5665
5666             Returns:
5667                 List of all found sub-shapes indices.
5668             """
5669
5670             # Example: see GEOM_TestOthers.py
5671             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5672                                                            theTopLeftPoint, theTopRigthPoint,
5673                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5674             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
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         #  @param theName Object name; when specified, this parameter is used
5684         #         for result publication in the study. Otherwise, if automatic
5685         #         publication is switched on, default value is used for result name.
5686         #
5687         #  @return List of all found sub-shapes.
5688         #
5689         #  @ref swig_GetShapesOnBox "Example"
5690         @ManageTransactions("ShapesOp")
5691         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5692             """
5693             Find in theShape all sub-shapes of type theShapeType, situated relatively
5694             the specified theBox by the certain way, defined through theState parameter.
5695
5696             Parameters:
5697                 theBox Shape for relative comparing.
5698                 theShape Shape to find sub-shapes of.
5699                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5700                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5701                 theName Object name; when specified, this parameter is used
5702                         for result publication in the study. Otherwise, if automatic
5703                         publication is switched on, default value is used for result name.
5704
5705             Returns:
5706                 List of all found sub-shapes.
5707             """
5708             # Example: see GEOM_TestOthers.py
5709             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5710             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5711             self._autoPublish(aList, theName, "shapeOnBox")
5712             return aList
5713
5714         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5715         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5716         #  @param theBox Shape for relative comparing.
5717         #  @param theShape Shape to find sub-shapes of.
5718         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5719         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5720         #
5721         #  @return List of all found sub-shapes indices.
5722         #
5723         #  @ref swig_GetShapesOnBoxIDs "Example"
5724         @ManageTransactions("ShapesOp")
5725         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5726             """
5727             Find in theShape all sub-shapes of type theShapeType, situated relatively
5728             the specified theBox by the certain way, defined through theState parameter.
5729
5730             Parameters:
5731                 theBox Shape for relative comparing.
5732                 theShape Shape to find sub-shapes of.
5733                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5734                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5735
5736             Returns:
5737                 List of all found sub-shapes indices.
5738             """
5739             # Example: see GEOM_TestOthers.py
5740             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5741             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5742             return aList
5743
5744         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5745         #  situated relatively the specified \a theCheckShape by the
5746         #  certain way, defined through \a theState parameter.
5747         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5748         #  @param theShape Shape to find sub-shapes of.
5749         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5750         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5751         #  @param theName Object name; when specified, this parameter is used
5752         #         for result publication in the study. Otherwise, if automatic
5753         #         publication is switched on, default value is used for result name.
5754         #
5755         #  @return List of all found sub-shapes.
5756         #
5757         #  @ref swig_GetShapesOnShape "Example"
5758         @ManageTransactions("ShapesOp")
5759         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5760             """
5761             Find in theShape all sub-shapes of type theShapeType,
5762             situated relatively the specified theCheckShape by the
5763             certain way, defined through theState parameter.
5764
5765             Parameters:
5766                 theCheckShape Shape for relative comparing. It must be a solid.
5767                 theShape Shape to find sub-shapes of.
5768                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5769                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5770                 theName Object name; when specified, this parameter is used
5771                         for result publication in the study. Otherwise, if automatic
5772                         publication is switched on, default value is used for result name.
5773
5774             Returns:
5775                 List of all found sub-shapes.
5776             """
5777             # Example: see GEOM_TestOthers.py
5778             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5779                                                    theShapeType, theState)
5780             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5781             self._autoPublish(aList, theName, "shapeOnShape")
5782             return aList
5783
5784         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5785         #  situated relatively the specified \a theCheckShape by the
5786         #  certain way, defined through \a theState parameter.
5787         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5788         #  @param theShape Shape to find sub-shapes of.
5789         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5790         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5791         #  @param theName Object name; when specified, this parameter is used
5792         #         for result publication in the study. Otherwise, if automatic
5793         #         publication is switched on, default value is used for result name.
5794         #
5795         #  @return All found sub-shapes as compound.
5796         #
5797         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5798         @ManageTransactions("ShapesOp")
5799         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
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                 theName Object name; when specified, this parameter is used
5811                         for result publication in the study. Otherwise, if automatic
5812                         publication is switched on, default value is used for result name.
5813
5814             Returns:
5815                 All found sub-shapes as compound.
5816             """
5817             # Example: see GEOM_TestOthers.py
5818             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5819                                                              theShapeType, theState)
5820             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5821             self._autoPublish(anObj, theName, "shapeOnShape")
5822             return anObj
5823
5824         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5825         #  situated relatively the specified \a theCheckShape by the
5826         #  certain way, defined through \a theState parameter.
5827         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5828         #  @param theShape Shape to find sub-shapes of.
5829         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5830         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5831         #
5832         #  @return List of all found sub-shapes indices.
5833         #
5834         #  @ref swig_GetShapesOnShapeIDs "Example"
5835         @ManageTransactions("ShapesOp")
5836         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5837             """
5838             Find in theShape all sub-shapes of type theShapeType,
5839             situated relatively the specified theCheckShape by the
5840             certain way, defined through theState parameter.
5841
5842             Parameters:
5843                 theCheckShape Shape for relative comparing. It must be a solid.
5844                 theShape Shape to find sub-shapes of.
5845                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5846                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5847
5848             Returns:
5849                 List of all found sub-shapes indices.
5850             """
5851             # Example: see GEOM_TestOthers.py
5852             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5853                                                       theShapeType, theState)
5854             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5855             return aList
5856
5857         ## Get sub-shape(s) of theShapeWhere, which are
5858         #  coincident with \a theShapeWhat or could be a part of it.
5859         #  @param theShapeWhere Shape to find sub-shapes of.
5860         #  @param theShapeWhat Shape, specifying what to find.
5861         #  @param isNewImplementation implementation of GetInPlace functionality
5862         #             (default = False, old alghorithm based on shape properties)
5863         #  @param theName Object name; when specified, this parameter is used
5864         #         for result publication in the study. Otherwise, if automatic
5865         #         publication is switched on, default value is used for result name.
5866         #
5867         #  @return Compound which includes all found sub-shapes if they have different types; 
5868         #          or group of all found shapes of the equal type; or a single found sub-shape.
5869         #
5870         #  @note This function has a restriction on argument shapes.
5871         #        If \a theShapeWhere has curved parts with significantly
5872         #        outstanding centres (i.e. the mass centre of a part is closer to
5873         #        \a theShapeWhat than to the part), such parts will not be found.
5874         #        @image html get_in_place_lost_part.png
5875         #
5876         #  @ref swig_GetInPlace "Example"
5877         @ManageTransactions("ShapesOp")
5878         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5879             """
5880             Get sub-shape(s) of theShapeWhere, which are
5881             coincident with  theShapeWhat or could be a part of it.
5882
5883             Parameters:
5884                 theShapeWhere Shape to find sub-shapes of.
5885                 theShapeWhat Shape, specifying what to find.
5886                 isNewImplementation Implementation of GetInPlace functionality
5887                                     (default = False, old alghorithm based on shape properties)
5888                 theName Object name; when specified, this parameter is used
5889                         for result publication in the study. Otherwise, if automatic
5890                         publication is switched on, default value is used for result name.
5891
5892             Returns:
5893                 Compound which includes all found sub-shapes if they have different types; 
5894                 or group of all found shapes of the equal type; or a single found sub-shape.
5895
5896
5897             Note:
5898                 This function has a restriction on argument shapes.
5899                 If theShapeWhere has curved parts with significantly
5900                 outstanding centres (i.e. the mass centre of a part is closer to
5901                 theShapeWhat than to the part), such parts will not be found.
5902             """
5903             # Example: see GEOM_TestOthers.py
5904             anObj = None
5905             if isNewImplementation:
5906                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5907             else:
5908                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5909                 pass
5910             RaiseIfFailed("GetInPlace", self.ShapesOp)
5911             self._autoPublish(anObj, theName, "inplace")
5912             return anObj
5913
5914         ## Get sub-shape(s) of \a theShapeWhere, which are
5915         #  coincident with \a theShapeWhat or could be a part of it.
5916         #
5917         #  Implementation of this method is based on a saved history of an operation,
5918         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5919         #  arguments (an argument shape or a sub-shape of an argument shape).
5920         #  The operation could be the Partition or one of boolean operations,
5921         #  performed on simple shapes (not on compounds).
5922         #
5923         #  @param theShapeWhere Shape to find sub-shapes of.
5924         #  @param theShapeWhat Shape, specifying what to find (must be in the
5925         #                      building history of the ShapeWhere).
5926         #  @param theName Object name; when specified, this parameter is used
5927         #         for result publication in the study. Otherwise, if automatic
5928         #         publication is switched on, default value is used for result name.
5929         #
5930         #  @return Compound which includes all found sub-shapes if they have different types; 
5931         #          or group of all found shapes of the equal type; or a single found sub-shape.
5932         #
5933         #  @ref swig_GetInPlace "Example"
5934         @ManageTransactions("ShapesOp")
5935         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5936             """
5937             Implementation of this method is based on a saved history of an operation,
5938             produced theShapeWhere. The theShapeWhat must be among this operation's
5939             arguments (an argument shape or a sub-shape of an argument shape).
5940             The operation could be the Partition or one of boolean operations,
5941             performed on simple shapes (not on compounds).
5942
5943             Parameters:
5944                 theShapeWhere Shape to find sub-shapes of.
5945                 theShapeWhat Shape, specifying what to find (must be in the
5946                                 building history of the ShapeWhere).
5947                 theName Object name; when specified, this parameter is used
5948                         for result publication in the study. Otherwise, if automatic
5949                         publication is switched on, default value is used for result name.
5950
5951             Returns:
5952                 Compound which includes all found sub-shapes if they have different types; 
5953                 or group of all found shapes of the equal type; or a single found sub-shape.
5954             """
5955             # Example: see GEOM_TestOthers.py
5956             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5957             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5958             self._autoPublish(anObj, theName, "inplace")
5959             return anObj
5960
5961         ## Get sub-shape of theShapeWhere, which is
5962         #  equal to \a theShapeWhat.
5963         #  @param theShapeWhere Shape to find sub-shape of.
5964         #  @param theShapeWhat Shape, specifying what to find.
5965         #  @param theName Object name; when specified, this parameter is used
5966         #         for result publication in the study. Otherwise, if automatic
5967         #         publication is switched on, default value is used for result name.
5968         #
5969         #  @return New GEOM.GEOM_Object for found sub-shape.
5970         #
5971         #  @ref swig_GetSame "Example"
5972         @ManageTransactions("ShapesOp")
5973         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5974             """
5975             Get sub-shape of theShapeWhere, which is
5976             equal to theShapeWhat.
5977
5978             Parameters:
5979                 theShapeWhere Shape to find sub-shape of.
5980                 theShapeWhat Shape, specifying what to find.
5981                 theName Object name; when specified, this parameter is used
5982                         for result publication in the study. Otherwise, if automatic
5983                         publication is switched on, default value is used for result name.
5984
5985             Returns:
5986                 New GEOM.GEOM_Object for found sub-shape.
5987             """
5988             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5989             RaiseIfFailed("GetSame", self.ShapesOp)
5990             self._autoPublish(anObj, theName, "sameShape")
5991             return anObj
5992
5993
5994         ## Get sub-shape indices of theShapeWhere, which is
5995         #  equal to \a theShapeWhat.
5996         #  @param theShapeWhere Shape to find sub-shape of.
5997         #  @param theShapeWhat Shape, specifying what to find.
5998         #  @return List of all found sub-shapes indices.
5999         #
6000         #  @ref swig_GetSame "Example"
6001         @ManageTransactions("ShapesOp")
6002         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6003             """
6004             Get sub-shape indices of theShapeWhere, which is
6005             equal to theShapeWhat.
6006
6007             Parameters:
6008                 theShapeWhere Shape to find sub-shape of.
6009                 theShapeWhat Shape, specifying what to find.
6010
6011             Returns:
6012                 List of all found sub-shapes indices.
6013             """
6014             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6015             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6016             return anObj
6017
6018         ## Resize the input edge with the new Min and Max parameters.
6019         #  The input edge parameters range is [0, 1]. If theMin parameter is
6020         #  negative, the input edge is extended, otherwise it is shrinked by
6021         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6022         #  otherwise it is shrinked by theMax parameter.
6023         #  @param theEdge the input edge to be resized.
6024         #  @param theMin the minimal parameter value.
6025         #  @param theMax the maximal parameter value.
6026         #  @param theName Object name; when specified, this parameter is used
6027         #         for result publication in the study. Otherwise, if automatic
6028         #         publication is switched on, default value is used for result name.
6029         #  @return New GEOM.GEOM_Object, containing the created edge.
6030         #
6031         #  @ref tui_extend "Example"
6032         @ManageTransactions("ShapesOp")
6033         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6034             """
6035             Resize the input edge with the new Min and Max parameters.
6036             The input edge parameters range is [0, 1]. If theMin parameter is
6037             negative, the input edge is extended, otherwise it is shrinked by
6038             theMin parameter. If theMax is greater than 1, the edge is extended,
6039             otherwise it is shrinked by theMax parameter.
6040
6041             Parameters:
6042                 theEdge the input edge to be resized.
6043                 theMin the minimal parameter value.
6044                 theMax the maximal parameter value.
6045                 theName Object name; when specified, this parameter is used
6046                         for result publication in the study. Otherwise, if automatic
6047                         publication is switched on, default value is used for result name.
6048
6049             Returns:
6050                 New GEOM.GEOM_Object, containing the created edge.
6051             """
6052             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6053             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6054             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6055             anObj.SetParameters(Parameters)
6056             self._autoPublish(anObj, theName, "edge")
6057             return anObj
6058
6059         ## Resize the input face with the new UMin, UMax, VMin and VMax
6060         #  parameters. The input face U and V parameters range is [0, 1]. If
6061         #  theUMin parameter is negative, the input face is extended, otherwise
6062         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6063         #  greater than 1, the face is extended, otherwise it is shrinked along
6064         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6065         #  V direction of the input face.
6066         #  @param theFace the input face to be resized.
6067         #  @param theUMin the minimal U parameter value.
6068         #  @param theUMax the maximal U parameter value.
6069         #  @param theVMin the minimal V parameter value.
6070         #  @param theVMax the maximal V parameter value.
6071         #  @param theName Object name; when specified, this parameter is used
6072         #         for result publication in the study. Otherwise, if automatic
6073         #         publication is switched on, default value is used for result name.
6074         #  @return New GEOM.GEOM_Object, containing the created face.
6075         #
6076         #  @ref tui_extend "Example"
6077         @ManageTransactions("ShapesOp")
6078         def ExtendFace(self, theFace, theUMin, theUMax,
6079                        theVMin, theVMax, theName=None):
6080             """
6081             Resize the input face with the new UMin, UMax, VMin and VMax
6082             parameters. The input face U and V parameters range is [0, 1]. If
6083             theUMin parameter is negative, the input face is extended, otherwise
6084             it is shrinked along U direction by theUMin parameter. If theUMax is
6085             greater than 1, the face is extended, otherwise it is shrinked along
6086             U direction by theUMax parameter. So as for theVMin, theVMax and
6087             V direction of the input face.
6088
6089             Parameters:
6090                 theFace the input face to be resized.
6091                 theUMin the minimal U parameter value.
6092                 theUMax the maximal U parameter value.
6093                 theVMin the minimal V parameter value.
6094                 theVMax the maximal V parameter value.
6095                 theName Object name; when specified, this parameter is used
6096                         for result publication in the study. Otherwise, if automatic
6097                         publication is switched on, default value is used for result name.
6098
6099             Returns:
6100                 New GEOM.GEOM_Object, containing the created face.
6101             """
6102             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6103             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6104                                              theVMin, theVMax)
6105             RaiseIfFailed("ExtendFace", self.ShapesOp)
6106             anObj.SetParameters(Parameters)
6107             self._autoPublish(anObj, theName, "face")
6108             return anObj
6109
6110         ## This function takes some face as input parameter and creates new
6111         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6112         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6113         #  parameters of the source face (in the parametrical space).
6114         #  @param theFace the input face.
6115         #  @param theName Object name; when specified, this parameter is used
6116         #         for result publication in the study. Otherwise, if automatic
6117         #         publication is switched on, default value is used for result name.
6118         #  @return New GEOM.GEOM_Object, containing the created face.
6119         #
6120         #  @ref tui_creation_surface "Example"
6121         @ManageTransactions("ShapesOp")
6122         def MakeSurfaceFromFace(self, theFace, theName=None):
6123             """
6124             This function takes some face as input parameter and creates new
6125             GEOM_Object, i.e. topological shape by extracting underlying surface
6126             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6127             parameters of the source face (in the parametrical space).
6128
6129             Parameters:
6130                 theFace the input face.
6131                 theName Object name; when specified, this parameter is used
6132                         for result publication in the study. Otherwise, if automatic
6133                         publication is switched on, default value is used for result name.
6134
6135             Returns:
6136                 New GEOM.GEOM_Object, containing the created face.
6137             """
6138             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6139             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6140             self._autoPublish(anObj, theName, "surface")
6141             return anObj
6142
6143         # end of l4_obtain
6144         ## @}
6145
6146         ## @addtogroup l4_access
6147         ## @{
6148
6149         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6150         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6151         #  @param aShape Shape to get sub-shape of.
6152         #  @param ListOfID List of sub-shapes indices.
6153         #  @param theName Object name; when specified, this parameter is used
6154         #         for result publication in the study. Otherwise, if automatic
6155         #         publication is switched on, default value is used for result name.
6156         #
6157         #  @return Found sub-shape.
6158         #
6159         #  @ref swig_all_decompose "Example"
6160         def GetSubShape(self, aShape, ListOfID, theName=None):
6161             """
6162             Obtain a composite sub-shape of aShape, composed from sub-shapes
6163             of aShape, selected by their unique IDs inside aShape
6164
6165             Parameters:
6166                 aShape Shape to get sub-shape of.
6167                 ListOfID List of sub-shapes indices.
6168                 theName Object name; when specified, this parameter is used
6169                         for result publication in the study. Otherwise, if automatic
6170                         publication is switched on, default value is used for result name.
6171
6172             Returns:
6173                 Found sub-shape.
6174             """
6175             # Example: see GEOM_TestAll.py
6176             anObj = self.AddSubShape(aShape,ListOfID)
6177             self._autoPublish(anObj, theName, "subshape")
6178             return anObj
6179
6180         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6181         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6182         #  @param aShape Shape to get sub-shape of.
6183         #  @param aSubShape Sub-shapes of aShape.
6184         #  @return ID of found sub-shape.
6185         #
6186         #  @ref swig_all_decompose "Example"
6187         @ManageTransactions("LocalOp")
6188         def GetSubShapeID(self, aShape, aSubShape):
6189             """
6190             Obtain unique ID of sub-shape aSubShape inside aShape
6191             of aShape, selected by their unique IDs inside aShape
6192
6193             Parameters:
6194                aShape Shape to get sub-shape of.
6195                aSubShape Sub-shapes of aShape.
6196
6197             Returns:
6198                ID of found sub-shape.
6199             """
6200             # Example: see GEOM_TestAll.py
6201             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6202             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6203             return anID
6204
6205         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6206         #  This function is provided for performance purpose. The complexity is O(n) with n
6207         #  the number of subobjects of aShape
6208         #  @param aShape Shape to get sub-shape of.
6209         #  @param aSubShapes Sub-shapes of aShape.
6210         #  @return list of IDs of found sub-shapes.
6211         #
6212         #  @ref swig_all_decompose "Example"
6213         @ManageTransactions("ShapesOp")
6214         def GetSubShapesIDs(self, aShape, aSubShapes):
6215             """
6216             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6217             This function is provided for performance purpose. The complexity is O(n) with n
6218             the number of subobjects of aShape
6219
6220             Parameters:
6221                aShape Shape to get sub-shape of.
6222                aSubShapes Sub-shapes of aShape.
6223
6224             Returns:
6225                List of IDs of found sub-shape.
6226             """
6227             # Example: see GEOM_TestAll.py
6228             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6229             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6230             return anIDs
6231
6232         # end of l4_access
6233         ## @}
6234
6235         ## @addtogroup l4_decompose
6236         ## @{
6237
6238         ## Get all sub-shapes and groups of \a theShape,
6239         #  that were created already by any other methods.
6240         #  @param theShape Any shape.
6241         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6242         #                       returned, else all found sub-shapes and groups.
6243         #  @return List of existing sub-objects of \a theShape.
6244         #
6245         #  @ref swig_all_decompose "Example"
6246         @ManageTransactions("ShapesOp")
6247         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6248             """
6249             Get all sub-shapes and groups of theShape,
6250             that were created already by any other methods.
6251
6252             Parameters:
6253                 theShape Any shape.
6254                 theGroupsOnly If this parameter is TRUE, only groups will be
6255                                  returned, else all found sub-shapes and groups.
6256
6257             Returns:
6258                 List of existing sub-objects of theShape.
6259             """
6260             # Example: see GEOM_TestAll.py
6261             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6262             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6263             return ListObj
6264
6265         ## Get all groups of \a theShape,
6266         #  that were created already by any other methods.
6267         #  @param theShape Any shape.
6268         #  @return List of existing groups of \a theShape.
6269         #
6270         #  @ref swig_all_decompose "Example"
6271         @ManageTransactions("ShapesOp")
6272         def GetGroups(self, theShape):
6273             """
6274             Get all groups of theShape,
6275             that were created already by any other methods.
6276
6277             Parameters:
6278                 theShape Any shape.
6279
6280             Returns:
6281                 List of existing groups of theShape.
6282             """
6283             # Example: see GEOM_TestAll.py
6284             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6285             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6286             return ListObj
6287
6288         ## Explode a shape on sub-shapes of a given type.
6289         #  If the shape itself matches the type, it is also returned.
6290         #  @param aShape Shape to be exploded.
6291         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6292         #  @param theName Object name; when specified, this parameter is used
6293         #         for result publication in the study. Otherwise, if automatic
6294         #         publication is switched on, default value is used for result name.
6295         #
6296         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6297         #
6298         #  @ref swig_all_decompose "Example"
6299         @ManageTransactions("ShapesOp")
6300         def SubShapeAll(self, aShape, aType, theName=None):
6301             """
6302             Explode a shape on sub-shapes of a given type.
6303             If the shape itself matches the type, it is also returned.
6304
6305             Parameters:
6306                 aShape Shape to be exploded.
6307                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6308                 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             Returns:
6313                 List of sub-shapes of type theShapeType, contained in theShape.
6314             """
6315             # Example: see GEOM_TestAll.py
6316             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6317             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6318             self._autoPublish(ListObj, theName, "subshape")
6319             return ListObj
6320
6321         ## Explode a shape on sub-shapes of a given type.
6322         #  @param aShape Shape to be exploded.
6323         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6324         #  @return List of IDs of sub-shapes.
6325         #
6326         #  @ref swig_all_decompose "Example"
6327         @ManageTransactions("ShapesOp")
6328         def SubShapeAllIDs(self, aShape, aType):
6329             """
6330             Explode a shape on sub-shapes of a given type.
6331
6332             Parameters:
6333                 aShape Shape to be exploded (see geompy.ShapeType)
6334                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6335
6336             Returns:
6337                 List of IDs of sub-shapes.
6338             """
6339             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6340             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6341             return ListObj
6342
6343         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6344         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6345         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6346         #  @param aShape Shape to get sub-shape of.
6347         #  @param ListOfInd List of sub-shapes indices.
6348         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6349         #  @param theName Object name; when specified, this parameter is used
6350         #         for result publication in the study. Otherwise, if automatic
6351         #         publication is switched on, default value is used for result name.
6352         #
6353         #  @return A compound of sub-shapes of aShape.
6354         #
6355         #  @ref swig_all_decompose "Example"
6356         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6357             """
6358             Obtain a compound of sub-shapes of aShape,
6359             selected by their indices in list of all sub-shapes of type aType.
6360             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6361
6362             Parameters:
6363                 aShape Shape to get sub-shape of.
6364                 ListOfID List of sub-shapes indices.
6365                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6366                 theName Object name; when specified, this parameter is used
6367                         for result publication in the study. Otherwise, if automatic
6368                         publication is switched on, default value is used for result name.
6369
6370             Returns:
6371                 A compound of sub-shapes of aShape.
6372             """
6373             # Example: see GEOM_TestAll.py
6374             ListOfIDs = []
6375             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6376             for ind in ListOfInd:
6377                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6378             # note: auto-publishing is done in self.GetSubShape()
6379             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6380             return anObj
6381
6382         ## Explode a shape on sub-shapes of a given type.
6383         #  Sub-shapes will be sorted taking into account their gravity centers,
6384         #  to provide stable order of sub-shapes. Please see
6385         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6386         #  If the shape itself matches the type, it is also returned.
6387         #  @param aShape Shape to be exploded.
6388         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6389         #  @param theName Object name; when specified, this parameter is used
6390         #         for result publication in the study. Otherwise, if automatic
6391         #         publication is switched on, default value is used for result name.
6392         #
6393         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6394         #
6395         #  @ref swig_SubShapeAllSorted "Example"
6396         @ManageTransactions("ShapesOp")
6397         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6398             """
6399             Explode a shape on sub-shapes of a given type.
6400             Sub-shapes will be sorted taking into account their gravity centers,
6401             to provide stable order of sub-shapes.
6402             If the shape itself matches the type, it is also returned.
6403
6404             Parameters:
6405                 aShape Shape to be exploded.
6406                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6407                 theName Object name; when specified, this parameter is used
6408                         for result publication in the study. Otherwise, if automatic
6409                         publication is switched on, default value is used for result name.
6410
6411             Returns:
6412                 List of sub-shapes of type theShapeType, contained in theShape.
6413             """
6414             # Example: see GEOM_TestAll.py
6415             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6416             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6417             self._autoPublish(ListObj, theName, "subshape")
6418             return ListObj
6419
6420         ## Explode a shape on sub-shapes of a given type.
6421         #  Sub-shapes will be sorted taking into account their gravity centers,
6422         #  to provide stable order of sub-shapes. Please see
6423         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6424         #  @param aShape Shape to be exploded.
6425         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6426         #  @return List of IDs of sub-shapes.
6427         #
6428         #  @ref swig_all_decompose "Example"
6429         @ManageTransactions("ShapesOp")
6430         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6431             """
6432             Explode a shape on sub-shapes of a given type.
6433             Sub-shapes will be sorted taking into account their gravity centers,
6434             to provide stable order of sub-shapes.
6435
6436             Parameters:
6437                 aShape Shape to be exploded.
6438                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6439
6440             Returns:
6441                 List of IDs of sub-shapes.
6442             """
6443             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6444             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6445             return ListIDs
6446
6447         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6448         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6449         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6450         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6451         #  @param aShape Shape to get sub-shape of.
6452         #  @param ListOfInd List of sub-shapes indices.
6453         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6454         #  @param theName Object name; when specified, this parameter is used
6455         #         for result publication in the study. Otherwise, if automatic
6456         #         publication is switched on, default value is used for result name.
6457         #
6458         #  @return A compound of sub-shapes of aShape.
6459         #
6460         #  @ref swig_all_decompose "Example"
6461         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6462             """
6463             Obtain a compound of sub-shapes of aShape,
6464             selected by they indices in sorted list of all sub-shapes of type aType.
6465             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6466
6467             Parameters:
6468                 aShape Shape to get sub-shape of.
6469                 ListOfID List of sub-shapes indices.
6470                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6471                 theName Object name; when specified, this parameter is used
6472                         for result publication in the study. Otherwise, if automatic
6473                         publication is switched on, default value is used for result name.
6474
6475             Returns:
6476                 A compound of sub-shapes of aShape.
6477             """
6478             # Example: see GEOM_TestAll.py
6479             ListOfIDs = []
6480             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6481             for ind in ListOfInd:
6482                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6483             # note: auto-publishing is done in self.GetSubShape()
6484             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6485             return anObj
6486
6487         ## Extract shapes (excluding the main shape) of given type.
6488         #  @param aShape The shape.
6489         #  @param aType  The shape type (see ShapeType())
6490         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6491         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6492         #  @param theName Object name; when specified, this parameter is used
6493         #         for result publication in the study. Otherwise, if automatic
6494         #         publication is switched on, default value is used for result name.
6495         #
6496         #  @return List of sub-shapes of type aType, contained in aShape.
6497         #
6498         #  @ref swig_FilletChamfer "Example"
6499         @ManageTransactions("ShapesOp")
6500         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6501             """
6502             Extract shapes (excluding the main shape) of given type.
6503
6504             Parameters:
6505                 aShape The shape.
6506                 aType  The shape type (see geompy.ShapeType)
6507                 isSorted Boolean flag to switch sorting on/off.
6508                 theName Object name; when specified, this parameter is used
6509                         for result publication in the study. Otherwise, if automatic
6510                         publication is switched on, default value is used for result name.
6511
6512             Returns:
6513                 List of sub-shapes of type aType, contained in aShape.
6514             """
6515             # Example: see GEOM_TestAll.py
6516             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6517             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6518             self._autoPublish(ListObj, theName, "subshape")
6519             return ListObj
6520
6521         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6522         #  @param aShape Main shape.
6523         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6524         #  @param 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         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6528         #
6529         #  @ref swig_all_decompose "Example"
6530         @ManageTransactions("ShapesOp")
6531         def SubShapes(self, aShape, anIDs, theName=None):
6532             """
6533             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6534
6535             Parameters:
6536                 aShape Main shape.
6537                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6538                 theName Object name; when specified, this parameter is used
6539                         for result publication in the study. Otherwise, if automatic
6540                         publication is switched on, default value is used for result name.
6541
6542             Returns:
6543                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6544             """
6545             # Example: see GEOM_TestAll.py
6546             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6547             RaiseIfFailed("SubShapes", self.ShapesOp)
6548             self._autoPublish(ListObj, theName, "subshape")
6549             return ListObj
6550
6551         ## Explode a shape into edges sorted in a row from a starting point.
6552         #  @param theShape the shape to be exploded on edges.
6553         #  @param theStartPoint the starting point.
6554         #  @param theName Object name; when specified, this parameter is used
6555         #         for result publication in the study. Otherwise, if automatic
6556         #         publication is switched on, default value is used for result name.
6557         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6558         #          of edges sorted in a row from a starting point.
6559         #
6560         #  @ref swig_GetSubShapeEdgeSorted "Example"
6561         @ManageTransactions("ShapesOp")
6562         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6563             """
6564             Explode a shape into edges sorted in a row from a starting point.
6565
6566             Parameters:
6567                 theShape the shape to be exploded on edges.
6568                 theStartPoint the starting point.
6569                 theName Object name; when specified, this parameter is used
6570                         for result publication in the study. Otherwise, if automatic
6571                         publication is switched on, default value is used for result name.
6572
6573             Returns:
6574                 List of GEOM.GEOM_Object that is actually an ordered list
6575                 of edges sorted in a row from a starting point.
6576             """
6577             # Example: see GEOM_TestAll.py
6578             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6579             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6580             self._autoPublish(ListObj, theName, "SortedEdges")
6581             return ListObj
6582
6583         ##
6584         # Return the list of subshapes that satisfies a certain tolerance
6585         # criterion. The user defines the type of shapes to be returned, the
6586         # condition and the tolerance value. The operation is defined for
6587         # faces, edges and vertices only. E.g. for theShapeType FACE,
6588         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6589         # all faces of theShape that have tolerances greater then 1.e7.
6590         #
6591         #  @param theShape the shape to be exploded
6592         #  @param theShapeType the type of sub-shapes to be returned (see
6593         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6594         #  @param theCondition the condition type (see GEOM::comparison_condition).
6595         #  @param theTolerance the tolerance filter.
6596         #  @param theName Object name; when specified, this parameter is used
6597         #         for result publication in the study. Otherwise, if automatic
6598         #         publication is switched on, default value is used for result name.
6599         #  @return the list of shapes that satisfy the conditions.
6600         #
6601         #  @ref swig_GetSubShapesWithTolerance "Example"
6602         @ManageTransactions("ShapesOp")
6603         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6604                                       theCondition, theTolerance, theName=None):
6605             """
6606             Return the list of subshapes that satisfies a certain tolerance
6607             criterion. The user defines the type of shapes to be returned, the
6608             condition and the tolerance value. The operation is defined for
6609             faces, edges and vertices only. E.g. for theShapeType FACE,
6610             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6611             all faces of theShape that have tolerances greater then 1.e7.
6612             
6613             Parameters:
6614                 theShape the shape to be exploded
6615                 theShapeType the type of sub-shapes to be returned (see
6616                              ShapeType()). Can have the values FACE,
6617                              EDGE and VERTEX only.
6618                 theCondition the condition type (see GEOM::comparison_condition).
6619                 theTolerance the tolerance filter.
6620                 theName Object name; when specified, this parameter is used
6621                         for result publication in the study. Otherwise, if automatic
6622                         publication is switched on, default value is used for result name.
6623
6624             Returns:
6625                 The list of shapes that satisfy the conditions.
6626             """
6627             # Example: see GEOM_TestAll.py
6628             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6629                                                               theCondition, theTolerance)
6630             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6631             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6632             return ListObj
6633
6634         ## Check if the object is a sub-object of another GEOM object.
6635         #  @param aSubObject Checked sub-object (or its parent object, in case if
6636         #         \a theSubObjectIndex is non-zero).
6637         #  @param anObject An object that is checked for ownership (or its parent object,
6638         #         in case if \a theObjectIndex is non-zero).
6639         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6640         #         identifies a sub-object within its parent specified via \a theSubObject.
6641         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6642         #         identifies an object within its parent specified via \a theObject.
6643         #  @return TRUE, if the given object contains sub-object.
6644         @ManageTransactions("ShapesOp")
6645         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6646             """
6647             Check if the object is a sub-object of another GEOM object.
6648             
6649             Parameters:
6650                 aSubObject Checked sub-object (or its parent object, in case if
6651                     \a theSubObjectIndex is non-zero).
6652                 anObject An object that is checked for ownership (or its parent object,
6653                     in case if \a theObjectIndex is non-zero).
6654                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6655                     identifies a sub-object within its parent specified via \a theSubObject.
6656                 anObjectIndex When non-zero, specifies a sub-shape index that
6657                     identifies an object within its parent specified via \a theObject.
6658
6659             Returns
6660                 TRUE, if the given object contains sub-object.
6661             """
6662             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6663             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6664             return IsOk
6665
6666         ## Perform extraction of sub-shapes from the main shape.
6667         #
6668         #  @param theShape the main shape
6669         #  @param theListOfID the list of sub-shape IDs to be extracted from
6670         #         the main shape.
6671         #  @return New GEOM.GEOM_Object, containing the shape without
6672         #          extracted sub-shapes.
6673         #
6674         #  @ref swig_MakeExtraction "Example"
6675         @ManageTransactions("ShapesOp")
6676         def MakeExtraction(self, theShape, theListOfID, theName=None):
6677             """
6678             Perform extraction of sub-shapes from the main shape.
6679
6680             Parameters:
6681                 theShape the main shape
6682                 theListOfID the list of sub-shape IDs to be extracted from
6683                             the main shape.
6684
6685             Returns
6686                 New GEOM.GEOM_Object, containing the shape without
6687                 extracted sub-shapes.
6688             """
6689             # Example: see GEOM_TestAll.py
6690             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6691             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6692             self._autoPublish(anObj, theName, "Extraction")
6693             return anObj
6694
6695         # end of l4_decompose
6696         ## @}
6697
6698         ## @addtogroup l4_decompose_d
6699         ## @{
6700
6701         ## Deprecated method
6702         #  It works like SubShapeAllSortedCentres(), but wrongly
6703         #  defines centres of faces, shells and solids.
6704         @ManageTransactions("ShapesOp")
6705         def SubShapeAllSorted(self, aShape, aType, theName=None):
6706             """
6707             Deprecated method
6708             It works like geompy.SubShapeAllSortedCentres, but wrongly
6709             defines centres of faces, shells and solids.
6710             """
6711             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6712             RaiseIfFailed("MakeExplode", self.ShapesOp)
6713             self._autoPublish(ListObj, theName, "subshape")
6714             return ListObj
6715
6716         ## Deprecated method
6717         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6718         #  defines centres of faces, shells and solids.
6719         @ManageTransactions("ShapesOp")
6720         def SubShapeAllSortedIDs(self, aShape, aType):
6721             """
6722             Deprecated method
6723             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6724             defines centres of faces, shells and solids.
6725             """
6726             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6727             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6728             return ListIDs
6729
6730         ## Deprecated method
6731         #  It works like SubShapeSortedCentres(), but has a bug
6732         #  (wrongly defines centres of faces, shells and solids).
6733         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6734             """
6735             Deprecated method
6736             It works like geompy.SubShapeSortedCentres, but has a bug
6737             (wrongly defines centres of faces, shells and solids).
6738             """
6739             ListOfIDs = []
6740             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6741             for ind in ListOfInd:
6742                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6743             # note: auto-publishing is done in self.GetSubShape()
6744             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6745             return anObj
6746
6747         # end of l4_decompose_d
6748         ## @}
6749
6750         ## @addtogroup l3_healing
6751         ## @{
6752
6753         ## Apply a sequence of Shape Healing operators to the given object.
6754         #  @param theShape Shape to be processed.
6755         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6756         #  @param theParameters List of names of parameters
6757         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6758         #  @param theValues List of values of parameters, in the same order
6759         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6760         #  @param theName Object name; when specified, this parameter is used
6761         #         for result publication in the study. Otherwise, if automatic
6762         #         publication is switched on, default value is used for result name.
6763         #
6764         #  <b> Operators and Parameters: </b> \n
6765         #
6766         #  * \b FixShape - corrects invalid shapes. \n
6767         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6768         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6769         #
6770         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6771         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6772         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6773         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6774         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6775         #  - \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
6776         #  - \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
6777         #  - \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
6778         #
6779         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6780         #    surfaces in segments using a certain angle. \n
6781         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6782         #    if Angle=180, four if Angle=90, etc). \n
6783         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6784         #
6785         #  * \b SplitClosedFaces - splits closed faces in segments.
6786         #    The number of segments depends on the number of splitting points.\n
6787         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6788         #
6789         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6790         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6791         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6792         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6793         #   This and the previous parameters can take the following values:\n
6794         #   \b Parametric \b Continuity \n
6795         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6796         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6797         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6798         #    ruling out sharp edges).\n
6799         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6800         #       are of the same magnitude).\n
6801         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6802         #    or surfaces (d/du C(u)) are the same at junction. \n
6803         #   \b Geometric \b Continuity \n
6804         #   \b G1: first derivatives are proportional at junction.\n
6805         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6806         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6807         #   \b G2: first and second derivatives are proportional at junction.
6808         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6809         #    continuity requires that the underlying parameterization was continuous as well.
6810         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6811         #
6812         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6813         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6814         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6815         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6816         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6817         #       with the specified parameters.\n
6818         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6819         #       with the specified parameters.\n
6820         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6821         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6822         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6823         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6824         #
6825         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6826         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6827         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6828         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6829         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6830         #
6831         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6832         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6833         #
6834         #
6835         #  @return New GEOM.GEOM_Object, containing processed shape.
6836         #
6837         #  \n @ref tui_shape_processing "Example"
6838         @ManageTransactions("HealOp")
6839         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6840             """
6841             Apply a sequence of Shape Healing operators to the given object.
6842
6843             Parameters:
6844                 theShape Shape to be processed.
6845                 theValues List of values of parameters, in the same order
6846                           as parameters are listed in theParameters list.
6847                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6848                 theParameters List of names of parameters
6849                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6850                 theName Object name; when specified, this parameter is used
6851                         for result publication in the study. Otherwise, if automatic
6852                         publication is switched on, default value is used for result name.
6853
6854                 Operators and Parameters:
6855
6856                  * FixShape - corrects invalid shapes.
6857                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6858                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6859                  * FixFaceSize - removes small faces, such as spots and strips.
6860                      * FixFaceSize.Tolerance - defines minimum possible face size.
6861                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6862                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6863                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6864                      * 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.
6865                      * 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.
6866                      * 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.
6867
6868                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6869                                 in segments using a certain angle.
6870                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6871                                           if Angle=180, four if Angle=90, etc).
6872                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6873                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6874                                       splitting points.
6875                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6876                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6877                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6878                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6879                      * SplitContinuity.CurveContinuity - required continuity for curves.
6880                        This and the previous parameters can take the following values:
6881
6882                        Parametric Continuity:
6883                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6884                                                    coincidental. The curves or surfaces may still meet at an angle,
6885                                                    giving rise to a sharp corner or edge).
6886                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6887                                                    are parallel, ruling out sharp edges).
6888                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6889                                                   or surfaces are of the same magnitude).
6890                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6891                           curves or surfaces (d/du C(u)) are the same at junction.
6892
6893                        Geometric Continuity:
6894                        G1: first derivatives are proportional at junction.
6895                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6896                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6897                        G2: first and second derivatives are proportional at junction. As the names imply,
6898                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6899                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6900                            geometric continuity of order n, but not vice-versa.
6901                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6902                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6903                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6904                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6905                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6906                                                         the specified parameters.
6907                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6908                                                         the specified parameters.
6909                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6910                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6911                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6912                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6913                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6914                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6915                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6916                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6917                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6918                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6919                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6920
6921             Returns:
6922                 New GEOM.GEOM_Object, containing processed shape.
6923
6924             Note: For more information look through SALOME Geometry User's Guide->
6925                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6926             """
6927             # Example: see GEOM_TestHealing.py
6928             theValues,Parameters = ParseList(theValues)
6929             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6930             # To avoid script failure in case of good argument shape
6931             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6932                 return theShape
6933             RaiseIfFailed("ProcessShape", self.HealOp)
6934             for string in (theOperators + theParameters):
6935                 Parameters = ":" + Parameters
6936                 pass
6937             anObj.SetParameters(Parameters)
6938             self._autoPublish(anObj, theName, "healed")
6939             return anObj
6940
6941         ## Remove faces from the given object (shape).
6942         #  @param theObject Shape to be processed.
6943         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6944         #                  removes ALL faces of the given object.
6945         #  @param theName Object name; when specified, this parameter is used
6946         #         for result publication in the study. Otherwise, if automatic
6947         #         publication is switched on, default value is used for result name.
6948         #
6949         #  @return New GEOM.GEOM_Object, containing processed shape.
6950         #
6951         #  @ref tui_suppress_faces "Example"
6952         @ManageTransactions("HealOp")
6953         def SuppressFaces(self, theObject, theFaces, theName=None):
6954             """
6955             Remove faces from the given object (shape).
6956
6957             Parameters:
6958                 theObject Shape to be processed.
6959                 theFaces Indices of faces to be removed, if EMPTY then the method
6960                          removes ALL faces of the given object.
6961                 theName Object name; when specified, this parameter is used
6962                         for result publication in the study. Otherwise, if automatic
6963                         publication is switched on, default value is used for result name.
6964
6965             Returns:
6966                 New GEOM.GEOM_Object, containing processed shape.
6967             """
6968             # Example: see GEOM_TestHealing.py
6969             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6970             RaiseIfFailed("SuppressFaces", self.HealOp)
6971             self._autoPublish(anObj, theName, "suppressFaces")
6972             return anObj
6973
6974         ## Sewing of faces into a single shell.
6975         #  @param ListShape Shapes to be processed.
6976         #  @param theTolerance Required tolerance value.
6977         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6978         #  @param theName Object name; when specified, this parameter is used
6979         #         for result publication in the study. Otherwise, if automatic
6980         #         publication is switched on, default value is used for result name.
6981         #
6982         #  @return New GEOM.GEOM_Object, containing a result shell.
6983         #
6984         #  @ref tui_sewing "Example"
6985         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6986             """
6987             Sewing of faces into a single shell.
6988
6989             Parameters:
6990                 ListShape Shapes to be processed.
6991                 theTolerance Required tolerance value.
6992                 AllowNonManifold Flag that allows non-manifold sewing.
6993                 theName Object name; when specified, this parameter is used
6994                         for result publication in the study. Otherwise, if automatic
6995                         publication is switched on, default value is used for result name.
6996
6997             Returns:
6998                 New GEOM.GEOM_Object, containing containing a result shell.
6999             """
7000             # Example: see GEOM_TestHealing.py
7001             # note: auto-publishing is done in self.Sew()
7002             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7003             return anObj
7004
7005         ## Sewing of faces into a single shell.
7006         #  @param ListShape Shapes to be processed.
7007         #  @param theTolerance Required tolerance value.
7008         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7009         #  @param theName Object name; when specified, this parameter is used
7010         #         for result publication in the study. Otherwise, if automatic
7011         #         publication is switched on, default value is used for result name.
7012         #
7013         #  @return New GEOM.GEOM_Object, containing a result shell.
7014         @ManageTransactions("HealOp")
7015         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7016             """
7017             Sewing of faces into a single shell.
7018
7019             Parameters:
7020                 ListShape Shapes to be processed.
7021                 theTolerance Required tolerance value.
7022                 AllowNonManifold Flag that allows non-manifold sewing.
7023                 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             Returns:
7028                 New GEOM.GEOM_Object, containing a result shell.
7029             """
7030             # Example: see MakeSewing() above
7031             theTolerance,Parameters = ParseParameters(theTolerance)
7032             if AllowNonManifold:
7033                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7034             else:
7035                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7036             # To avoid script failure in case of good argument shape
7037             # (Fix of test cases geom/bugs11/L7,L8)
7038             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7039                 return anObj
7040             RaiseIfFailed("Sew", self.HealOp)
7041             anObj.SetParameters(Parameters)
7042             self._autoPublish(anObj, theName, "sewed")
7043             return anObj
7044
7045         ## Rebuild the topology of theSolids by removing
7046         #  the faces that are shared by several solids.
7047         #  @param theSolids A compound or a list of solids to be processed.
7048         #  @param theName Object name; when specified, this parameter is used
7049         #         for result publication in the study. Otherwise, if automatic
7050         #         publication is switched on, default value is used for result name.
7051         #
7052         #  @return New GEOM.GEOM_Object, containing processed shape.
7053         #
7054         #  @ref tui_remove_webs "Example"
7055         @ManageTransactions("HealOp")
7056         def RemoveInternalFaces (self, theSolids, theName=None):
7057             """
7058             Rebuild the topology of theSolids by removing
7059             the faces that are shared by several solids.
7060
7061             Parameters:
7062                 theSolids A compound or a list of solids to be processed.
7063                 theName Object name; when specified, this parameter is used
7064                         for result publication in the study. Otherwise, if automatic
7065                         publication is switched on, default value is used for result name.
7066
7067             Returns:
7068                 New GEOM.GEOM_Object, containing processed shape.
7069             """
7070             # Example: see GEOM_TestHealing.py
7071             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7072             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7073             self._autoPublish(anObj, theName, "removeWebs")
7074             return anObj
7075
7076         ## Remove internal wires and edges from the given object (face).
7077         #  @param theObject Shape to be processed.
7078         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7079         #                  removes ALL internal wires of the given object.
7080         #  @param theName Object name; when specified, this parameter is used
7081         #         for result publication in the study. Otherwise, if automatic
7082         #         publication is switched on, default value is used for result name.
7083         #
7084         #  @return New GEOM.GEOM_Object, containing processed shape.
7085         #
7086         #  @ref tui_suppress_internal_wires "Example"
7087         @ManageTransactions("HealOp")
7088         def SuppressInternalWires(self, theObject, theWires, theName=None):
7089             """
7090             Remove internal wires and edges from the given object (face).
7091
7092             Parameters:
7093                 theObject Shape to be processed.
7094                 theWires Indices of wires to be removed, if EMPTY then the method
7095                          removes ALL internal wires of the given object.
7096                 theName Object name; when specified, this parameter is used
7097                         for result publication in the study. Otherwise, if automatic
7098                         publication is switched on, default value is used for result name.
7099
7100             Returns:
7101                 New GEOM.GEOM_Object, containing processed shape.
7102             """
7103             # Example: see GEOM_TestHealing.py
7104             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7105             RaiseIfFailed("RemoveIntWires", self.HealOp)
7106             self._autoPublish(anObj, theName, "suppressWires")
7107             return anObj
7108
7109         ## Remove internal closed contours (holes) from the given object.
7110         #  @param theObject Shape to be processed.
7111         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7112         #                  removes ALL internal holes of the given object
7113         #  @param theName Object name; when specified, this parameter is used
7114         #         for result publication in the study. Otherwise, if automatic
7115         #         publication is switched on, default value is used for result name.
7116         #
7117         #  @return New GEOM.GEOM_Object, containing processed shape.
7118         #
7119         #  @ref tui_suppress_holes "Example"
7120         @ManageTransactions("HealOp")
7121         def SuppressHoles(self, theObject, theWires, theName=None):
7122             """
7123             Remove internal closed contours (holes) from the given object.
7124
7125             Parameters:
7126                 theObject Shape to be processed.
7127                 theWires Indices of wires to be removed, if EMPTY then the method
7128                          removes ALL internal holes of the given object
7129                 theName Object name; when specified, this parameter is used
7130                         for result publication in the study. Otherwise, if automatic
7131                         publication is switched on, default value is used for result name.
7132
7133             Returns:
7134                 New GEOM.GEOM_Object, containing processed shape.
7135             """
7136             # Example: see GEOM_TestHealing.py
7137             anObj = self.HealOp.FillHoles(theObject, theWires)
7138             RaiseIfFailed("FillHoles", self.HealOp)
7139             self._autoPublish(anObj, theName, "suppressHoles")
7140             return anObj
7141
7142         ## Close an open wire.
7143         #  @param theObject Shape to be processed.
7144         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7145         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7146         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7147         #                        If False : closure by creation of an edge between ends.
7148         #  @param theName Object name; when specified, this parameter is used
7149         #         for result publication in the study. Otherwise, if automatic
7150         #         publication is switched on, default value is used for result name.
7151         #
7152         #  @return New GEOM.GEOM_Object, containing processed shape.
7153         #
7154         #  @ref tui_close_contour "Example"
7155         @ManageTransactions("HealOp")
7156         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7157             """
7158             Close an open wire.
7159
7160             Parameters:
7161                 theObject Shape to be processed.
7162                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7163                          if [ ], then theObject itself is a wire.
7164                 isCommonVertex If True  : closure by creation of a common vertex,
7165                                If False : closure by creation of an edge between ends.
7166                 theName Object name; when specified, this parameter is used
7167                         for result publication in the study. Otherwise, if automatic
7168                         publication is switched on, default value is used for result name.
7169
7170             Returns:
7171                 New GEOM.GEOM_Object, containing processed shape.
7172             """
7173             # Example: see GEOM_TestHealing.py
7174             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7175             RaiseIfFailed("CloseContour", self.HealOp)
7176             self._autoPublish(anObj, theName, "closeContour")
7177             return anObj
7178
7179         ## Addition of a point to a given edge object.
7180         #  @param theObject Shape to be processed.
7181         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7182         #                      if -1, then theObject itself is the edge.
7183         #  @param theValue Value of parameter on edge or length parameter,
7184         #                  depending on \a isByParameter.
7185         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7186         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7187         #  @param theName Object name; when specified, this parameter is used
7188         #         for result publication in the study. Otherwise, if automatic
7189         #         publication is switched on, default value is used for result name.
7190         #
7191         #  @return New GEOM.GEOM_Object, containing processed shape.
7192         #
7193         #  @ref tui_add_point_on_edge "Example"
7194         @ManageTransactions("HealOp")
7195         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7196             """
7197             Addition of a point to a given edge object.
7198
7199             Parameters:
7200                 theObject Shape to be processed.
7201                 theEdgeIndex Index of edge to be divided within theObject's shape,
7202                              if -1, then theObject itself is the edge.
7203                 theValue Value of parameter on edge or length parameter,
7204                          depending on isByParameter.
7205                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7206                               if FALSE : theValue is treated as a length parameter [0..1]
7207                 theName Object name; when specified, this parameter is used
7208                         for result publication in the study. Otherwise, if automatic
7209                         publication is switched on, default value is used for result name.
7210
7211             Returns:
7212                 New GEOM.GEOM_Object, containing processed shape.
7213             """
7214             # Example: see GEOM_TestHealing.py
7215             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7216             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7217             RaiseIfFailed("DivideEdge", self.HealOp)
7218             anObj.SetParameters(Parameters)
7219             self._autoPublish(anObj, theName, "divideEdge")
7220             return anObj
7221
7222         ## Addition of points to a given edge of \a theObject by projecting
7223         #  other points to the given edge.
7224         #  @param theObject Shape to be processed.
7225         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7226         #                      if -1, then theObject itself is the edge.
7227         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7228         #  @param theName Object name; when specified, this parameter is used
7229         #         for result publication in the study. Otherwise, if automatic
7230         #         publication is switched on, default value is used for result name.
7231         #
7232         #  @return New GEOM.GEOM_Object, containing processed shape.
7233         #
7234         #  @ref tui_add_point_on_edge "Example"
7235         @ManageTransactions("HealOp")
7236         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7237             """
7238             Addition of points to a given edge of \a theObject by projecting
7239             other points to the given edge.
7240
7241             Parameters:
7242                 theObject Shape to be processed.
7243                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7244                              if -1, then theObject itself is the edge.
7245                 thePoints List of points to project to theEdgeIndex-th edge.
7246                 theName Object name; when specified, this parameter is used
7247                         for result publication in the study. Otherwise, if automatic
7248                         publication is switched on, default value is used for result name.
7249
7250             Returns:
7251                 New GEOM.GEOM_Object, containing processed shape.
7252             """
7253             # Example: see GEOM_TestHealing.py
7254             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7255                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7256             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7257             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7258             self._autoPublish(anObj, theName, "divideEdge")
7259             return anObj
7260
7261         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7262         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7263         #  @param theVertices A list of vertices to suppress. If the list
7264         #                     is empty, all vertices in a wire will be assumed.
7265         #  @param theName Object name; when specified, this parameter is used
7266         #         for result publication in the study. Otherwise, if automatic
7267         #         publication is switched on, default value is used for result name.
7268         #
7269         #  @return New GEOM.GEOM_Object with modified wire.
7270         #
7271         #  @ref tui_fuse_collinear_edges "Example"
7272         @ManageTransactions("HealOp")
7273         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7274             """
7275             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7276
7277             Parameters:
7278                 theWire Wire to minimize the number of C1 continuous edges in.
7279                 theVertices A list of vertices to suppress. If the list
7280                             is empty, all vertices in a wire will be assumed.
7281                 theName Object name; when specified, this parameter is used
7282                         for result publication in the study. Otherwise, if automatic
7283                         publication is switched on, default value is used for result name.
7284
7285             Returns:
7286                 New GEOM.GEOM_Object with modified wire.
7287             """
7288             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7289             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7290             self._autoPublish(anObj, theName, "fuseEdges")
7291             return anObj
7292
7293         ## Change orientation of the given object. Updates given shape.
7294         #  @param theObject Shape to be processed.
7295         #  @return Updated <var>theObject</var>
7296         #
7297         #  @ref swig_todo "Example"
7298         @ManageTransactions("HealOp")
7299         def ChangeOrientationShell(self,theObject):
7300             """
7301             Change orientation of the given object. Updates given shape.
7302
7303             Parameters:
7304                 theObject Shape to be processed.
7305
7306             Returns:
7307                 Updated theObject
7308             """
7309             theObject = self.HealOp.ChangeOrientation(theObject)
7310             RaiseIfFailed("ChangeOrientation", self.HealOp)
7311             pass
7312
7313         ## Change orientation of the given object.
7314         #  @param theObject Shape to be processed.
7315         #  @param theName Object name; when specified, this parameter is used
7316         #         for result publication in the study. Otherwise, if automatic
7317         #         publication is switched on, default value is used for result name.
7318         #
7319         #  @return New GEOM.GEOM_Object, containing processed shape.
7320         #
7321         #  @ref swig_todo "Example"
7322         @ManageTransactions("HealOp")
7323         def ChangeOrientationShellCopy(self, theObject, theName=None):
7324             """
7325             Change orientation of the given object.
7326
7327             Parameters:
7328                 theObject Shape to be processed.
7329                 theName Object name; when specified, this parameter is used
7330                         for result publication in the study. Otherwise, if automatic
7331                         publication is switched on, default value is used for result name.
7332
7333             Returns:
7334                 New GEOM.GEOM_Object, containing processed shape.
7335             """
7336             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7337             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7338             self._autoPublish(anObj, theName, "reversed")
7339             return anObj
7340
7341         ## Try to limit tolerance of the given object by value \a theTolerance.
7342         #  @param theObject Shape to be processed.
7343         #  @param theTolerance Required tolerance value.
7344         #  @param theName Object name; when specified, this parameter is used
7345         #         for result publication in the study. Otherwise, if automatic
7346         #         publication is switched on, default value is used for result name.
7347         #
7348         #  @return New GEOM.GEOM_Object, containing processed shape.
7349         #
7350         #  @ref tui_limit_tolerance "Example"
7351         @ManageTransactions("HealOp")
7352         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7353             """
7354             Try to limit tolerance of the given object by value theTolerance.
7355
7356             Parameters:
7357                 theObject Shape to be processed.
7358                 theTolerance Required tolerance value.
7359                 theName Object name; when specified, this parameter is used
7360                         for result publication in the study. Otherwise, if automatic
7361                         publication is switched on, default value is used for result name.
7362
7363             Returns:
7364                 New GEOM.GEOM_Object, containing processed shape.
7365             """
7366             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7367             RaiseIfFailed("LimitTolerance", self.HealOp)
7368             self._autoPublish(anObj, theName, "limitTolerance")
7369             return anObj
7370
7371         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7372         #  that constitute a free boundary of the given shape.
7373         #  @param theObject Shape to get free boundary of.
7374         #  @param theName Object name; when specified, this parameter is used
7375         #         for result publication in the study. Otherwise, if automatic
7376         #         publication is switched on, default value is used for result name.
7377         #
7378         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7379         #  \n \a status: FALSE, if an error(s) occured during the method execution.
7380         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7381         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7382         #
7383         #  @ref tui_free_boundaries_page "Example"
7384         @ManageTransactions("HealOp")
7385         def GetFreeBoundary(self, theObject, theName=None):
7386             """
7387             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7388             that constitute a free boundary of the given shape.
7389
7390             Parameters:
7391                 theObject Shape to get free boundary of.
7392                 theName Object name; when specified, this parameter is used
7393                         for result publication in the study. Otherwise, if automatic
7394                         publication is switched on, default value is used for result name.
7395
7396             Returns:
7397                 [status, theClosedWires, theOpenWires]
7398                  status: FALSE, if an error(s) occured during the method execution.
7399                  theClosedWires: Closed wires on the free boundary of the given shape.
7400                  theOpenWires: Open wires on the free boundary of the given shape.
7401             """
7402             # Example: see GEOM_TestHealing.py
7403             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7404             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7405             self._autoPublish(anObj[1], theName, "closedWire")
7406             self._autoPublish(anObj[2], theName, "openWire")
7407             return anObj
7408
7409         ## Replace coincident faces in \a theShapes by one face.
7410         #  @param theShapes Initial shapes, either a list or compound of shapes.
7411         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7412         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7413         #                         otherwise all initial shapes.
7414         #  @param theName Object name; when specified, this parameter is used
7415         #         for result publication in the study. Otherwise, if automatic
7416         #         publication is switched on, default value is used for result name.
7417         #
7418         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7419         #
7420         #  @ref tui_glue_faces "Example"
7421         @ManageTransactions("ShapesOp")
7422         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7423             """
7424             Replace coincident faces in theShapes by one face.
7425
7426             Parameters:
7427                 theShapes Initial shapes, either a list or compound of shapes.
7428                 theTolerance Maximum distance between faces, which can be considered as coincident.
7429                 doKeepNonSolids If FALSE, only solids will present in the result,
7430                                 otherwise all initial shapes.
7431                 theName Object name; when specified, this parameter is used
7432                         for result publication in the study. Otherwise, if automatic
7433                         publication is switched on, default value is used for result name.
7434
7435             Returns:
7436                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7437             """
7438             # Example: see GEOM_Spanner.py
7439             theTolerance,Parameters = ParseParameters(theTolerance)
7440             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7441             if anObj is None:
7442                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
7443             anObj.SetParameters(Parameters)
7444             self._autoPublish(anObj, theName, "glueFaces")
7445             return anObj
7446
7447         ## Find coincident faces in \a theShapes for possible gluing.
7448         #  @param theShapes Initial shapes, either a list or compound of shapes.
7449         #  @param theTolerance Maximum distance between faces,
7450         #                      which can be considered as coincident.
7451         #  @param theName Object name; when specified, this parameter is used
7452         #         for result publication in the study. Otherwise, if automatic
7453         #         publication is switched on, default value is used for result name.
7454         #
7455         #  @return GEOM.ListOfGO
7456         #
7457         #  @ref tui_glue_faces "Example"
7458         @ManageTransactions("ShapesOp")
7459         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7460             """
7461             Find coincident faces in theShapes for possible gluing.
7462
7463             Parameters:
7464                 theShapes Initial shapes, either a list or compound of shapes.
7465                 theTolerance Maximum distance between faces,
7466                              which can be considered as coincident.
7467                 theName Object name; when specified, this parameter is used
7468                         for result publication in the study. Otherwise, if automatic
7469                         publication is switched on, default value is used for result name.
7470
7471             Returns:
7472                 GEOM.ListOfGO
7473             """
7474             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7475             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7476             self._autoPublish(anObj, theName, "facesToGlue")
7477             return anObj
7478
7479         ## Replace coincident faces in \a theShapes by one face
7480         #  in compliance with given list of faces
7481         #  @param theShapes Initial shapes, either a list or compound of shapes.
7482         #  @param theTolerance Maximum distance between faces,
7483         #                      which can be considered as coincident.
7484         #  @param theFaces List of faces for gluing.
7485         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7486         #                         otherwise all initial shapes.
7487         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7488         #                        will be glued, otherwise only the edges,
7489         #                        belonging to <VAR>theFaces</VAR>.
7490         #  @param theName Object name; when specified, this parameter is used
7491         #         for result publication in the study. Otherwise, if automatic
7492         #         publication is switched on, default value is used for result name.
7493         #
7494         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7495         #
7496         #  @ref tui_glue_faces "Example"
7497         @ManageTransactions("ShapesOp")
7498         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7499                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7500             """
7501             Replace coincident faces in theShapes by one face
7502             in compliance with given list of faces
7503
7504             Parameters:
7505                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7506                 theTolerance Maximum distance between faces,
7507                              which can be considered as coincident.
7508                 theFaces List of faces for gluing.
7509                 doKeepNonSolids If FALSE, only solids will present in the result,
7510                                 otherwise all initial shapes.
7511                 doGlueAllEdges If TRUE, all coincident edges of theShape
7512                                will be glued, otherwise only the edges,
7513                                belonging to theFaces.
7514                 theName Object name; when specified, this parameter is used
7515                         for result publication in the study. Otherwise, if automatic
7516                         publication is switched on, default value is used for result name.
7517
7518             Returns:
7519                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7520             """
7521             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7522                                                       doKeepNonSolids, doGlueAllEdges)
7523             if anObj is None:
7524                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
7525             self._autoPublish(anObj, theName, "glueFaces")
7526             return anObj
7527
7528         ## Replace coincident edges in \a theShapes by one edge.
7529         #  @param theShapes Initial shapes, either a list or compound of shapes.
7530         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7531         #  @param theName Object name; when specified, this parameter is used
7532         #         for result publication in the study. Otherwise, if automatic
7533         #         publication is switched on, default value is used for result name.
7534         #
7535         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7536         #
7537         #  @ref tui_glue_edges "Example"
7538         @ManageTransactions("ShapesOp")
7539         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7540             """
7541             Replace coincident edges in theShapes by one edge.
7542
7543             Parameters:
7544                 theShapes Initial shapes, either a list or compound of shapes.
7545                 theTolerance Maximum distance between edges, which can be considered as coincident.
7546                 theName Object name; when specified, this parameter is used
7547                         for result publication in the study. Otherwise, if automatic
7548                         publication is switched on, default value is used for result name.
7549
7550             Returns:
7551                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7552             """
7553             theTolerance,Parameters = ParseParameters(theTolerance)
7554             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7555             if anObj is None:
7556                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
7557             anObj.SetParameters(Parameters)
7558             self._autoPublish(anObj, theName, "glueEdges")
7559             return anObj
7560
7561         ## Find coincident edges in \a theShapes for possible gluing.
7562         #  @param theShapes Initial shapes, either a list or compound of shapes.
7563         #  @param theTolerance Maximum distance between edges,
7564         #                      which can be considered as coincident.
7565         #  @param theName Object name; when specified, this parameter is used
7566         #         for result publication in the study. Otherwise, if automatic
7567         #         publication is switched on, default value is used for result name.
7568         #
7569         #  @return GEOM.ListOfGO
7570         #
7571         #  @ref tui_glue_edges "Example"
7572         @ManageTransactions("ShapesOp")
7573         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7574             """
7575             Find coincident edges in theShapes for possible gluing.
7576
7577             Parameters:
7578                 theShapes Initial shapes, either a list or compound of shapes.
7579                 theTolerance Maximum distance between edges,
7580                              which can be considered as coincident.
7581                 theName Object name; when specified, this parameter is used
7582                         for result publication in the study. Otherwise, if automatic
7583                         publication is switched on, default value is used for result name.
7584
7585             Returns:
7586                 GEOM.ListOfGO
7587             """
7588             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7589             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7590             self._autoPublish(anObj, theName, "edgesToGlue")
7591             return anObj
7592
7593         ## Replace coincident edges in theShapes by one edge
7594         #  in compliance with given list of edges.
7595         #  @param theShapes Initial shapes, either a list or compound of shapes.
7596         #  @param theTolerance Maximum distance between edges,
7597         #                      which can be considered as coincident.
7598         #  @param theEdges List of edges for gluing.
7599         #  @param theName Object name; when specified, this parameter is used
7600         #         for result publication in the study. Otherwise, if automatic
7601         #         publication is switched on, default value is used for result name.
7602         #
7603         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7604         #
7605         #  @ref tui_glue_edges "Example"
7606         @ManageTransactions("ShapesOp")
7607         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7608             """
7609             Replace coincident edges in theShapes by one edge
7610             in compliance with given list of edges.
7611
7612             Parameters:
7613                 theShapes Initial shapes, either a list or compound of shapes.
7614                 theTolerance Maximum distance between edges,
7615                              which can be considered as coincident.
7616                 theEdges List of edges for gluing.
7617                 theName Object name; when specified, this parameter is used
7618                         for result publication in the study. Otherwise, if automatic
7619                         publication is switched on, default value is used for result name.
7620
7621             Returns:
7622                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7623             """
7624             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7625             if anObj is None:
7626                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7627             self._autoPublish(anObj, theName, "glueEdges")
7628             return anObj
7629
7630         # end of l3_healing
7631         ## @}
7632
7633         ## @addtogroup l3_boolean Boolean Operations
7634         ## @{
7635
7636         # -----------------------------------------------------------------------------
7637         # Boolean (Common, Cut, Fuse, Section)
7638         # -----------------------------------------------------------------------------
7639
7640         ## Perform one of boolean operations on two given shapes.
7641         #  @param theShape1 First argument for boolean operation.
7642         #  @param theShape2 Second argument for boolean operation.
7643         #  @param theOperation Indicates the operation to be done:\n
7644         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7645         #  @param checkSelfInte The flag that tells if the arguments should
7646         #         be checked for self-intersection prior to the operation.
7647         #  @param theName Object name; when specified, this parameter is used
7648         #         for result publication in the study. Otherwise, if automatic
7649         #         publication is switched on, default value is used for result name.
7650         #
7651         #  @note This algorithm doesn't find all types of self-intersections.
7652         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7653         #        vertex/face and edge/face intersections. Face/face
7654         #        intersections detection is switched off as it is a
7655         #        time-consuming operation that gives an impact on performance.
7656         #        To find all self-intersections please use
7657         #        CheckSelfIntersections() method.
7658         #
7659         #  @return New GEOM.GEOM_Object, containing the result shape.
7660         #
7661         #  @ref tui_fuse "Example"
7662         @ManageTransactions("BoolOp")
7663         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7664             """
7665             Perform one of boolean operations on two given shapes.
7666
7667             Parameters:
7668                 theShape1 First argument for boolean operation.
7669                 theShape2 Second argument for boolean operation.
7670                 theOperation Indicates the operation to be done:
7671                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7672                 checkSelfInte The flag that tells if the arguments should
7673                               be checked for self-intersection prior to
7674                               the operation.
7675                 theName Object name; when specified, this parameter is used
7676                         for result publication in the study. Otherwise, if automatic
7677                         publication is switched on, default value is used for result name.
7678
7679             Note:
7680                     This algorithm doesn't find all types of self-intersections.
7681                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7682                     vertex/face and edge/face intersections. Face/face
7683                     intersections detection is switched off as it is a
7684                     time-consuming operation that gives an impact on performance.
7685                     To find all self-intersections please use
7686                     CheckSelfIntersections() method.
7687
7688             Returns:
7689                 New GEOM.GEOM_Object, containing the result shape.
7690             """
7691             # Example: see GEOM_TestAll.py
7692             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7693             RaiseIfFailed("MakeBoolean", self.BoolOp)
7694             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7695             self._autoPublish(anObj, theName, def_names[theOperation])
7696             return anObj
7697
7698         ## Perform Common boolean operation on two given shapes.
7699         #  @param theShape1 First argument for boolean operation.
7700         #  @param theShape2 Second argument for boolean operation.
7701         #  @param checkSelfInte The flag that tells if the arguments should
7702         #         be checked for self-intersection prior to the operation.
7703         #  @param theName Object name; when specified, this parameter is used
7704         #         for result publication in the study. Otherwise, if automatic
7705         #         publication is switched on, default value is used for result name.
7706         #
7707         #  @note This algorithm doesn't find all types of self-intersections.
7708         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7709         #        vertex/face and edge/face intersections. Face/face
7710         #        intersections detection is switched off as it is a
7711         #        time-consuming operation that gives an impact on performance.
7712         #        To find all self-intersections please use
7713         #        CheckSelfIntersections() method.
7714         #
7715         #  @return New GEOM.GEOM_Object, containing the result shape.
7716         #
7717         #  @ref tui_common "Example 1"
7718         #  \n @ref swig_MakeCommon "Example 2"
7719         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7720             """
7721             Perform Common boolean operation on two given shapes.
7722
7723             Parameters:
7724                 theShape1 First argument for boolean operation.
7725                 theShape2 Second argument for boolean operation.
7726                 checkSelfInte The flag that tells if the arguments should
7727                               be checked for self-intersection prior to
7728                               the operation.
7729                 theName Object name; when specified, this parameter is used
7730                         for result publication in the study. Otherwise, if automatic
7731                         publication is switched on, default value is used for result name.
7732
7733             Note:
7734                     This algorithm doesn't find all types of self-intersections.
7735                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7736                     vertex/face and edge/face intersections. Face/face
7737                     intersections detection is switched off as it is a
7738                     time-consuming operation that gives an impact on performance.
7739                     To find all self-intersections please use
7740                     CheckSelfIntersections() method.
7741
7742             Returns:
7743                 New GEOM.GEOM_Object, containing the result shape.
7744             """
7745             # Example: see GEOM_TestOthers.py
7746             # note: auto-publishing is done in self.MakeBoolean()
7747             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7748
7749         ## Perform Cut boolean operation on two given shapes.
7750         #  @param theShape1 First argument for boolean operation.
7751         #  @param theShape2 Second argument for boolean operation.
7752         #  @param checkSelfInte The flag that tells if the arguments should
7753         #         be checked for self-intersection prior to the operation.
7754         #  @param theName Object name; when specified, this parameter is used
7755         #         for result publication in the study. Otherwise, if automatic
7756         #         publication is switched on, default value is used for result name.
7757         #
7758         #  @note This algorithm doesn't find all types of self-intersections.
7759         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7760         #        vertex/face and edge/face intersections. Face/face
7761         #        intersections detection is switched off as it is a
7762         #        time-consuming operation that gives an impact on performance.
7763         #        To find all self-intersections please use
7764         #        CheckSelfIntersections() method.
7765         #
7766         #  @return New GEOM.GEOM_Object, containing the result shape.
7767         #
7768         #  @ref tui_cut "Example 1"
7769         #  \n @ref swig_MakeCommon "Example 2"
7770         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7771             """
7772             Perform Cut boolean operation on two given shapes.
7773
7774             Parameters:
7775                 theShape1 First argument for boolean operation.
7776                 theShape2 Second argument for boolean operation.
7777                 checkSelfInte The flag that tells if the arguments should
7778                               be checked for self-intersection prior to
7779                               the operation.
7780                 theName Object name; when specified, this parameter is used
7781                         for result publication in the study. Otherwise, if automatic
7782                         publication is switched on, default value is used for result name.
7783
7784             Note:
7785                     This algorithm doesn't find all types of self-intersections.
7786                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7787                     vertex/face and edge/face intersections. Face/face
7788                     intersections detection is switched off as it is a
7789                     time-consuming operation that gives an impact on performance.
7790                     To find all self-intersections please use
7791                     CheckSelfIntersections() method.
7792
7793             Returns:
7794                 New GEOM.GEOM_Object, containing the result shape.
7795
7796             """
7797             # Example: see GEOM_TestOthers.py
7798             # note: auto-publishing is done in self.MakeBoolean()
7799             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7800
7801         ## Perform Fuse boolean operation on two given shapes.
7802         #  @param theShape1 First argument for boolean operation.
7803         #  @param theShape2 Second argument for boolean operation.
7804         #  @param checkSelfInte The flag that tells if the arguments should
7805         #         be checked for self-intersection prior to the operation.
7806         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7807         #         operation should be performed during the operation.
7808         #  @param theName Object name; when specified, this parameter is used
7809         #         for result publication in the study. Otherwise, if automatic
7810         #         publication is switched on, default value is used for result name.
7811         #
7812         #  @note This algorithm doesn't find all types of self-intersections.
7813         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7814         #        vertex/face and edge/face intersections. Face/face
7815         #        intersections detection is switched off as it is a
7816         #        time-consuming operation that gives an impact on performance.
7817         #        To find all self-intersections please use
7818         #        CheckSelfIntersections() method.
7819         #
7820         #  @return New GEOM.GEOM_Object, containing the result shape.
7821         #
7822         #  @ref tui_fuse "Example 1"
7823         #  \n @ref swig_MakeCommon "Example 2"
7824         @ManageTransactions("BoolOp")
7825         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7826                      rmExtraEdges=False, theName=None):
7827             """
7828             Perform Fuse boolean operation on two given shapes.
7829
7830             Parameters:
7831                 theShape1 First argument for boolean operation.
7832                 theShape2 Second argument for boolean operation.
7833                 checkSelfInte The flag that tells if the arguments should
7834                               be checked for self-intersection prior to
7835                               the operation.
7836                 rmExtraEdges The flag that tells if Remove Extra Edges
7837                              operation should be performed during the operation.
7838                 theName Object name; when specified, this parameter is used
7839                         for result publication in the study. Otherwise, if automatic
7840                         publication is switched on, default value is used for result name.
7841
7842             Note:
7843                     This algorithm doesn't find all types of self-intersections.
7844                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7845                     vertex/face and edge/face intersections. Face/face
7846                     intersections detection is switched off as it is a
7847                     time-consuming operation that gives an impact on performance.
7848                     To find all self-intersections please use
7849                     CheckSelfIntersections() method.
7850
7851             Returns:
7852                 New GEOM.GEOM_Object, containing the result shape.
7853
7854             """
7855             # Example: see GEOM_TestOthers.py
7856             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7857                                          checkSelfInte, rmExtraEdges)
7858             RaiseIfFailed("MakeFuse", self.BoolOp)
7859             self._autoPublish(anObj, theName, "fuse")
7860             return anObj
7861
7862         ## Perform Section boolean operation on two given shapes.
7863         #  @param theShape1 First argument for boolean operation.
7864         #  @param theShape2 Second argument for boolean operation.
7865         #  @param checkSelfInte The flag that tells if the arguments should
7866         #         be checked for self-intersection prior to the operation.
7867         #         If a self-intersection detected the operation fails.
7868         #  @param theName Object name; when specified, this parameter is used
7869         #         for result publication in the study. Otherwise, if automatic
7870         #         publication is switched on, default value is used for result name.
7871         #  @return New GEOM.GEOM_Object, containing the result shape.
7872         #
7873         #  @ref tui_section "Example 1"
7874         #  \n @ref swig_MakeCommon "Example 2"
7875         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7876             """
7877             Perform Section boolean operation on two given shapes.
7878
7879             Parameters:
7880                 theShape1 First argument for boolean operation.
7881                 theShape2 Second argument for boolean operation.
7882                 checkSelfInte The flag that tells if the arguments should
7883                               be checked for self-intersection prior to the operation.
7884                               If a self-intersection detected the operation fails.
7885                 theName Object name; when specified, this parameter is used
7886                         for result publication in the study. Otherwise, if automatic
7887                         publication is switched on, default value is used for result name.
7888             Returns:
7889                 New GEOM.GEOM_Object, containing the result shape.
7890
7891             """
7892             # Example: see GEOM_TestOthers.py
7893             # note: auto-publishing is done in self.MakeBoolean()
7894             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7895
7896         ## Perform Fuse boolean operation on the list of shapes.
7897         #  @param theShapesList Shapes to be fused.
7898         #  @param checkSelfInte The flag that tells if the arguments should
7899         #         be checked for self-intersection prior to the operation.
7900         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7901         #         operation should be performed during the operation.
7902         #  @param theName Object name; when specified, this parameter is used
7903         #         for result publication in the study. Otherwise, if automatic
7904         #         publication is switched on, default value is used for result name.
7905         #
7906         #  @note This algorithm doesn't find all types of self-intersections.
7907         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7908         #        vertex/face and edge/face intersections. Face/face
7909         #        intersections detection is switched off as it is a
7910         #        time-consuming operation that gives an impact on performance.
7911         #        To find all self-intersections please use
7912         #        CheckSelfIntersections() method.
7913         #
7914         #  @return New GEOM.GEOM_Object, containing the result shape.
7915         #
7916         #  @ref tui_fuse "Example 1"
7917         #  \n @ref swig_MakeCommon "Example 2"
7918         @ManageTransactions("BoolOp")
7919         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7920                          rmExtraEdges=False, theName=None):
7921             """
7922             Perform Fuse boolean operation on the list of shapes.
7923
7924             Parameters:
7925                 theShapesList Shapes to be fused.
7926                 checkSelfInte The flag that tells if the arguments should
7927                               be checked for self-intersection prior to
7928                               the operation.
7929                 rmExtraEdges The flag that tells if Remove Extra Edges
7930                              operation should be performed during the operation.
7931                 theName Object name; when specified, this parameter is used
7932                         for result publication in the study. Otherwise, if automatic
7933                         publication is switched on, default value is used for result name.
7934
7935             Note:
7936                     This algorithm doesn't find all types of self-intersections.
7937                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7938                     vertex/face and edge/face intersections. Face/face
7939                     intersections detection is switched off as it is a
7940                     time-consuming operation that gives an impact on performance.
7941                     To find all self-intersections please use
7942                     CheckSelfIntersections() method.
7943
7944             Returns:
7945                 New GEOM.GEOM_Object, containing the result shape.
7946
7947             """
7948             # Example: see GEOM_TestOthers.py
7949             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7950                                              rmExtraEdges)
7951             RaiseIfFailed("MakeFuseList", self.BoolOp)
7952             self._autoPublish(anObj, theName, "fuse")
7953             return anObj
7954
7955         ## Perform Common boolean operation on the list of shapes.
7956         #  @param theShapesList Shapes for Common operation.
7957         #  @param checkSelfInte The flag that tells if the arguments should
7958         #         be checked for self-intersection prior to the operation.
7959         #  @param theName Object name; when specified, this parameter is used
7960         #         for result publication in the study. Otherwise, if automatic
7961         #         publication is switched on, default value is used for result name.
7962         #
7963         #  @note This algorithm doesn't find all types of self-intersections.
7964         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7965         #        vertex/face and edge/face intersections. Face/face
7966         #        intersections detection is switched off as it is a
7967         #        time-consuming operation that gives an impact on performance.
7968         #        To find all self-intersections please use
7969         #        CheckSelfIntersections() method.
7970         #
7971         #  @return New GEOM.GEOM_Object, containing the result shape.
7972         #
7973         #  @ref tui_common "Example 1"
7974         #  \n @ref swig_MakeCommon "Example 2"
7975         @ManageTransactions("BoolOp")
7976         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7977             """
7978             Perform Common boolean operation on the list of shapes.
7979
7980             Parameters:
7981                 theShapesList Shapes for Common operation.
7982                 checkSelfInte The flag that tells if the arguments should
7983                               be checked for self-intersection prior to
7984                               the operation.
7985                 theName Object name; when specified, this parameter is used
7986                         for result publication in the study. Otherwise, if automatic
7987                         publication is switched on, default value is used for result name.
7988
7989             Note:
7990                     This algorithm doesn't find all types of self-intersections.
7991                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7992                     vertex/face and edge/face intersections. Face/face
7993                     intersections detection is switched off as it is a
7994                     time-consuming operation that gives an impact on performance.
7995                     To find all self-intersections please use
7996                     CheckSelfIntersections() method.
7997
7998             Returns:
7999                 New GEOM.GEOM_Object, containing the result shape.
8000
8001             """
8002             # Example: see GEOM_TestOthers.py
8003             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8004             RaiseIfFailed("MakeCommonList", self.BoolOp)
8005             self._autoPublish(anObj, theName, "common")
8006             return anObj
8007
8008         ## Perform Cut boolean operation on one object and the list of tools.
8009         #  @param theMainShape The object of the operation.
8010         #  @param theShapesList The list of tools of the operation.
8011         #  @param checkSelfInte The flag that tells if the arguments should
8012         #         be checked for self-intersection prior to the operation.
8013         #  @param theName Object name; when specified, this parameter is used
8014         #         for result publication in the study. Otherwise, if automatic
8015         #         publication is switched on, default value is used for result name.
8016         #
8017         #  @note This algorithm doesn't find all types of self-intersections.
8018         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8019         #        vertex/face and edge/face intersections. Face/face
8020         #        intersections detection is switched off as it is a
8021         #        time-consuming operation that gives an impact on performance.
8022         #        To find all self-intersections please use
8023         #        CheckSelfIntersections() method.
8024         #
8025         #  @return New GEOM.GEOM_Object, containing the result shape.
8026         #
8027         #  @ref tui_cut "Example 1"
8028         #  \n @ref swig_MakeCommon "Example 2"
8029         @ManageTransactions("BoolOp")
8030         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8031             """
8032             Perform Cut boolean operation on one object and the list of tools.
8033
8034             Parameters:
8035                 theMainShape The object of the operation.
8036                 theShapesList The list of tools of the operation.
8037                 checkSelfInte The flag that tells if the arguments should
8038                               be checked for self-intersection prior to
8039                               the operation.
8040                 theName Object name; when specified, this parameter is used
8041                         for result publication in the study. Otherwise, if automatic
8042                         publication is switched on, default value is used for result name.
8043
8044             Note:
8045                     This algorithm doesn't find all types of self-intersections.
8046                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8047                     vertex/face and edge/face intersections. Face/face
8048                     intersections detection is switched off as it is a
8049                     time-consuming operation that gives an impact on performance.
8050                     To find all self-intersections please use
8051                     CheckSelfIntersections() method.
8052
8053             Returns:
8054                 New GEOM.GEOM_Object, containing the result shape.
8055
8056             """
8057             # Example: see GEOM_TestOthers.py
8058             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8059             RaiseIfFailed("MakeCutList", self.BoolOp)
8060             self._autoPublish(anObj, theName, "cut")
8061             return anObj
8062
8063         # end of l3_boolean
8064         ## @}
8065
8066         ## @addtogroup l3_basic_op
8067         ## @{
8068
8069         ## Perform partition operation.
8070         #  @param ListShapes Shapes to be intersected.
8071         #  @param ListTools Shapes to intersect theShapes.
8072         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8073         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8074         #         type will be detected automatically.
8075         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8076         #                             target type (equal to Limit) are kept in the result,
8077         #                             else standalone shapes of lower dimension
8078         #                             are kept also (if they exist).
8079         #
8080         #  @param theName Object name; when specified, this parameter is used
8081         #         for result publication in the study. Otherwise, if automatic
8082         #         publication is switched on, default value is used for result name.
8083         #
8084         #  @note Each compound from ListShapes and ListTools will be exploded
8085         #        in order to avoid possible intersection between shapes from this compound.
8086         #
8087         #  After implementation new version of PartitionAlgo (October 2006)
8088         #  other parameters are ignored by current functionality. They are kept
8089         #  in this function only for support old versions.
8090         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8091         #         Each shape from theKeepInside must belong to theShapes also.
8092         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8093         #         Each shape from theRemoveInside must belong to theShapes also.
8094         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8095         #      @param ListMaterials Material indices for each shape. Make sence,
8096         #         only if theRemoveWebs is TRUE.
8097         #
8098         #  @return New GEOM.GEOM_Object, containing the result shapes.
8099         #
8100         #  @ref tui_partition "Example"
8101         @ManageTransactions("BoolOp")
8102         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8103                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8104                           KeepNonlimitShapes=0, theName=None):
8105             """
8106             Perform partition operation.
8107
8108             Parameters:
8109                 ListShapes Shapes to be intersected.
8110                 ListTools Shapes to intersect theShapes.
8111                 Limit Type of resulting shapes (see geompy.ShapeType)
8112                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8113                       type will be detected automatically.
8114                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8115                                     target type (equal to Limit) are kept in the result,
8116                                     else standalone shapes of lower dimension
8117                                     are kept also (if they exist).
8118
8119                 theName Object name; when specified, this parameter is used
8120                         for result publication in the study. Otherwise, if automatic
8121                         publication is switched on, default value is used for result name.
8122             Note:
8123                     Each compound from ListShapes and ListTools will be exploded
8124                     in order to avoid possible intersection between shapes from
8125                     this compound.
8126
8127             After implementation new version of PartitionAlgo (October 2006) other
8128             parameters are ignored by current functionality. They are kept in this
8129             function only for support old versions.
8130
8131             Ignored parameters:
8132                 ListKeepInside Shapes, outside which the results will be deleted.
8133                                Each shape from theKeepInside must belong to theShapes also.
8134                 ListRemoveInside Shapes, inside which the results will be deleted.
8135                                  Each shape from theRemoveInside must belong to theShapes also.
8136                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8137                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
8138
8139             Returns:
8140                 New GEOM.GEOM_Object, containing the result shapes.
8141             """
8142             # Example: see GEOM_TestAll.py
8143             if Limit == self.ShapeType["AUTO"]:
8144                 # automatic detection of the most appropriate shape limit type
8145                 lim = GEOM.SHAPE
8146                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
8147                 Limit = EnumToLong(lim)
8148                 pass
8149             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8150                                               ListKeepInside, ListRemoveInside,
8151                                               Limit, RemoveWebs, ListMaterials,
8152                                               KeepNonlimitShapes);
8153             RaiseIfFailed("MakePartition", self.BoolOp)
8154             self._autoPublish(anObj, theName, "partition")
8155             return anObj
8156
8157         ## Perform partition operation.
8158         #  This method may be useful if it is needed to make a partition for
8159         #  compound contains nonintersected shapes. Performance will be better
8160         #  since intersection between shapes from compound is not performed.
8161         #
8162         #  Description of all parameters as in previous method MakePartition().
8163         #  One additional parameter is provided:
8164         #  @param checkSelfInte The flag that tells if the arguments should
8165         #         be checked for self-intersection prior to the operation.
8166         #
8167         #  @note This algorithm doesn't find all types of self-intersections.
8168         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8169         #        vertex/face and edge/face intersections. Face/face
8170         #        intersections detection is switched off as it is a
8171         #        time-consuming operation that gives an impact on performance.
8172         #        To find all self-intersections please use
8173         #        CheckSelfIntersections() method.
8174         #
8175         #  @note Passed compounds (via ListShapes or via ListTools)
8176         #           have to consist of nonintersecting shapes.
8177         #
8178         #  @return New GEOM.GEOM_Object, containing the result shapes.
8179         #
8180         #  @ref swig_todo "Example"
8181         @ManageTransactions("BoolOp")
8182         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8183                                                  ListKeepInside=[], ListRemoveInside=[],
8184                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8185                                                  ListMaterials=[], KeepNonlimitShapes=0,
8186                                                  checkSelfInte=False, theName=None):
8187             """
8188             Perform partition operation.
8189             This method may be useful if it is needed to make a partition for
8190             compound contains nonintersected shapes. Performance will be better
8191             since intersection between shapes from compound is not performed.
8192
8193             Parameters:
8194                 Description of all parameters as in method geompy.MakePartition.
8195                 One additional parameter is provided:
8196                 checkSelfInte The flag that tells if the arguments should
8197                               be checked for self-intersection prior to
8198                               the operation.
8199
8200             Note:
8201                     This algorithm doesn't find all types of self-intersections.
8202                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8203                     vertex/face and edge/face intersections. Face/face
8204                     intersections detection is switched off as it is a
8205                     time-consuming operation that gives an impact on performance.
8206                     To find all self-intersections please use
8207                     CheckSelfIntersections() method.
8208
8209             NOTE:
8210                 Passed compounds (via ListShapes or via ListTools)
8211                 have to consist of nonintersecting shapes.
8212
8213             Returns:
8214                 New GEOM.GEOM_Object, containing the result shapes.
8215             """
8216             if Limit == self.ShapeType["AUTO"]:
8217                 # automatic detection of the most appropriate shape limit type
8218                 lim = GEOM.SHAPE
8219                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
8220                 Limit = EnumToLong(lim)
8221                 pass
8222             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8223                                                                      ListKeepInside, ListRemoveInside,
8224                                                                      Limit, RemoveWebs, ListMaterials,
8225                                                                      KeepNonlimitShapes, checkSelfInte);
8226             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8227             self._autoPublish(anObj, theName, "partition")
8228             return anObj
8229
8230         ## See method MakePartition() for more information.
8231         #
8232         #  @ref tui_partition "Example 1"
8233         #  \n @ref swig_Partition "Example 2"
8234         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8235                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8236                       KeepNonlimitShapes=0, theName=None):
8237             """
8238             See method geompy.MakePartition for more information.
8239             """
8240             # Example: see GEOM_TestOthers.py
8241             # note: auto-publishing is done in self.MakePartition()
8242             anObj = self.MakePartition(ListShapes, ListTools,
8243                                        ListKeepInside, ListRemoveInside,
8244                                        Limit, RemoveWebs, ListMaterials,
8245                                        KeepNonlimitShapes, theName);
8246             return anObj
8247
8248         ## Perform partition of the Shape with the Plane
8249         #  @param theShape Shape to be intersected.
8250         #  @param thePlane Tool shape, to intersect theShape.
8251         #  @param theName Object name; when specified, this parameter is used
8252         #         for result publication in the study. Otherwise, if automatic
8253         #         publication is switched on, default value is used for result name.
8254         #
8255         #  @return New GEOM.GEOM_Object, containing the result shape.
8256         #
8257         #  @note This operation is a shortcut to the more general @ref MakePartition
8258         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8259         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8260         #  @ref MakePartition operation have default values:
8261         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8262         #  - @a KeepNonlimitShapes: 0
8263         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8264         #    @a Materials (obsolete parameters): empty
8265         #
8266         #  @note I.e. the following two operations are equivalent:
8267         #  @code
8268         #  Result = geompy.MakeHalfPartition(Object, Plane)
8269         #  Result = geompy.MakePartition([Object], [Plane])
8270         #  @endcode
8271         #
8272         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8273         #
8274         #  @ref tui_partition "Example"
8275         @ManageTransactions("BoolOp")
8276         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8277             """
8278             Perform partition of the Shape with the Plane
8279
8280             Parameters:
8281                 theShape Shape to be intersected.
8282                 thePlane Tool shape, to intersect theShape.
8283                 theName Object name; when specified, this parameter is used
8284                         for result publication in the study. Otherwise, if automatic
8285                         publication is switched on, default value is used for result name.
8286
8287             Returns:
8288                 New GEOM.GEOM_Object, containing the result shape.
8289          
8290             Note: This operation is a shortcut to the more general MakePartition
8291             operation, where theShape specifies single "object" (shape being partitioned)
8292             and thePlane specifies single "tool" (intersector shape). Other parameters of
8293             MakePartition operation have default values:
8294             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8295             - KeepNonlimitShapes: 0
8296             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8297          
8298             I.e. the following two operations are equivalent:
8299               Result = geompy.MakeHalfPartition(Object, Plane)
8300               Result = geompy.MakePartition([Object], [Plane])
8301             """
8302             # Example: see GEOM_TestAll.py
8303             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8304             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8305             self._autoPublish(anObj, theName, "partition")
8306             return anObj
8307
8308         # end of l3_basic_op
8309         ## @}
8310
8311         ## @addtogroup l3_transform
8312         ## @{
8313
8314         ## Translate the given object along the vector, specified
8315         #  by its end points.
8316         #  @param theObject The object to be translated.
8317         #  @param thePoint1 Start point of translation vector.
8318         #  @param thePoint2 End point of translation vector.
8319         #  @param theCopy Flag used to translate object itself or create a copy.
8320         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8321         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8322         @ManageTransactions("TrsfOp")
8323         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8324             """
8325             Translate the given object along the vector, specified by its end points.
8326
8327             Parameters:
8328                 theObject The object to be translated.
8329                 thePoint1 Start point of translation vector.
8330                 thePoint2 End point of translation vector.
8331                 theCopy Flag used to translate object itself or create a copy.
8332
8333             Returns:
8334                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8335                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8336             """
8337             if theCopy:
8338                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8339             else:
8340                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8341             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8342             return anObj
8343
8344         ## Translate the given object along the vector, specified
8345         #  by its end points, creating its copy before the translation.
8346         #  @param theObject The object to be translated.
8347         #  @param thePoint1 Start point of translation vector.
8348         #  @param thePoint2 End point of translation vector.
8349         #  @param theName Object name; when specified, this parameter is used
8350         #         for result publication in the study. Otherwise, if automatic
8351         #         publication is switched on, default value is used for result name.
8352         #
8353         #  @return New GEOM.GEOM_Object, containing the translated object.
8354         #
8355         #  @ref tui_translation "Example 1"
8356         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8357         @ManageTransactions("TrsfOp")
8358         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8359             """
8360             Translate the given object along the vector, specified
8361             by its end points, creating its copy before the translation.
8362
8363             Parameters:
8364                 theObject The object to be translated.
8365                 thePoint1 Start point of translation vector.
8366                 thePoint2 End point of translation vector.
8367                 theName Object name; when specified, this parameter is used
8368                         for result publication in the study. Otherwise, if automatic
8369                         publication is switched on, default value is used for result name.
8370
8371             Returns:
8372                 New GEOM.GEOM_Object, containing the translated object.
8373             """
8374             # Example: see GEOM_TestAll.py
8375             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8376             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8377             self._autoPublish(anObj, theName, "translated")
8378             return anObj
8379
8380         ## Translate the given object along the vector, specified by its components.
8381         #  @param theObject The object to be translated.
8382         #  @param theDX,theDY,theDZ Components of translation vector.
8383         #  @param theCopy Flag used to translate object itself or create a copy.
8384         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8385         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8386         #
8387         #  @ref tui_translation "Example"
8388         @ManageTransactions("TrsfOp")
8389         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8390             """
8391             Translate the given object along the vector, specified by its components.
8392
8393             Parameters:
8394                 theObject The object to be translated.
8395                 theDX,theDY,theDZ Components of translation vector.
8396                 theCopy Flag used to translate object itself or create a copy.
8397
8398             Returns:
8399                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8400                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8401             """
8402             # Example: see GEOM_TestAll.py
8403             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8404             if theCopy:
8405                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8406             else:
8407                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8408             anObj.SetParameters(Parameters)
8409             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8410             return anObj
8411
8412         ## Translate the given object along the vector, specified
8413         #  by its components, creating its copy before the translation.
8414         #  @param theObject The object to be translated.
8415         #  @param theDX,theDY,theDZ Components of translation vector.
8416         #  @param theName Object name; when specified, this parameter is used
8417         #         for result publication in the study. Otherwise, if automatic
8418         #         publication is switched on, default value is used for result name.
8419         #
8420         #  @return New GEOM.GEOM_Object, containing the translated object.
8421         #
8422         #  @ref tui_translation "Example"
8423         @ManageTransactions("TrsfOp")
8424         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8425             """
8426             Translate the given object along the vector, specified
8427             by its components, creating its copy before the translation.
8428
8429             Parameters:
8430                 theObject The object to be translated.
8431                 theDX,theDY,theDZ Components of translation vector.
8432                 theName Object name; when specified, this parameter is used
8433                         for result publication in the study. Otherwise, if automatic
8434                         publication is switched on, default value is used for result name.
8435
8436             Returns:
8437                 New GEOM.GEOM_Object, containing the translated object.
8438             """
8439             # Example: see GEOM_TestAll.py
8440             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8441             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8442             anObj.SetParameters(Parameters)
8443             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8444             self._autoPublish(anObj, theName, "translated")
8445             return anObj
8446
8447         ## Translate the given object along the given vector.
8448         #  @param theObject The object to be translated.
8449         #  @param theVector The translation vector.
8450         #  @param theCopy Flag used to translate object itself or create a copy.
8451         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8452         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8453         @ManageTransactions("TrsfOp")
8454         def TranslateVector(self, theObject, theVector, theCopy=False):
8455             """
8456             Translate the given object along the given vector.
8457
8458             Parameters:
8459                 theObject The object to be translated.
8460                 theVector The translation vector.
8461                 theCopy Flag used to translate object itself or create a copy.
8462
8463             Returns:
8464                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8465                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8466             """
8467             if theCopy:
8468                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8469             else:
8470                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8471             RaiseIfFailed("TranslateVector", self.TrsfOp)
8472             return anObj
8473
8474         ## Translate the given object along the given vector,
8475         #  creating its copy before the translation.
8476         #  @param theObject The object to be translated.
8477         #  @param theVector The translation vector.
8478         #  @param theName Object name; when specified, this parameter is used
8479         #         for result publication in the study. Otherwise, if automatic
8480         #         publication is switched on, default value is used for result name.
8481         #
8482         #  @return New GEOM.GEOM_Object, containing the translated object.
8483         #
8484         #  @ref tui_translation "Example"
8485         @ManageTransactions("TrsfOp")
8486         def MakeTranslationVector(self, theObject, theVector, theName=None):
8487             """
8488             Translate the given object along the given vector,
8489             creating its copy before the translation.
8490
8491             Parameters:
8492                 theObject The object to be translated.
8493                 theVector The translation vector.
8494                 theName Object name; when specified, this parameter is used
8495                         for result publication in the study. Otherwise, if automatic
8496                         publication is switched on, default value is used for result name.
8497
8498             Returns:
8499                 New GEOM.GEOM_Object, containing the translated object.
8500             """
8501             # Example: see GEOM_TestAll.py
8502             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8503             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8504             self._autoPublish(anObj, theName, "translated")
8505             return anObj
8506
8507         ## Translate the given object along the given vector on given distance.
8508         #  @param theObject The object to be translated.
8509         #  @param theVector The translation vector.
8510         #  @param theDistance The translation distance.
8511         #  @param theCopy Flag used to translate object itself or create a copy.
8512         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8513         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8514         #
8515         #  @ref tui_translation "Example"
8516         @ManageTransactions("TrsfOp")
8517         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8518             """
8519             Translate the given object along the given vector on given distance.
8520
8521             Parameters:
8522                 theObject The object to be translated.
8523                 theVector The translation vector.
8524                 theDistance The translation distance.
8525                 theCopy Flag used to translate object itself or create a copy.
8526
8527             Returns:
8528                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8529                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8530             """
8531             # Example: see GEOM_TestAll.py
8532             theDistance,Parameters = ParseParameters(theDistance)
8533             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8534             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8535             anObj.SetParameters(Parameters)
8536             return anObj
8537
8538         ## Translate the given object along the given vector on given distance,
8539         #  creating its copy before the translation.
8540         #  @param theObject The object to be translated.
8541         #  @param theVector The translation vector.
8542         #  @param theDistance The translation distance.
8543         #  @param theName Object name; when specified, this parameter is used
8544         #         for result publication in the study. Otherwise, if automatic
8545         #         publication is switched on, default value is used for result name.
8546         #
8547         #  @return New GEOM.GEOM_Object, containing the translated object.
8548         #
8549         #  @ref tui_translation "Example"
8550         @ManageTransactions("TrsfOp")
8551         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8552             """
8553             Translate the given object along the given vector on given distance,
8554             creating its copy before the translation.
8555
8556             Parameters:
8557                 theObject The object to be translated.
8558                 theVector The translation vector.
8559                 theDistance The translation distance.
8560                 theName Object name; when specified, this parameter is used
8561                         for result publication in the study. Otherwise, if automatic
8562                         publication is switched on, default value is used for result name.
8563
8564             Returns:
8565                 New GEOM.GEOM_Object, containing the translated object.
8566             """
8567             # Example: see GEOM_TestAll.py
8568             theDistance,Parameters = ParseParameters(theDistance)
8569             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8570             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8571             anObj.SetParameters(Parameters)
8572             self._autoPublish(anObj, theName, "translated")
8573             return anObj
8574
8575         ## Rotate the given object around the given axis on the given angle.
8576         #  @param theObject The object to be rotated.
8577         #  @param theAxis Rotation axis.
8578         #  @param theAngle Rotation angle in radians.
8579         #  @param theCopy Flag used to rotate object itself or create a copy.
8580         #
8581         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8582         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8583         #
8584         #  @ref tui_rotation "Example"
8585         @ManageTransactions("TrsfOp")
8586         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8587             """
8588             Rotate the given object around the given axis on the given angle.
8589
8590             Parameters:
8591                 theObject The object to be rotated.
8592                 theAxis Rotation axis.
8593                 theAngle Rotation angle in radians.
8594                 theCopy Flag used to rotate object itself or create a copy.
8595
8596             Returns:
8597                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8598                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8599             """
8600             # Example: see GEOM_TestAll.py
8601             flag = False
8602             if isinstance(theAngle,str):
8603                 flag = True
8604             theAngle, Parameters = ParseParameters(theAngle)
8605             if flag:
8606                 theAngle = theAngle*math.pi/180.0
8607             if theCopy:
8608                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8609             else:
8610                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8611             RaiseIfFailed("Rotate", self.TrsfOp)
8612             anObj.SetParameters(Parameters)
8613             return anObj
8614
8615         ## Rotate the given object around the given axis
8616         #  on the given angle, creating its copy before the rotation.
8617         #  @param theObject The object to be rotated.
8618         #  @param theAxis Rotation axis.
8619         #  @param theAngle Rotation angle in radians.
8620         #  @param theName Object name; when specified, this parameter is used
8621         #         for result publication in the study. Otherwise, if automatic
8622         #         publication is switched on, default value is used for result name.
8623         #
8624         #  @return New GEOM.GEOM_Object, containing the rotated object.
8625         #
8626         #  @ref tui_rotation "Example"
8627         @ManageTransactions("TrsfOp")
8628         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8629             """
8630             Rotate the given object around the given axis
8631             on the given angle, creating its copy before the rotatation.
8632
8633             Parameters:
8634                 theObject The object to be rotated.
8635                 theAxis Rotation axis.
8636                 theAngle Rotation angle in radians.
8637                 theName Object name; when specified, this parameter is used
8638                         for result publication in the study. Otherwise, if automatic
8639                         publication is switched on, default value is used for result name.
8640
8641             Returns:
8642                 New GEOM.GEOM_Object, containing the rotated object.
8643             """
8644             # Example: see GEOM_TestAll.py
8645             flag = False
8646             if isinstance(theAngle,str):
8647                 flag = True
8648             theAngle, Parameters = ParseParameters(theAngle)
8649             if flag:
8650                 theAngle = theAngle*math.pi/180.0
8651             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8652             RaiseIfFailed("RotateCopy", self.TrsfOp)
8653             anObj.SetParameters(Parameters)
8654             self._autoPublish(anObj, theName, "rotated")
8655             return anObj
8656
8657         ## Rotate given object around vector perpendicular to plane
8658         #  containing three points.
8659         #  @param theObject The object to be rotated.
8660         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8661         #  containing the three points.
8662         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8663         #  @param theCopy Flag used to rotate object itself or create a copy.
8664         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8665         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8666         @ManageTransactions("TrsfOp")
8667         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8668             """
8669             Rotate given object around vector perpendicular to plane
8670             containing three points.
8671
8672             Parameters:
8673                 theObject The object to be rotated.
8674                 theCentPoint central point  the axis is the vector perpendicular to the plane
8675                              containing the three points.
8676                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8677                 theCopy Flag used to rotate object itself or create a copy.
8678
8679             Returns:
8680                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8681                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8682             """
8683             if theCopy:
8684                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8685             else:
8686                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8687             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8688             return anObj
8689
8690         ## Rotate given object around vector perpendicular to plane
8691         #  containing three points, creating its copy before the rotatation.
8692         #  @param theObject The object to be rotated.
8693         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8694         #  containing the three points.
8695         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8696         #  @param theName Object name; when specified, this parameter is used
8697         #         for result publication in the study. Otherwise, if automatic
8698         #         publication is switched on, default value is used for result name.
8699         #
8700         #  @return New GEOM.GEOM_Object, containing the rotated object.
8701         #
8702         #  @ref tui_rotation "Example"
8703         @ManageTransactions("TrsfOp")
8704         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8705             """
8706             Rotate given object around vector perpendicular to plane
8707             containing three points, creating its copy before the rotatation.
8708
8709             Parameters:
8710                 theObject The object to be rotated.
8711                 theCentPoint central point  the axis is the vector perpendicular to the plane
8712                              containing the three points.
8713                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8714                 theName Object name; when specified, this parameter is used
8715                         for result publication in the study. Otherwise, if automatic
8716                         publication is switched on, default value is used for result name.
8717
8718             Returns:
8719                 New GEOM.GEOM_Object, containing the rotated object.
8720             """
8721             # Example: see GEOM_TestAll.py
8722             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8723             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8724             self._autoPublish(anObj, theName, "rotated")
8725             return anObj
8726
8727         ## Scale the given object by the specified factor.
8728         #  @param theObject The object to be scaled.
8729         #  @param thePoint Center point for scaling.
8730         #                  Passing None for it means scaling relatively the origin of global CS.
8731         #  @param theFactor Scaling factor value.
8732         #  @param theCopy Flag used to scale object itself or create a copy.
8733         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8734         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8735         @ManageTransactions("TrsfOp")
8736         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8737             """
8738             Scale the given object by the specified factor.
8739
8740             Parameters:
8741                 theObject The object to be scaled.
8742                 thePoint Center point for scaling.
8743                          Passing None for it means scaling relatively the origin of global CS.
8744                 theFactor Scaling factor value.
8745                 theCopy Flag used to scale object itself or create a copy.
8746
8747             Returns:
8748                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8749                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8750             """
8751             # Example: see GEOM_TestAll.py
8752             theFactor, Parameters = ParseParameters(theFactor)
8753             if theCopy:
8754                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8755             else:
8756                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8757             RaiseIfFailed("Scale", self.TrsfOp)
8758             anObj.SetParameters(Parameters)
8759             return anObj
8760
8761         ## Scale the given object by the factor, creating its copy before the scaling.
8762         #  @param theObject The object to be scaled.
8763         #  @param thePoint Center point for scaling.
8764         #                  Passing None for it means scaling relatively the origin of global CS.
8765         #  @param theFactor Scaling factor value.
8766         #  @param theName Object name; when specified, this parameter is used
8767         #         for result publication in the study. Otherwise, if automatic
8768         #         publication is switched on, default value is used for result name.
8769         #
8770         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8771         #
8772         #  @ref tui_scale "Example"
8773         @ManageTransactions("TrsfOp")
8774         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8775             """
8776             Scale the given object by the factor, creating its copy before the scaling.
8777
8778             Parameters:
8779                 theObject The object to be scaled.
8780                 thePoint Center point for scaling.
8781                          Passing None for it means scaling relatively the origin of global CS.
8782                 theFactor Scaling factor value.
8783                 theName Object name; when specified, this parameter is used
8784                         for result publication in the study. Otherwise, if automatic
8785                         publication is switched on, default value is used for result name.
8786
8787             Returns:
8788                 New GEOM.GEOM_Object, containing the scaled shape.
8789             """
8790             # Example: see GEOM_TestAll.py
8791             theFactor, Parameters = ParseParameters(theFactor)
8792             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8793             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8794             anObj.SetParameters(Parameters)
8795             self._autoPublish(anObj, theName, "scaled")
8796             return anObj
8797
8798         ## Scale the given object by different factors along coordinate axes.
8799         #  @param theObject The object to be scaled.
8800         #  @param thePoint Center point for scaling.
8801         #                  Passing None for it means scaling relatively the origin of global CS.
8802         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8803         #  @param theCopy Flag used to scale object itself or create a copy.
8804         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8805         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8806         @ManageTransactions("TrsfOp")
8807         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8808             """
8809             Scale the given object by different factors along coordinate axes.
8810
8811             Parameters:
8812                 theObject The object to be scaled.
8813                 thePoint Center point for scaling.
8814                             Passing None for it means scaling relatively the origin of global CS.
8815                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8816                 theCopy Flag used to scale object itself or create a copy.
8817
8818             Returns:
8819                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8820                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8821             """
8822             # Example: see GEOM_TestAll.py
8823             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8824             if theCopy:
8825                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8826                                                             theFactorX, theFactorY, theFactorZ)
8827             else:
8828                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8829                                                         theFactorX, theFactorY, theFactorZ)
8830             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8831             anObj.SetParameters(Parameters)
8832             return anObj
8833
8834         ## Scale the given object by different factors along coordinate axes,
8835         #  creating its copy before the scaling.
8836         #  @param theObject The object to be scaled.
8837         #  @param thePoint Center point for scaling.
8838         #                  Passing None for it means scaling relatively the origin of global CS.
8839         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8840         #  @param theName Object name; when specified, this parameter is used
8841         #         for result publication in the study. Otherwise, if automatic
8842         #         publication is switched on, default value is used for result name.
8843         #
8844         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8845         #
8846         #  @ref swig_scale "Example"
8847         @ManageTransactions("TrsfOp")
8848         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8849             """
8850             Scale the given object by different factors along coordinate axes,
8851             creating its copy before the scaling.
8852
8853             Parameters:
8854                 theObject The object to be scaled.
8855                 thePoint Center point for scaling.
8856                             Passing None for it means scaling relatively the origin of global CS.
8857                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8858                 theName Object name; when specified, this parameter is used
8859                         for result publication in the study. Otherwise, if automatic
8860                         publication is switched on, default value is used for result name.
8861
8862             Returns:
8863                 New GEOM.GEOM_Object, containing the scaled shape.
8864             """
8865             # Example: see GEOM_TestAll.py
8866             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8867             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8868                                                         theFactorX, theFactorY, theFactorZ)
8869             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8870             anObj.SetParameters(Parameters)
8871             self._autoPublish(anObj, theName, "scaled")
8872             return anObj
8873
8874         ## Mirror an object relatively the given plane.
8875         #  @param theObject The object to be mirrored.
8876         #  @param thePlane Plane of symmetry.
8877         #  @param theCopy Flag used to mirror object itself or create a copy.
8878         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8879         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8880         @ManageTransactions("TrsfOp")
8881         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8882             """
8883             Mirror an object relatively the given plane.
8884
8885             Parameters:
8886                 theObject The object to be mirrored.
8887                 thePlane Plane of symmetry.
8888                 theCopy Flag used to mirror object itself or create a copy.
8889
8890             Returns:
8891                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8892                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8893             """
8894             if theCopy:
8895                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8896             else:
8897                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8898             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8899             return anObj
8900
8901         ## Create an object, symmetrical
8902         #  to the given one relatively the given plane.
8903         #  @param theObject The object to be mirrored.
8904         #  @param thePlane Plane of symmetry.
8905         #  @param theName Object name; when specified, this parameter is used
8906         #         for result publication in the study. Otherwise, if automatic
8907         #         publication is switched on, default value is used for result name.
8908         #
8909         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8910         #
8911         #  @ref tui_mirror "Example"
8912         @ManageTransactions("TrsfOp")
8913         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8914             """
8915             Create an object, symmetrical to the given one relatively the given plane.
8916
8917             Parameters:
8918                 theObject The object to be mirrored.
8919                 thePlane Plane of symmetry.
8920                 theName Object name; when specified, this parameter is used
8921                         for result publication in the study. Otherwise, if automatic
8922                         publication is switched on, default value is used for result name.
8923
8924             Returns:
8925                 New GEOM.GEOM_Object, containing the mirrored shape.
8926             """
8927             # Example: see GEOM_TestAll.py
8928             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8929             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8930             self._autoPublish(anObj, theName, "mirrored")
8931             return anObj
8932
8933         ## Mirror an object relatively the given axis.
8934         #  @param theObject The object to be mirrored.
8935         #  @param theAxis Axis of symmetry.
8936         #  @param theCopy Flag used to mirror object itself or create a copy.
8937         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8938         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8939         @ManageTransactions("TrsfOp")
8940         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8941             """
8942             Mirror an object relatively the given axis.
8943
8944             Parameters:
8945                 theObject The object to be mirrored.
8946                 theAxis Axis of symmetry.
8947                 theCopy Flag used to mirror object itself or create a copy.
8948
8949             Returns:
8950                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8951                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8952             """
8953             if theCopy:
8954                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8955             else:
8956                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8957             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8958             return anObj
8959
8960         ## Create an object, symmetrical
8961         #  to the given one relatively the given axis.
8962         #  @param theObject The object to be mirrored.
8963         #  @param theAxis Axis of symmetry.
8964         #  @param theName Object name; when specified, this parameter is used
8965         #         for result publication in the study. Otherwise, if automatic
8966         #         publication is switched on, default value is used for result name.
8967         #
8968         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8969         #
8970         #  @ref tui_mirror "Example"
8971         @ManageTransactions("TrsfOp")
8972         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8973             """
8974             Create an object, symmetrical to the given one relatively the given axis.
8975
8976             Parameters:
8977                 theObject The object to be mirrored.
8978                 theAxis Axis of symmetry.
8979                 theName Object name; when specified, this parameter is used
8980                         for result publication in the study. Otherwise, if automatic
8981                         publication is switched on, default value is used for result name.
8982
8983             Returns:
8984                 New GEOM.GEOM_Object, containing the mirrored shape.
8985             """
8986             # Example: see GEOM_TestAll.py
8987             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8988             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8989             self._autoPublish(anObj, theName, "mirrored")
8990             return anObj
8991
8992         ## Mirror an object relatively the given point.
8993         #  @param theObject The object to be mirrored.
8994         #  @param thePoint Point of symmetry.
8995         #  @param theCopy Flag used to mirror object itself or create a copy.
8996         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8997         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8998         @ManageTransactions("TrsfOp")
8999         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9000             """
9001             Mirror an object relatively the given point.
9002
9003             Parameters:
9004                 theObject The object to be mirrored.
9005                 thePoint Point of symmetry.
9006                 theCopy Flag used to mirror object itself or create a copy.
9007
9008             Returns:
9009                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9010                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9011             """
9012             # Example: see GEOM_TestAll.py
9013             if theCopy:
9014                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9015             else:
9016                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9017             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9018             return anObj
9019
9020         ## Create an object, symmetrical
9021         #  to the given one relatively the given point.
9022         #  @param theObject The object to be mirrored.
9023         #  @param thePoint Point of symmetry.
9024         #  @param theName Object name; when specified, this parameter is used
9025         #         for result publication in the study. Otherwise, if automatic
9026         #         publication is switched on, default value is used for result name.
9027         #
9028         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9029         #
9030         #  @ref tui_mirror "Example"
9031         @ManageTransactions("TrsfOp")
9032         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9033             """
9034             Create an object, symmetrical
9035             to the given one relatively the given point.
9036
9037             Parameters:
9038                 theObject The object to be mirrored.
9039                 thePoint Point of symmetry.
9040                 theName Object name; when specified, this parameter is used
9041                         for result publication in the study. Otherwise, if automatic
9042                         publication is switched on, default value is used for result name.
9043
9044             Returns:
9045                 New GEOM.GEOM_Object, containing the mirrored shape.
9046             """
9047             # Example: see GEOM_TestAll.py
9048             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9049             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9050             self._autoPublish(anObj, theName, "mirrored")
9051             return anObj
9052
9053         ## Modify the location of the given object.
9054         #  @param theObject The object to be displaced.
9055         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9056         #                     If \a theStartLCS is NULL, displacement
9057         #                     will be performed from global CS.\n
9058         #                     If \a theObject itself is used as \a theStartLCS,
9059         #                     its location will be changed to \a theEndLCS.
9060         #  @param theEndLCS Coordinate system to perform displacement to it.
9061         #  @param theCopy Flag used to displace object itself or create a copy.
9062         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9063         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9064         @ManageTransactions("TrsfOp")
9065         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9066             """
9067             Modify the Location of the given object by LCS, creating its copy before the setting.
9068
9069             Parameters:
9070                 theObject The object to be displaced.
9071                 theStartLCS Coordinate system to perform displacement from it.
9072                             If theStartLCS is NULL, displacement
9073                             will be performed from global CS.
9074                             If theObject itself is used as theStartLCS,
9075                             its location will be changed to theEndLCS.
9076                 theEndLCS Coordinate system to perform displacement to it.
9077                 theCopy Flag used to displace object itself or create a copy.
9078
9079             Returns:
9080                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9081                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9082             """
9083             # Example: see GEOM_TestAll.py
9084             if theCopy:
9085                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9086             else:
9087                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9088             RaiseIfFailed("Displace", self.TrsfOp)
9089             return anObj
9090
9091         ## Modify the Location of the given object by LCS,
9092         #  creating its copy before the setting.
9093         #  @param theObject The object to be displaced.
9094         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9095         #                     If \a theStartLCS is NULL, displacement
9096         #                     will be performed from global CS.\n
9097         #                     If \a theObject itself is used as \a theStartLCS,
9098         #                     its location will be changed to \a theEndLCS.
9099         #  @param theEndLCS Coordinate system to perform displacement to it.
9100         #  @param theName Object name; when specified, this parameter is used
9101         #         for result publication in the study. Otherwise, if automatic
9102         #         publication is switched on, default value is used for result name.
9103         #
9104         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9105         #
9106         #  @ref tui_modify_location "Example"
9107         @ManageTransactions("TrsfOp")
9108         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9109             """
9110             Modify the Location of the given object by LCS, creating its copy before the setting.
9111
9112             Parameters:
9113                 theObject The object to be displaced.
9114                 theStartLCS Coordinate system to perform displacement from it.
9115                             If theStartLCS is NULL, displacement
9116                             will be performed from global CS.
9117                             If theObject itself is used as theStartLCS,
9118                             its location will be changed to theEndLCS.
9119                 theEndLCS Coordinate system to perform displacement to it.
9120                 theName Object name; when specified, this parameter is used
9121                         for result publication in the study. Otherwise, if automatic
9122                         publication is switched on, default value is used for result name.
9123
9124             Returns:
9125                 New GEOM.GEOM_Object, containing the displaced shape.
9126
9127             Example of usage:
9128                 # create local coordinate systems
9129                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9130                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9131                 # modify the location of the given object
9132                 position = geompy.MakePosition(cylinder, cs1, cs2)
9133             """
9134             # Example: see GEOM_TestAll.py
9135             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9136             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9137             self._autoPublish(anObj, theName, "displaced")
9138             return anObj
9139
9140         ## Modify the Location of the given object by Path.
9141         #  @param  theObject The object to be displaced.
9142         #  @param  thePath Wire or Edge along that the object will be translated.
9143         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9144         #  @param  theCopy is to create a copy objects if true.
9145         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9146         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9147         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9148         #
9149         #  @ref tui_modify_location "Example"
9150         @ManageTransactions("TrsfOp")
9151         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9152             """
9153             Modify the Location of the given object by Path.
9154
9155             Parameters:
9156                  theObject The object to be displaced.
9157                  thePath Wire or Edge along that the object will be translated.
9158                  theDistance progress of Path (0 = start location, 1 = end of path location).
9159                  theCopy is to create a copy objects if true.
9160                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9161
9162             Returns:
9163                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9164                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9165
9166             Example of usage:
9167                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9168             """
9169             # Example: see GEOM_TestAll.py
9170             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9171             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9172             return anObj
9173
9174         ## Modify the Location of the given object by Path, creating its copy before the operation.
9175         #  @param theObject The object to be displaced.
9176         #  @param thePath Wire or Edge along that the object will be translated.
9177         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9178         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9179         #  @param theName Object name; when specified, this parameter is used
9180         #         for result publication in the study. Otherwise, if automatic
9181         #         publication is switched on, default value is used for result name.
9182         #
9183         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9184         @ManageTransactions("TrsfOp")
9185         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9186             """
9187             Modify the Location of the given object by Path, creating its copy before the operation.
9188
9189             Parameters:
9190                  theObject The object to be displaced.
9191                  thePath Wire or Edge along that the object will be translated.
9192                  theDistance progress of Path (0 = start location, 1 = end of path location).
9193                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9194                  theName Object name; when specified, this parameter is used
9195                          for result publication in the study. Otherwise, if automatic
9196                          publication is switched on, default value is used for result name.
9197
9198             Returns:
9199                 New GEOM.GEOM_Object, containing the displaced shape.
9200             """
9201             # Example: see GEOM_TestAll.py
9202             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9203             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9204             self._autoPublish(anObj, theName, "displaced")
9205             return anObj
9206
9207         ## Offset given shape.
9208         #  @param theObject The base object for the offset.
9209         #  @param theOffset Offset value.
9210         #  @param theCopy Flag used to offset object itself or create a copy.
9211         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9212         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9213         @ManageTransactions("TrsfOp")
9214         def Offset(self, theObject, theOffset, theCopy=False):
9215             """
9216             Offset given shape.
9217
9218             Parameters:
9219                 theObject The base object for the offset.
9220                 theOffset Offset value.
9221                 theCopy Flag used to offset object itself or create a copy.
9222
9223             Returns:
9224                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9225                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9226             """
9227             theOffset, Parameters = ParseParameters(theOffset)
9228             if theCopy:
9229                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
9230             else:
9231                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
9232             RaiseIfFailed("Offset", self.TrsfOp)
9233             anObj.SetParameters(Parameters)
9234             return anObj
9235
9236         ## Create new object as offset of the given one.
9237         #  @param theObject The base object for the offset.
9238         #  @param theOffset Offset value.
9239         #  @param theName Object name; when specified, this parameter is used
9240         #         for result publication in the study. Otherwise, if automatic
9241         #         publication is switched on, default value is used for result name.
9242         #
9243         #  @return New GEOM.GEOM_Object, containing the offset object.
9244         #
9245         #  @ref tui_offset "Example"
9246         @ManageTransactions("TrsfOp")
9247         def MakeOffset(self, theObject, theOffset, theName=None):
9248             """
9249             Create new object as offset of the given one.
9250
9251             Parameters:
9252                 theObject The base object for the offset.
9253                 theOffset Offset value.
9254                 theName Object name; when specified, this parameter is used
9255                         for result publication in the study. Otherwise, if automatic
9256                         publication is switched on, default value is used for result name.
9257
9258             Returns:
9259                 New GEOM.GEOM_Object, containing the offset object.
9260
9261             Example of usage:
9262                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9263                  # create a new object as offset of the given object
9264                  offset = geompy.MakeOffset(box, 70.)
9265             """
9266             # Example: see GEOM_TestAll.py
9267             theOffset, Parameters = ParseParameters(theOffset)
9268             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
9269             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9270             anObj.SetParameters(Parameters)
9271             self._autoPublish(anObj, theName, "offset")
9272             return anObj
9273
9274         ## Create new object as projection of the given one on another.
9275         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9276         #         Edge and wire are acceptable if @a theTarget is a face.
9277         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9278         #  @param theName Object name; when specified, this parameter is used
9279         #         for result publication in the study. Otherwise, if automatic
9280         #         publication is switched on, default value is used for result name.
9281         #
9282         #  @return New GEOM.GEOM_Object, containing the projection.
9283         #
9284         #  @ref tui_projection "Example"
9285         @ManageTransactions("TrsfOp")
9286         def MakeProjection(self, theSource, theTarget, theName=None):
9287             """
9288             Create new object as projection of the given one on another.
9289
9290             Parameters:
9291                 theSource The source object for the projection. It can be a point, edge or wire.
9292                           Edge and wire are acceptable if theTarget is a face.
9293                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9294                 theName Object name; when specified, this parameter is used
9295                         for result publication in the study. Otherwise, if automatic
9296                         publication is switched on, default value is used for result name.
9297
9298             Returns:
9299                 New GEOM.GEOM_Object, containing the projection.
9300             """
9301             # Example: see GEOM_TestAll.py
9302             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9303             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9304             self._autoPublish(anObj, theName, "projection")
9305             return anObj
9306
9307         ## Create a projection of the given point on a wire or an edge.
9308         #  If there are no solutions or there are 2 or more solutions It throws an
9309         #  exception.
9310         #  @param thePoint the point to be projected.
9311         #  @param theWire the wire. The edge is accepted as well.
9312         #  @param theName Object name; when specified, this parameter is used
9313         #         for result publication in the study. Otherwise, if automatic
9314         #         publication is switched on, default value is used for result name.
9315         #
9316         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9317         #  \n \a u: The parameter of projection point on edge.
9318         #  \n \a PointOnEdge: The projection point.
9319         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9320         #
9321         #  @ref tui_projection "Example"
9322         @ManageTransactions("TrsfOp")
9323         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9324             """
9325             Create a projection of the given point on a wire or an edge.
9326             If there are no solutions or there are 2 or more solutions It throws an
9327             exception.
9328
9329             Parameters:
9330                 thePoint the point to be projected.
9331                 theWire the wire. The edge is accepted as well.
9332                 theName Object name; when specified, this parameter is used
9333                         for result publication in the study. Otherwise, if automatic
9334                         publication is switched on, default value is used for result name.
9335
9336             Returns:
9337                 [u, PointOnEdge, EdgeInWireIndex]
9338                  u: The parameter of projection point on edge.
9339                  PointOnEdge: The projection point.
9340                  EdgeInWireIndex: The index of an edge in a wire.
9341             """
9342             # Example: see GEOM_TestAll.py
9343             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9344             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9345             self._autoPublish(anObj[1], theName, "projection")
9346             return anObj
9347
9348         # -----------------------------------------------------------------------------
9349         # Patterns
9350         # -----------------------------------------------------------------------------
9351
9352         ## Translate the given object along the given vector a given number times
9353         #  @param theObject The object to be translated.
9354         #  @param theVector Direction of the translation. DX if None.
9355         #  @param theStep Distance to translate on.
9356         #  @param theNbTimes Quantity of translations to be done.
9357         #  @param theName Object name; when specified, this parameter is used
9358         #         for result publication in the study. Otherwise, if automatic
9359         #         publication is switched on, default value is used for result name.
9360         #
9361         #  @return New GEOM.GEOM_Object, containing compound of all
9362         #          the shapes, obtained after each translation.
9363         #
9364         #  @ref tui_multi_translation "Example"
9365         @ManageTransactions("TrsfOp")
9366         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9367             """
9368             Translate the given object along the given vector a given number times
9369
9370             Parameters:
9371                 theObject The object to be translated.
9372                 theVector Direction of the translation. DX if None.
9373                 theStep Distance to translate on.
9374                 theNbTimes Quantity of translations to be done.
9375                 theName Object name; when specified, this parameter is used
9376                         for result publication in the study. Otherwise, if automatic
9377                         publication is switched on, default value is used for result name.
9378
9379             Returns:
9380                 New GEOM.GEOM_Object, containing compound of all
9381                 the shapes, obtained after each translation.
9382
9383             Example of usage:
9384                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9385             """
9386             # Example: see GEOM_TestAll.py
9387             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9388             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9389             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9390             anObj.SetParameters(Parameters)
9391             self._autoPublish(anObj, theName, "multitranslation")
9392             return anObj
9393
9394         ## Conseqently apply two specified translations to theObject specified number of times.
9395         #  @param theObject The object to be translated.
9396         #  @param theVector1 Direction of the first translation. DX if None.
9397         #  @param theStep1 Step of the first translation.
9398         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9399         #  @param theVector2 Direction of the second translation. DY if None.
9400         #  @param theStep2 Step of the second translation.
9401         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9402         #  @param theName Object name; when specified, this parameter is used
9403         #         for result publication in the study. Otherwise, if automatic
9404         #         publication is switched on, default value is used for result name.
9405         #
9406         #  @return New GEOM.GEOM_Object, containing compound of all
9407         #          the shapes, obtained after each translation.
9408         #
9409         #  @ref tui_multi_translation "Example"
9410         @ManageTransactions("TrsfOp")
9411         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9412                                    theVector2, theStep2, theNbTimes2, theName=None):
9413             """
9414             Conseqently apply two specified translations to theObject specified number of times.
9415
9416             Parameters:
9417                 theObject The object to be translated.
9418                 theVector1 Direction of the first translation. DX if None.
9419                 theStep1 Step of the first translation.
9420                 theNbTimes1 Quantity of translations to be done along theVector1.
9421                 theVector2 Direction of the second translation. DY if None.
9422                 theStep2 Step of the second translation.
9423                 theNbTimes2 Quantity of translations to be done along theVector2.
9424                 theName Object name; when specified, this parameter is used
9425                         for result publication in the study. Otherwise, if automatic
9426                         publication is switched on, default value is used for result name.
9427
9428             Returns:
9429                 New GEOM.GEOM_Object, containing compound of all
9430                 the shapes, obtained after each translation.
9431
9432             Example of usage:
9433                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9434             """
9435             # Example: see GEOM_TestAll.py
9436             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9437             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9438                                                  theVector2, theStep2, theNbTimes2)
9439             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9440             anObj.SetParameters(Parameters)
9441             self._autoPublish(anObj, theName, "multitranslation")
9442             return anObj
9443
9444         ## Rotate the given object around the given axis a given number times.
9445         #  Rotation angle will be 2*PI/theNbTimes.
9446         #  @param theObject The object to be rotated.
9447         #  @param theAxis The rotation axis. DZ if None.
9448         #  @param theNbTimes Quantity of rotations to be done.
9449         #  @param theName Object name; when specified, this parameter is used
9450         #         for result publication in the study. Otherwise, if automatic
9451         #         publication is switched on, default value is used for result name.
9452         #
9453         #  @return New GEOM.GEOM_Object, containing compound of all the
9454         #          shapes, obtained after each rotation.
9455         #
9456         #  @ref tui_multi_rotation "Example"
9457         @ManageTransactions("TrsfOp")
9458         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9459             """
9460             Rotate the given object around the given axis a given number times.
9461             Rotation angle will be 2*PI/theNbTimes.
9462
9463             Parameters:
9464                 theObject The object to be rotated.
9465                 theAxis The rotation axis. DZ if None.
9466                 theNbTimes Quantity of rotations to be done.
9467                 theName Object name; when specified, this parameter is used
9468                         for result publication in the study. Otherwise, if automatic
9469                         publication is switched on, default value is used for result name.
9470
9471             Returns:
9472                 New GEOM.GEOM_Object, containing compound of all the
9473                 shapes, obtained after each rotation.
9474
9475             Example of usage:
9476                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9477             """
9478             # Example: see GEOM_TestAll.py
9479             theNbTimes, Parameters = ParseParameters(theNbTimes)
9480             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9481             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9482             anObj.SetParameters(Parameters)
9483             self._autoPublish(anObj, theName, "multirotation")
9484             return anObj
9485
9486         ## Rotate the given object around the given axis
9487         #  a given number times on the given angle.
9488         #  @param theObject The object to be rotated.
9489         #  @param theAxis The rotation axis. DZ if None.
9490         #  @param theAngleStep Rotation angle in radians.
9491         #  @param theNbTimes Quantity of rotations to be done.
9492         #  @param 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         #  @return New GEOM.GEOM_Object, containing compound of all the
9497         #          shapes, obtained after each rotation.
9498         #
9499         #  @ref tui_multi_rotation "Example"
9500         @ManageTransactions("TrsfOp")
9501         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9502             """
9503             Rotate the given object around the given axis
9504             a given number times on the given angle.
9505
9506             Parameters:
9507                 theObject The object to be rotated.
9508                 theAxis The rotation axis. DZ if None.
9509                 theAngleStep Rotation angle in radians.
9510                 theNbTimes Quantity of rotations to be done.
9511                 theName Object name; when specified, this parameter is used
9512                         for result publication in the study. Otherwise, if automatic
9513                         publication is switched on, default value is used for result name.
9514
9515             Returns:
9516                 New GEOM.GEOM_Object, containing compound of all the
9517                 shapes, obtained after each rotation.
9518
9519             Example of usage:
9520                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9521             """
9522             # Example: see GEOM_TestAll.py
9523             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9524             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9525             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9526             anObj.SetParameters(Parameters)
9527             self._autoPublish(anObj, theName, "multirotation")
9528             return anObj
9529
9530         ## Rotate the given object around the given axis a given
9531         #  number times and multi-translate each rotation result.
9532         #  Rotation angle will be 2*PI/theNbTimes1.
9533         #  Translation direction passes through center of gravity
9534         #  of rotated shape and its projection on the rotation axis.
9535         #  @param theObject The object to be rotated.
9536         #  @param theAxis Rotation axis. DZ if None.
9537         #  @param theNbTimes1 Quantity of rotations to be done.
9538         #  @param theRadialStep Translation distance.
9539         #  @param theNbTimes2 Quantity of translations to be done.
9540         #  @param theName Object name; when specified, this parameter is used
9541         #         for result publication in the study. Otherwise, if automatic
9542         #         publication is switched on, default value is used for result name.
9543         #
9544         #  @return New GEOM.GEOM_Object, containing compound of all the
9545         #          shapes, obtained after each transformation.
9546         #
9547         #  @ref tui_multi_rotation "Example"
9548         @ManageTransactions("TrsfOp")
9549         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9550             """
9551             Rotate the given object around the
9552             given axis on the given angle a given number
9553             times and multi-translate each rotation result.
9554             Translation direction passes through center of gravity
9555             of rotated shape and its projection on the rotation axis.
9556
9557             Parameters:
9558                 theObject The object to be rotated.
9559                 theAxis Rotation axis. DZ if None.
9560                 theNbTimes1 Quantity of rotations to be done.
9561                 theRadialStep Translation distance.
9562                 theNbTimes2 Quantity of translations to be done.
9563                 theName Object name; when specified, this parameter is used
9564                         for result publication in the study. Otherwise, if automatic
9565                         publication is switched on, default value is used for result name.
9566
9567             Returns:
9568                 New GEOM.GEOM_Object, containing compound of all the
9569                 shapes, obtained after each transformation.
9570
9571             Example of usage:
9572                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9573             """
9574             # Example: see GEOM_TestAll.py
9575             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9576             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9577             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9578             anObj.SetParameters(Parameters)
9579             self._autoPublish(anObj, theName, "multirotation")
9580             return anObj
9581
9582         ## Rotate the given object around the
9583         #  given axis on the given angle a given number
9584         #  times and multi-translate each rotation result.
9585         #  Translation direction passes through center of gravity
9586         #  of rotated shape and its projection on the rotation axis.
9587         #  @param theObject The object to be rotated.
9588         #  @param theAxis Rotation axis. DZ if None.
9589         #  @param theAngleStep Rotation angle in radians.
9590         #  @param theNbTimes1 Quantity of rotations to be done.
9591         #  @param theRadialStep Translation distance.
9592         #  @param theNbTimes2 Quantity of translations to be done.
9593         #  @param theName Object name; when specified, this parameter is used
9594         #         for result publication in the study. Otherwise, if automatic
9595         #         publication is switched on, default value is used for result name.
9596         #
9597         #  @return New GEOM.GEOM_Object, containing compound of all the
9598         #          shapes, obtained after each transformation.
9599         #
9600         #  @ref tui_multi_rotation "Example"
9601         @ManageTransactions("TrsfOp")
9602         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9603             """
9604             Rotate the given object around the
9605             given axis on the given angle a given number
9606             times and multi-translate each rotation result.
9607             Translation direction passes through center of gravity
9608             of rotated shape and its projection on the rotation axis.
9609
9610             Parameters:
9611                 theObject The object to be rotated.
9612                 theAxis Rotation axis. DZ if None.
9613                 theAngleStep Rotation angle in radians.
9614                 theNbTimes1 Quantity of rotations to be done.
9615                 theRadialStep Translation distance.
9616                 theNbTimes2 Quantity of translations to be done.
9617                 theName Object name; when specified, this parameter is used
9618                         for result publication in the study. Otherwise, if automatic
9619                         publication is switched on, default value is used for result name.
9620
9621             Returns:
9622                 New GEOM.GEOM_Object, containing compound of all the
9623                 shapes, obtained after each transformation.
9624
9625             Example of usage:
9626                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9627             """
9628             # Example: see GEOM_TestAll.py
9629             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9630             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9631             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9632             anObj.SetParameters(Parameters)
9633             self._autoPublish(anObj, theName, "multirotation")
9634             return anObj
9635
9636         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9637         #
9638         #  @ref swig_MakeMultiRotation "Example"
9639         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9640             """
9641             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9642
9643             Example of usage:
9644                 pz = geompy.MakeVertex(0, 0, 100)
9645                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9646                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9647             """
9648             # Example: see GEOM_TestOthers.py
9649             aVec = self.MakeLine(aPoint,aDir)
9650             # note: auto-publishing is done in self.MultiRotate1D()
9651             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9652             return anObj
9653
9654         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9655         #
9656         #  @ref swig_MakeMultiRotation "Example"
9657         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9658             """
9659             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9660
9661             Example of usage:
9662                 pz = geompy.MakeVertex(0, 0, 100)
9663                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9664                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9665             """
9666             # Example: see GEOM_TestOthers.py
9667             aVec = self.MakeLine(aPoint,aDir)
9668             # note: auto-publishing is done in self.MultiRotate1D()
9669             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9670             return anObj
9671
9672         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9673         #
9674         #  @ref swig_MakeMultiRotation "Example"
9675         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9676             """
9677             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9678
9679             Example of usage:
9680                 pz = geompy.MakeVertex(0, 0, 100)
9681                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9682                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9683             """
9684             # Example: see GEOM_TestOthers.py
9685             aVec = self.MakeLine(aPoint,aDir)
9686             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9687             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9688             return anObj
9689
9690         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9691         #
9692         #  @ref swig_MakeMultiRotation "Example"
9693         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9694             """
9695             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9696
9697             Example of usage:
9698                 pz = geompy.MakeVertex(0, 0, 100)
9699                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9700                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9701             """
9702             # Example: see GEOM_TestOthers.py
9703             aVec = self.MakeLine(aPoint,aDir)
9704             # note: auto-publishing is done in self.MultiRotate2D()
9705             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9706             return anObj
9707
9708         ##
9709         #  Compute a wire or a face that represents a projection of the source
9710         #  shape onto cylinder. The cylinder's coordinate system is the same
9711         #  as the global coordinate system.
9712         #
9713         #  @param theObject The object to be projected. It can be either
9714         #         a planar wire or a face.
9715         #  @param theRadius The radius of the cylinder.
9716         #  @param theStartAngle The starting angle in radians from
9717         #         the cylinder's X axis around Z axis. The angle from which
9718         #         the projection is started.
9719         #  @param theAngleLength The projection length angle in radians.
9720         #         The angle in which to project the total length of the wire.
9721         #         If it is negative the projection is not scaled and natural
9722         #         wire length is kept for the projection.
9723         #  @param theAngleRotation The desired angle in radians between
9724         #         the tangent vector to the first curve at the first point of
9725         #         the theObject's projection in 2D space and U-direction of
9726         #         cylinder's 2D space.
9727         #  @param theName Object name; when specified, this parameter is used
9728         #         for result publication in the study. Otherwise, if automatic
9729         #         publication is switched on, default value is used for result name.
9730         #
9731         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9732         #         represents a wire or a face that represents a projection of
9733         #         the source shape onto a cylinder.
9734         #
9735         #  @ref tui_projection "Example"
9736         def MakeProjectionOnCylinder (self, theObject, theRadius,
9737                                       theStartAngle=0.0, theAngleLength=-1.0,
9738                                       theAngleRotation=0.0,
9739                                       theName=None):
9740             """
9741             Compute a wire or a face that represents a projection of the source
9742             shape onto cylinder. The cylinder's coordinate system is the same
9743             as the global coordinate system.
9744
9745             Parameters:
9746                 theObject The object to be projected. It can be either
9747                         a planar wire or a face.
9748                 theRadius The radius of the cylinder.
9749                 theStartAngle The starting angle in radians from the cylinder's X axis
9750                         around Z axis. The angle from which the projection is started.
9751                 theAngleLength The projection length angle in radians. The angle in which
9752                         to project the total length of the wire. If it is negative the
9753                         projection is not scaled and natural wire length is kept for
9754                         the projection.
9755                 theAngleRotation The desired angle in radians between
9756                         the tangent vector to the first curve at the first
9757                         point of the theObject's projection in 2D space and
9758                         U-direction of cylinder's 2D space.
9759                 theName Object name; when specified, this parameter is used
9760                         for result publication in the study. Otherwise, if automatic
9761                         publication is switched on, default value is used for result name.
9762
9763             Returns:
9764                 New GEOM.GEOM_Object, containing the result shape. The result
9765                 represents a wire or a face that represents a projection of
9766                 the source shape onto a cylinder.
9767             """
9768             # Example: see GEOM_TestAll.py
9769             flagStartAngle = False
9770             if isinstance(theStartAngle,str):
9771                 flagStartAngle = True
9772             flagAngleLength = False
9773             if isinstance(theAngleLength,str):
9774                 flagAngleLength = True
9775             flagAngleRotation = False
9776             if isinstance(theAngleRotation,str):
9777                 flagAngleRotation = True
9778             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9779               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9780             if flagStartAngle:
9781                 theStartAngle = theStartAngle*math.pi/180.
9782             if flagAngleLength:
9783                 theAngleLength = theAngleLength*math.pi/180.
9784             if flagAngleRotation:
9785                 theAngleRotation = theAngleRotation*math.pi/180.
9786             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9787                 theStartAngle, theAngleLength, theAngleRotation)
9788             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9789             anObj.SetParameters(Parameters)
9790             self._autoPublish(anObj, theName, "projection")
9791             return anObj
9792
9793         # end of l3_transform
9794         ## @}
9795
9796         ## @addtogroup l3_transform_d
9797         ## @{
9798
9799         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9800         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9801             """
9802             Deprecated method. Use MultiRotate1DNbTimes instead.
9803             """
9804             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9805             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9806
9807         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9808         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9809         @ManageTransactions("TrsfOp")
9810         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9811             """
9812             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9813             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9814
9815             Example of usage:
9816                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9817             """
9818             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9819             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9820             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9821             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9822             anObj.SetParameters(Parameters)
9823             self._autoPublish(anObj, theName, "multirotation")
9824             return anObj
9825
9826         ## The same, as MultiRotate1D(), but axis is given by direction and point
9827         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9828         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9829             """
9830             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9831             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9832
9833             Example of usage:
9834                 pz = geompy.MakeVertex(0, 0, 100)
9835                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9836                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9837             """
9838             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9839             aVec = self.MakeLine(aPoint,aDir)
9840             # note: auto-publishing is done in self.MultiRotate1D()
9841             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9842             return anObj
9843
9844         ## The same, as MultiRotate2D(), but axis is given by direction and point
9845         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9846         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9847             """
9848             The same, as MultiRotate2D(), but axis is given by direction and point
9849             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9850
9851             Example of usage:
9852                 pz = geompy.MakeVertex(0, 0, 100)
9853                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9854                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9855             """
9856             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9857             aVec = self.MakeLine(aPoint,aDir)
9858             # note: auto-publishing is done in self.MultiRotate2D()
9859             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9860             return anObj
9861
9862         # end of l3_transform_d
9863         ## @}
9864
9865         ## @addtogroup l3_local
9866         ## @{
9867
9868         ## Perform a fillet on all edges of the given shape.
9869         #  @param theShape Shape, to perform fillet on.
9870         #  @param theR Fillet radius.
9871         #  @param theName Object name; when specified, this parameter is used
9872         #         for result publication in the study. Otherwise, if automatic
9873         #         publication is switched on, default value is used for result name.
9874         #
9875         #  @return New GEOM.GEOM_Object, containing the result shape.
9876         #
9877         #  @ref tui_fillet "Example 1"
9878         #  \n @ref swig_MakeFilletAll "Example 2"
9879         @ManageTransactions("LocalOp")
9880         def MakeFilletAll(self, theShape, theR, theName=None):
9881             """
9882             Perform a fillet on all edges of the given shape.
9883
9884             Parameters:
9885                 theShape Shape, to perform fillet on.
9886                 theR Fillet radius.
9887                 theName Object name; when specified, this parameter is used
9888                         for result publication in the study. Otherwise, if automatic
9889                         publication is switched on, default value is used for result name.
9890
9891             Returns:
9892                 New GEOM.GEOM_Object, containing the result shape.
9893
9894             Example of usage:
9895                filletall = geompy.MakeFilletAll(prism, 10.)
9896             """
9897             # Example: see GEOM_TestOthers.py
9898             theR,Parameters = ParseParameters(theR)
9899             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9900             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9901             anObj.SetParameters(Parameters)
9902             self._autoPublish(anObj, theName, "fillet")
9903             return anObj
9904
9905         ## Perform a fillet on the specified edges/faces of the given shape
9906         #  @param theShape Shape, to perform fillet on.
9907         #  @param theR Fillet radius.
9908         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9909         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9910         #  @param theName Object name; when specified, this parameter is used
9911         #         for result publication in the study. Otherwise, if automatic
9912         #         publication is switched on, default value is used for result name.
9913         #
9914         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9915         #
9916         #  @return New GEOM.GEOM_Object, containing the result shape.
9917         #
9918         #  @ref tui_fillet "Example"
9919         @ManageTransactions("LocalOp")
9920         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9921             """
9922             Perform a fillet on the specified edges/faces of the given shape
9923
9924             Parameters:
9925                 theShape Shape, to perform fillet on.
9926                 theR Fillet radius.
9927                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9928                 theListShapes Global indices of edges/faces to perform fillet on.
9929                 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:
9934                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9935
9936             Returns:
9937                 New GEOM.GEOM_Object, containing the result shape.
9938
9939             Example of usage:
9940                 # get the list of IDs (IDList) for the fillet
9941                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9942                 IDlist_e = []
9943                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9944                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9945                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9946                 # make a fillet on the specified edges of the given shape
9947                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9948             """
9949             # Example: see GEOM_TestAll.py
9950             theR,Parameters = ParseParameters(theR)
9951             anObj = None
9952             if theShapeType == self.ShapeType["EDGE"]:
9953                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9954                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9955             else:
9956                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9957                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9958             anObj.SetParameters(Parameters)
9959             self._autoPublish(anObj, theName, "fillet")
9960             return anObj
9961
9962         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9963         @ManageTransactions("LocalOp")
9964         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9965             """
9966             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9967
9968             Example of usage:
9969                 # get the list of IDs (IDList) for the fillet
9970                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9971                 IDlist_e = []
9972                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9973                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9974                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9975                 # make a fillet on the specified edges of the given shape
9976                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9977             """
9978             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9979             anObj = None
9980             if theShapeType == self.ShapeType["EDGE"]:
9981                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9982                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9983             else:
9984                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9985                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9986             anObj.SetParameters(Parameters)
9987             self._autoPublish(anObj, theName, "fillet")
9988             return anObj
9989
9990         ## Perform a fillet on the specified edges of the given shape
9991         #  @param theShape  Wire Shape to perform fillet on.
9992         #  @param theR  Fillet radius.
9993         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9994         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9995         #    \note The list of vertices could be empty,
9996         #          in this case fillet will done done at all vertices in wire
9997         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9998         #         by the length of the edges, nearest to the fillet vertex.
9999         #         But sometimes the next edge is C1 continuous with the one, nearest to
10000         #         the fillet point, and such two (or more) edges can be united to allow
10001         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10002         #         thus ignoring the secant vertex (vertices).
10003         #  @param theName Object name; when specified, this parameter is used
10004         #         for result publication in the study. Otherwise, if automatic
10005         #         publication is switched on, default value is used for result name.
10006         #
10007         #  @return New GEOM.GEOM_Object, containing the result shape.
10008         #
10009         #  @ref tui_fillet2d "Example"
10010         @ManageTransactions("LocalOp")
10011         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10012             """
10013             Perform a fillet on the specified edges of the given shape
10014
10015             Parameters:
10016                 theShape  Wire Shape to perform fillet on.
10017                 theR  Fillet radius.
10018                 theListOfVertexes Global indices of vertexes to perform fillet on.
10019                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10020                     by the length of the edges, nearest to the fillet vertex.
10021                     But sometimes the next edge is C1 continuous with the one, nearest to
10022                     the fillet point, and such two (or more) edges can be united to allow
10023                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10024                     thus ignoring the secant vertex (vertices).
10025                 theName Object name; when specified, this parameter is used
10026                         for result publication in the study. Otherwise, if automatic
10027                         publication is switched on, default value is used for result name.
10028             Note:
10029                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10030
10031                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10032
10033             Returns:
10034                 New GEOM.GEOM_Object, containing the result shape.
10035
10036             Example of usage:
10037                 # create wire
10038                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10039                 # make fillet at given wire vertices with giver radius
10040                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10041             """
10042             # Example: see GEOM_TestAll.py
10043             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10044             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10045             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10046             anObj.SetParameters(Parameters)
10047             self._autoPublish(anObj, theName, "fillet")
10048             return anObj
10049
10050         ## Perform a fillet at the specified vertices of the given face/shell.
10051         #  @param theShape Face or Shell shape to perform fillet on.
10052         #  @param theR Fillet radius.
10053         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10054         #  @param theName Object name; when specified, this parameter is used
10055         #         for result publication in the study. Otherwise, if automatic
10056         #         publication is switched on, default value is used for result name.
10057         #
10058         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10059         #
10060         #  @return New GEOM.GEOM_Object, containing the result shape.
10061         #
10062         #  @ref tui_fillet2d "Example"
10063         @ManageTransactions("LocalOp")
10064         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10065             """
10066             Perform a fillet at the specified vertices of the given face/shell.
10067
10068             Parameters:
10069                 theShape  Face or Shell shape to perform fillet on.
10070                 theR  Fillet radius.
10071                 theListOfVertexes Global indices of vertexes to perform fillet on.
10072                 theName Object name; when specified, this parameter is used
10073                         for result publication in the study. Otherwise, if automatic
10074                         publication is switched on, default value is used for result name.
10075             Note:
10076                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10077
10078             Returns:
10079                 New GEOM.GEOM_Object, containing the result shape.
10080
10081             Example of usage:
10082                 face = geompy.MakeFaceHW(100, 100, 1)
10083                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10084             """
10085             # Example: see GEOM_TestAll.py
10086             theR,Parameters = ParseParameters(theR)
10087             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10088             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10089             anObj.SetParameters(Parameters)
10090             self._autoPublish(anObj, theName, "fillet")
10091             return anObj
10092
10093         ## Perform a symmetric chamfer on all edges of the given shape.
10094         #  @param theShape Shape, to perform chamfer on.
10095         #  @param theD Chamfer size along each face.
10096         #  @param theName Object name; when specified, this parameter is used
10097         #         for result publication in the study. Otherwise, if automatic
10098         #         publication is switched on, default value is used for result name.
10099         #
10100         #  @return New GEOM.GEOM_Object, containing the result shape.
10101         #
10102         #  @ref tui_chamfer "Example 1"
10103         #  \n @ref swig_MakeChamferAll "Example 2"
10104         @ManageTransactions("LocalOp")
10105         def MakeChamferAll(self, theShape, theD, theName=None):
10106             """
10107             Perform a symmetric chamfer on all edges of the given shape.
10108
10109             Parameters:
10110                 theShape Shape, to perform chamfer on.
10111                 theD Chamfer size along each face.
10112                 theName Object name; when specified, this parameter is used
10113                         for result publication in the study. Otherwise, if automatic
10114                         publication is switched on, default value is used for result name.
10115
10116             Returns:
10117                 New GEOM.GEOM_Object, containing the result shape.
10118
10119             Example of usage:
10120                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10121             """
10122             # Example: see GEOM_TestOthers.py
10123             theD,Parameters = ParseParameters(theD)
10124             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10125             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10126             anObj.SetParameters(Parameters)
10127             self._autoPublish(anObj, theName, "chamfer")
10128             return anObj
10129
10130         ## Perform a chamfer on edges, common to the specified faces,
10131         #  with distance D1 on the Face1
10132         #  @param theShape Shape, to perform chamfer on.
10133         #  @param theD1 Chamfer size along \a theFace1.
10134         #  @param theD2 Chamfer size along \a theFace2.
10135         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10136         #  @param 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 GetSubShapeID().
10141         #
10142         #  @return New GEOM.GEOM_Object, containing the result shape.
10143         #
10144         #  @ref tui_chamfer "Example"
10145         @ManageTransactions("LocalOp")
10146         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10147             """
10148             Perform a chamfer on edges, common to the specified faces,
10149             with distance D1 on the Face1
10150
10151             Parameters:
10152                 theShape Shape, to perform chamfer on.
10153                 theD1 Chamfer size along theFace1.
10154                 theD2 Chamfer size along theFace2.
10155                 theFace1,theFace2 Global indices of two faces of theShape.
10156                 theName Object name; when specified, this parameter is used
10157                         for result publication in the study. Otherwise, if automatic
10158                         publication is switched on, default value is used for result name.
10159
10160             Note:
10161                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10162
10163             Returns:
10164                 New GEOM.GEOM_Object, containing the result shape.
10165
10166             Example of usage:
10167                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10168                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10169                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10170                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10171             """
10172             # Example: see GEOM_TestAll.py
10173             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10174             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10175             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10176             anObj.SetParameters(Parameters)
10177             self._autoPublish(anObj, theName, "chamfer")
10178             return anObj
10179
10180         ## Perform a chamfer on edges
10181         #  @param theShape Shape, to perform chamfer on.
10182         #  @param theD Chamfer length
10183         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10184         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10185         #  @param theName Object name; when specified, this parameter is used
10186         #         for result publication in the study. Otherwise, if automatic
10187         #         publication is switched on, default value is used for result name.
10188         #
10189         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10190         #
10191         #  @return New GEOM.GEOM_Object, containing the result shape.
10192         @ManageTransactions("LocalOp")
10193         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10194             """
10195             Perform a chamfer on edges
10196
10197             Parameters:
10198                 theShape Shape, to perform chamfer on.
10199                 theD1 Chamfer size along theFace1.
10200                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10201                 theFace1,theFace2 Global indices of two faces of theShape.
10202                 theName Object name; when specified, this parameter is used
10203                         for result publication in the study. Otherwise, if automatic
10204                         publication is switched on, default value is used for result name.
10205
10206             Note:
10207                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10208
10209             Returns:
10210                 New GEOM.GEOM_Object, containing the result shape.
10211
10212             Example of usage:
10213                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10214                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10215                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10216                 ang = 30
10217                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
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.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10226             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10227             anObj.SetParameters(Parameters)
10228             self._autoPublish(anObj, theName, "chamfer")
10229             return anObj
10230
10231         ## Perform a chamfer on all edges of the specified faces,
10232         #  with distance D1 on the first specified face (if several for one edge)
10233         #  @param theShape Shape, to perform chamfer on.
10234         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10235         #               connected to the edge, are in \a theFaces, \a theD1
10236         #               will be get along face, which is nearer to \a theFaces beginning.
10237         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10238         #  @param theFaces Sequence of global indices of faces of \a theShape.
10239         #  @param theName Object name; when specified, this parameter is used
10240         #         for result publication in the study. Otherwise, if automatic
10241         #         publication is switched on, default value is used for result name.
10242         #
10243         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10244         #
10245         #  @return New GEOM.GEOM_Object, containing the result shape.
10246         #
10247         #  @ref tui_chamfer "Example"
10248         @ManageTransactions("LocalOp")
10249         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10250             """
10251             Perform a chamfer on all edges of the specified faces,
10252             with distance D1 on the first specified face (if several for one edge)
10253
10254             Parameters:
10255                 theShape Shape, to perform chamfer on.
10256                 theD1 Chamfer size along face from  theFaces. If both faces,
10257                       connected to the edge, are in theFaces, theD1
10258                       will be get along face, which is nearer to theFaces beginning.
10259                 theD2 Chamfer size along another of two faces, connected to the edge.
10260                 theFaces Sequence of global indices of faces of theShape.
10261                 theName Object name; when specified, this parameter is used
10262                         for result publication in the study. Otherwise, if automatic
10263                         publication is switched on, default value is used for result name.
10264
10265             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10266
10267             Returns:
10268                 New GEOM.GEOM_Object, containing the result shape.
10269             """
10270             # Example: see GEOM_TestAll.py
10271             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10272             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10273             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10274             anObj.SetParameters(Parameters)
10275             self._autoPublish(anObj, theName, "chamfer")
10276             return anObj
10277
10278         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
10279         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10280         #
10281         #  @ref swig_FilletChamfer "Example"
10282         @ManageTransactions("LocalOp")
10283         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10284             """
10285             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
10286             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10287             """
10288             flag = False
10289             if isinstance(theAngle,str):
10290                 flag = True
10291             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10292             if flag:
10293                 theAngle = theAngle*math.pi/180.0
10294             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10295             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10296             anObj.SetParameters(Parameters)
10297             self._autoPublish(anObj, theName, "chamfer")
10298             return anObj
10299
10300         ## Perform a chamfer on edges,
10301         #  with distance D1 on the first specified face (if several for one edge)
10302         #  @param theShape Shape, to perform chamfer on.
10303         #  @param theD1,theD2 Chamfer size
10304         #  @param theEdges Sequence of edges of \a theShape.
10305         #  @param theName Object name; when specified, this parameter is used
10306         #         for result publication in the study. Otherwise, if automatic
10307         #         publication is switched on, default value is used for result name.
10308         #
10309         #  @return New GEOM.GEOM_Object, containing the result shape.
10310         #
10311         #  @ref swig_FilletChamfer "Example"
10312         @ManageTransactions("LocalOp")
10313         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10314             """
10315             Perform a chamfer on edges,
10316             with distance D1 on the first specified face (if several for one edge)
10317
10318             Parameters:
10319                 theShape Shape, to perform chamfer on.
10320                 theD1,theD2 Chamfer size
10321                 theEdges Sequence of edges of theShape.
10322                 theName Object name; when specified, this parameter is used
10323                         for result publication in the study. Otherwise, if automatic
10324                         publication is switched on, default value is used for result name.
10325
10326             Returns:
10327                 New GEOM.GEOM_Object, containing the result shape.
10328             """
10329             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10330             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10331             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10332             anObj.SetParameters(Parameters)
10333             self._autoPublish(anObj, theName, "chamfer")
10334             return anObj
10335
10336         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
10337         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10338         @ManageTransactions("LocalOp")
10339         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10340             """
10341             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
10342             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10343             """
10344             flag = False
10345             if isinstance(theAngle,str):
10346                 flag = True
10347             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10348             if flag:
10349                 theAngle = theAngle*math.pi/180.0
10350             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10351             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10352             anObj.SetParameters(Parameters)
10353             self._autoPublish(anObj, theName, "chamfer")
10354             return anObj
10355
10356         ## @sa MakeChamferEdge(), MakeChamferFaces()
10357         #
10358         #  @ref swig_MakeChamfer "Example"
10359         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10360             """
10361             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10362             """
10363             # Example: see GEOM_TestOthers.py
10364             anObj = None
10365             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10366             if aShapeType == self.ShapeType["EDGE"]:
10367                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10368             else:
10369                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10370             return anObj
10371
10372         ## Remove material from a solid by extrusion of the base shape on the given distance.
10373         #  @param theInit Shape to remove material from. It must be a solid or
10374         #  a compound made of a single solid.
10375         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10376         #  @param theH Prism dimension along the normal to theBase
10377         #  @param theAngle Draft angle in degrees.
10378         #  @param theInvert If true material changes the direction
10379         #  @param theName Object name; when specified, this parameter is used
10380         #         for result publication in the study. Otherwise, if automatic
10381         #         publication is switched on, default value is used for result name.
10382         #
10383         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10384         #
10385         #  @ref tui_creation_prism "Example"
10386         @ManageTransactions("PrimOp")
10387         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10388             """
10389             Add material to a solid by extrusion of the base shape on the given distance.
10390
10391             Parameters:
10392                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10393                 theBase Closed edge or wire defining the base shape to be extruded.
10394                 theH Prism dimension along the normal  to theBase
10395                 theAngle Draft angle in degrees.
10396                 theInvert If true material changes the direction.
10397                 theName Object name; when specified, this parameter is used
10398                         for result publication in the study. Otherwise, if automatic
10399                         publication is switched on, default value is used for result name.
10400
10401             Returns:
10402                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10403             """
10404             # Example: see GEOM_TestAll.py
10405             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10406             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10407             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10408             anObj.SetParameters(Parameters)
10409             self._autoPublish(anObj, theName, "extrudedCut")
10410             return anObj
10411
10412         ## Add material to a solid by extrusion of the base shape on the given distance.
10413         #  @param theInit Shape to add material to. It must be a solid or
10414         #  a compound made of a single solid.
10415         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10416         #  @param theH Prism dimension along the normal to theBase
10417         #  @param theAngle Draft angle in degrees.
10418         #  @param theInvert If true material changes the direction
10419         #  @param theName Object name; when specified, this parameter is used
10420         #         for result publication in the study. Otherwise, if automatic
10421         #         publication is switched on, default value is used for result name.
10422         #
10423         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10424         #
10425         #  @ref tui_creation_prism "Example"
10426         @ManageTransactions("PrimOp")
10427         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10428             """
10429             Add material to a solid by extrusion of the base shape on the given distance.
10430
10431             Parameters:
10432                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10433                 theBase Closed edge or wire defining the base shape to be extruded.
10434                 theH Prism dimension along the normal  to theBase
10435                 theAngle Draft angle in degrees.
10436                 theInvert If true material changes the direction.
10437                 theName Object name; when specified, this parameter is used
10438                         for result publication in the study. Otherwise, if automatic
10439                         publication is switched on, default value is used for result name.
10440
10441             Returns:
10442                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10443             """
10444             # Example: see GEOM_TestAll.py
10445             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10446             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10447             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10448             anObj.SetParameters(Parameters)
10449             self._autoPublish(anObj, theName, "extrudedBoss")
10450             return anObj
10451
10452         # end of l3_local
10453         ## @}
10454
10455         ## @addtogroup l3_basic_op
10456         ## @{
10457
10458         ## Perform an Archimde operation on the given shape with given parameters.
10459         #  The object presenting the resulting face is returned.
10460         #  @param theShape Shape to be put in water.
10461         #  @param theWeight Weight of the shape.
10462         #  @param theWaterDensity Density of the water.
10463         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10464         #  @param theName Object name; when specified, this parameter is used
10465         #         for result publication in the study. Otherwise, if automatic
10466         #         publication is switched on, default value is used for result name.
10467         #
10468         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10469         #          by a plane, corresponding to water level.
10470         #
10471         #  @ref tui_archimede "Example"
10472         @ManageTransactions("LocalOp")
10473         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10474             """
10475             Perform an Archimde operation on the given shape with given parameters.
10476             The object presenting the resulting face is returned.
10477
10478             Parameters:
10479                 theShape Shape to be put in water.
10480                 theWeight Weight of the shape.
10481                 theWaterDensity Density of the water.
10482                 theMeshDeflection Deflection of the mesh, using to compute the section.
10483                 theName Object name; when specified, this parameter is used
10484                         for result publication in the study. Otherwise, if automatic
10485                         publication is switched on, default value is used for result name.
10486
10487             Returns:
10488                 New GEOM.GEOM_Object, containing a section of theShape
10489                 by a plane, corresponding to water level.
10490             """
10491             # Example: see GEOM_TestAll.py
10492             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10493               theWeight,theWaterDensity,theMeshDeflection)
10494             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10495             RaiseIfFailed("MakeArchimede", self.LocalOp)
10496             anObj.SetParameters(Parameters)
10497             self._autoPublish(anObj, theName, "archimede")
10498             return anObj
10499
10500         # end of l3_basic_op
10501         ## @}
10502
10503         ## @addtogroup l2_measure
10504         ## @{
10505
10506         ## Get point coordinates
10507         #  @return [x, y, z]
10508         #
10509         #  @ref tui_point_coordinates_page "Example"
10510         @ManageTransactions("MeasuOp")
10511         def PointCoordinates(self,Point):
10512             """
10513             Get point coordinates
10514
10515             Returns:
10516                 [x, y, z]
10517             """
10518             # Example: see GEOM_TestMeasures.py
10519             aTuple = self.MeasuOp.PointCoordinates(Point)
10520             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10521             return aTuple
10522
10523         ## Get vector coordinates
10524         #  @return [x, y, z]
10525         #
10526         #  @ref tui_measurement_tools_page "Example"
10527         def VectorCoordinates(self,Vector):
10528             """
10529             Get vector coordinates
10530
10531             Returns:
10532                 [x, y, z]
10533             """
10534
10535             p1=self.GetFirstVertex(Vector)
10536             p2=self.GetLastVertex(Vector)
10537
10538             X1=self.PointCoordinates(p1)
10539             X2=self.PointCoordinates(p2)
10540
10541             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10542
10543
10544         ## Compute cross product
10545         #  @return vector w=u^v
10546         #
10547         #  @ref tui_measurement_tools_page "Example"
10548         def CrossProduct(self, Vector1, Vector2):
10549             """
10550             Compute cross product
10551
10552             Returns: vector w=u^v
10553             """
10554             u=self.VectorCoordinates(Vector1)
10555             v=self.VectorCoordinates(Vector2)
10556             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])
10557
10558             return w
10559
10560         ## Compute cross product
10561         #  @return dot product  p=u.v
10562         #
10563         #  @ref tui_measurement_tools_page "Example"
10564         def DotProduct(self, Vector1, Vector2):
10565             """
10566             Compute cross product
10567
10568             Returns: dot product  p=u.v
10569             """
10570             u=self.VectorCoordinates(Vector1)
10571             v=self.VectorCoordinates(Vector2)
10572             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10573
10574             return p
10575
10576
10577         ## Get summarized length of all wires,
10578         #  area of surface and volume of the given shape.
10579         #  @param theShape Shape to define properties of.
10580         #  @param theTolerance maximal relative error of area
10581         #         and volume computation.
10582         #  @return [theLength, theSurfArea, theVolume]\n
10583         #  theLength:   Summarized length of all wires of the given shape.\n
10584         #  theSurfArea: Area of surface of the given shape.\n
10585         #  theVolume:   Volume of the given shape.
10586         #
10587         #  @ref tui_basic_properties_page "Example"
10588         @ManageTransactions("MeasuOp")
10589         def BasicProperties(self,theShape, theTolerance=1.e-6):
10590             """
10591             Get summarized length of all wires,
10592             area of surface and volume of the given shape.
10593
10594             Parameters:
10595                 theShape Shape to define properties of.
10596                 theTolerance maximal relative error of area
10597                              and volume computation.
10598
10599             Returns:
10600                 [theLength, theSurfArea, theVolume]
10601                  theLength:   Summarized length of all wires of the given shape.
10602                  theSurfArea: Area of surface of the given shape.
10603                  theVolume:   Volume of the given shape.
10604             """
10605             # Example: see GEOM_TestMeasures.py
10606             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10607             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10608             return aTuple
10609
10610         ## Get parameters of bounding box of the given shape
10611         #  @param theShape Shape to obtain bounding box of.
10612         #  @param precise TRUE for precise computation; FALSE for fast one.
10613         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10614         #  Xmin,Xmax: Limits of shape along OX axis.
10615         #  Ymin,Ymax: Limits of shape along OY axis.
10616         #  Zmin,Zmax: Limits of shape along OZ axis.
10617         #
10618         #  @ref tui_bounding_box_page "Example"
10619         @ManageTransactions("MeasuOp")
10620         def BoundingBox (self, theShape, precise=False):
10621             """
10622             Get parameters of bounding box of the given shape
10623
10624             Parameters:
10625                 theShape Shape to obtain bounding box of.
10626                 precise TRUE for precise computation; FALSE for fast one.
10627
10628             Returns:
10629                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10630                  Xmin,Xmax: Limits of shape along OX axis.
10631                  Ymin,Ymax: Limits of shape along OY axis.
10632                  Zmin,Zmax: Limits of shape along OZ axis.
10633             """
10634             # Example: see GEOM_TestMeasures.py
10635             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10636             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10637             return aTuple
10638
10639         ## Get bounding box of the given shape
10640         #  @param theShape Shape to obtain bounding box of.
10641         #  @param precise TRUE for precise computation; FALSE for fast one.
10642         #  @param theName Object name; when specified, this parameter is used
10643         #         for result publication in the study. Otherwise, if automatic
10644         #         publication is switched on, default value is used for result name.
10645         #
10646         #  @return New GEOM.GEOM_Object, containing the created box.
10647         #
10648         #  @ref tui_bounding_box_page "Example"
10649         @ManageTransactions("MeasuOp")
10650         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10651             """
10652             Get bounding box of the given shape
10653
10654             Parameters:
10655                 theShape Shape to obtain bounding box of.
10656                 precise TRUE for precise computation; FALSE for fast one.
10657                 theName Object name; when specified, this parameter is used
10658                         for result publication in the study. Otherwise, if automatic
10659                         publication is switched on, default value is used for result name.
10660
10661             Returns:
10662                 New GEOM.GEOM_Object, containing the created box.
10663             """
10664             # Example: see GEOM_TestMeasures.py
10665             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10666             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10667             self._autoPublish(anObj, theName, "bndbox")
10668             return anObj
10669
10670         ## Get inertia matrix and moments of inertia of theShape.
10671         #  @param theShape Shape to calculate inertia of.
10672         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10673         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10674         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10675         #
10676         #  @ref tui_inertia_page "Example"
10677         @ManageTransactions("MeasuOp")
10678         def Inertia(self,theShape):
10679             """
10680             Get inertia matrix and moments of inertia of theShape.
10681
10682             Parameters:
10683                 theShape Shape to calculate inertia of.
10684
10685             Returns:
10686                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10687                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10688                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10689             """
10690             # Example: see GEOM_TestMeasures.py
10691             aTuple = self.MeasuOp.GetInertia(theShape)
10692             RaiseIfFailed("GetInertia", self.MeasuOp)
10693             return aTuple
10694
10695         ## Get if coords are included in the shape (ST_IN or ST_ON)
10696         #  @param theShape Shape
10697         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10698         #  @param tolerance to be used (default is 1.0e-7)
10699         #  @return list_of_boolean = [res1, res2, ...]
10700         @ManageTransactions("MeasuOp")
10701         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10702             """
10703             Get if coords are included in the shape (ST_IN or ST_ON)
10704
10705             Parameters:
10706                 theShape Shape
10707                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10708                 tolerance to be used (default is 1.0e-7)
10709
10710             Returns:
10711                 list_of_boolean = [res1, res2, ...]
10712             """
10713             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10714
10715         ## Get minimal distance between the given shapes.
10716         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10717         #  @return Value of the minimal distance between the given shapes.
10718         #
10719         #  @ref tui_min_distance_page "Example"
10720         @ManageTransactions("MeasuOp")
10721         def MinDistance(self, theShape1, theShape2):
10722             """
10723             Get minimal distance between the given shapes.
10724
10725             Parameters:
10726                 theShape1,theShape2 Shapes to find minimal distance between.
10727
10728             Returns:
10729                 Value of the minimal distance between the given shapes.
10730             """
10731             # Example: see GEOM_TestMeasures.py
10732             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10733             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10734             return aTuple[0]
10735
10736         ## Get minimal distance between the given shapes.
10737         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10738         #  @return Value of the minimal distance between the given shapes, in form of list
10739         #          [Distance, DX, DY, DZ].
10740         #
10741         #  @ref tui_min_distance_page "Example"
10742         @ManageTransactions("MeasuOp")
10743         def MinDistanceComponents(self, theShape1, theShape2):
10744             """
10745             Get minimal distance between the given shapes.
10746
10747             Parameters:
10748                 theShape1,theShape2 Shapes to find minimal distance between.
10749
10750             Returns:
10751                 Value of the minimal distance between the given shapes, in form of list
10752                 [Distance, DX, DY, DZ]
10753             """
10754             # Example: see GEOM_TestMeasures.py
10755             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10756             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10757             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10758             return aRes
10759
10760         ## Get closest points of the given shapes.
10761         #  @param theShape1,theShape2 Shapes to find closest points of.
10762         #  @return The number of found solutions (-1 in case of infinite number of
10763         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10764         #
10765         #  @ref tui_min_distance_page "Example"
10766         @ManageTransactions("MeasuOp")
10767         def ClosestPoints (self, theShape1, theShape2):
10768             """
10769             Get closest points of the given shapes.
10770
10771             Parameters:
10772                 theShape1,theShape2 Shapes to find closest points of.
10773
10774             Returns:
10775                 The number of found solutions (-1 in case of infinite number of
10776                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10777             """
10778             # Example: see GEOM_TestMeasures.py
10779             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10780             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10781             return aTuple
10782
10783         ## Get angle between the given shapes in degrees.
10784         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10785         #  @note If both arguments are vectors, the angle is computed in accordance
10786         #        with their orientations, otherwise the minimum angle is computed.
10787         #  @return Value of the angle between the given shapes in degrees.
10788         #
10789         #  @ref tui_angle_page "Example"
10790         @ManageTransactions("MeasuOp")
10791         def GetAngle(self, theShape1, theShape2):
10792             """
10793             Get angle between the given shapes in degrees.
10794
10795             Parameters:
10796                 theShape1,theShape2 Lines or linear edges to find angle between.
10797
10798             Note:
10799                 If both arguments are vectors, the angle is computed in accordance
10800                 with their orientations, otherwise the minimum angle is computed.
10801
10802             Returns:
10803                 Value of the angle between the given shapes in degrees.
10804             """
10805             # Example: see GEOM_TestMeasures.py
10806             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10807             RaiseIfFailed("GetAngle", self.MeasuOp)
10808             return anAngle
10809
10810         ## Get angle between the given shapes in radians.
10811         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10812         #  @note If both arguments are vectors, the angle is computed in accordance
10813         #        with their orientations, otherwise the minimum angle is computed.
10814         #  @return Value of the angle between the given shapes in radians.
10815         #
10816         #  @ref tui_angle_page "Example"
10817         @ManageTransactions("MeasuOp")
10818         def GetAngleRadians(self, theShape1, theShape2):
10819             """
10820             Get angle between the given shapes in radians.
10821
10822             Parameters:
10823                 theShape1,theShape2 Lines or linear edges to find angle between.
10824
10825
10826             Note:
10827                 If both arguments are vectors, the angle is computed in accordance
10828                 with their orientations, otherwise the minimum angle is computed.
10829
10830             Returns:
10831                 Value of the angle between the given shapes in radians.
10832             """
10833             # Example: see GEOM_TestMeasures.py
10834             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10835             RaiseIfFailed("GetAngle", self.MeasuOp)
10836             return anAngle
10837
10838         ## Get angle between the given vectors in degrees.
10839         #  @param theShape1,theShape2 Vectors to find angle between.
10840         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10841         #                 if False, the opposite vector to the normal vector is used.
10842         #  @return Value of the angle between the given vectors in degrees.
10843         #
10844         #  @ref tui_angle_page "Example"
10845         @ManageTransactions("MeasuOp")
10846         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10847             """
10848             Get angle between the given vectors in degrees.
10849
10850             Parameters:
10851                 theShape1,theShape2 Vectors to find angle between.
10852                 theFlag If True, the normal vector is defined by the two vectors cross,
10853                         if False, the opposite vector to the normal vector is used.
10854
10855             Returns:
10856                 Value of the angle between the given vectors in degrees.
10857             """
10858             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10859             if not theFlag:
10860                 anAngle = 360. - anAngle
10861             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10862             return anAngle
10863
10864         ## The same as GetAngleVectors, but the result is in radians.
10865         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10866             """
10867             Get angle between the given vectors in radians.
10868
10869             Parameters:
10870                 theShape1,theShape2 Vectors to find angle between.
10871                 theFlag If True, the normal vector is defined by the two vectors cross,
10872                         if False, the opposite vector to the normal vector is used.
10873
10874             Returns:
10875                 Value of the angle between the given vectors in radians.
10876             """
10877             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10878             return anAngle
10879
10880         ## @name Curve Curvature Measurement
10881         #  Methods for receiving radius of curvature of curves
10882         #  in the given point
10883         ## @{
10884
10885         ## Measure curvature of a curve at a point, set by parameter.
10886         #  @param theCurve a curve.
10887         #  @param theParam parameter.
10888         #  @return radius of curvature of \a theCurve.
10889         #
10890         #  @ref swig_todo "Example"
10891         @ManageTransactions("MeasuOp")
10892         def CurveCurvatureByParam(self, theCurve, theParam):
10893             """
10894             Measure curvature of a curve at a point, set by parameter.
10895
10896             Parameters:
10897                 theCurve a curve.
10898                 theParam parameter.
10899
10900             Returns:
10901                 radius of curvature of theCurve.
10902             """
10903             # Example: see GEOM_TestMeasures.py
10904             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10905             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10906             return aCurv
10907
10908         ## Measure curvature of a curve at a point.
10909         #  @param theCurve a curve.
10910         #  @param thePoint given point.
10911         #  @return radius of curvature of \a theCurve.
10912         #
10913         #  @ref swig_todo "Example"
10914         @ManageTransactions("MeasuOp")
10915         def CurveCurvatureByPoint(self, theCurve, thePoint):
10916             """
10917             Measure curvature of a curve at a point.
10918
10919             Parameters:
10920                 theCurve a curve.
10921                 thePoint given point.
10922
10923             Returns:
10924                 radius of curvature of theCurve.
10925             """
10926             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10927             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10928             return aCurv
10929         ## @}
10930
10931         ## @name Surface Curvature Measurement
10932         #  Methods for receiving max and min radius of curvature of surfaces
10933         #  in the given point
10934         ## @{
10935
10936         ## Measure max radius of curvature of surface.
10937         #  @param theSurf the given surface.
10938         #  @param theUParam Value of U-parameter on the referenced surface.
10939         #  @param theVParam Value of V-parameter on the referenced surface.
10940         #  @return max radius of curvature of theSurf.
10941         #
10942         ## @ref swig_todo "Example"
10943         @ManageTransactions("MeasuOp")
10944         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10945             """
10946             Measure max radius of curvature of surface.
10947
10948             Parameters:
10949                 theSurf the given surface.
10950                 theUParam Value of U-parameter on the referenced surface.
10951                 theVParam Value of V-parameter on the referenced surface.
10952
10953             Returns:
10954                 max radius of curvature of theSurf.
10955             """
10956             # Example: see GEOM_TestMeasures.py
10957             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10958             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10959             return aSurf
10960
10961         ## Measure max radius of curvature of surface in the given point
10962         #  @param theSurf the given surface.
10963         #  @param thePoint given point.
10964         #  @return max radius of curvature of theSurf.
10965         #
10966         ## @ref swig_todo "Example"
10967         @ManageTransactions("MeasuOp")
10968         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10969             """
10970             Measure max radius of curvature of surface in the given point.
10971
10972             Parameters:
10973                 theSurf the given surface.
10974                 thePoint given point.
10975
10976             Returns:
10977                 max radius of curvature of theSurf.
10978             """
10979             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10980             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10981             return aSurf
10982
10983         ## Measure min radius of curvature of surface.
10984         #  @param theSurf the given surface.
10985         #  @param theUParam Value of U-parameter on the referenced surface.
10986         #  @param theVParam Value of V-parameter on the referenced surface.
10987         #  @return min radius of curvature of theSurf.
10988         #
10989         ## @ref swig_todo "Example"
10990         @ManageTransactions("MeasuOp")
10991         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10992             """
10993             Measure min radius of curvature of surface.
10994
10995             Parameters:
10996                 theSurf the given surface.
10997                 theUParam Value of U-parameter on the referenced surface.
10998                 theVParam Value of V-parameter on the referenced surface.
10999
11000             Returns:
11001                 Min radius of curvature of theSurf.
11002             """
11003             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11004             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11005             return aSurf
11006
11007         ## Measure min radius of curvature of surface in the given point
11008         #  @param theSurf the given surface.
11009         #  @param thePoint given point.
11010         #  @return min radius of curvature of theSurf.
11011         #
11012         ## @ref swig_todo "Example"
11013         @ManageTransactions("MeasuOp")
11014         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11015             """
11016             Measure min radius of curvature of surface in the given point.
11017
11018             Parameters:
11019                 theSurf the given surface.
11020                 thePoint given point.
11021
11022             Returns:
11023                 Min radius of curvature of theSurf.
11024             """
11025             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11026             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11027             return aSurf
11028         ## @}
11029
11030         ## Get min and max tolerances of sub-shapes of theShape
11031         #  @param theShape Shape, to get tolerances of.
11032         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11033         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11034         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11035         #  VertMin,VertMax: Min and max tolerances of the vertices.
11036         #
11037         #  @ref tui_tolerance_page "Example"
11038         @ManageTransactions("MeasuOp")
11039         def Tolerance(self,theShape):
11040             """
11041             Get min and max tolerances of sub-shapes of theShape
11042
11043             Parameters:
11044                 theShape Shape, to get tolerances of.
11045
11046             Returns:
11047                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11048                  FaceMin,FaceMax: Min and max tolerances of the faces.
11049                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11050                  VertMin,VertMax: Min and max tolerances of the vertices.
11051             """
11052             # Example: see GEOM_TestMeasures.py
11053             aTuple = self.MeasuOp.GetTolerance(theShape)
11054             RaiseIfFailed("GetTolerance", self.MeasuOp)
11055             return aTuple
11056
11057         ## Obtain description of the given shape (number of sub-shapes of each type)
11058         #  @param theShape Shape to be described.
11059         #  @return Description of the given shape.
11060         #
11061         #  @ref tui_whatis_page "Example"
11062         @ManageTransactions("MeasuOp")
11063         def WhatIs(self,theShape):
11064             """
11065             Obtain description of the given shape (number of sub-shapes of each type)
11066
11067             Parameters:
11068                 theShape Shape to be described.
11069
11070             Returns:
11071                 Description of the given shape.
11072             """
11073             # Example: see GEOM_TestMeasures.py
11074             aDescr = self.MeasuOp.WhatIs(theShape)
11075             RaiseIfFailed("WhatIs", self.MeasuOp)
11076             return aDescr
11077
11078         ## Obtain quantity of shapes of the given type in \a theShape.
11079         #  If \a theShape is of type \a theType, it is also counted.
11080         #  @param theShape Shape to be described.
11081         #  @param theType the given ShapeType().
11082         #  @return Quantity of shapes of type \a theType in \a theShape.
11083         #
11084         #  @ref tui_measurement_tools_page "Example"
11085         def NbShapes (self, theShape, theType):
11086             """
11087             Obtain quantity of shapes of the given type in theShape.
11088             If theShape is of type theType, it is also counted.
11089
11090             Parameters:
11091                 theShape Shape to be described.
11092                 theType the given geompy.ShapeType
11093
11094             Returns:
11095                 Quantity of shapes of type theType in theShape.
11096             """
11097             # Example: see GEOM_TestMeasures.py
11098             listSh = self.SubShapeAllIDs(theShape, theType)
11099             Nb = len(listSh)
11100             return Nb
11101
11102         ## Obtain quantity of shapes of each type in \a theShape.
11103         #  The \a theShape is also counted.
11104         #  @param theShape Shape to be described.
11105         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11106         #
11107         #  @ref tui_measurement_tools_page "Example"
11108         def ShapeInfo (self, theShape):
11109             """
11110             Obtain quantity of shapes of each type in theShape.
11111             The theShape is also counted.
11112
11113             Parameters:
11114                 theShape Shape to be described.
11115
11116             Returns:
11117                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11118             """
11119             # Example: see GEOM_TestMeasures.py
11120             aDict = {}
11121             for typeSh in self.ShapeType:
11122                 if typeSh in ( "AUTO", "SHAPE" ): continue
11123                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11124                 Nb = len(listSh)
11125                 aDict[typeSh] = Nb
11126                 pass
11127             return aDict
11128
11129         def GetCreationInformation(self, theShape):
11130             res = ''
11131             infos = theShape.GetCreationInformation()
11132             for info in infos:
11133                 # operationName
11134                 opName = info.operationName
11135                 if not opName: opName = "no info available"
11136                 if res: res += "\n"
11137                 res += "Operation: " + opName
11138                 # parameters
11139                 for parVal in info.params:
11140                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11141             return res
11142
11143         ## Get a point, situated at the centre of mass of theShape.
11144         #  @param theShape Shape to define centre of mass of.
11145         #  @param theName Object name; when specified, this parameter is used
11146         #         for result publication in the study. Otherwise, if automatic
11147         #         publication is switched on, default value is used for result name.
11148         #
11149         #  @return New GEOM.GEOM_Object, containing the created point.
11150         #
11151         #  @ref tui_center_of_mass_page "Example"
11152         @ManageTransactions("MeasuOp")
11153         def MakeCDG(self, theShape, theName=None):
11154             """
11155             Get a point, situated at the centre of mass of theShape.
11156
11157             Parameters:
11158                 theShape Shape to define centre of mass of.
11159                 theName Object name; when specified, this parameter is used
11160                         for result publication in the study. Otherwise, if automatic
11161                         publication is switched on, default value is used for result name.
11162
11163             Returns:
11164                 New GEOM.GEOM_Object, containing the created point.
11165             """
11166             # Example: see GEOM_TestMeasures.py
11167             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11168             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11169             self._autoPublish(anObj, theName, "centerOfMass")
11170             return anObj
11171
11172         ## Get a vertex sub-shape by index depended with orientation.
11173         #  @param theShape Shape to find sub-shape.
11174         #  @param theIndex Index to find vertex by this index (starting from zero)
11175         #  @param theName Object name; when specified, this parameter is used
11176         #         for result publication in the study. Otherwise, if automatic
11177         #         publication is switched on, default value is used for result name.
11178         #
11179         #  @return New GEOM.GEOM_Object, containing the created vertex.
11180         #
11181         #  @ref tui_measurement_tools_page "Example"
11182         @ManageTransactions("MeasuOp")
11183         def GetVertexByIndex(self, theShape, theIndex, theName=None):
11184             """
11185             Get a vertex sub-shape by index depended with orientation.
11186
11187             Parameters:
11188                 theShape Shape to find sub-shape.
11189                 theIndex Index to find vertex by this index (starting from zero)
11190                 theName Object name; when specified, this parameter is used
11191                         for result publication in the study. Otherwise, if automatic
11192                         publication is switched on, default value is used for result name.
11193
11194             Returns:
11195                 New GEOM.GEOM_Object, containing the created vertex.
11196             """
11197             # Example: see GEOM_TestMeasures.py
11198             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
11199             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11200             self._autoPublish(anObj, theName, "vertex")
11201             return anObj
11202
11203         ## Get the first vertex of wire/edge depended orientation.
11204         #  @param theShape Shape to find first vertex.
11205         #  @param theName Object name; when specified, this parameter is used
11206         #         for result publication in the study. Otherwise, if automatic
11207         #         publication is switched on, default value is used for result name.
11208         #
11209         #  @return New GEOM.GEOM_Object, containing the created vertex.
11210         #
11211         #  @ref tui_measurement_tools_page "Example"
11212         def GetFirstVertex(self, theShape, theName=None):
11213             """
11214             Get the first vertex of wire/edge depended orientation.
11215
11216             Parameters:
11217                 theShape Shape to find first vertex.
11218                 theName Object name; when specified, this parameter is used
11219                         for result publication in the study. Otherwise, if automatic
11220                         publication is switched on, default value is used for result name.
11221
11222             Returns:
11223                 New GEOM.GEOM_Object, containing the created vertex.
11224             """
11225             # Example: see GEOM_TestMeasures.py
11226             # note: auto-publishing is done in self.GetVertexByIndex()
11227             return self.GetVertexByIndex(theShape, 0, theName)
11228
11229         ## Get the last vertex of wire/edge depended orientation.
11230         #  @param theShape Shape to find last vertex.
11231         #  @param theName Object name; when specified, this parameter is used
11232         #         for result publication in the study. Otherwise, if automatic
11233         #         publication is switched on, default value is used for result name.
11234         #
11235         #  @return New GEOM.GEOM_Object, containing the created vertex.
11236         #
11237         #  @ref tui_measurement_tools_page "Example"
11238         def GetLastVertex(self, theShape, theName=None):
11239             """
11240             Get the last vertex of wire/edge depended orientation.
11241
11242             Parameters:
11243                 theShape Shape to find last vertex.
11244                 theName Object name; when specified, this parameter is used
11245                         for result publication in the study. Otherwise, if automatic
11246                         publication is switched on, default value is used for result name.
11247
11248             Returns:
11249                 New GEOM.GEOM_Object, containing the created vertex.
11250             """
11251             # Example: see GEOM_TestMeasures.py
11252             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11253             # note: auto-publishing is done in self.GetVertexByIndex()
11254             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
11255
11256         ## Get a normale to the given face. If the point is not given,
11257         #  the normale is calculated at the center of mass.
11258         #  @param theFace Face to define normale of.
11259         #  @param theOptionalPoint Point to compute the normale at.
11260         #  @param theName Object name; when specified, this parameter is used
11261         #         for result publication in the study. Otherwise, if automatic
11262         #         publication is switched on, default value is used for result name.
11263         #
11264         #  @return New GEOM.GEOM_Object, containing the created vector.
11265         #
11266         #  @ref swig_todo "Example"
11267         @ManageTransactions("MeasuOp")
11268         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11269             """
11270             Get a normale to the given face. If the point is not given,
11271             the normale is calculated at the center of mass.
11272
11273             Parameters:
11274                 theFace Face to define normale of.
11275                 theOptionalPoint Point to compute the normale at.
11276                 theName Object name; when specified, this parameter is used
11277                         for result publication in the study. Otherwise, if automatic
11278                         publication is switched on, default value is used for result name.
11279
11280             Returns:
11281                 New GEOM.GEOM_Object, containing the created vector.
11282             """
11283             # Example: see GEOM_TestMeasures.py
11284             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11285             RaiseIfFailed("GetNormal", self.MeasuOp)
11286             self._autoPublish(anObj, theName, "normal")
11287             return anObj
11288
11289         ## Print shape errors obtained from CheckShape.
11290         #  @param theShape Shape that was checked.
11291         #  @param theShapeErrors the shape errors obtained by CheckShape.
11292         #  @param theReturnStatus If 0 the description of problem is printed.
11293         #                         If 1 the description of problem is returned.
11294         #  @return If theReturnStatus is equal to 1 the description is returned.
11295         #          Otherwise doesn't return anything.
11296         #
11297         #  @ref tui_check_shape_page "Example"
11298         @ManageTransactions("MeasuOp")
11299         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11300             """
11301             Print shape errors obtained from CheckShape.
11302
11303             Parameters:
11304                 theShape Shape that was checked.
11305                 theShapeErrors the shape errors obtained by CheckShape.
11306                 theReturnStatus If 0 the description of problem is printed.
11307                                 If 1 the description of problem is returned.
11308
11309             Returns:
11310                 If theReturnStatus is equal to 1 the description is returned.
11311                   Otherwise doesn't return anything.
11312             """
11313             # Example: see GEOM_TestMeasures.py
11314             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11315             if theReturnStatus == 1:
11316                 return Descr
11317             print Descr
11318             pass
11319
11320         ## Check a topology of the given shape.
11321         #  @param theShape Shape to check validity of.
11322         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11323         #                        if TRUE, the shape's geometry will be checked also.
11324         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11325         #                         of problem is printed.
11326         #                         If 1 isValid flag and the description of
11327         #                         problem is returned.
11328         #                         If 2 isValid flag and the list of error data
11329         #                         is returned.
11330         #  @return TRUE, if the shape "seems to be valid".
11331         #          If theShape is invalid, prints a description of problem.
11332         #          If theReturnStatus is equal to 1 the description is returned
11333         #          along with IsValid flag.
11334         #          If theReturnStatus is equal to 2 the list of error data is
11335         #          returned along with IsValid flag.
11336         #
11337         #  @ref tui_check_shape_page "Example"
11338         @ManageTransactions("MeasuOp")
11339         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11340             """
11341             Check a topology of the given shape.
11342
11343             Parameters:
11344                 theShape Shape to check validity of.
11345                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11346                                if TRUE, the shape's geometry will be checked also.
11347                 theReturnStatus If 0 and if theShape is invalid, a description
11348                                 of problem is printed.
11349                                 If 1 IsValid flag and the description of
11350                                 problem is returned.
11351                                 If 2 IsValid flag and the list of error data
11352                                 is returned.
11353
11354             Returns:
11355                 TRUE, if the shape "seems to be valid".
11356                 If theShape is invalid, prints a description of problem.
11357                 If theReturnStatus is equal to 1 the description is returned
11358                 along with IsValid flag.
11359                 If theReturnStatus is equal to 2 the list of error data is
11360                 returned along with IsValid flag.
11361             """
11362             # Example: see GEOM_TestMeasures.py
11363             if theIsCheckGeom:
11364                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11365                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11366             else:
11367                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11368                 RaiseIfFailed("CheckShape", self.MeasuOp)
11369             if IsValid == 0:
11370                 if theReturnStatus == 0:
11371                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11372                     print Descr
11373             if theReturnStatus == 1:
11374               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11375               return (IsValid, Descr)
11376             elif theReturnStatus == 2:
11377               return (IsValid, ShapeErrors)
11378             return IsValid
11379
11380         ## Detect self-intersections in the given shape.
11381         #  @param theShape Shape to check.
11382         #  @param theCheckLevel is the level of self-intersection check.
11383         #         Possible input values are:
11384         #         - GEOM.SI_V_V(0) - only V/V interferences
11385         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11386         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11387         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11388         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11389         #         - GEOM.SI_ALL(5) - all interferences.
11390         #  @return TRUE, if the shape contains no self-intersections.
11391         #
11392         #  @ref tui_check_self_intersections_page "Example"
11393         @ManageTransactions("MeasuOp")
11394         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11395             """
11396             Detect self-intersections in the given shape.
11397
11398             Parameters:
11399                 theShape Shape to check.
11400                 theCheckLevel is the level of self-intersection check.
11401                   Possible input values are:
11402                    - GEOM.SI_V_V(0) - only V/V interferences
11403                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11404                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11405                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11406                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11407                    - GEOM.SI_ALL(5) - all interferences.
11408  
11409             Returns:
11410                 TRUE, if the shape contains no self-intersections.
11411             """
11412             # Example: see GEOM_TestMeasures.py
11413             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11414             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11415             return IsValid
11416
11417         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11418         #  @param theShape Shape to check.
11419         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
11420         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11421         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11422         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11423         #         - if \a theTolerance > 0, algorithm detects gaps
11424         #  @return TRUE, if the shape contains no self-intersections.
11425         #
11426         #  @ref tui_check_self_intersections_fast_page "Example"
11427         @ManageTransactions("MeasuOp")
11428         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11429             """
11430             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11431
11432             Parameters:
11433                 theShape Shape to check.
11434                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11435                     - if theDeflection <= 0, default deflection 0.001 is used
11436                 theTolerance Specifies a distance between shapes used for detecting gaps:
11437                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11438                     - if theTolerance > 0, algorithm detects gaps
11439  
11440             Returns:
11441                 TRUE, if the shape contains no self-intersections.
11442             """
11443             # Example: see GEOM_TestMeasures.py
11444             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11445             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11446             return IsValid
11447
11448         ## Check boolean and partition operations agruments.
11449         #  @param theShape the agrument of an operation to be checked
11450         #  @return TRUE if the agrument is valid for a boolean or partition
11451         #          operation; FALSE otherwise.
11452         @ManageTransactions("MeasuOp")
11453         def CheckBOPArguments(self, theShape):
11454             """
11455             Check boolean and partition operations agruments.
11456
11457             Parameters:
11458                 theShape the agrument of an operation to be checked
11459
11460             Returns:
11461                 TRUE if the agrument is valid for a boolean or partition
11462                 operation; FALSE otherwise.
11463             """
11464             return self.MeasuOp.CheckBOPArguments(theShape)
11465
11466         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11467         #  @param theShape1 First source object
11468         #  @param theShape2 Second source object
11469         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11470         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11471         #         - if \a theTolerance > 0, algorithm detects gaps
11472         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
11473         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11474         #  @return TRUE, if there are intersections (gaps) between source shapes
11475         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11476         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11477         #
11478         #  @ref tui_fast_intersection_page "Example"
11479         @ManageTransactions("MeasuOp")
11480         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11481             """
11482             Detect intersections of the given shapes with algorithm based on mesh intersections.
11483
11484             Parameters:
11485                 theShape1 First source object
11486                 theShape2 Second source object
11487                 theTolerance Specifies a distance between shapes used for detecting gaps:
11488                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11489                     - if theTolerance > 0, algorithm detects gaps
11490                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11491                     - if theDeflection <= 0, default deflection 0.001 is used
11492  
11493             Returns:
11494                 TRUE, if there are intersections (gaps) between source shapes
11495                 List of sub-shapes IDs from 1st shape that localize intersection.
11496                 List of sub-shapes IDs from 2nd shape that localize intersection.
11497             """
11498             # Example: see GEOM_TestMeasures.py
11499             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11500             RaiseIfFailed("FastIntersect", self.MeasuOp)
11501             return IsOk, Res1, Res2
11502
11503         ## Get position (LCS) of theShape.
11504         #
11505         #  Origin of the LCS is situated at the shape's center of mass.
11506         #  Axes of the LCS are obtained from shape's location or,
11507         #  if the shape is a planar face, from position of its plane.
11508         #
11509         #  @param theShape Shape to calculate position of.
11510         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11511         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11512         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11513         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11514         #
11515         #  @ref swig_todo "Example"
11516         @ManageTransactions("MeasuOp")
11517         def GetPosition(self,theShape):
11518             """
11519             Get position (LCS) of theShape.
11520             Origin of the LCS is situated at the shape's center of mass.
11521             Axes of the LCS are obtained from shape's location or,
11522             if the shape is a planar face, from position of its plane.
11523
11524             Parameters:
11525                 theShape Shape to calculate position of.
11526
11527             Returns:
11528                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11529                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11530                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11531                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11532             """
11533             # Example: see GEOM_TestMeasures.py
11534             aTuple = self.MeasuOp.GetPosition(theShape)
11535             RaiseIfFailed("GetPosition", self.MeasuOp)
11536             return aTuple
11537
11538         ## Get kind of theShape.
11539         #
11540         #  @param theShape Shape to get a kind of.
11541         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11542         #          and a list of parameters, describing the shape.
11543         #  @note  Concrete meaning of each value, returned via \a theIntegers
11544         #         or \a theDoubles list depends on the kind() of the shape.
11545         #
11546         #  @ref swig_todo "Example"
11547         @ManageTransactions("MeasuOp")
11548         def KindOfShape(self,theShape):
11549             """
11550             Get kind of theShape.
11551
11552             Parameters:
11553                 theShape Shape to get a kind of.
11554
11555             Returns:
11556                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11557                     and a list of parameters, describing the shape.
11558             Note:
11559                 Concrete meaning of each value, returned via theIntegers
11560                 or theDoubles list depends on the geompy.kind of the shape
11561             """
11562             # Example: see GEOM_TestMeasures.py
11563             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11564             RaiseIfFailed("KindOfShape", self.MeasuOp)
11565
11566             aKind  = aRoughTuple[0]
11567             anInts = aRoughTuple[1]
11568             aDbls  = aRoughTuple[2]
11569
11570             # Now there is no exception from this rule:
11571             aKindTuple = [aKind] + aDbls + anInts
11572
11573             # If they are we will regroup parameters for such kind of shape.
11574             # For example:
11575             #if aKind == kind.SOME_KIND:
11576             #    #  SOME_KIND     int int double int double double
11577             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11578
11579             return aKindTuple
11580
11581         ## Returns the string that describes if the shell is good for solid.
11582         #  This is a support method for MakeSolid.
11583         #
11584         #  @param theShell the shell to be checked.
11585         #  @return Returns a string that describes the shell validity for
11586         #          solid construction.
11587         @ManageTransactions("MeasuOp")
11588         def _IsGoodForSolid(self, theShell):
11589             """
11590             Returns the string that describes if the shell is good for solid.
11591             This is a support method for MakeSolid.
11592
11593             Parameter:
11594                 theShell the shell to be checked.
11595
11596             Returns:
11597                 Returns a string that describes the shell validity for
11598                 solid construction.
11599             """
11600             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11601             return aDescr
11602
11603         # end of l2_measure
11604         ## @}
11605
11606         ## @addtogroup l2_import_export
11607         ## @{
11608
11609         ## Import a shape from the BREP, IGES, STEP or other file
11610         #  (depends on given format) with given name.
11611         #
11612         #  Note: this function is deprecated, it is kept for backward compatibility only
11613         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11614         #
11615         #  @param theFileName The file, containing the shape.
11616         #  @param theFormatName Specify format for the file reading.
11617         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11618         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11619         #            format 'STEP_SCALE' is used instead of 'STEP',
11620         #            length unit will be set to 'meter' and result model will be scaled.
11621         #  @param theName Object name; when specified, this parameter is used
11622         #         for result publication in the study. Otherwise, if automatic
11623         #         publication is switched on, default value is used for result name.
11624         #
11625         #  @return New GEOM.GEOM_Object, containing the imported shape.
11626         #          If material names are imported it returns the list of
11627         #          objects. The first one is the imported object followed by
11628         #          material groups.
11629         #  @note Auto publishing is allowed for the shape itself. Imported
11630         #        material groups are not automatically published.
11631         #
11632         #  @ref swig_Import_Export "Example"
11633         @ManageTransactions("InsertOp")
11634         def ImportFile(self, theFileName, theFormatName, theName=None):
11635             """
11636             Import a shape from the BREP, IGES, STEP or other file
11637             (depends on given format) with given name.
11638
11639             Note: this function is deprecated, it is kept for backward compatibility only
11640             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11641
11642             Parameters: 
11643                 theFileName The file, containing the shape.
11644                 theFormatName Specify format for the file reading.
11645                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11646                     If format 'IGES_SCALE' is used instead of 'IGES' or
11647                        format 'STEP_SCALE' is used instead of 'STEP',
11648                        length unit will be set to 'meter' and result model will be scaled.
11649                 theName Object name; when specified, this parameter is used
11650                         for result publication in the study. Otherwise, if automatic
11651                         publication is switched on, default value is used for result name.
11652
11653             Returns:
11654                 New GEOM.GEOM_Object, containing the imported shape.
11655                 If material names are imported it returns the list of
11656                 objects. The first one is the imported object followed by
11657                 material groups.
11658             Note:
11659                 Auto publishing is allowed for the shape itself. Imported
11660                 material groups are not automatically published.
11661             """
11662             # Example: see GEOM_TestOthers.py
11663             print """
11664             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11665             where <FormatName> is a name of desirable format for importing.
11666             """
11667             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11668             RaiseIfFailed("ImportFile", self.InsertOp)
11669             aNbObj = len(aListObj)
11670             if aNbObj > 0:
11671                 self._autoPublish(aListObj[0], theName, "imported")
11672             if aNbObj == 1:
11673                 return aListObj[0]
11674             return aListObj
11675
11676         ## Deprecated analog of ImportFile()
11677         def Import(self, theFileName, theFormatName, theName=None):
11678             """
11679             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11680             """
11681             # note: auto-publishing is done in self.ImportFile()
11682             return self.ImportFile(theFileName, theFormatName, theName)
11683
11684         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11685         #
11686         #  @note As the byte-stream representing the shape data can be quite large, this method
11687         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11688         #  so please use this method carefully, only for strong reasons.
11689         #  
11690         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11691         #  data stream.
11692         #
11693         #  @param theStream The BRep binary stream.
11694         #  @param theName Object name; when specified, this parameter is used
11695         #         for result publication in the study. Otherwise, if automatic
11696         #         publication is switched on, default value is used for result name.
11697         #
11698         #  @return New GEOM_Object, containing the shape, read from theStream.
11699         #
11700         #  @ref swig_Import_Export "Example"
11701         @ManageTransactions("InsertOp")
11702         def RestoreShape (self, theStream, theName=None):
11703             """
11704             Read a shape from the binary stream, containing its bounding representation (BRep).
11705
11706             Note:
11707                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11708
11709             Parameters:
11710                 theStream The BRep binary stream.
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_Object, containing the shape, read from theStream.
11717             """
11718             # Example: see GEOM_TestOthers.py
11719             if not theStream:
11720                 # this is the workaround to ignore invalid case when data stream is empty
11721                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11722                     print "WARNING: Result of RestoreShape is a NULL shape!"
11723                     return None
11724             anObj = self.InsertOp.RestoreShape(theStream)
11725             RaiseIfFailed("RestoreShape", self.InsertOp)
11726             self._autoPublish(anObj, theName, "restored")
11727             return anObj
11728
11729         ## Export the given shape into a file with given name.
11730         #
11731         #  Note: this function is deprecated, it is kept for backward compatibility only
11732         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11733         #
11734         #  @param theObject Shape to be stored in the file.
11735         #  @param theFileName Name of the file to store the given shape in.
11736         #  @param theFormatName Specify format for the shape storage.
11737         #         Available formats can be obtained with
11738         #         geompy.InsertOp.ExportTranslators()[0] method.
11739         #
11740         #  @ref swig_Import_Export "Example"
11741         @ManageTransactions("InsertOp")
11742         def Export(self, theObject, theFileName, theFormatName):
11743             """
11744             Export the given shape into a file with given name.
11745
11746             Note: this function is deprecated, it is kept for backward compatibility only
11747             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11748             
11749             Parameters: 
11750                 theObject Shape to be stored in the file.
11751                 theFileName Name of the file to store the given shape in.
11752                 theFormatName Specify format for the shape storage.
11753                               Available formats can be obtained with
11754                               geompy.InsertOp.ExportTranslators()[0] method.
11755             """
11756             # Example: see GEOM_TestOthers.py
11757             print """
11758             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11759             where <FormatName> is a name of desirable format for exporting.
11760             """
11761             self.InsertOp.Export(theObject, theFileName, theFormatName)
11762             if self.InsertOp.IsDone() == 0:
11763                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11764                 pass
11765             pass
11766
11767         # end of l2_import_export
11768         ## @}
11769
11770         ## @addtogroup l3_blocks
11771         ## @{
11772
11773         ## Create a quadrangle face from four edges. Order of Edges is not
11774         #  important. It is  not necessary that edges share the same vertex.
11775         #  @param E1,E2,E3,E4 Edges for the face bound.
11776         #  @param theName Object name; when specified, this parameter is used
11777         #         for result publication in the study. Otherwise, if automatic
11778         #         publication is switched on, default value is used for result name.
11779         #
11780         #  @return New GEOM.GEOM_Object, containing the created face.
11781         #
11782         #  @ref tui_building_by_blocks_page "Example"
11783         @ManageTransactions("BlocksOp")
11784         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11785             """
11786             Create a quadrangle face from four edges. Order of Edges is not
11787             important. It is  not necessary that edges share the same vertex.
11788
11789             Parameters:
11790                 E1,E2,E3,E4 Edges for the face bound.
11791                 theName Object name; when specified, this parameter is used
11792                         for result publication in the study. Otherwise, if automatic
11793                         publication is switched on, default value is used for result name.
11794
11795             Returns:
11796                 New GEOM.GEOM_Object, containing the created face.
11797
11798             Example of usage:
11799                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11800             """
11801             # Example: see GEOM_Spanner.py
11802             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11803             RaiseIfFailed("MakeQuad", self.BlocksOp)
11804             self._autoPublish(anObj, theName, "quad")
11805             return anObj
11806
11807         ## Create a quadrangle face on two edges.
11808         #  The missing edges will be built by creating the shortest ones.
11809         #  @param E1,E2 Two opposite edges for the face.
11810         #  @param theName Object name; when specified, this parameter is used
11811         #         for result publication in the study. Otherwise, if automatic
11812         #         publication is switched on, default value is used for result name.
11813         #
11814         #  @return New GEOM.GEOM_Object, containing the created face.
11815         #
11816         #  @ref tui_building_by_blocks_page "Example"
11817         @ManageTransactions("BlocksOp")
11818         def MakeQuad2Edges(self, E1, E2, theName=None):
11819             """
11820             Create a quadrangle face on two edges.
11821             The missing edges will be built by creating the shortest ones.
11822
11823             Parameters:
11824                 E1,E2 Two opposite edges for the face.
11825                 theName Object name; when specified, this parameter is used
11826                         for result publication in the study. Otherwise, if automatic
11827                         publication is switched on, default value is used for result name.
11828
11829             Returns:
11830                 New GEOM.GEOM_Object, containing the created face.
11831
11832             Example of usage:
11833                 # create vertices
11834                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11835                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11836                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11837                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11838                 # create edges
11839                 edge1 = geompy.MakeEdge(p1, p2)
11840                 edge2 = geompy.MakeEdge(p3, p4)
11841                 # create a quadrangle face from two edges
11842                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11843             """
11844             # Example: see GEOM_Spanner.py
11845             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11846             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11847             self._autoPublish(anObj, theName, "quad")
11848             return anObj
11849
11850         ## Create a quadrangle face with specified corners.
11851         #  The missing edges will be built by creating the shortest ones.
11852         #  @param V1,V2,V3,V4 Corner vertices for the face.
11853         #  @param theName Object name; when specified, this parameter is used
11854         #         for result publication in the study. Otherwise, if automatic
11855         #         publication is switched on, default value is used for result name.
11856         #
11857         #  @return New GEOM.GEOM_Object, containing the created face.
11858         #
11859         #  @ref tui_building_by_blocks_page "Example 1"
11860         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11861         @ManageTransactions("BlocksOp")
11862         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11863             """
11864             Create a quadrangle face with specified corners.
11865             The missing edges will be built by creating the shortest ones.
11866
11867             Parameters:
11868                 V1,V2,V3,V4 Corner vertices for the face.
11869                 theName Object name; when specified, this parameter is used
11870                         for result publication in the study. Otherwise, if automatic
11871                         publication is switched on, default value is used for result name.
11872
11873             Returns:
11874                 New GEOM.GEOM_Object, containing the created face.
11875
11876             Example of usage:
11877                 # create vertices
11878                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11879                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11880                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11881                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11882                 # create a quadrangle from four points in its corners
11883                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11884             """
11885             # Example: see GEOM_Spanner.py
11886             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11887             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11888             self._autoPublish(anObj, theName, "quad")
11889             return anObj
11890
11891         ## Create a hexahedral solid, bounded by the six given faces. Order of
11892         #  faces is not important. It is  not necessary that Faces share the same edge.
11893         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11894         #  @param theName Object name; when specified, this parameter is used
11895         #         for result publication in the study. Otherwise, if automatic
11896         #         publication is switched on, default value is used for result name.
11897         #
11898         #  @return New GEOM.GEOM_Object, containing the created solid.
11899         #
11900         #  @ref tui_building_by_blocks_page "Example 1"
11901         #  \n @ref swig_MakeHexa "Example 2"
11902         @ManageTransactions("BlocksOp")
11903         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11904             """
11905             Create a hexahedral solid, bounded by the six given faces. Order of
11906             faces is not important. It is  not necessary that Faces share the same edge.
11907
11908             Parameters:
11909                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11910                 theName Object name; when specified, this parameter is used
11911                         for result publication in the study. Otherwise, if automatic
11912                         publication is switched on, default value is used for result name.
11913
11914             Returns:
11915                 New GEOM.GEOM_Object, containing the created solid.
11916
11917             Example of usage:
11918                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11919             """
11920             # Example: see GEOM_Spanner.py
11921             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11922             RaiseIfFailed("MakeHexa", self.BlocksOp)
11923             self._autoPublish(anObj, theName, "hexa")
11924             return anObj
11925
11926         ## Create a hexahedral solid between two given faces.
11927         #  The missing faces will be built by creating the smallest ones.
11928         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11929         #  @param theName Object name; when specified, this parameter is used
11930         #         for result publication in the study. Otherwise, if automatic
11931         #         publication is switched on, default value is used for result name.
11932         #
11933         #  @return New GEOM.GEOM_Object, containing the created solid.
11934         #
11935         #  @ref tui_building_by_blocks_page "Example 1"
11936         #  \n @ref swig_MakeHexa2Faces "Example 2"
11937         @ManageTransactions("BlocksOp")
11938         def MakeHexa2Faces(self, F1, F2, theName=None):
11939             """
11940             Create a hexahedral solid between two given faces.
11941             The missing faces will be built by creating the smallest ones.
11942
11943             Parameters:
11944                 F1,F2 Two opposite faces for the hexahedral solid.
11945                 theName Object name; when specified, this parameter is used
11946                         for result publication in the study. Otherwise, if automatic
11947                         publication is switched on, default value is used for result name.
11948
11949             Returns:
11950                 New GEOM.GEOM_Object, containing the created solid.
11951
11952             Example of usage:
11953                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11954             """
11955             # Example: see GEOM_Spanner.py
11956             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11957             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11958             self._autoPublish(anObj, theName, "hexa")
11959             return anObj
11960
11961         # end of l3_blocks
11962         ## @}
11963
11964         ## @addtogroup l3_blocks_op
11965         ## @{
11966
11967         ## Get a vertex, found in the given shape by its coordinates.
11968         #  @param theShape Block or a compound of blocks.
11969         #  @param theX,theY,theZ Coordinates of the sought vertex.
11970         #  @param theEpsilon Maximum allowed distance between the resulting
11971         #                    vertex and point with the given coordinates.
11972         #  @param theName Object name; when specified, this parameter is used
11973         #         for result publication in the study. Otherwise, if automatic
11974         #         publication is switched on, default value is used for result name.
11975         #
11976         #  @return New GEOM.GEOM_Object, containing the found vertex.
11977         #
11978         #  @ref swig_GetPoint "Example"
11979         @ManageTransactions("BlocksOp")
11980         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11981             """
11982             Get a vertex, found in the given shape by its coordinates.
11983
11984             Parameters:
11985                 theShape Block or a compound of blocks.
11986                 theX,theY,theZ Coordinates of the sought vertex.
11987                 theEpsilon Maximum allowed distance between the resulting
11988                            vertex and point with the given coordinates.
11989                 theName Object name; when specified, this parameter is used
11990                         for result publication in the study. Otherwise, if automatic
11991                         publication is switched on, default value is used for result name.
11992
11993             Returns:
11994                 New GEOM.GEOM_Object, containing the found vertex.
11995
11996             Example of usage:
11997                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11998             """
11999             # Example: see GEOM_TestOthers.py
12000             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12001             RaiseIfFailed("GetPoint", self.BlocksOp)
12002             self._autoPublish(anObj, theName, "vertex")
12003             return anObj
12004
12005         ## Find a vertex of the given shape, which has minimal distance to the given point.
12006         #  @param theShape Any shape.
12007         #  @param thePoint Point, close to the desired vertex.
12008         #  @param theName Object name; when specified, this parameter is used
12009         #         for result publication in the study. Otherwise, if automatic
12010         #         publication is switched on, default value is used for result name.
12011         #
12012         #  @return New GEOM.GEOM_Object, containing the found vertex.
12013         #
12014         #  @ref swig_GetVertexNearPoint "Example"
12015         @ManageTransactions("BlocksOp")
12016         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12017             """
12018             Find a vertex of the given shape, which has minimal distance to the given point.
12019
12020             Parameters:
12021                 theShape Any shape.
12022                 thePoint Point, close to the desired vertex.
12023                 theName Object name; when specified, this parameter is used
12024                         for result publication in the study. Otherwise, if automatic
12025                         publication is switched on, default value is used for result name.
12026
12027             Returns:
12028                 New GEOM.GEOM_Object, containing the found vertex.
12029
12030             Example of usage:
12031                 pmidle = geompy.MakeVertex(50, 0, 50)
12032                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12033             """
12034             # Example: see GEOM_TestOthers.py
12035             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12036             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12037             self._autoPublish(anObj, theName, "vertex")
12038             return anObj
12039
12040         ## Get an edge, found in the given shape by two given vertices.
12041         #  @param theShape Block or a compound of blocks.
12042         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12043         #  @param theName Object name; when specified, this parameter is used
12044         #         for result publication in the study. Otherwise, if automatic
12045         #         publication is switched on, default value is used for result name.
12046         #
12047         #  @return New GEOM.GEOM_Object, containing the found edge.
12048         #
12049         #  @ref swig_GetEdge "Example"
12050         @ManageTransactions("BlocksOp")
12051         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12052             """
12053             Get an edge, found in the given shape by two given vertices.
12054
12055             Parameters:
12056                 theShape Block or a compound of blocks.
12057                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12058                 theName Object name; when specified, this parameter is used
12059                         for result publication in the study. Otherwise, if automatic
12060                         publication is switched on, default value is used for result name.
12061
12062             Returns:
12063                 New GEOM.GEOM_Object, containing the found edge.
12064             """
12065             # Example: see GEOM_Spanner.py
12066             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12067             RaiseIfFailed("GetEdge", self.BlocksOp)
12068             self._autoPublish(anObj, theName, "edge")
12069             return anObj
12070
12071         ## Find an edge of the given shape, which has minimal distance to the given point.
12072         #  @param theShape Block or a compound of blocks.
12073         #  @param thePoint Point, close to the desired edge.
12074         #  @param theName Object name; when specified, this parameter is used
12075         #         for result publication in the study. Otherwise, if automatic
12076         #         publication is switched on, default value is used for result name.
12077         #
12078         #  @return New GEOM.GEOM_Object, containing the found edge.
12079         #
12080         #  @ref swig_GetEdgeNearPoint "Example"
12081         @ManageTransactions("BlocksOp")
12082         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12083             """
12084             Find an edge of the given shape, which has minimal distance to the given point.
12085
12086             Parameters:
12087                 theShape Block or a compound of blocks.
12088                 thePoint Point, close to the desired edge.
12089                 theName Object name; when specified, this parameter is used
12090                         for result publication in the study. Otherwise, if automatic
12091                         publication is switched on, default value is used for result name.
12092
12093             Returns:
12094                 New GEOM.GEOM_Object, containing the found edge.
12095             """
12096             # Example: see GEOM_TestOthers.py
12097             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12098             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12099             self._autoPublish(anObj, theName, "edge")
12100             return anObj
12101
12102         ## Returns a face, found in the given shape by four given corner vertices.
12103         #  @param theShape Block or a compound of blocks.
12104         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12105         #  @param theName Object name; when specified, this parameter is used
12106         #         for result publication in the study. Otherwise, if automatic
12107         #         publication is switched on, default value is used for result name.
12108         #
12109         #  @return New GEOM.GEOM_Object, containing the found face.
12110         #
12111         #  @ref swig_todo "Example"
12112         @ManageTransactions("BlocksOp")
12113         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12114             """
12115             Returns a face, found in the given shape by four given corner vertices.
12116
12117             Parameters:
12118                 theShape Block or a compound of blocks.
12119                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12120                 theName Object name; when specified, this parameter is used
12121                         for result publication in the study. Otherwise, if automatic
12122                         publication is switched on, default value is used for result name.
12123
12124             Returns:
12125                 New GEOM.GEOM_Object, containing the found face.
12126             """
12127             # Example: see GEOM_Spanner.py
12128             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12129             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12130             self._autoPublish(anObj, theName, "face")
12131             return anObj
12132
12133         ## Get a face of block, found in the given shape by two given edges.
12134         #  @param theShape Block or a compound of blocks.
12135         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12136         #  @param theName Object name; when specified, this parameter is used
12137         #         for result publication in the study. Otherwise, if automatic
12138         #         publication is switched on, default value is used for result name.
12139         #
12140         #  @return New GEOM.GEOM_Object, containing the found face.
12141         #
12142         #  @ref swig_todo "Example"
12143         @ManageTransactions("BlocksOp")
12144         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12145             """
12146             Get a face of block, found in the given shape by two given edges.
12147
12148             Parameters:
12149                 theShape Block or a compound of blocks.
12150                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12151                 theName Object name; when specified, this parameter is used
12152                         for result publication in the study. Otherwise, if automatic
12153                         publication is switched on, default value is used for result name.
12154
12155             Returns:
12156                 New GEOM.GEOM_Object, containing the found face.
12157             """
12158             # Example: see GEOM_Spanner.py
12159             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12160             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12161             self._autoPublish(anObj, theName, "face")
12162             return anObj
12163
12164         ## Find a face, opposite to the given one in the given block.
12165         #  @param theBlock Must be a hexahedral solid.
12166         #  @param theFace Face of \a theBlock, opposite to the desired face.
12167         #  @param theName Object name; when specified, this parameter is used
12168         #         for result publication in the study. Otherwise, if automatic
12169         #         publication is switched on, default value is used for result name.
12170         #
12171         #  @return New GEOM.GEOM_Object, containing the found face.
12172         #
12173         #  @ref swig_GetOppositeFace "Example"
12174         @ManageTransactions("BlocksOp")
12175         def GetOppositeFace(self, theBlock, theFace, theName=None):
12176             """
12177             Find a face, opposite to the given one in the given block.
12178
12179             Parameters:
12180                 theBlock Must be a hexahedral solid.
12181                 theFace Face of theBlock, opposite to the desired face.
12182                 theName Object name; when specified, this parameter is used
12183                         for result publication in the study. Otherwise, if automatic
12184                         publication is switched on, default value is used for result name.
12185
12186             Returns:
12187                 New GEOM.GEOM_Object, containing the found face.
12188             """
12189             # Example: see GEOM_Spanner.py
12190             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12191             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12192             self._autoPublish(anObj, theName, "face")
12193             return anObj
12194
12195         ## Find a face of the given shape, which has minimal distance to the given point.
12196         #  @param theShape Block or a compound of blocks.
12197         #  @param thePoint Point, close to the desired face.
12198         #  @param theName Object name; when specified, this parameter is used
12199         #         for result publication in the study. Otherwise, if automatic
12200         #         publication is switched on, default value is used for result name.
12201         #
12202         #  @return New GEOM.GEOM_Object, containing the found face.
12203         #
12204         #  @ref swig_GetFaceNearPoint "Example"
12205         @ManageTransactions("BlocksOp")
12206         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12207             """
12208             Find a face of the given shape, which has minimal distance to the given point.
12209
12210             Parameters:
12211                 theShape Block or a compound of blocks.
12212                 thePoint Point, close to the desired face.
12213                 theName Object name; when specified, this parameter is used
12214                         for result publication in the study. Otherwise, if automatic
12215                         publication is switched on, default value is used for result name.
12216
12217             Returns:
12218                 New GEOM.GEOM_Object, containing the found face.
12219             """
12220             # Example: see GEOM_Spanner.py
12221             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12222             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12223             self._autoPublish(anObj, theName, "face")
12224             return anObj
12225
12226         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12227         #  @param theBlock Block or a compound of blocks.
12228         #  @param theVector Vector, close to the normale of the desired face.
12229         #  @param theName Object name; when specified, this parameter is used
12230         #         for result publication in the study. Otherwise, if automatic
12231         #         publication is switched on, default value is used for result name.
12232         #
12233         #  @return New GEOM.GEOM_Object, containing the found face.
12234         #
12235         #  @ref swig_todo "Example"
12236         @ManageTransactions("BlocksOp")
12237         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12238             """
12239             Find a face of block, whose outside normale has minimal angle with the given vector.
12240
12241             Parameters:
12242                 theBlock Block or a compound of blocks.
12243                 theVector Vector, close to the normale of the desired face.
12244                 theName Object name; when specified, this parameter is used
12245                         for result publication in the study. Otherwise, if automatic
12246                         publication is switched on, default value is used for result name.
12247
12248             Returns:
12249                 New GEOM.GEOM_Object, containing the found face.
12250             """
12251             # Example: see GEOM_Spanner.py
12252             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12253             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12254             self._autoPublish(anObj, theName, "face")
12255             return anObj
12256
12257         ## Find all sub-shapes of type \a theShapeType of the given shape,
12258         #  which have minimal distance to the given point.
12259         #  @param theShape Any shape.
12260         #  @param thePoint Point, close to the desired shape.
12261         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12262         #  @param theTolerance The tolerance for distances comparison. All shapes
12263         #                      with distances to the given point in interval
12264         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12265         #  @param theName Object name; when specified, this parameter is used
12266         #         for result publication in the study. Otherwise, if automatic
12267         #         publication is switched on, default value is used for result name.
12268         #
12269         #  @return New GEOM_Object, containing a group of all found shapes.
12270         #
12271         #  @ref swig_GetShapesNearPoint "Example"
12272         @ManageTransactions("BlocksOp")
12273         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12274             """
12275             Find all sub-shapes of type theShapeType of the given shape,
12276             which have minimal distance to the given point.
12277
12278             Parameters:
12279                 theShape Any shape.
12280                 thePoint Point, close to the desired shape.
12281                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12282                 theTolerance The tolerance for distances comparison. All shapes
12283                                 with distances to the given point in interval
12284                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12285                 theName Object name; when specified, this parameter is used
12286                         for result publication in the study. Otherwise, if automatic
12287                         publication is switched on, default value is used for result name.
12288
12289             Returns:
12290                 New GEOM_Object, containing a group of all found shapes.
12291             """
12292             # Example: see GEOM_TestOthers.py
12293             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12294             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12295             self._autoPublish(anObj, theName, "group")
12296             return anObj
12297
12298         # end of l3_blocks_op
12299         ## @}
12300
12301         ## @addtogroup l4_blocks_measure
12302         ## @{
12303
12304         ## Check, if the compound of blocks is given.
12305         #  To be considered as a compound of blocks, the
12306         #  given shape must satisfy the following conditions:
12307         #  - Each element of the compound should be a Block (6 faces).
12308         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12309         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12310         #       there are more than 4 edges in the only wire of a face,
12311         #       this face is considered to be quadrangle if it has 4 bounds
12312         #       (1 or more edge) of C1 continuity.
12313         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12314         #  - The compound should be connexe.
12315         #  - The glue between two quadrangle faces should be applied.
12316         #  @param theCompound The compound to check.
12317         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12318         #         taking into account C1 continuity.
12319         #  @param theAngTolerance the angular tolerance to check if two neighbor
12320         #         edges are codirectional in the common vertex with this
12321         #         tolerance. This parameter is used only if
12322         #         <VAR>theIsUseC1</VAR> is set to True.
12323         #  @return TRUE, if the given shape is a compound of blocks.
12324         #  If theCompound is not valid, prints all discovered errors.
12325         #
12326         #  @ref tui_check_compound_of_blocks_page "Example 1"
12327         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12328         @ManageTransactions("BlocksOp")
12329         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12330                                   theAngTolerance = 1.e-12):
12331             """
12332             Check, if the compound of blocks is given.
12333             To be considered as a compound of blocks, the
12334             given shape must satisfy the following conditions:
12335             - Each element of the compound should be a Block (6 faces).
12336             - Each face should be a quadrangle, i.e. it should have only 1 wire
12337                  with 4 edges. If theIsUseC1 is set to True and
12338                  there are more than 4 edges in the only wire of a face,
12339                  this face is considered to be quadrangle if it has 4 bounds
12340                  (1 or more edge) of C1 continuity.
12341             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12342             - The compound should be connexe.
12343             - The glue between two quadrangle faces should be applied.
12344
12345             Parameters:
12346                 theCompound The compound to check.
12347                 theIsUseC1 Flag to check if there are 4 bounds on a face
12348                            taking into account C1 continuity.
12349                 theAngTolerance the angular tolerance to check if two neighbor
12350                            edges are codirectional in the common vertex with this
12351                            tolerance. This parameter is used only if
12352                            theIsUseC1 is set to True.
12353
12354             Returns:
12355                 TRUE, if the given shape is a compound of blocks.
12356                 If theCompound is not valid, prints all discovered errors.
12357             """
12358             # Example: see GEOM_Spanner.py
12359             aTolerance = -1.0
12360             if theIsUseC1:
12361                 aTolerance = theAngTolerance
12362             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12363             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12364             if IsValid == 0:
12365                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12366                 print Descr
12367             return IsValid
12368
12369         ## Retrieve all non blocks solids and faces from \a theShape.
12370         #  @param theShape The shape to explore.
12371         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12372         #         taking into account C1 continuity.
12373         #  @param theAngTolerance the angular tolerance to check if two neighbor
12374         #         edges are codirectional in the common vertex with this
12375         #         tolerance. This parameter is used only if
12376         #         <VAR>theIsUseC1</VAR> is set to True.
12377         #  @param theName Object name; when specified, this parameter is used
12378         #         for result publication in the study. Otherwise, if automatic
12379         #         publication is switched on, default value is used for result name.
12380         #
12381         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12382         #          non block solids (= not 6 faces, or with 6 faces, but with the
12383         #          presence of non-quadrangular faces). The second object is a
12384         #          group of all non quadrangular faces (= faces with more then
12385         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12386         #          with 1 wire with not 4 edges that do not form 4 bounds of
12387         #          C1 continuity).
12388         #
12389         #  @ref tui_get_non_blocks_page "Example 1"
12390         #  \n @ref swig_GetNonBlocks "Example 2"
12391         @ManageTransactions("BlocksOp")
12392         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12393                           theAngTolerance = 1.e-12, theName=None):
12394             """
12395             Retrieve all non blocks solids and faces from theShape.
12396
12397             Parameters:
12398                 theShape The shape to explore.
12399                 theIsUseC1 Flag to check if there are 4 bounds on a face
12400                            taking into account C1 continuity.
12401                 theAngTolerance the angular tolerance to check if two neighbor
12402                            edges are codirectional in the common vertex with this
12403                            tolerance. This parameter is used only if
12404                            theIsUseC1 is set to True.
12405                 theName Object name; when specified, this parameter is used
12406                         for result publication in the study. Otherwise, if automatic
12407                         publication is switched on, default value is used for result name.
12408
12409             Returns:
12410                 A tuple of two GEOM_Objects. The first object is a group of all
12411                 non block solids (= not 6 faces, or with 6 faces, but with the
12412                 presence of non-quadrangular faces). The second object is a
12413                 group of all non quadrangular faces (= faces with more then
12414                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12415                 with 1 wire with not 4 edges that do not form 4 bounds of
12416                 C1 continuity).
12417
12418             Usage:
12419                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12420             """
12421             # Example: see GEOM_Spanner.py
12422             aTolerance = -1.0
12423             if theIsUseC1:
12424                 aTolerance = theAngTolerance
12425             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12426             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12427             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12428             return aTuple
12429
12430         ## Remove all seam and degenerated edges from \a theShape.
12431         #  Unite faces and edges, sharing one surface. It means that
12432         #  this faces must have references to one C++ surface object (handle).
12433         #  @param theShape The compound or single solid to remove irregular edges from.
12434         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12435         #         do not unite faces.
12436         #  @param theName Object name; when specified, this parameter is used
12437         #         for result publication in the study. Otherwise, if automatic
12438         #         publication is switched on, default value is used for result name.
12439         #
12440         #  @return Improved shape.
12441         #
12442         #  @ref swig_RemoveExtraEdges "Example"
12443         @ManageTransactions("BlocksOp")
12444         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12445             """
12446             Remove all seam and degenerated edges from theShape.
12447             Unite faces and edges, sharing one surface. It means that
12448             this faces must have references to one C++ surface object (handle).
12449
12450             Parameters:
12451                 theShape The compound or single solid to remove irregular edges from.
12452                 doUnionFaces If True, then unite faces. If False (the default value),
12453                              do not unite faces.
12454                 theName Object name; when specified, this parameter is used
12455                         for result publication in the study. Otherwise, if automatic
12456                         publication is switched on, default value is used for result name.
12457
12458             Returns:
12459                 Improved shape.
12460             """
12461             # Example: see GEOM_TestOthers.py
12462             nbFacesOptimum = -1 # -1 means do not unite faces
12463             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12464             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12465             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12466             self._autoPublish(anObj, theName, "removeExtraEdges")
12467             return anObj
12468
12469         ## Performs union faces of \a theShape
12470         #  Unite faces sharing one surface. It means that
12471         #  these faces must have references to one C++ surface object (handle).
12472         #  @param theShape The compound or single solid that contains faces
12473         #         to perform union.
12474         #  @param theName Object name; when specified, this parameter is used
12475         #         for result publication in the study. Otherwise, if automatic
12476         #         publication is switched on, default value is used for result name.
12477         #
12478         #  @return Improved shape.
12479         #
12480         #  @ref swig_UnionFaces "Example"
12481         @ManageTransactions("BlocksOp")
12482         def UnionFaces(self, theShape, theName=None):
12483             """
12484             Performs union faces of theShape.
12485             Unite faces sharing one surface. It means that
12486             these faces must have references to one C++ surface object (handle).
12487
12488             Parameters:
12489                 theShape The compound or single solid that contains faces
12490                          to perform union.
12491                 theName Object name; when specified, this parameter is used
12492                         for result publication in the study. Otherwise, if automatic
12493                         publication is switched on, default value is used for result name.
12494
12495             Returns:
12496                 Improved shape.
12497             """
12498             # Example: see GEOM_TestOthers.py
12499             anObj = self.BlocksOp.UnionFaces(theShape)
12500             RaiseIfFailed("UnionFaces", self.BlocksOp)
12501             self._autoPublish(anObj, theName, "unionFaces")
12502             return anObj
12503
12504         ## Check, if the given shape is a blocks compound.
12505         #  Fix all detected errors.
12506         #    \note Single block can be also fixed by this method.
12507         #  @param theShape The compound to check and improve.
12508         #  @param theName Object name; when specified, this parameter is used
12509         #         for result publication in the study. Otherwise, if automatic
12510         #         publication is switched on, default value is used for result name.
12511         #
12512         #  @return Improved compound.
12513         #
12514         #  @ref swig_CheckAndImprove "Example"
12515         @ManageTransactions("BlocksOp")
12516         def CheckAndImprove(self, theShape, theName=None):
12517             """
12518             Check, if the given shape is a blocks compound.
12519             Fix all detected errors.
12520
12521             Note:
12522                 Single block can be also fixed by this method.
12523
12524             Parameters:
12525                 theShape The compound to check and improve.
12526                 theName Object name; when specified, this parameter is used
12527                         for result publication in the study. Otherwise, if automatic
12528                         publication is switched on, default value is used for result name.
12529
12530             Returns:
12531                 Improved compound.
12532             """
12533             # Example: see GEOM_TestOthers.py
12534             anObj = self.BlocksOp.CheckAndImprove(theShape)
12535             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12536             self._autoPublish(anObj, theName, "improved")
12537             return anObj
12538
12539         # end of l4_blocks_measure
12540         ## @}
12541
12542         ## @addtogroup l3_blocks_op
12543         ## @{
12544
12545         ## Get all the blocks, contained in the given compound.
12546         #  @param theCompound The compound to explode.
12547         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12548         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12549         #  @param theName Object name; when specified, this parameter is used
12550         #         for result publication in the study. Otherwise, if automatic
12551         #         publication is switched on, default value is used for result name.
12552         #
12553         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12554         #
12555         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12556         #
12557         #  @ref tui_explode_on_blocks "Example 1"
12558         #  \n @ref swig_MakeBlockExplode "Example 2"
12559         @ManageTransactions("BlocksOp")
12560         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12561             """
12562             Get all the blocks, contained in the given compound.
12563
12564             Parameters:
12565                 theCompound The compound to explode.
12566                 theMinNbFaces If solid has lower number of faces, it is not a block.
12567                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12568                 theName Object name; when specified, this parameter is used
12569                         for result publication in the study. Otherwise, if automatic
12570                         publication is switched on, default value is used for result name.
12571
12572             Note:
12573                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12574
12575             Returns:
12576                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12577             """
12578             # Example: see GEOM_TestOthers.py
12579             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12580             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12581             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12582             for anObj in aList:
12583                 anObj.SetParameters(Parameters)
12584                 pass
12585             self._autoPublish(aList, theName, "block")
12586             return aList
12587
12588         ## Find block, containing the given point inside its volume or on boundary.
12589         #  @param theCompound Compound, to find block in.
12590         #  @param thePoint Point, close to the desired block. If the point lays on
12591         #         boundary between some blocks, we return block with nearest center.
12592         #  @param 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         #  @return New GEOM.GEOM_Object, containing the found block.
12597         #
12598         #  @ref swig_todo "Example"
12599         @ManageTransactions("BlocksOp")
12600         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12601             """
12602             Find block, containing the given point inside its volume or on boundary.
12603
12604             Parameters:
12605                 theCompound Compound, to find block in.
12606                 thePoint Point, close to the desired block. If the point lays on
12607                          boundary between some blocks, we return block with nearest center.
12608                 theName Object name; when specified, this parameter is used
12609                         for result publication in the study. Otherwise, if automatic
12610                         publication is switched on, default value is used for result name.
12611
12612             Returns:
12613                 New GEOM.GEOM_Object, containing the found block.
12614             """
12615             # Example: see GEOM_Spanner.py
12616             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12617             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12618             self._autoPublish(anObj, theName, "block")
12619             return anObj
12620
12621         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12622         #  @param theCompound Compound, to find block in.
12623         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12624         #  @param theName Object name; when specified, this parameter is used
12625         #         for result publication in the study. Otherwise, if automatic
12626         #         publication is switched on, default value is used for result name.
12627         #
12628         #  @return New GEOM.GEOM_Object, containing the found block.
12629         #
12630         #  @ref swig_GetBlockByParts "Example"
12631         @ManageTransactions("BlocksOp")
12632         def GetBlockByParts(self, theCompound, theParts, theName=None):
12633             """
12634              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12635
12636              Parameters:
12637                 theCompound Compound, to find block in.
12638                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12639                 theName Object name; when specified, this parameter is used
12640                         for result publication in the study. Otherwise, if automatic
12641                         publication is switched on, default value is used for result name.
12642
12643             Returns:
12644                 New GEOM_Object, containing the found block.
12645             """
12646             # Example: see GEOM_TestOthers.py
12647             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12648             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12649             self._autoPublish(anObj, theName, "block")
12650             return anObj
12651
12652         ## Return all blocks, containing all the elements, passed as the parts.
12653         #  @param theCompound Compound, to find blocks in.
12654         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12655         #  @param theName Object name; when specified, this parameter is used
12656         #         for result publication in the study. Otherwise, if automatic
12657         #         publication is switched on, default value is used for result name.
12658         #
12659         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12660         #
12661         #  @ref swig_todo "Example"
12662         @ManageTransactions("BlocksOp")
12663         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12664             """
12665             Return all blocks, containing all the elements, passed as the parts.
12666
12667             Parameters:
12668                 theCompound Compound, to find blocks in.
12669                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
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                 List of GEOM.GEOM_Object, containing the found blocks.
12676             """
12677             # Example: see GEOM_Spanner.py
12678             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12679             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12680             self._autoPublish(aList, theName, "block")
12681             return aList
12682
12683         ## Multi-transformate block and glue the result.
12684         #  Transformation is defined so, as to superpose direction faces.
12685         #  @param Block Hexahedral solid to be multi-transformed.
12686         #  @param DirFace1 ID of First direction face.
12687         #  @param DirFace2 ID of Second direction face.
12688         #  @param NbTimes Quantity of transformations to be done.
12689         #  @param theName Object name; when specified, this parameter is used
12690         #         for result publication in the study. Otherwise, if automatic
12691         #         publication is switched on, default value is used for result name.
12692         #
12693         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12694         #
12695         #  @return New GEOM.GEOM_Object, containing the result shape.
12696         #
12697         #  @ref tui_multi_transformation "Example"
12698         @ManageTransactions("BlocksOp")
12699         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12700             """
12701             Multi-transformate block and glue the result.
12702             Transformation is defined so, as to superpose direction faces.
12703
12704             Parameters:
12705                 Block Hexahedral solid to be multi-transformed.
12706                 DirFace1 ID of First direction face.
12707                 DirFace2 ID of Second direction face.
12708                 NbTimes Quantity of transformations to be done.
12709                 theName Object name; when specified, this parameter is used
12710                         for result publication in the study. Otherwise, if automatic
12711                         publication is switched on, default value is used for result name.
12712
12713             Note:
12714                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12715
12716             Returns:
12717                 New GEOM.GEOM_Object, containing the result shape.
12718             """
12719             # Example: see GEOM_Spanner.py
12720             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12721             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12722             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12723             anObj.SetParameters(Parameters)
12724             self._autoPublish(anObj, theName, "transformed")
12725             return anObj
12726
12727         ## Multi-transformate block and glue the result.
12728         #  @param Block Hexahedral solid to be multi-transformed.
12729         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12730         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12731         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12732         #  @param theName Object name; when specified, this parameter is used
12733         #         for result publication in the study. Otherwise, if automatic
12734         #         publication is switched on, default value is used for result name.
12735         #
12736         #  @return New GEOM.GEOM_Object, containing the result shape.
12737         #
12738         #  @ref tui_multi_transformation "Example"
12739         @ManageTransactions("BlocksOp")
12740         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12741                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12742             """
12743             Multi-transformate block and glue the result.
12744
12745             Parameters:
12746                 Block Hexahedral solid to be multi-transformed.
12747                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12748                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12749                 NbTimesU,NbTimesV Quantity of transformations to be done.
12750                 theName Object name; when specified, this parameter is used
12751                         for result publication in the study. Otherwise, if automatic
12752                         publication is switched on, default value is used for result name.
12753
12754             Returns:
12755                 New GEOM.GEOM_Object, containing the result shape.
12756             """
12757             # Example: see GEOM_Spanner.py
12758             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12759               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12760             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12761                                                             DirFace1V, DirFace2V, NbTimesV)
12762             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12763             anObj.SetParameters(Parameters)
12764             self._autoPublish(anObj, theName, "transformed")
12765             return anObj
12766
12767         ## Build all possible propagation groups.
12768         #  Propagation group is a set of all edges, opposite to one (main)
12769         #  edge of this group directly or through other opposite edges.
12770         #  Notion of Opposite Edge make sence only on quadrangle face.
12771         #  @param theShape Shape to build propagation groups on.
12772         #  @param theName Object name; when specified, this parameter is used
12773         #         for result publication in the study. Otherwise, if automatic
12774         #         publication is switched on, default value is used for result name.
12775         #
12776         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12777         #
12778         #  @ref swig_Propagate "Example"
12779         @ManageTransactions("BlocksOp")
12780         def Propagate(self, theShape, theName=None):
12781             """
12782             Build all possible propagation groups.
12783             Propagation group is a set of all edges, opposite to one (main)
12784             edge of this group directly or through other opposite edges.
12785             Notion of Opposite Edge make sence only on quadrangle face.
12786
12787             Parameters:
12788                 theShape Shape to build propagation groups on.
12789                 theName Object name; when specified, this parameter is used
12790                         for result publication in the study. Otherwise, if automatic
12791                         publication is switched on, default value is used for result name.
12792
12793             Returns:
12794                 List of GEOM.GEOM_Object, each of them is a propagation group.
12795             """
12796             # Example: see GEOM_TestOthers.py
12797             listChains = self.BlocksOp.Propagate(theShape)
12798             RaiseIfFailed("Propagate", self.BlocksOp)
12799             self._autoPublish(listChains, theName, "propagate")
12800             return listChains
12801
12802         # end of l3_blocks_op
12803         ## @}
12804
12805         ## @addtogroup l3_groups
12806         ## @{
12807
12808         ## Creates a new group which will store sub-shapes of theMainShape
12809         #  @param theMainShape is a GEOM object on which the group is selected
12810         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12811         #  @param theName Object name; when specified, this parameter is used
12812         #         for result publication in the study. Otherwise, if automatic
12813         #         publication is switched on, default value is used for result name.
12814         #
12815         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12816         #
12817         #  @ref tui_working_with_groups_page "Example 1"
12818         #  \n @ref swig_CreateGroup "Example 2"
12819         @ManageTransactions("GroupOp")
12820         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12821             """
12822             Creates a new group which will store sub-shapes of theMainShape
12823
12824             Parameters:
12825                theMainShape is a GEOM object on which the group is selected
12826                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12827                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12828                 theName Object name; when specified, this parameter is used
12829                         for result publication in the study. Otherwise, if automatic
12830                         publication is switched on, default value is used for result name.
12831
12832             Returns:
12833                a newly created GEOM group
12834
12835             Example of usage:
12836                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12837
12838             """
12839             # Example: see GEOM_TestOthers.py
12840             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12841             RaiseIfFailed("CreateGroup", self.GroupOp)
12842             self._autoPublish(anObj, theName, "group")
12843             return anObj
12844
12845         ## Adds a sub-object with ID theSubShapeId to the group
12846         #  @param theGroup is a GEOM group to which the new sub-shape is added
12847         #  @param theSubShapeID is a sub-shape ID in the main object.
12848         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12849         #
12850         #  @ref tui_working_with_groups_page "Example"
12851         @ManageTransactions("GroupOp")
12852         def AddObject(self,theGroup, theSubShapeID):
12853             """
12854             Adds a sub-object with ID theSubShapeId to the group
12855
12856             Parameters:
12857                 theGroup       is a GEOM group to which the new sub-shape is added
12858                 theSubShapeID  is a sub-shape ID in the main object.
12859
12860             Note:
12861                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12862             """
12863             # Example: see GEOM_TestOthers.py
12864             self.GroupOp.AddObject(theGroup, theSubShapeID)
12865             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12866                 RaiseIfFailed("AddObject", self.GroupOp)
12867                 pass
12868             pass
12869
12870         ## Removes a sub-object with ID \a theSubShapeId from the group
12871         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12872         #  @param theSubShapeID is a sub-shape ID in the main object.
12873         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12874         #
12875         #  @ref tui_working_with_groups_page "Example"
12876         @ManageTransactions("GroupOp")
12877         def RemoveObject(self,theGroup, theSubShapeID):
12878             """
12879             Removes a sub-object with ID theSubShapeId from the group
12880
12881             Parameters:
12882                 theGroup is a GEOM group from which the new sub-shape is removed
12883                 theSubShapeID is a sub-shape ID in the main object.
12884
12885             Note:
12886                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12887             """
12888             # Example: see GEOM_TestOthers.py
12889             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12890             RaiseIfFailed("RemoveObject", self.GroupOp)
12891             pass
12892
12893         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12894         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12895         #  @param theSubShapes is a list of sub-shapes to be added.
12896         #
12897         #  @ref tui_working_with_groups_page "Example"
12898         @ManageTransactions("GroupOp")
12899         def UnionList (self,theGroup, theSubShapes):
12900             """
12901             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12902
12903             Parameters:
12904                 theGroup is a GEOM group to which the new sub-shapes are added.
12905                 theSubShapes is a list of sub-shapes to be added.
12906             """
12907             # Example: see GEOM_TestOthers.py
12908             self.GroupOp.UnionList(theGroup, theSubShapes)
12909             RaiseIfFailed("UnionList", self.GroupOp)
12910             pass
12911
12912         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12913         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12914         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12915         #
12916         #  @ref swig_UnionIDs "Example"
12917         @ManageTransactions("GroupOp")
12918         def UnionIDs(self,theGroup, theSubShapes):
12919             """
12920             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12921
12922             Parameters:
12923                 theGroup is a GEOM group to which the new sub-shapes are added.
12924                 theSubShapes is a list of indices of sub-shapes to be added.
12925             """
12926             # Example: see GEOM_TestOthers.py
12927             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12928             RaiseIfFailed("UnionIDs", self.GroupOp)
12929             pass
12930
12931         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12932         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12933         #  @param theSubShapes is a list of sub-shapes to be removed.
12934         #
12935         #  @ref tui_working_with_groups_page "Example"
12936         @ManageTransactions("GroupOp")
12937         def DifferenceList (self,theGroup, theSubShapes):
12938             """
12939             Removes from the group all the given shapes. No errors, if some shapes are not included.
12940
12941             Parameters:
12942                 theGroup is a GEOM group from which the sub-shapes are removed.
12943                 theSubShapes is a list of sub-shapes to be removed.
12944             """
12945             # Example: see GEOM_TestOthers.py
12946             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12947             RaiseIfFailed("DifferenceList", self.GroupOp)
12948             pass
12949
12950         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12951         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12952         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12953         #
12954         #  @ref swig_DifferenceIDs "Example"
12955         @ManageTransactions("GroupOp")
12956         def DifferenceIDs(self,theGroup, theSubShapes):
12957             """
12958             Removes from the group all the given shapes. No errors, if some shapes are not included.
12959
12960             Parameters:
12961                 theGroup is a GEOM group from which the sub-shapes are removed.
12962                 theSubShapes is a list of indices of sub-shapes to be removed.
12963             """
12964             # Example: see GEOM_TestOthers.py
12965             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12966             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12967             pass
12968
12969         ## Union of two groups.
12970         #  New group is created. It will contain all entities
12971         #  which are present in groups theGroup1 and theGroup2.
12972         #  @param theGroup1, theGroup2 are the initial GEOM groups
12973         #                              to create the united group from.
12974         #  @param theName Object name; when specified, this parameter is used
12975         #         for result publication in the study. Otherwise, if automatic
12976         #         publication is switched on, default value is used for result name.
12977         #
12978         #  @return a newly created GEOM group.
12979         #
12980         #  @ref tui_union_groups_anchor "Example"
12981         @ManageTransactions("GroupOp")
12982         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12983             """
12984             Union of two groups.
12985             New group is created. It will contain all entities
12986             which are present in groups theGroup1 and theGroup2.
12987
12988             Parameters:
12989                 theGroup1, theGroup2 are the initial GEOM groups
12990                                      to create the united group from.
12991                 theName Object name; when specified, this parameter is used
12992                         for result publication in the study. Otherwise, if automatic
12993                         publication is switched on, default value is used for result name.
12994
12995             Returns:
12996                 a newly created GEOM group.
12997             """
12998             # Example: see GEOM_TestOthers.py
12999             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13000             RaiseIfFailed("UnionGroups", self.GroupOp)
13001             self._autoPublish(aGroup, theName, "group")
13002             return aGroup
13003
13004         ## Intersection of two groups.
13005         #  New group is created. It will contain only those entities
13006         #  which are present in both groups theGroup1 and theGroup2.
13007         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13008         #  @param theName Object name; when specified, this parameter is used
13009         #         for result publication in the study. Otherwise, if automatic
13010         #         publication is switched on, default value is used for result name.
13011         #
13012         #  @return a newly created GEOM group.
13013         #
13014         #  @ref tui_intersect_groups_anchor "Example"
13015         @ManageTransactions("GroupOp")
13016         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13017             """
13018             Intersection of two groups.
13019             New group is created. It will contain only those entities
13020             which are present in both groups theGroup1 and theGroup2.
13021
13022             Parameters:
13023                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13024                 theName Object name; when specified, this parameter is used
13025                         for result publication in the study. Otherwise, if automatic
13026                         publication is switched on, default value is used for result name.
13027
13028             Returns:
13029                 a newly created GEOM group.
13030             """
13031             # Example: see GEOM_TestOthers.py
13032             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13033             RaiseIfFailed("IntersectGroups", self.GroupOp)
13034             self._autoPublish(aGroup, theName, "group")
13035             return aGroup
13036
13037         ## Cut of two groups.
13038         #  New group is created. It will contain entities which are
13039         #  present in group theGroup1 but are not present in group theGroup2.
13040         #  @param theGroup1 is a GEOM group to include elements of.
13041         #  @param theGroup2 is a GEOM group to exclude elements of.
13042         #  @param theName Object name; when specified, this parameter is used
13043         #         for result publication in the study. Otherwise, if automatic
13044         #         publication is switched on, default value is used for result name.
13045         #
13046         #  @return a newly created GEOM group.
13047         #
13048         #  @ref tui_cut_groups_anchor "Example"
13049         @ManageTransactions("GroupOp")
13050         def CutGroups (self, theGroup1, theGroup2, theName=None):
13051             """
13052             Cut of two groups.
13053             New group is created. It will contain entities which are
13054             present in group theGroup1 but are not present in group theGroup2.
13055
13056             Parameters:
13057                 theGroup1 is a GEOM group to include elements of.
13058                 theGroup2 is a GEOM group to exclude elements of.
13059                 theName Object name; when specified, this parameter is used
13060                         for result publication in the study. Otherwise, if automatic
13061                         publication is switched on, default value is used for result name.
13062
13063             Returns:
13064                 a newly created GEOM group.
13065             """
13066             # Example: see GEOM_TestOthers.py
13067             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13068             RaiseIfFailed("CutGroups", self.GroupOp)
13069             self._autoPublish(aGroup, theName, "group")
13070             return aGroup
13071
13072         ## Union of list of groups.
13073         #  New group is created. It will contain all entities that are
13074         #  present in groups listed in theGList.
13075         #  @param theGList is a list of GEOM groups to create the united group from.
13076         #  @param theName Object name; when specified, this parameter is used
13077         #         for result publication in the study. Otherwise, if automatic
13078         #         publication is switched on, default value is used for result name.
13079         #
13080         #  @return a newly created GEOM group.
13081         #
13082         #  @ref tui_union_groups_anchor "Example"
13083         @ManageTransactions("GroupOp")
13084         def UnionListOfGroups (self, theGList, theName=None):
13085             """
13086             Union of list of groups.
13087             New group is created. It will contain all entities that are
13088             present in groups listed in theGList.
13089
13090             Parameters:
13091                 theGList is a list of GEOM groups to create the united group from.
13092                 theName Object name; when specified, this parameter is used
13093                         for result publication in the study. Otherwise, if automatic
13094                         publication is switched on, default value is used for result name.
13095
13096             Returns:
13097                 a newly created GEOM group.
13098             """
13099             # Example: see GEOM_TestOthers.py
13100             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13101             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13102             self._autoPublish(aGroup, theName, "group")
13103             return aGroup
13104
13105         ## Cut of lists of groups.
13106         #  New group is created. It will contain only entities
13107         #  which are present in groups listed in theGList.
13108         #  @param theGList is a list of GEOM groups to include elements of.
13109         #  @param theName Object name; when specified, this parameter is used
13110         #         for result publication in the study. Otherwise, if automatic
13111         #         publication is switched on, default value is used for result name.
13112         #
13113         #  @return a newly created GEOM group.
13114         #
13115         #  @ref tui_intersect_groups_anchor "Example"
13116         @ManageTransactions("GroupOp")
13117         def IntersectListOfGroups (self, theGList, theName=None):
13118             """
13119             Cut of lists of groups.
13120             New group is created. It will contain only entities
13121             which are present in groups listed in theGList.
13122
13123             Parameters:
13124                 theGList is a list of GEOM groups to include elements of.
13125                 theName Object name; when specified, this parameter is used
13126                         for result publication in the study. Otherwise, if automatic
13127                         publication is switched on, default value is used for result name.
13128
13129             Returns:
13130                 a newly created GEOM group.
13131             """
13132             # Example: see GEOM_TestOthers.py
13133             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13134             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13135             self._autoPublish(aGroup, theName, "group")
13136             return aGroup
13137
13138         ## Cut of lists of groups.
13139         #  New group is created. It will contain only entities
13140         #  which are present in groups listed in theGList1 but
13141         #  are not present in groups from theGList2.
13142         #  @param theGList1 is a list of GEOM groups to include elements of.
13143         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13144         #  @param theName Object name; when specified, this parameter is used
13145         #         for result publication in the study. Otherwise, if automatic
13146         #         publication is switched on, default value is used for result name.
13147         #
13148         #  @return a newly created GEOM group.
13149         #
13150         #  @ref tui_cut_groups_anchor "Example"
13151         @ManageTransactions("GroupOp")
13152         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13153             """
13154             Cut of lists of groups.
13155             New group is created. It will contain only entities
13156             which are present in groups listed in theGList1 but
13157             are not present in groups from theGList2.
13158
13159             Parameters:
13160                 theGList1 is a list of GEOM groups to include elements of.
13161                 theGList2 is a list of GEOM groups to exclude elements of.
13162                 theName Object name; when specified, this parameter is used
13163                         for result publication in the study. Otherwise, if automatic
13164                         publication is switched on, default value is used for result name.
13165
13166             Returns:
13167                 a newly created GEOM group.
13168             """
13169             # Example: see GEOM_TestOthers.py
13170             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13171             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13172             self._autoPublish(aGroup, theName, "group")
13173             return aGroup
13174
13175         ## Returns a list of sub-objects ID stored in the group
13176         #  @param theGroup is a GEOM group for which a list of IDs is requested
13177         #
13178         #  @ref swig_GetObjectIDs "Example"
13179         @ManageTransactions("GroupOp")
13180         def GetObjectIDs(self,theGroup):
13181             """
13182             Returns a list of sub-objects ID stored in the group
13183
13184             Parameters:
13185                 theGroup is a GEOM group for which a list of IDs is requested
13186             """
13187             # Example: see GEOM_TestOthers.py
13188             ListIDs = self.GroupOp.GetObjects(theGroup)
13189             RaiseIfFailed("GetObjects", self.GroupOp)
13190             return ListIDs
13191
13192         ## Returns a type of sub-objects stored in the group
13193         #  @param theGroup is a GEOM group which type is returned.
13194         #
13195         #  @ref swig_GetType "Example"
13196         @ManageTransactions("GroupOp")
13197         def GetType(self,theGroup):
13198             """
13199             Returns a type of sub-objects stored in the group
13200
13201             Parameters:
13202                 theGroup is a GEOM group which type is returned.
13203             """
13204             # Example: see GEOM_TestOthers.py
13205             aType = self.GroupOp.GetType(theGroup)
13206             RaiseIfFailed("GetType", self.GroupOp)
13207             return aType
13208
13209         ## Convert a type of geom object from id to string value
13210         #  @param theId is a GEOM obect type id.
13211         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13212         #  @ref swig_GetType "Example"
13213         def ShapeIdToType(self, theId):
13214             """
13215             Convert a type of geom object from id to string value
13216
13217             Parameters:
13218                 theId is a GEOM obect type id.
13219
13220             Returns:
13221                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13222             """
13223             if theId == 0:
13224                 return "COPY"
13225             if theId == 1:
13226                 return "IMPORT"
13227             if theId == 2:
13228                 return "POINT"
13229             if theId == 3:
13230                 return "VECTOR"
13231             if theId == 4:
13232                 return "PLANE"
13233             if theId == 5:
13234                 return "LINE"
13235             if theId == 6:
13236                 return "TORUS"
13237             if theId == 7:
13238                 return "BOX"
13239             if theId == 8:
13240                 return "CYLINDER"
13241             if theId == 9:
13242                 return "CONE"
13243             if theId == 10:
13244                 return "SPHERE"
13245             if theId == 11:
13246                 return "PRISM"
13247             if theId == 12:
13248                 return "REVOLUTION"
13249             if theId == 13:
13250                 return "BOOLEAN"
13251             if theId == 14:
13252                 return "PARTITION"
13253             if theId == 15:
13254                 return "POLYLINE"
13255             if theId == 16:
13256                 return "CIRCLE"
13257             if theId == 17:
13258                 return "SPLINE"
13259             if theId == 18:
13260                 return "ELLIPSE"
13261             if theId == 19:
13262                 return "CIRC_ARC"
13263             if theId == 20:
13264                 return "FILLET"
13265             if theId == 21:
13266                 return "CHAMFER"
13267             if theId == 22:
13268                 return "EDGE"
13269             if theId == 23:
13270                 return "WIRE"
13271             if theId == 24:
13272                 return "FACE"
13273             if theId == 25:
13274                 return "SHELL"
13275             if theId == 26:
13276                 return "SOLID"
13277             if theId == 27:
13278                 return "COMPOUND"
13279             if theId == 28:
13280                 return "SUBSHAPE"
13281             if theId == 29:
13282                 return "PIPE"
13283             if theId == 30:
13284                 return "ARCHIMEDE"
13285             if theId == 31:
13286                 return "FILLING"
13287             if theId == 32:
13288                 return "EXPLODE"
13289             if theId == 33:
13290                 return "GLUED"
13291             if theId == 34:
13292                 return "SKETCHER"
13293             if theId == 35:
13294                 return "CDG"
13295             if theId == 36:
13296                 return "FREE_BOUNDS"
13297             if theId == 37:
13298                 return "GROUP"
13299             if theId == 38:
13300                 return "BLOCK"
13301             if theId == 39:
13302                 return "MARKER"
13303             if theId == 40:
13304                 return "THRUSECTIONS"
13305             if theId == 41:
13306                 return "COMPOUNDFILTER"
13307             if theId == 42:
13308                 return "SHAPES_ON_SHAPE"
13309             if theId == 43:
13310                 return "ELLIPSE_ARC"
13311             if theId == 44:
13312                 return "3DSKETCHER"
13313             if theId == 45:
13314                 return "FILLET_2D"
13315             if theId == 46:
13316                 return "FILLET_1D"
13317             if theId == 201:
13318                 return "PIPETSHAPE"
13319             return "Shape Id not exist."
13320
13321         ## Returns a main shape associated with the group
13322         #  @param theGroup is a GEOM group for which a main shape object is requested
13323         #  @return a GEOM object which is a main shape for theGroup
13324         #
13325         #  @ref swig_GetMainShape "Example"
13326         @ManageTransactions("GroupOp")
13327         def GetMainShape(self,theGroup):
13328             """
13329             Returns a main shape associated with the group
13330
13331             Parameters:
13332                 theGroup is a GEOM group for which a main shape object is requested
13333
13334             Returns:
13335                 a GEOM object which is a main shape for theGroup
13336
13337             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13338             """
13339             # Example: see GEOM_TestOthers.py
13340             anObj = self.GroupOp.GetMainShape(theGroup)
13341             RaiseIfFailed("GetMainShape", self.GroupOp)
13342             return anObj
13343
13344         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13345         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13346         #  @param theShape given shape (see GEOM.GEOM_Object)
13347         #  @param min_length minimum length of edges of theShape
13348         #  @param max_length maximum length of edges of theShape
13349         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13350         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13351         #  @param theName Object name; when specified, this parameter is used
13352         #         for result publication in the study. Otherwise, if automatic
13353         #         publication is switched on, default value is used for result name.
13354         #
13355         #  @return a newly created GEOM group of edges
13356         #
13357         #  @@ref swig_todo "Example"
13358         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13359             """
13360             Create group of edges of theShape, whose length is in range [min_length, max_length].
13361             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13362
13363             Parameters:
13364                 theShape given shape
13365                 min_length minimum length of edges of theShape
13366                 max_length maximum length of edges of theShape
13367                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13368                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13369                 theName Object name; when specified, this parameter is used
13370                         for result publication in the study. Otherwise, if automatic
13371                         publication is switched on, default value is used for result name.
13372
13373              Returns:
13374                 a newly created GEOM group of edges.
13375             """
13376             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13377             edges_in_range = []
13378             for edge in edges:
13379                 Props = self.BasicProperties(edge)
13380                 if min_length <= Props[0] and Props[0] <= max_length:
13381                     if (not include_min) and (min_length == Props[0]):
13382                         skip = 1
13383                     else:
13384                         if (not include_max) and (Props[0] == max_length):
13385                             skip = 1
13386                         else:
13387                             edges_in_range.append(edge)
13388
13389             if len(edges_in_range) <= 0:
13390                 print "No edges found by given criteria"
13391                 return None
13392
13393             # note: auto-publishing is done in self.CreateGroup()
13394             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13395             self.UnionList(group_edges, edges_in_range)
13396
13397             return group_edges
13398
13399         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13400         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13401         #  @param min_length minimum length of edges of selected shape
13402         #  @param max_length maximum length of edges of selected shape
13403         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13404         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13405         #  @return a newly created GEOM group of edges
13406         #  @ref swig_todo "Example"
13407         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13408             """
13409             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13410             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13411
13412             Parameters:
13413                 min_length minimum length of edges of selected shape
13414                 max_length maximum length of edges of selected shape
13415                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13416                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13417
13418              Returns:
13419                 a newly created GEOM group of edges.
13420             """
13421             nb_selected = sg.SelectedCount()
13422             if nb_selected < 1:
13423                 print "Select a shape before calling this function, please."
13424                 return 0
13425             if nb_selected > 1:
13426                 print "Only one shape must be selected"
13427                 return 0
13428
13429             id_shape = sg.getSelected(0)
13430             shape = IDToObject( id_shape )
13431
13432             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13433
13434             left_str  = " < "
13435             right_str = " < "
13436             if include_min: left_str  = " <= "
13437             if include_max: right_str  = " <= "
13438
13439             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
13440                                     + left_str + "length" + right_str + `max_length`)
13441
13442             sg.updateObjBrowser()
13443
13444             return group_edges
13445
13446         # end of l3_groups
13447         ## @}
13448
13449         #@@ insert new functions before this line @@ do not remove this line @@#
13450
13451         ## Create a copy of the given object
13452         #
13453         #  @param theOriginal geometry object for copy
13454         #  @param theName Object name; when specified, this parameter is used
13455         #         for result publication in the study. Otherwise, if automatic
13456         #         publication is switched on, default value is used for result name.
13457         #
13458         #  @return New GEOM_Object, containing the copied shape.
13459         #
13460         #  @ingroup l1_geomBuilder_auxiliary
13461         #  @ref swig_MakeCopy "Example"
13462         @ManageTransactions("InsertOp")
13463         def MakeCopy(self, theOriginal, theName=None):
13464             """
13465             Create a copy of the given object
13466
13467             Parameters:
13468                 theOriginal geometry object for copy
13469                 theName Object name; when specified, this parameter is used
13470                         for result publication in the study. Otherwise, if automatic
13471                         publication is switched on, default value is used for result name.
13472
13473             Returns:
13474                 New GEOM_Object, containing the copied shape.
13475
13476             Example of usage: Copy = geompy.MakeCopy(Box)
13477             """
13478             # Example: see GEOM_TestAll.py
13479             anObj = self.InsertOp.MakeCopy(theOriginal)
13480             RaiseIfFailed("MakeCopy", self.InsertOp)
13481             self._autoPublish(anObj, theName, "copy")
13482             return anObj
13483
13484         ## Add Path to load python scripts from
13485         #  @param Path a path to load python scripts from
13486         #  @ingroup l1_geomBuilder_auxiliary
13487         def addPath(self,Path):
13488             """
13489             Add Path to load python scripts from
13490
13491             Parameters:
13492                 Path a path to load python scripts from
13493             """
13494             if (sys.path.count(Path) < 1):
13495                 sys.path.append(Path)
13496                 pass
13497             pass
13498
13499         ## Load marker texture from the file
13500         #  @param Path a path to the texture file
13501         #  @return unique texture identifier
13502         #  @ingroup l1_geomBuilder_auxiliary
13503         @ManageTransactions("InsertOp")
13504         def LoadTexture(self, Path):
13505             """
13506             Load marker texture from the file
13507
13508             Parameters:
13509                 Path a path to the texture file
13510
13511             Returns:
13512                 unique texture identifier
13513             """
13514             # Example: see GEOM_TestAll.py
13515             ID = self.InsertOp.LoadTexture(Path)
13516             RaiseIfFailed("LoadTexture", self.InsertOp)
13517             return ID
13518
13519         ## Get internal name of the object based on its study entry
13520         #  @note This method does not provide an unique identifier of the geometry object.
13521         #  @note This is internal function of GEOM component, though it can be used outside it for
13522         #  appropriate reason (e.g. for identification of geometry object).
13523         #  @param obj geometry object
13524         #  @return unique object identifier
13525         #  @ingroup l1_geomBuilder_auxiliary
13526         def getObjectID(self, obj):
13527             """
13528             Get internal name of the object based on its study entry.
13529             Note: this method does not provide an unique identifier of the geometry object.
13530             It is an internal function of GEOM component, though it can be used outside GEOM for
13531             appropriate reason (e.g. for identification of geometry object).
13532
13533             Parameters:
13534                 obj geometry object
13535
13536             Returns:
13537                 unique object identifier
13538             """
13539             ID = ""
13540             entry = salome.ObjectToID(obj)
13541             if entry is not None:
13542                 lst = entry.split(":")
13543                 if len(lst) > 0:
13544                     ID = lst[-1] # -1 means last item in the list
13545                     return "GEOM_" + ID
13546             return ID
13547
13548
13549
13550         ## Add marker texture. @a Width and @a Height parameters
13551         #  specify width and height of the texture in pixels.
13552         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13553         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13554         #  parameter should be unpacked string, in which '1' symbols represent opaque
13555         #  pixels and '0' represent transparent pixels of the texture bitmap.
13556         #
13557         #  @param Width texture width in pixels
13558         #  @param Height texture height in pixels
13559         #  @param Texture texture data
13560         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13561         #  @return unique texture identifier
13562         #  @ingroup l1_geomBuilder_auxiliary
13563         @ManageTransactions("InsertOp")
13564         def AddTexture(self, Width, Height, Texture, RowData=False):
13565             """
13566             Add marker texture. Width and Height parameters
13567             specify width and height of the texture in pixels.
13568             If RowData is True, Texture parameter should represent texture data
13569             packed into the byte array. If RowData is False (default), Texture
13570             parameter should be unpacked string, in which '1' symbols represent opaque
13571             pixels and '0' represent transparent pixels of the texture bitmap.
13572
13573             Parameters:
13574                 Width texture width in pixels
13575                 Height texture height in pixels
13576                 Texture texture data
13577                 RowData if True, Texture data are packed in the byte stream
13578
13579             Returns:
13580                 return unique texture identifier
13581             """
13582             if not RowData: Texture = PackData(Texture)
13583             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13584             RaiseIfFailed("AddTexture", self.InsertOp)
13585             return ID
13586
13587         ## Transfer not topological data from one GEOM object to another.
13588         #
13589         #  @param theObjectFrom the source object of non-topological data
13590         #  @param theObjectTo the destination object of non-topological data
13591         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13592         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13593         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13594         #         Other values of GEOM.find_shape_method are not supported.
13595         #
13596         #  @return True in case of success; False otherwise.
13597         #
13598         #  @ingroup l1_geomBuilder_auxiliary
13599         #
13600         #  @ref swig_TransferData "Example"
13601         @ManageTransactions("InsertOp")
13602         def TransferData(self, theObjectFrom, theObjectTo,
13603                          theFindMethod=GEOM.FSM_GetInPlace):
13604             """
13605             Transfer not topological data from one GEOM object to another.
13606
13607             Parameters:
13608                 theObjectFrom the source object of non-topological data
13609                 theObjectTo the destination object of non-topological data
13610                 theFindMethod method to search sub-shapes of theObjectFrom
13611                               in shape theObjectTo. Possible values are:
13612                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13613                               and GEOM.FSM_GetInPlace_Old. Other values of
13614                               GEOM.find_shape_method are not supported.
13615
13616             Returns:
13617                 True in case of success; False otherwise.
13618
13619             # Example: see GEOM_TestOthers.py
13620             """
13621             # Example: see GEOM_TestAll.py
13622             isOk = self.InsertOp.TransferData(theObjectFrom,
13623                                                theObjectTo, theFindMethod)
13624             RaiseIfFailed("TransferData", self.InsertOp)
13625             return isOk
13626
13627         ## Creates a new folder object. It is a container for any GEOM objects.
13628         #  @param Name name of the container
13629         #  @param Father parent object. If None,
13630         #         folder under 'Geometry' root object will be created.
13631         #  @return a new created folder
13632         #  @ingroup l1_publish_data
13633         def NewFolder(self, Name, Father=None):
13634             """
13635             Create a new folder object. It is an auxiliary container for any GEOM objects.
13636
13637             Parameters:
13638                 Name name of the container
13639                 Father parent object. If None,
13640                 folder under 'Geometry' root object will be created.
13641
13642             Returns:
13643                 a new created folder
13644             """
13645             if not Father: Father = self.father
13646             return self.CreateFolder(Name, Father)
13647
13648         ## Move object to the specified folder
13649         #  @param Object object to move
13650         #  @param Folder target folder
13651         #  @ingroup l1_publish_data
13652         def PutToFolder(self, Object, Folder):
13653             """
13654             Move object to the specified folder
13655
13656             Parameters:
13657                 Object object to move
13658                 Folder target folder
13659             """
13660             self.MoveToFolder(Object, Folder)
13661             pass
13662
13663         ## Move list of objects to the specified folder
13664         #  @param ListOfSO list of objects to move
13665         #  @param Folder target folder
13666         #  @ingroup l1_publish_data
13667         def PutListToFolder(self, ListOfSO, Folder):
13668             """
13669             Move list of objects to the specified folder
13670
13671             Parameters:
13672                 ListOfSO list of objects to move
13673                 Folder target folder
13674             """
13675             self.MoveListToFolder(ListOfSO, Folder)
13676             pass
13677
13678         ## @addtogroup l2_field
13679         ## @{
13680
13681         ## Creates a field
13682         #  @param shape the shape the field lies on
13683         #  @param name the field name
13684         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13685         #  @param dimension dimension of the shape the field lies on
13686         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13687         #  @param componentNames names of components
13688         #  @return a created field
13689         @ManageTransactions("FieldOp")
13690         def CreateField(self, shape, name, type, dimension, componentNames):
13691             """
13692             Creates a field
13693
13694             Parameters:
13695                 shape the shape the field lies on
13696                 name  the field name
13697                 type  type of field data
13698                 dimension dimension of the shape the field lies on
13699                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13700                 componentNames names of components
13701
13702             Returns:
13703                 a created field
13704             """
13705             if isinstance( type, int ):
13706                 if type < 0 or type > 3:
13707                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13708                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13709
13710             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13711             RaiseIfFailed("CreateField", self.FieldOp)
13712             global geom
13713             geom._autoPublish( f, "", name)
13714             return f
13715
13716         ## Removes a field from the GEOM component
13717         #  @param field the field to remove
13718         def RemoveField(self, field):
13719             "Removes a field from the GEOM component"
13720             global geom
13721             if isinstance( field, GEOM._objref_GEOM_Field ):
13722                 geom.RemoveObject( field )
13723             elif isinstance( field, geomField ):
13724                 geom.RemoveObject( field.field )
13725             else:
13726                 raise RuntimeError, "RemoveField() : the object is not a field"
13727             return
13728
13729         ## Returns number of fields on a shape
13730         @ManageTransactions("FieldOp")
13731         def CountFields(self, shape):
13732             "Returns number of fields on a shape"
13733             nb = self.FieldOp.CountFields( shape )
13734             RaiseIfFailed("CountFields", self.FieldOp)
13735             return nb
13736
13737         ## Returns all fields on a shape
13738         @ManageTransactions("FieldOp")
13739         def GetFields(self, shape):
13740             "Returns all fields on a shape"
13741             ff = self.FieldOp.GetFields( shape )
13742             RaiseIfFailed("GetFields", self.FieldOp)
13743             return ff
13744
13745         ## Returns a field on a shape by its name
13746         @ManageTransactions("FieldOp")
13747         def GetField(self, shape, name):
13748             "Returns a field on a shape by its name"
13749             f = self.FieldOp.GetField( shape, name )
13750             RaiseIfFailed("GetField", self.FieldOp)
13751             return f
13752
13753         # end of l2_field
13754         ## @}
13755
13756
13757 import omniORB
13758 # Register the new proxy for GEOM_Gen
13759 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13760
13761
13762 ## Field on Geometry
13763 #  @ingroup l2_field
13764 class geomField( GEOM._objref_GEOM_Field ):
13765
13766     def __init__(self):
13767         GEOM._objref_GEOM_Field.__init__(self)
13768         self.field = GEOM._objref_GEOM_Field
13769         return
13770
13771     ## Returns the shape the field lies on
13772     def getShape(self):
13773         "Returns the shape the field lies on"
13774         return self.field.GetShape(self)
13775
13776     ## Returns the field name
13777     def getName(self):
13778         "Returns the field name"
13779         return self.field.GetName(self)
13780
13781     ## Returns type of field data as integer [0-3]
13782     def getType(self):
13783         "Returns type of field data"
13784         return self.field.GetDataType(self)._v
13785
13786     ## Returns type of field data:
13787     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13788     def getTypeEnum(self):
13789         "Returns type of field data"
13790         return self.field.GetDataType(self)
13791
13792     ## Returns dimension of the shape the field lies on:
13793     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13794     def getDimension(self):
13795         """Returns dimension of the shape the field lies on:
13796         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13797         return self.field.GetDimension(self)
13798
13799     ## Returns names of components
13800     def getComponents(self):
13801         "Returns names of components"
13802         return self.field.GetComponents(self)
13803
13804     ## Adds a time step to the field
13805     #  @param step the time step number further used as the step identifier
13806     #  @param stamp the time step time
13807     #  @param values the values of the time step
13808     def addStep(self, step, stamp, values):
13809         "Adds a time step to the field"
13810         stp = self.field.AddStep( self, step, stamp )
13811         if not stp:
13812             raise RuntimeError, \
13813                   "Field.addStep() : Error: step %s already exists in this field"%step
13814         global geom
13815         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13816         self.setValues( step, values )
13817         return stp
13818
13819     ## Remove a time step from the field
13820     def removeStep(self,step):
13821         "Remove a time step from the field"
13822         stepSO = None
13823         try:
13824             stepObj = self.field.GetStep( self, step )
13825             if stepObj:
13826                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13827         except:
13828             #import traceback
13829             #traceback.print_exc()
13830             pass
13831         self.field.RemoveStep( self, step )
13832         if stepSO:
13833             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13834         return
13835
13836     ## Returns number of time steps in the field
13837     def countSteps(self):
13838         "Returns number of time steps in the field"
13839         return self.field.CountSteps(self)
13840
13841     ## Returns a list of time step IDs in the field
13842     def getSteps(self):
13843         "Returns a list of time step IDs in the field"
13844         return self.field.GetSteps(self)
13845
13846     ## Returns a time step by its ID
13847     def getStep(self,step):
13848         "Returns a time step by its ID"
13849         stp = self.field.GetStep(self, step)
13850         if not stp:
13851             raise RuntimeError, "Step %s is missing from this field"%step
13852         return stp
13853
13854     ## Returns the time of the field step
13855     def getStamp(self,step):
13856         "Returns the time of the field step"
13857         return self.getStep(step).GetStamp()
13858
13859     ## Changes the time of the field step
13860     def setStamp(self, step, stamp):
13861         "Changes the time of the field step"
13862         return self.getStep(step).SetStamp(stamp)
13863
13864     ## Returns values of the field step
13865     def getValues(self, step):
13866         "Returns values of the field step"
13867         return self.getStep(step).GetValues()
13868
13869     ## Changes values of the field step
13870     def setValues(self, step, values):
13871         "Changes values of the field step"
13872         stp = self.getStep(step)
13873         errBeg = "Field.setValues(values) : Error: "
13874         try:
13875             ok = stp.SetValues( values )
13876         except Exception, e:
13877             excStr = str(e)
13878             if excStr.find("WrongPythonType") > 0:
13879                 raise RuntimeError, errBeg +\
13880                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13881             raise RuntimeError, errBeg + str(e)
13882         if not ok:
13883             nbOK = self.field.GetArraySize(self)
13884             nbKO = len(values)
13885             if nbOK != nbKO:
13886                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13887             else:
13888                 raise RuntimeError, errBeg + "failed"
13889         return
13890
13891     pass # end of class geomField
13892
13893 # Register the new proxy for GEOM_Field
13894 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13895
13896
13897 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13898 #  interface to GEOM operations.
13899 #
13900 #  Typical use is:
13901 #  \code
13902 #    import salome
13903 #    salome.salome_init()
13904 #    from salome.geom import geomBuilder
13905 #    geompy = geomBuilder.New()
13906 #  \endcode
13907 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13908 #  @return geomBuilder instance
13909 def New( instance=None):
13910     """
13911     Create a new geomBuilder instance.The geomBuilder class provides the Python
13912     interface to GEOM operations.
13913
13914     Typical use is:
13915         import salome
13916         salome.salome_init()
13917         from salome.geom import geomBuilder
13918         geompy = geomBuilder.New()
13919
13920     Parameters:
13921         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13922     Returns:
13923         geomBuilder instance
13924     """
13925     #print "New geomBuilder ", study, instance
13926     global engine
13927     global geom
13928     global doLcc
13929     engine = instance
13930     if engine is None:
13931       doLcc = True
13932     geom = geomBuilder()
13933     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13934     geom.init_geom()
13935     return geom
13936
13937
13938 # Register methods from the plug-ins in the geomBuilder class 
13939 plugins_var = os.environ.get( "GEOM_PluginsList" )
13940
13941 plugins = None
13942 if plugins_var is not None:
13943     plugins = plugins_var.split( ":" )
13944     plugins=filter(lambda x: len(x)>0, plugins)
13945 if plugins is not None:
13946     for pluginName in plugins:
13947         pluginBuilderName = pluginName + "Builder"
13948         try:
13949             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13950         except Exception, e:
13951             from salome_utils import verbose
13952             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13953             continue
13954         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13955         plugin = eval( pluginBuilderName )
13956         
13957         # add methods from plugin module to the geomBuilder class
13958         for k in dir( plugin ):
13959             if k[0] == '_': continue
13960             method = getattr( plugin, k )
13961             if type( method ).__name__ == 'function':
13962                 if not hasattr( geomBuilder, k ):
13963                     setattr( geomBuilder, k, method )
13964                 pass
13965             pass
13966         del pluginName
13967         pass
13968     pass