Salome HOME
0023272: [CEA] Add a tolerance for basic properties computation
[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(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, theName="nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, theName=("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if 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(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Pack an argument into a list
521 def ToList( arg ):
522     if isinstance( arg, list ):
523         return arg
524     if hasattr( arg, "__getitem__" ):
525         return list( arg )
526     return [ arg ]
527
528 ## Information about closed/unclosed state of shell or wire
529 #  @ingroup l1_geomBuilder_auxiliary
530 class info:
531     """
532     Information about closed/unclosed state of shell or wire
533     """
534     UNKNOWN  = 0
535     CLOSED   = 1
536     UNCLOSED = 2
537
538 ## Private class used to bind calls of plugin operations to geomBuilder
539 class PluginOperation:
540   def __init__(self, operation, function):
541     self.operation = operation
542     self.function = function
543     pass
544
545   @ManageTransactions("operation")
546   def __call__(self, *args):
547     res = self.function(self.operation, *args)
548     RaiseIfFailed(self.function.__name__, self.operation)
549     return res
550
551 # Warning: geom is a singleton
552 geom = None
553 engine = None
554 doLcc = False
555 created = False
556
557 class geomBuilder(object, GEOM._objref_GEOM_Gen):
558
559         ## Enumeration ShapeType as a dictionary. \n
560         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
561         #  @ingroup l1_geomBuilder_auxiliary
562         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
563
564         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
565         #  and a list of parameters, describing the shape.
566         #  List of parameters, describing the shape:
567         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
568         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
569         #
570         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
571         #
572         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
573         #
574         #  - SPHERE:       [xc yc zc            R]
575         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
576         #  - BOX:          [xc yc zc                      ax ay az]
577         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
578         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
579         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
580         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
581         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
582         #
583         #  - SPHERE2D:     [xc yc zc            R]
584         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
585         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
586         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
587         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
588         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
589         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
590         #  - PLANE:        [xo yo zo  dx dy dz]
591         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
592         #  - FACE:                                       [nb_edges  nb_vertices]
593         #
594         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
595         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
596         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
597         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
598         #  - LINE:         [xo yo zo  dx dy dz]
599         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
600         #  - EDGE:                                                 [nb_vertices]
601         #
602         #  - VERTEX:       [x  y  z]
603         #
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.myStudyId = 0
656               self.father    = None
657
658               self.BasicOp  = None
659               self.CurvesOp = None
660               self.PrimOp   = None
661               self.ShapesOp = None
662               self.HealOp   = None
663               self.InsertOp = None
664               self.BoolOp   = None
665               self.TrsfOp   = None
666               self.LocalOp  = None
667               self.MeasuOp  = None
668               self.BlocksOp = None
669               self.GroupOp  = None
670               self.FieldOp  = None
671             pass
672
673         ## Process object publication in the study, as follows:
674         #  - if @a theName is specified (not None), the object is published in the study
675         #    with this name, not taking into account "auto-publishing" option;
676         #  - if @a theName is NOT specified, the object is published in the study
677         #    (using default name, which can be customized using @a theDefaultName parameter)
678         #    only if auto-publishing is switched on.
679         #
680         #  @param theObj  object, a subject for publishing
681         #  @param theName object name for study
682         #  @param theDefaultName default name for the auto-publishing
683         #
684         #  @sa addToStudyAuto()
685         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
686             # ---
687             def _item_name(_names, _defname, _idx=-1):
688                 if not _names: _names = _defname
689                 if type(_names) in [types.ListType, types.TupleType]:
690                     if _idx >= 0:
691                         if _idx >= len(_names) or not _names[_idx]:
692                             if type(_defname) not in [types.ListType, types.TupleType]:
693                                 _name = "%s_%d"%(_defname, _idx+1)
694                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
695                                 _name = _defname[_idx]
696                             else:
697                                 _name = "%noname_%d"%(dn, _idx+1)
698                             pass
699                         else:
700                             _name = _names[_idx]
701                         pass
702                     else:
703                         # must be wrong  usage
704                         _name = _names[0]
705                     pass
706                 else:
707                     if _idx >= 0:
708                         _name = "%s_%d"%(_names, _idx+1)
709                     else:
710                         _name = _names
711                     pass
712                 return _name
713             # ---
714             def _publish( _name, _obj ):
715                 fatherObj = None
716                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
717                     fatherObj = _obj.GetShape()
718                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
719                     fatherObj = _obj.GetField()
720                 elif not _obj.IsMainShape():
721                     fatherObj = _obj.GetMainShape()
722                     pass
723                 if fatherObj and fatherObj.GetStudyEntry():
724                     self.addToStudyInFather(fatherObj, _obj, _name)
725                 else:
726                     self.addToStudy(_obj, _name)
727                     pass
728                 return
729             # ---
730             if not theObj:
731                 return # null object
732             if not theName and not self.myMaxNbSubShapesAllowed:
733                 return # nothing to do: auto-publishing is disabled
734             if not theName and not theDefaultName:
735                 return # neither theName nor theDefaultName is given
736             import types
737             if type(theObj) in [types.ListType, types.TupleType]:
738                 # list of objects is being published
739                 idx = 0
740                 for obj in theObj:
741                     if not obj: continue # bad object
742                     name = _item_name(theName, theDefaultName, idx)
743                     _publish( name, obj )
744                     idx = idx+1
745                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
746                     pass
747                 pass
748             else:
749                 # single object is published
750                 name = _item_name(theName, theDefaultName)
751                 _publish( name, theObj )
752             pass
753
754         ## @addtogroup l1_geomBuilder_auxiliary
755         ## @{
756         def init_geom(self,theStudy):
757             self.myStudy = theStudy
758             self.myStudyId = self.myStudy._get_StudyId()
759             self.myBuilder = self.myStudy.NewBuilder()
760             self.father = self.myStudy.FindComponent("GEOM")
761             notebook.myStudy = theStudy
762             if self.father is None:
763                 self.father = self.myBuilder.NewComponent("GEOM")
764                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
765                 FName = A1._narrow(SALOMEDS.AttributeName)
766                 FName.SetValue("Geometry")
767                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
768                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
769                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
770                 self.myBuilder.DefineComponentInstance(self.father,self)
771                 pass
772             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
773             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
774             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
775             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
776             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
777             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
778             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
779             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
780             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
781             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
782             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
783             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
784             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
785
786             # set GEOM as root in the use case tree
787             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
788             self.myUseCaseBuilder.SetRootCurrent()
789             self.myUseCaseBuilder.Append(self.father)
790
791             # load data from the study file, if necessary
792             self.myBuilder.LoadWith(self.father, self)
793             pass
794
795         def GetPluginOperations(self, studyID, libraryName):
796             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
797             return op
798
799         ## Enable / disable results auto-publishing
800         #
801         #  The automatic publishing is managed in the following way:
802         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
803         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
804         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
805         #  value passed as parameter has the same effect.
806         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
807         #  maximum number of sub-shapes allowed for publishing is set to specified value.
808         #
809         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
810         #  @ingroup l1_publish_data
811         def addToStudyAuto(self, maxNbSubShapes=-1):
812             """
813             Enable / disable results auto-publishing
814
815             The automatic publishing is managed in the following way:
816             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
817             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
818             maximum number of sub-shapes allowed for publishing is unlimited; any negative
819             value passed as parameter has the same effect.
820             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
821             maximum number of sub-shapes allowed for publishing is set to this value.
822
823             Parameters:
824                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
825
826             Example of usage:
827                 geompy.addToStudyAuto()   # enable auto-publishing
828                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
829                 geompy.addToStudyAuto(0)  # disable auto-publishing
830             """
831             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
832             pass
833
834         ## Dump component to the Python script
835         #  This method overrides IDL function to allow default values for the parameters.
836         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
837             """
838             Dump component to the Python script
839             This method overrides IDL function to allow default values for the parameters.
840             """
841             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
842
843         ## Get name for sub-shape aSubObj of shape aMainObj
844         #
845         # @ref swig_SubShapeName "Example"
846         @ManageTransactions("ShapesOp")
847         def SubShapeName(self,aSubObj, aMainObj):
848             """
849             Get name for sub-shape aSubObj of shape aMainObj
850             """
851             # Example: see GEOM_TestAll.py
852
853             #aSubId  = orb.object_to_string(aSubObj)
854             #aMainId = orb.object_to_string(aMainObj)
855             #index = gg.getIndexTopology(aSubId, aMainId)
856             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
857             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
858             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
859             return name
860
861         ## Publish in study aShape with name aName
862         #
863         #  \param aShape the shape to be published
864         #  \param aName  the name for the shape
865         #  \param doRestoreSubShapes if True, finds and publishes also
866         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
867         #         and published sub-shapes of arguments
868         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
869         #                                                  these arguments description
870         #  \return study entry of the published shape in form of string
871         #
872         #  @ingroup l1_publish_data
873         #  @ref swig_all_addtostudy "Example"
874         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
875                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
876             """
877             Publish in study aShape with name aName
878
879             Parameters:
880                 aShape the shape to be published
881                 aName  the name for the shape
882                 doRestoreSubShapes if True, finds and publishes also
883                                    sub-shapes of aShape, corresponding to its arguments
884                                    and published sub-shapes of arguments
885                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
886                                                          these arguments description
887
888             Returns:
889                 study entry of the published shape in form of string
890
891             Example of usage:
892                 id_block1 = geompy.addToStudy(Block1, "Block 1")
893             """
894             # Example: see GEOM_TestAll.py
895             try:
896                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
897                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
898                 if doRestoreSubShapes:
899                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
900                                             theFindMethod, theInheritFirstArg, True )
901             except:
902                 print "addToStudy() failed"
903                 return ""
904             return aShape.GetStudyEntry()
905
906         ## Publish in study aShape with name aName as sub-object of previously published aFather
907         #  \param aFather previously published object
908         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
909         #  \param aName  the name for the shape
910         #
911         #  \return study entry of the published shape in form of string
912         #
913         #  @ingroup l1_publish_data
914         #  @ref swig_all_addtostudyInFather "Example"
915         def addToStudyInFather(self, aFather, aShape, aName):
916             """
917             Publish in study aShape with name aName as sub-object of previously published aFather
918
919             Parameters:
920                 aFather previously published object
921                 aShape the shape to be published as sub-object of aFather
922                 aName  the name for the shape
923
924             Returns:
925                 study entry of the published shape in form of string
926             """
927             # Example: see GEOM_TestAll.py
928             try:
929                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
930                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
931             except:
932                 print "addToStudyInFather() failed"
933                 return ""
934             return aShape.GetStudyEntry()
935
936         ## Unpublish object in study
937         #
938         #  \param obj the object to be unpublished
939         def hideInStudy(self, obj):
940             """
941             Unpublish object in study
942
943             Parameters:
944                 obj the object to be unpublished
945             """
946             ior = salome.orb.object_to_string(obj)
947             aSObject = self.myStudy.FindObjectIOR(ior)
948             if aSObject is not None:
949                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
950                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
951                 drwAttribute.SetDrawable(False)
952                 # hide references if any
953                 vso = self.myStudy.FindDependances(aSObject);
954                 for refObj in vso :
955                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
956                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
957                     drwAttribute.SetDrawable(False)
958                     pass
959                 pass
960
961         # end of l1_geomBuilder_auxiliary
962         ## @}
963
964         ## @addtogroup l3_restore_ss
965         ## @{
966
967         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
968         #  To be used from python scripts out of addToStudy() (non-default usage)
969         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
970         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
971         #                   If this list is empty, all operation arguments will be published
972         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
973         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
974         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
975         #                            Do not publish sub-shapes in place of arguments, but only
976         #                            in place of sub-shapes of the first argument,
977         #                            because the whole shape corresponds to the first argument.
978         #                            Mainly to be used after transformations, but it also can be
979         #                            usefull after partition with one object shape, and some other
980         #                            operations, where only the first argument has to be considered.
981         #                            If theObject has only one argument shape, this flag is automatically
982         #                            considered as True, not regarding really passed value.
983         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
984         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
985         #  \return list of published sub-shapes
986         #
987         #  @ref tui_restore_prs_params "Example"
988         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
989                               theInheritFirstArg=False, theAddPrefix=True):
990             """
991             Publish sub-shapes, standing for arguments and sub-shapes of arguments
992             To be used from python scripts out of geompy.addToStudy (non-default usage)
993
994             Parameters:
995                 theObject published GEOM.GEOM_Object, arguments of which will be published
996                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
997                           If this list is empty, all operation arguments will be published
998                 theFindMethod method to search sub-shapes, corresponding to arguments and
999                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1000                 theInheritFirstArg set properties of the first argument for theObject.
1001                                    Do not publish sub-shapes in place of arguments, but only
1002                                    in place of sub-shapes of the first argument,
1003                                    because the whole shape corresponds to the first argument.
1004                                    Mainly to be used after transformations, but it also can be
1005                                    usefull after partition with one object shape, and some other
1006                                    operations, where only the first argument has to be considered.
1007                                    If theObject has only one argument shape, this flag is automatically
1008                                    considered as True, not regarding really passed value.
1009                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1010                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1011             Returns:
1012                 list of published sub-shapes
1013             """
1014             # Example: see GEOM_TestAll.py
1015             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1016                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1017
1018         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1019         #  To be used from python scripts out of addToStudy() (non-default usage)
1020         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1021         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1022         #                   If this list is empty, all operation arguments will be published
1023         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1024         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1025         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1026         #                            Do not publish sub-shapes in place of arguments, but only
1027         #                            in place of sub-shapes of the first argument,
1028         #                            because the whole shape corresponds to the first argument.
1029         #                            Mainly to be used after transformations, but it also can be
1030         #                            usefull after partition with one object shape, and some other
1031         #                            operations, where only the first argument has to be considered.
1032         #                            If theObject has only one argument shape, this flag is automatically
1033         #                            considered as True, not regarding really passed value.
1034         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1035         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1036         #  \return list of published sub-shapes
1037         #
1038         #  @ref tui_restore_prs_params "Example"
1039         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1040                                    theInheritFirstArg=False, theAddPrefix=True):
1041             """
1042             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1043             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1044
1045             Parameters:
1046                 theObject published GEOM.GEOM_Object, arguments of which will be published
1047                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1048                           If this list is empty, all operation arguments will be published
1049                 theFindMethod method to search sub-shapes, corresponding to arguments and
1050                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1051                 theInheritFirstArg set properties of the first argument for theObject.
1052                                    Do not publish sub-shapes in place of arguments, but only
1053                                    in place of sub-shapes of the first argument,
1054                                    because the whole shape corresponds to the first argument.
1055                                    Mainly to be used after transformations, but it also can be
1056                                    usefull after partition with one object shape, and some other
1057                                    operations, where only the first argument has to be considered.
1058                                    If theObject has only one argument shape, this flag is automatically
1059                                    considered as True, not regarding really passed value.
1060                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1061                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1062
1063             Returns:
1064                 list of published sub-shapes
1065             """
1066             # Example: see GEOM_TestAll.py
1067             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1068                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1069
1070         # end of l3_restore_ss
1071         ## @}
1072
1073         ## @addtogroup l3_basic_go
1074         ## @{
1075
1076         ## Create point by three coordinates.
1077         #  @param theX The X coordinate of the point.
1078         #  @param theY The Y coordinate of the point.
1079         #  @param theZ The Z coordinate of the point.
1080         #  @param theName Object name; when specified, this parameter is used
1081         #         for result publication in the study. Otherwise, if automatic
1082         #         publication is switched on, default value is used for result name.
1083         #
1084         #  @return New GEOM.GEOM_Object, containing the created point.
1085         #
1086         #  @ref tui_creation_point "Example"
1087         @ManageTransactions("BasicOp")
1088         def MakeVertex(self, theX, theY, theZ, theName=None):
1089             """
1090             Create point by three coordinates.
1091
1092             Parameters:
1093                 theX The X coordinate of the point.
1094                 theY The Y coordinate of the point.
1095                 theZ The Z coordinate of the point.
1096                 theName Object name; when specified, this parameter is used
1097                         for result publication in the study. Otherwise, if automatic
1098                         publication is switched on, default value is used for result name.
1099
1100             Returns:
1101                 New GEOM.GEOM_Object, containing the created point.
1102             """
1103             # Example: see GEOM_TestAll.py
1104             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1105             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1106             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1107             anObj.SetParameters(Parameters)
1108             self._autoPublish(anObj, theName, "vertex")
1109             return anObj
1110
1111         ## Create a point, distant from the referenced point
1112         #  on the given distances along the coordinate axes.
1113         #  @param theReference The referenced point.
1114         #  @param theX Displacement from the referenced point along OX axis.
1115         #  @param theY Displacement from the referenced point along OY axis.
1116         #  @param theZ Displacement from the referenced point along OZ axis.
1117         #  @param theName Object name; when specified, this parameter is used
1118         #         for result publication in the study. Otherwise, if automatic
1119         #         publication is switched on, default value is used for result name.
1120         #
1121         #  @return New GEOM.GEOM_Object, containing the created point.
1122         #
1123         #  @ref tui_creation_point "Example"
1124         @ManageTransactions("BasicOp")
1125         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1126             """
1127             Create a point, distant from the referenced point
1128             on the given distances along the coordinate axes.
1129
1130             Parameters:
1131                 theReference The referenced point.
1132                 theX Displacement from the referenced point along OX axis.
1133                 theY Displacement from the referenced point along OY axis.
1134                 theZ Displacement from the referenced point along OZ axis.
1135                 theName Object name; when specified, this parameter is used
1136                         for result publication in the study. Otherwise, if automatic
1137                         publication is switched on, default value is used for result name.
1138
1139             Returns:
1140                 New GEOM.GEOM_Object, containing the created point.
1141             """
1142             # Example: see GEOM_TestAll.py
1143             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1144             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1145             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1146             anObj.SetParameters(Parameters)
1147             self._autoPublish(anObj, theName, "vertex")
1148             return anObj
1149
1150         ## Create a point, corresponding to the given parameter on the given curve.
1151         #  @param theRefCurve The referenced curve.
1152         #  @param theParameter Value of parameter on the referenced curve.
1153         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1154         #         to take the curve's orientation into account for the
1155         #         operation. I.e. if this flag is set, the results for the same
1156         #         parameters (except the value 0.5) is different for forward
1157         #         and reversed curves. If it is not set the result is the same.
1158         #  @param theName Object name; when specified, this parameter is used
1159         #         for result publication in the study. Otherwise, if automatic
1160         #         publication is switched on, default value is used for result name.
1161         #
1162         #  @return New GEOM.GEOM_Object, containing the created point.
1163         #
1164         #  @ref tui_creation_point "Example"
1165         @ManageTransactions("BasicOp")
1166         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1167                               takeOrientationIntoAccount=False, theName=None):
1168             """
1169             Create a point, corresponding to the given parameter on the given curve.
1170
1171             Parameters:
1172                 theRefCurve The referenced curve.
1173                 theParameter Value of parameter on the referenced curve.
1174                 takeOrientationIntoAccount flag that tells if it is necessary
1175                         to take the curve's orientation into account for the
1176                         operation. I.e. if this flag is set, the results for
1177                         the same parameters (except the value 0.5) is different
1178                         for forward and reversed curves. If it is not set
1179                         the result is the same.
1180                 theName Object name; when specified, this parameter is used
1181                         for result publication in the study. Otherwise, if automatic
1182                         publication is switched on, default value is used for result name.
1183
1184             Returns:
1185                 New GEOM.GEOM_Object, containing the created point.
1186
1187             Example of usage:
1188                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1189             """
1190             # Example: see GEOM_TestAll.py
1191             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1192                 theParameter, takeOrientationIntoAccount)
1193             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1194                                                   takeOrientationIntoAccount)
1195             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1196             anObj.SetParameters(Parameters)
1197             self._autoPublish(anObj, theName, "vertex")
1198             return anObj
1199
1200         ## Create a point by projection give coordinates on the given curve
1201         #  @param theRefCurve The referenced curve.
1202         #  @param theX X-coordinate in 3D space
1203         #  @param theY Y-coordinate in 3D space
1204         #  @param theZ Z-coordinate in 3D space
1205         #  @param theName Object name; when specified, this parameter is used
1206         #         for result publication in the study. Otherwise, if automatic
1207         #         publication is switched on, default value is used for result name.
1208         #
1209         #  @return New GEOM.GEOM_Object, containing the created point.
1210         #
1211         #  @ref tui_creation_point "Example"
1212         @ManageTransactions("BasicOp")
1213         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1214             """
1215             Create a point by projection give coordinates on the given curve
1216
1217             Parameters:
1218                 theRefCurve The referenced curve.
1219                 theX X-coordinate in 3D space
1220                 theY Y-coordinate in 3D space
1221                 theZ Z-coordinate in 3D space
1222                 theName Object name; when specified, this parameter is used
1223                         for result publication in the study. Otherwise, if automatic
1224                         publication is switched on, default value is used for result name.
1225
1226             Returns:
1227                 New GEOM.GEOM_Object, containing the created point.
1228
1229             Example of usage:
1230                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1231             """
1232             # Example: see GEOM_TestAll.py
1233             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1234             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1235             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1236             anObj.SetParameters(Parameters)
1237             self._autoPublish(anObj, theName, "vertex")
1238             return anObj
1239
1240         ## Create a point, corresponding to the given length on the given curve.
1241         #  @param theRefCurve The referenced curve.
1242         #  @param theLength Length on the referenced curve. It can be negative.
1243         #  @param theStartPoint Point allowing to choose the direction for the calculation
1244         #                       of the length. If None, start from the first point of theRefCurve.
1245         #  @param theName Object name; when specified, this parameter is used
1246         #         for result publication in the study. Otherwise, if automatic
1247         #         publication is switched on, default value is used for result name.
1248         #
1249         #  @return New GEOM.GEOM_Object, containing the created point.
1250         #
1251         #  @ref tui_creation_point "Example"
1252         @ManageTransactions("BasicOp")
1253         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1254             """
1255             Create a point, corresponding to the given length on the given curve.
1256
1257             Parameters:
1258                 theRefCurve The referenced curve.
1259                 theLength Length on the referenced curve. It can be negative.
1260                 theStartPoint Point allowing to choose the direction for the calculation
1261                               of the length. If None, start from the first point of theRefCurve.
1262                 theName Object name; when specified, this parameter is used
1263                         for result publication in the study. Otherwise, if automatic
1264                         publication is switched on, default value is used for result name.
1265
1266             Returns:
1267                 New GEOM.GEOM_Object, containing the created point.
1268             """
1269             # Example: see GEOM_TestAll.py
1270             theLength, Parameters = ParseParameters(theLength)
1271             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1272             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1273             anObj.SetParameters(Parameters)
1274             self._autoPublish(anObj, theName, "vertex")
1275             return anObj
1276
1277         ## Create a point, corresponding to the given parameters on the
1278         #    given surface.
1279         #  @param theRefSurf The referenced surface.
1280         #  @param theUParameter Value of U-parameter on the referenced surface.
1281         #  @param theVParameter Value of V-parameter on the referenced surface.
1282         #  @param theName Object name; when specified, this parameter is used
1283         #         for result publication in the study. Otherwise, if automatic
1284         #         publication is switched on, default value is used for result name.
1285         #
1286         #  @return New GEOM.GEOM_Object, containing the created point.
1287         #
1288         #  @ref swig_MakeVertexOnSurface "Example"
1289         @ManageTransactions("BasicOp")
1290         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1291             """
1292             Create a point, corresponding to the given parameters on the
1293             given surface.
1294
1295             Parameters:
1296                 theRefSurf The referenced surface.
1297                 theUParameter Value of U-parameter on the referenced surface.
1298                 theVParameter Value of V-parameter on the referenced surface.
1299                 theName Object name; when specified, this parameter is used
1300                         for result publication in the study. Otherwise, if automatic
1301                         publication is switched on, default value is used for result name.
1302
1303             Returns:
1304                 New GEOM.GEOM_Object, containing the created point.
1305
1306             Example of usage:
1307                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1308             """
1309             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1310             # Example: see GEOM_TestAll.py
1311             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1312             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1313             anObj.SetParameters(Parameters);
1314             self._autoPublish(anObj, theName, "vertex")
1315             return anObj
1316
1317         ## Create a point by projection give coordinates on the given surface
1318         #  @param theRefSurf The referenced surface.
1319         #  @param theX X-coordinate in 3D space
1320         #  @param theY Y-coordinate in 3D space
1321         #  @param theZ Z-coordinate in 3D space
1322         #  @param theName Object name; when specified, this parameter is used
1323         #         for result publication in the study. Otherwise, if automatic
1324         #         publication is switched on, default value is used for result name.
1325         #
1326         #  @return New GEOM.GEOM_Object, containing the created point.
1327         #
1328         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1329         @ManageTransactions("BasicOp")
1330         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1331             """
1332             Create a point by projection give coordinates on the given surface
1333
1334             Parameters:
1335                 theRefSurf The referenced surface.
1336                 theX X-coordinate in 3D space
1337                 theY Y-coordinate in 3D space
1338                 theZ Z-coordinate in 3D space
1339                 theName Object name; when specified, this parameter is used
1340                         for result publication in the study. Otherwise, if automatic
1341                         publication is switched on, default value is used for result name.
1342
1343             Returns:
1344                 New GEOM.GEOM_Object, containing the created point.
1345
1346             Example of usage:
1347                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1348             """
1349             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1350             # Example: see GEOM_TestAll.py
1351             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1352             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1353             anObj.SetParameters(Parameters);
1354             self._autoPublish(anObj, theName, "vertex")
1355             return anObj
1356
1357         ## Create a point, which lays on the given face.
1358         #  The point will lay in arbitrary place of the face.
1359         #  The only condition on it is a non-zero distance to the face boundary.
1360         #  Such point can be used to uniquely identify the face inside any
1361         #  shape in case, when the shape does not contain overlapped faces.
1362         #  @param theFace The referenced face.
1363         #  @param theName Object name; when specified, this parameter is used
1364         #         for result publication in the study. Otherwise, if automatic
1365         #         publication is switched on, default value is used for result name.
1366         #
1367         #  @return New GEOM.GEOM_Object, containing the created point.
1368         #
1369         #  @ref swig_MakeVertexInsideFace "Example"
1370         @ManageTransactions("BasicOp")
1371         def MakeVertexInsideFace (self, theFace, theName=None):
1372             """
1373             Create a point, which lays on the given face.
1374             The point will lay in arbitrary place of the face.
1375             The only condition on it is a non-zero distance to the face boundary.
1376             Such point can be used to uniquely identify the face inside any
1377             shape in case, when the shape does not contain overlapped faces.
1378
1379             Parameters:
1380                 theFace The referenced face.
1381                 theName Object name; when specified, this parameter is used
1382                         for result publication in the study. Otherwise, if automatic
1383                         publication is switched on, default value is used for result name.
1384
1385             Returns:
1386                 New GEOM.GEOM_Object, containing the created point.
1387
1388             Example of usage:
1389                 p_on_face = geompy.MakeVertexInsideFace(Face)
1390             """
1391             # Example: see GEOM_TestAll.py
1392             anObj = self.BasicOp.MakePointOnFace(theFace)
1393             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1394             self._autoPublish(anObj, theName, "vertex")
1395             return anObj
1396
1397         ## Create a point on intersection of two lines.
1398         #  @param theRefLine1, theRefLine2 The referenced lines.
1399         #  @param theName Object name; when specified, this parameter is used
1400         #         for result publication in the study. Otherwise, if automatic
1401         #         publication is switched on, default value is used for result name.
1402         #
1403         #  @return New GEOM.GEOM_Object, containing the created point.
1404         #
1405         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1406         @ManageTransactions("BasicOp")
1407         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1408             """
1409             Create a point on intersection of two lines.
1410
1411             Parameters:
1412                 theRefLine1, theRefLine2 The referenced lines.
1413                 theName Object name; when specified, this parameter is used
1414                         for result publication in the study. Otherwise, if automatic
1415                         publication is switched on, default value is used for result name.
1416
1417             Returns:
1418                 New GEOM.GEOM_Object, containing the created point.
1419             """
1420             # Example: see GEOM_TestAll.py
1421             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1422             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1423             self._autoPublish(anObj, theName, "vertex")
1424             return anObj
1425
1426         ## Create a tangent, corresponding to the given parameter on the given curve.
1427         #  @param theRefCurve The referenced curve.
1428         #  @param theParameter Value of parameter on the referenced curve.
1429         #  @param theName Object name; when specified, this parameter is used
1430         #         for result publication in the study. Otherwise, if automatic
1431         #         publication is switched on, default value is used for result name.
1432         #
1433         #  @return New GEOM.GEOM_Object, containing the created tangent.
1434         #
1435         #  @ref swig_MakeTangentOnCurve "Example"
1436         @ManageTransactions("BasicOp")
1437         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1438             """
1439             Create a tangent, corresponding to the given parameter on the given curve.
1440
1441             Parameters:
1442                 theRefCurve The referenced curve.
1443                 theParameter Value of parameter on the referenced curve.
1444                 theName Object name; when specified, this parameter is used
1445                         for result publication in the study. Otherwise, if automatic
1446                         publication is switched on, default value is used for result name.
1447
1448             Returns:
1449                 New GEOM.GEOM_Object, containing the created tangent.
1450
1451             Example of usage:
1452                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1453             """
1454             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1455             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1456             self._autoPublish(anObj, theName, "tangent")
1457             return anObj
1458
1459         ## Create a tangent plane, corresponding to the given parameter on the given face.
1460         #  @param theFace The face for which tangent plane should be built.
1461         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1462         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1463         #  @param theTrimSize the size of plane.
1464         #  @param theName Object name; when specified, this parameter is used
1465         #         for result publication in the study. Otherwise, if automatic
1466         #         publication is switched on, default value is used for result name.
1467         #
1468         #  @return New GEOM.GEOM_Object, containing the created tangent.
1469         #
1470         #  @ref swig_MakeTangentPlaneOnFace "Example"
1471         @ManageTransactions("BasicOp")
1472         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1473             """
1474             Create a tangent plane, corresponding to the given parameter on the given face.
1475
1476             Parameters:
1477                 theFace The face for which tangent plane should be built.
1478                 theParameterV vertical value of the center point (0.0 - 1.0).
1479                 theParameterU horisontal value of the center point (0.0 - 1.0).
1480                 theTrimSize the size of plane.
1481                 theName Object name; when specified, this parameter is used
1482                         for result publication in the study. Otherwise, if automatic
1483                         publication is switched on, default value is used for result name.
1484
1485            Returns:
1486                 New GEOM.GEOM_Object, containing the created tangent.
1487
1488            Example of usage:
1489                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1490             """
1491             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1492             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1493             self._autoPublish(anObj, theName, "tangent")
1494             return anObj
1495
1496         ## Create a vector with the given components.
1497         #  @param theDX X component of the vector.
1498         #  @param theDY Y component of the vector.
1499         #  @param theDZ Z component of the vector.
1500         #  @param theName Object name; when specified, this parameter is used
1501         #         for result publication in the study. Otherwise, if automatic
1502         #         publication is switched on, default value is used for result name.
1503         #
1504         #  @return New GEOM.GEOM_Object, containing the created vector.
1505         #
1506         #  @ref tui_creation_vector "Example"
1507         @ManageTransactions("BasicOp")
1508         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1509             """
1510             Create a vector with the given components.
1511
1512             Parameters:
1513                 theDX X component of the vector.
1514                 theDY Y component of the vector.
1515                 theDZ Z component of the vector.
1516                 theName Object name; when specified, this parameter is used
1517                         for result publication in the study. Otherwise, if automatic
1518                         publication is switched on, default value is used for result name.
1519
1520             Returns:
1521                 New GEOM.GEOM_Object, containing the created vector.
1522             """
1523             # Example: see GEOM_TestAll.py
1524             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1525             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1526             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1527             anObj.SetParameters(Parameters)
1528             self._autoPublish(anObj, theName, "vector")
1529             return anObj
1530
1531         ## Create a vector between two points.
1532         #  @param thePnt1 Start point for the vector.
1533         #  @param thePnt2 End point for the vector.
1534         #  @param theName Object name; when specified, this parameter is used
1535         #         for result publication in the study. Otherwise, if automatic
1536         #         publication is switched on, default value is used for result name.
1537         #
1538         #  @return New GEOM.GEOM_Object, containing the created vector.
1539         #
1540         #  @ref tui_creation_vector "Example"
1541         @ManageTransactions("BasicOp")
1542         def MakeVector(self, thePnt1, thePnt2, theName=None):
1543             """
1544             Create a vector between two points.
1545
1546             Parameters:
1547                 thePnt1 Start point for the vector.
1548                 thePnt2 End point for the vector.
1549                 theName Object name; when specified, this parameter is used
1550                         for result publication in the study. Otherwise, if automatic
1551                         publication is switched on, default value is used for result name.
1552
1553             Returns:
1554                 New GEOM.GEOM_Object, containing the created vector.
1555             """
1556             # Example: see GEOM_TestAll.py
1557             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1558             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1559             self._autoPublish(anObj, theName, "vector")
1560             return anObj
1561
1562         ## Create a line, passing through the given point
1563         #  and parrallel to the given direction
1564         #  @param thePnt Point. The resulting line will pass through it.
1565         #  @param theDir Direction. The resulting line will be parallel to it.
1566         #  @param theName Object name; when specified, this parameter is used
1567         #         for result publication in the study. Otherwise, if automatic
1568         #         publication is switched on, default value is used for result name.
1569         #
1570         #  @return New GEOM.GEOM_Object, containing the created line.
1571         #
1572         #  @ref tui_creation_line "Example"
1573         @ManageTransactions("BasicOp")
1574         def MakeLine(self, thePnt, theDir, theName=None):
1575             """
1576             Create a line, passing through the given point
1577             and parrallel to the given direction
1578
1579             Parameters:
1580                 thePnt Point. The resulting line will pass through it.
1581                 theDir Direction. The resulting line will be parallel to it.
1582                 theName Object name; when specified, this parameter is used
1583                         for result publication in the study. Otherwise, if automatic
1584                         publication is switched on, default value is used for result name.
1585
1586             Returns:
1587                 New GEOM.GEOM_Object, containing the created line.
1588             """
1589             # Example: see GEOM_TestAll.py
1590             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1591             RaiseIfFailed("MakeLine", self.BasicOp)
1592             self._autoPublish(anObj, theName, "line")
1593             return anObj
1594
1595         ## Create a line, passing through the given points
1596         #  @param thePnt1 First of two points, defining the line.
1597         #  @param thePnt2 Second of two points, defining the line.
1598         #  @param theName Object name; when specified, this parameter is used
1599         #         for result publication in the study. Otherwise, if automatic
1600         #         publication is switched on, default value is used for result name.
1601         #
1602         #  @return New GEOM.GEOM_Object, containing the created line.
1603         #
1604         #  @ref tui_creation_line "Example"
1605         @ManageTransactions("BasicOp")
1606         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1607             """
1608             Create a line, passing through the given points
1609
1610             Parameters:
1611                 thePnt1 First of two points, defining the line.
1612                 thePnt2 Second of two points, defining the line.
1613                 theName Object name; when specified, this parameter is used
1614                         for result publication in the study. Otherwise, if automatic
1615                         publication is switched on, default value is used for result name.
1616
1617             Returns:
1618                 New GEOM.GEOM_Object, containing the created line.
1619             """
1620             # Example: see GEOM_TestAll.py
1621             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1622             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1623             self._autoPublish(anObj, theName, "line")
1624             return anObj
1625
1626         ## Create a line on two faces intersection.
1627         #  @param theFace1 First of two faces, defining the line.
1628         #  @param theFace2 Second of two faces, defining the line.
1629         #  @param theName Object name; when specified, this parameter is used
1630         #         for result publication in the study. Otherwise, if automatic
1631         #         publication is switched on, default value is used for result name.
1632         #
1633         #  @return New GEOM.GEOM_Object, containing the created line.
1634         #
1635         #  @ref swig_MakeLineTwoFaces "Example"
1636         @ManageTransactions("BasicOp")
1637         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1638             """
1639             Create a line on two faces intersection.
1640
1641             Parameters:
1642                 theFace1 First of two faces, defining the line.
1643                 theFace2 Second of two faces, defining the line.
1644                 theName Object name; when specified, this parameter is used
1645                         for result publication in the study. Otherwise, if automatic
1646                         publication is switched on, default value is used for result name.
1647
1648             Returns:
1649                 New GEOM.GEOM_Object, containing the created line.
1650             """
1651             # Example: see GEOM_TestAll.py
1652             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1653             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1654             self._autoPublish(anObj, theName, "line")
1655             return anObj
1656
1657         ## Create a plane, passing through the given point
1658         #  and normal to the given vector.
1659         #  @param thePnt Point, the plane has to pass through.
1660         #  @param theVec Vector, defining the plane normal direction.
1661         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1662         #  @param theName Object name; when specified, this parameter is used
1663         #         for result publication in the study. Otherwise, if automatic
1664         #         publication is switched on, default value is used for result name.
1665         #
1666         #  @return New GEOM.GEOM_Object, containing the created plane.
1667         #
1668         #  @ref tui_creation_plane "Example"
1669         @ManageTransactions("BasicOp")
1670         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1671             """
1672             Create a plane, passing through the given point
1673             and normal to the given vector.
1674
1675             Parameters:
1676                 thePnt Point, the plane has to pass through.
1677                 theVec Vector, defining the plane normal direction.
1678                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1679                 theName Object name; when specified, this parameter is used
1680                         for result publication in the study. Otherwise, if automatic
1681                         publication is switched on, default value is used for result name.
1682
1683             Returns:
1684                 New GEOM.GEOM_Object, containing the created plane.
1685             """
1686             # Example: see GEOM_TestAll.py
1687             theTrimSize, Parameters = ParseParameters(theTrimSize);
1688             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1689             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1690             anObj.SetParameters(Parameters)
1691             self._autoPublish(anObj, theName, "plane")
1692             return anObj
1693
1694         ## Create a plane, passing through the three given points
1695         #  @param thePnt1 First of three points, defining the plane.
1696         #  @param thePnt2 Second of three points, defining the plane.
1697         #  @param thePnt3 Fird of three points, defining the plane.
1698         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1699         #  @param theName Object name; when specified, this parameter is used
1700         #         for result publication in the study. Otherwise, if automatic
1701         #         publication is switched on, default value is used for result name.
1702         #
1703         #  @return New GEOM.GEOM_Object, containing the created plane.
1704         #
1705         #  @ref tui_creation_plane "Example"
1706         @ManageTransactions("BasicOp")
1707         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1708             """
1709             Create a plane, passing through the three given points
1710
1711             Parameters:
1712                 thePnt1 First of three points, defining the plane.
1713                 thePnt2 Second of three points, defining the plane.
1714                 thePnt3 Fird of three points, defining the plane.
1715                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1716                 theName Object name; when specified, this parameter is used
1717                         for result publication in the study. Otherwise, if automatic
1718                         publication is switched on, default value is used for result name.
1719
1720             Returns:
1721                 New GEOM.GEOM_Object, containing the created plane.
1722             """
1723             # Example: see GEOM_TestAll.py
1724             theTrimSize, Parameters = ParseParameters(theTrimSize);
1725             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1726             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1727             anObj.SetParameters(Parameters)
1728             self._autoPublish(anObj, theName, "plane")
1729             return anObj
1730
1731         ## Create a plane, similar to the existing one, but with another size of representing face.
1732         #  @param theFace Referenced plane or LCS(Marker).
1733         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1734         #  @param theName Object name; when specified, this parameter is used
1735         #         for result publication in the study. Otherwise, if automatic
1736         #         publication is switched on, default value is used for result name.
1737         #
1738         #  @return New GEOM.GEOM_Object, containing the created plane.
1739         #
1740         #  @ref tui_creation_plane "Example"
1741         @ManageTransactions("BasicOp")
1742         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1743             """
1744             Create a plane, similar to the existing one, but with another size of representing face.
1745
1746             Parameters:
1747                 theFace Referenced plane or LCS(Marker).
1748                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1749                 theName Object name; when specified, this parameter is used
1750                         for result publication in the study. Otherwise, if automatic
1751                         publication is switched on, default value is used for result name.
1752
1753             Returns:
1754                 New GEOM.GEOM_Object, containing the created plane.
1755             """
1756             # Example: see GEOM_TestAll.py
1757             theTrimSize, Parameters = ParseParameters(theTrimSize);
1758             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1759             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1760             anObj.SetParameters(Parameters)
1761             self._autoPublish(anObj, theName, "plane")
1762             return anObj
1763
1764         ## Create a plane, passing through the 2 vectors
1765         #  with center in a start point of the first vector.
1766         #  @param theVec1 Vector, defining center point and plane direction.
1767         #  @param theVec2 Vector, defining the plane normal direction.
1768         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1769         #  @param theName Object name; when specified, this parameter is used
1770         #         for result publication in the study. Otherwise, if automatic
1771         #         publication is switched on, default value is used for result name.
1772         #
1773         #  @return New GEOM.GEOM_Object, containing the created plane.
1774         #
1775         #  @ref tui_creation_plane "Example"
1776         @ManageTransactions("BasicOp")
1777         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1778             """
1779             Create a plane, passing through the 2 vectors
1780             with center in a start point of the first vector.
1781
1782             Parameters:
1783                 theVec1 Vector, defining center point and plane direction.
1784                 theVec2 Vector, defining the plane normal direction.
1785                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1786                 theName Object name; when specified, this parameter is used
1787                         for result publication in the study. Otherwise, if automatic
1788                         publication is switched on, default value is used for result name.
1789
1790             Returns:
1791                 New GEOM.GEOM_Object, containing the created plane.
1792             """
1793             # Example: see GEOM_TestAll.py
1794             theTrimSize, Parameters = ParseParameters(theTrimSize);
1795             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1796             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1797             anObj.SetParameters(Parameters)
1798             self._autoPublish(anObj, theName, "plane")
1799             return anObj
1800
1801         ## Create a plane, based on a Local coordinate system.
1802         #  @param theLCS  coordinate system, defining plane.
1803         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1804         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1805         #  @param theName Object name; when specified, this parameter is used
1806         #         for result publication in the study. Otherwise, if automatic
1807         #         publication is switched on, default value is used for result name.
1808         #
1809         #  @return New GEOM.GEOM_Object, containing the created plane.
1810         #
1811         #  @ref tui_creation_plane "Example"
1812         @ManageTransactions("BasicOp")
1813         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1814             """
1815             Create a plane, based on a Local coordinate system.
1816
1817            Parameters:
1818                 theLCS  coordinate system, defining plane.
1819                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1820                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1821                 theName Object name; when specified, this parameter is used
1822                         for result publication in the study. Otherwise, if automatic
1823                         publication is switched on, default value is used for result name.
1824
1825             Returns:
1826                 New GEOM.GEOM_Object, containing the created plane.
1827             """
1828             # Example: see GEOM_TestAll.py
1829             theTrimSize, Parameters = ParseParameters(theTrimSize);
1830             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1831             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1832             anObj.SetParameters(Parameters)
1833             self._autoPublish(anObj, theName, "plane")
1834             return anObj
1835
1836         ## Create a local coordinate system.
1837         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1838         #  @param XDX,XDY,XDZ Three components of OX direction
1839         #  @param YDX,YDY,YDZ Three components of OY direction
1840         #  @param theName Object name; when specified, this parameter is used
1841         #         for result publication in the study. Otherwise, if automatic
1842         #         publication is switched on, default value is used for result name.
1843         #
1844         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1845         #
1846         #  @ref swig_MakeMarker "Example"
1847         @ManageTransactions("BasicOp")
1848         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1849             """
1850             Create a local coordinate system.
1851
1852             Parameters:
1853                 OX,OY,OZ Three coordinates of coordinate system origin.
1854                 XDX,XDY,XDZ Three components of OX direction
1855                 YDX,YDY,YDZ Three components of OY direction
1856                 theName Object name; when specified, this parameter is used
1857                         for result publication in the study. Otherwise, if automatic
1858                         publication is switched on, default value is used for result name.
1859
1860             Returns:
1861                 New GEOM.GEOM_Object, containing the created coordinate system.
1862             """
1863             # Example: see GEOM_TestAll.py
1864             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1865             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1866             RaiseIfFailed("MakeMarker", self.BasicOp)
1867             anObj.SetParameters(Parameters)
1868             self._autoPublish(anObj, theName, "lcs")
1869             return anObj
1870
1871         ## Create a local coordinate system from shape.
1872         #  @param theShape The initial shape to detect the coordinate system.
1873         #  @param theName Object name; when specified, this parameter is used
1874         #         for result publication in the study. Otherwise, if automatic
1875         #         publication is switched on, default value is used for result name.
1876         #
1877         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1878         #
1879         #  @ref tui_creation_lcs "Example"
1880         @ManageTransactions("BasicOp")
1881         def MakeMarkerFromShape(self, theShape, theName=None):
1882             """
1883             Create a local coordinate system from shape.
1884
1885             Parameters:
1886                 theShape The initial shape to detect the coordinate system.
1887                 theName Object name; when specified, this parameter is used
1888                         for result publication in the study. Otherwise, if automatic
1889                         publication is switched on, default value is used for result name.
1890
1891             Returns:
1892                 New GEOM.GEOM_Object, containing the created coordinate system.
1893             """
1894             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1895             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1896             self._autoPublish(anObj, theName, "lcs")
1897             return anObj
1898
1899         ## Create a local coordinate system from point and two vectors.
1900         #  @param theOrigin Point of coordinate system origin.
1901         #  @param theXVec Vector of X direction
1902         #  @param theYVec Vector of Y direction
1903         #  @param theName Object name; when specified, this parameter is used
1904         #         for result publication in the study. Otherwise, if automatic
1905         #         publication is switched on, default value is used for result name.
1906         #
1907         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1908         #
1909         #  @ref tui_creation_lcs "Example"
1910         @ManageTransactions("BasicOp")
1911         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1912             """
1913             Create a local coordinate system from point and two vectors.
1914
1915             Parameters:
1916                 theOrigin Point of coordinate system origin.
1917                 theXVec Vector of X direction
1918                 theYVec Vector of Y direction
1919                 theName Object name; when specified, this parameter is used
1920                         for result publication in the study. Otherwise, if automatic
1921                         publication is switched on, default value is used for result name.
1922
1923             Returns:
1924                 New GEOM.GEOM_Object, containing the created coordinate system.
1925
1926             """
1927             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1928             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1929             self._autoPublish(anObj, theName, "lcs")
1930             return anObj
1931
1932         # end of l3_basic_go
1933         ## @}
1934
1935         ## @addtogroup l4_curves
1936         ## @{
1937
1938         ##  Create an arc of circle, passing through three given points.
1939         #  @param thePnt1 Start point of the arc.
1940         #  @param thePnt2 Middle point of the arc.
1941         #  @param thePnt3 End point of the arc.
1942         #  @param theName Object name; when specified, this parameter is used
1943         #         for result publication in the study. Otherwise, if automatic
1944         #         publication is switched on, default value is used for result name.
1945         #
1946         #  @return New GEOM.GEOM_Object, containing the created arc.
1947         #
1948         #  @ref swig_MakeArc "Example"
1949         @ManageTransactions("CurvesOp")
1950         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1951             """
1952             Create an arc of circle, passing through three given points.
1953
1954             Parameters:
1955                 thePnt1 Start point of the arc.
1956                 thePnt2 Middle point of the arc.
1957                 thePnt3 End point of the arc.
1958                 theName Object name; when specified, this parameter is used
1959                         for result publication in the study. Otherwise, if automatic
1960                         publication is switched on, default value is used for result name.
1961
1962             Returns:
1963                 New GEOM.GEOM_Object, containing the created arc.
1964             """
1965             # Example: see GEOM_TestAll.py
1966             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1967             RaiseIfFailed("MakeArc", self.CurvesOp)
1968             self._autoPublish(anObj, theName, "arc")
1969             return anObj
1970
1971         ##  Create an arc of circle from a center and 2 points.
1972         #  @param thePnt1 Center of the arc
1973         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1974         #  @param thePnt3 End point of the arc (Gives also a direction)
1975         #  @param theSense Orientation of the arc
1976         #  @param theName Object name; when specified, this parameter is used
1977         #         for result publication in the study. Otherwise, if automatic
1978         #         publication is switched on, default value is used for result name.
1979         #
1980         #  @return New GEOM.GEOM_Object, containing the created arc.
1981         #
1982         #  @ref swig_MakeArc "Example"
1983         @ManageTransactions("CurvesOp")
1984         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1985             """
1986             Create an arc of circle from a center and 2 points.
1987
1988             Parameters:
1989                 thePnt1 Center of the arc
1990                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1991                 thePnt3 End point of the arc (Gives also a direction)
1992                 theSense Orientation of the arc
1993                 theName Object name; when specified, this parameter is used
1994                         for result publication in the study. Otherwise, if automatic
1995                         publication is switched on, default value is used for result name.
1996
1997             Returns:
1998                 New GEOM.GEOM_Object, containing the created arc.
1999             """
2000             # Example: see GEOM_TestAll.py
2001             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2002             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2003             self._autoPublish(anObj, theName, "arc")
2004             return anObj
2005
2006         ##  Create an arc of ellipse, of center and two points.
2007         #  @param theCenter Center of the arc.
2008         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2009         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2010         #  @param theName Object name; when specified, this parameter is used
2011         #         for result publication in the study. Otherwise, if automatic
2012         #         publication is switched on, default value is used for result name.
2013         #
2014         #  @return New GEOM.GEOM_Object, containing the created arc.
2015         #
2016         #  @ref swig_MakeArc "Example"
2017         @ManageTransactions("CurvesOp")
2018         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2019             """
2020             Create an arc of ellipse, of center and two points.
2021
2022             Parameters:
2023                 theCenter Center of the arc.
2024                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2025                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2026                 theName Object name; when specified, this parameter is used
2027                         for result publication in the study. Otherwise, if automatic
2028                         publication is switched on, default value is used for result name.
2029
2030             Returns:
2031                 New GEOM.GEOM_Object, containing the created arc.
2032             """
2033             # Example: see GEOM_TestAll.py
2034             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2035             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2036             self._autoPublish(anObj, theName, "arc")
2037             return anObj
2038
2039         ## Create a circle with given center, normal vector and radius.
2040         #  @param thePnt Circle center.
2041         #  @param theVec Vector, normal to the plane of the circle.
2042         #  @param theR Circle radius.
2043         #  @param theName Object name; when specified, this parameter is used
2044         #         for result publication in the study. Otherwise, if automatic
2045         #         publication is switched on, default value is used for result name.
2046         #
2047         #  @return New GEOM.GEOM_Object, containing the created circle.
2048         #
2049         #  @ref tui_creation_circle "Example"
2050         @ManageTransactions("CurvesOp")
2051         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2052             """
2053             Create a circle with given center, normal vector and radius.
2054
2055             Parameters:
2056                 thePnt Circle center.
2057                 theVec Vector, normal to the plane of the circle.
2058                 theR Circle radius.
2059                 theName Object name; when specified, this parameter is used
2060                         for result publication in the study. Otherwise, if automatic
2061                         publication is switched on, default value is used for result name.
2062
2063             Returns:
2064                 New GEOM.GEOM_Object, containing the created circle.
2065             """
2066             # Example: see GEOM_TestAll.py
2067             theR, Parameters = ParseParameters(theR)
2068             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2069             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2070             anObj.SetParameters(Parameters)
2071             self._autoPublish(anObj, theName, "circle")
2072             return anObj
2073
2074         ## Create a circle with given radius.
2075         #  Center of the circle will be in the origin of global
2076         #  coordinate system and normal vector will be codirected with Z axis
2077         #  @param theR Circle radius.
2078         #  @param theName Object name; when specified, this parameter is used
2079         #         for result publication in the study. Otherwise, if automatic
2080         #         publication is switched on, default value is used for result name.
2081         #
2082         #  @return New GEOM.GEOM_Object, containing the created circle.
2083         @ManageTransactions("CurvesOp")
2084         def MakeCircleR(self, theR, theName=None):
2085             """
2086             Create a circle with given radius.
2087             Center of the circle will be in the origin of global
2088             coordinate system and normal vector will be codirected with Z axis
2089
2090             Parameters:
2091                 theR Circle radius.
2092                 theName Object name; when specified, this parameter is used
2093                         for result publication in the study. Otherwise, if automatic
2094                         publication is switched on, default value is used for result name.
2095
2096             Returns:
2097                 New GEOM.GEOM_Object, containing the created circle.
2098             """
2099             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2100             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2101             self._autoPublish(anObj, theName, "circle")
2102             return anObj
2103
2104         ## Create a circle, passing through three given points
2105         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2106         #  @param theName Object name; when specified, this parameter is used
2107         #         for result publication in the study. Otherwise, if automatic
2108         #         publication is switched on, default value is used for result name.
2109         #
2110         #  @return New GEOM.GEOM_Object, containing the created circle.
2111         #
2112         #  @ref tui_creation_circle "Example"
2113         @ManageTransactions("CurvesOp")
2114         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2115             """
2116             Create a circle, passing through three given points
2117
2118             Parameters:
2119                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2120                 theName Object name; when specified, this parameter is used
2121                         for result publication in the study. Otherwise, if automatic
2122                         publication is switched on, default value is used for result name.
2123
2124             Returns:
2125                 New GEOM.GEOM_Object, containing the created circle.
2126             """
2127             # Example: see GEOM_TestAll.py
2128             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2129             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2130             self._autoPublish(anObj, theName, "circle")
2131             return anObj
2132
2133         ## Create a circle, with given point1 as center,
2134         #  passing through the point2 as radius and laying in the plane,
2135         #  defined by all three given points.
2136         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2137         #  @param theName Object name; when specified, this parameter is used
2138         #         for result publication in the study. Otherwise, if automatic
2139         #         publication is switched on, default value is used for result name.
2140         #
2141         #  @return New GEOM.GEOM_Object, containing the created circle.
2142         #
2143         #  @ref swig_MakeCircle "Example"
2144         @ManageTransactions("CurvesOp")
2145         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2146             """
2147             Create a circle, with given point1 as center,
2148             passing through the point2 as radius and laying in the plane,
2149             defined by all three given points.
2150
2151             Parameters:
2152                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2153                 theName Object name; when specified, this parameter is used
2154                         for result publication in the study. Otherwise, if automatic
2155                         publication is switched on, default value is used for result name.
2156
2157             Returns:
2158                 New GEOM.GEOM_Object, containing the created circle.
2159             """
2160             # Example: see GEOM_example6.py
2161             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2162             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2163             self._autoPublish(anObj, theName, "circle")
2164             return anObj
2165
2166         ## Create an ellipse with given center, normal vector and radiuses.
2167         #  @param thePnt Ellipse center.
2168         #  @param theVec Vector, normal to the plane of the ellipse.
2169         #  @param theRMajor Major ellipse radius.
2170         #  @param theRMinor Minor ellipse radius.
2171         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2172         #  @param theName Object name; when specified, this parameter is used
2173         #         for result publication in the study. Otherwise, if automatic
2174         #         publication is switched on, default value is used for result name.
2175         #
2176         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2177         #
2178         #  @ref tui_creation_ellipse "Example"
2179         @ManageTransactions("CurvesOp")
2180         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2181             """
2182             Create an ellipse with given center, normal vector and radiuses.
2183
2184             Parameters:
2185                 thePnt Ellipse center.
2186                 theVec Vector, normal to the plane of the ellipse.
2187                 theRMajor Major ellipse radius.
2188                 theRMinor Minor ellipse radius.
2189                 theVecMaj Vector, direction of the ellipse's main axis.
2190                 theName Object name; when specified, this parameter is used
2191                         for result publication in the study. Otherwise, if automatic
2192                         publication is switched on, default value is used for result name.
2193
2194             Returns:
2195                 New GEOM.GEOM_Object, containing the created ellipse.
2196             """
2197             # Example: see GEOM_TestAll.py
2198             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2199             if theVecMaj is not None:
2200                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2201             else:
2202                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2203                 pass
2204             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2205             anObj.SetParameters(Parameters)
2206             self._autoPublish(anObj, theName, "ellipse")
2207             return anObj
2208
2209         ## Create an ellipse with given radiuses.
2210         #  Center of the ellipse will be in the origin of global
2211         #  coordinate system and normal vector will be codirected with Z axis
2212         #  @param theRMajor Major ellipse radius.
2213         #  @param theRMinor Minor ellipse radius.
2214         #  @param theName Object name; when specified, this parameter is used
2215         #         for result publication in the study. Otherwise, if automatic
2216         #         publication is switched on, default value is used for result name.
2217         #
2218         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2219         @ManageTransactions("CurvesOp")
2220         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2221             """
2222             Create an ellipse with given radiuses.
2223             Center of the ellipse will be in the origin of global
2224             coordinate system and normal vector will be codirected with Z axis
2225
2226             Parameters:
2227                 theRMajor Major ellipse radius.
2228                 theRMinor Minor ellipse radius.
2229                 theName Object name; when specified, this parameter is used
2230                         for result publication in the study. Otherwise, if automatic
2231                         publication is switched on, default value is used for result name.
2232
2233             Returns:
2234             New GEOM.GEOM_Object, containing the created ellipse.
2235             """
2236             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2237             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2238             self._autoPublish(anObj, theName, "ellipse")
2239             return anObj
2240
2241         ## Create a polyline on the set of points.
2242         #  @param thePoints Sequence of points for the polyline.
2243         #  @param theIsClosed If True, build a closed wire.
2244         #  @param theName Object name; when specified, this parameter is used
2245         #         for result publication in the study. Otherwise, if automatic
2246         #         publication is switched on, default value is used for result name.
2247         #
2248         #  @return New GEOM.GEOM_Object, containing the created polyline.
2249         #
2250         #  @ref tui_creation_curve "Example"
2251         @ManageTransactions("CurvesOp")
2252         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2253             """
2254             Create a polyline on the set of points.
2255
2256             Parameters:
2257                 thePoints Sequence of points for the polyline.
2258                 theIsClosed If True, build a closed wire.
2259                 theName Object name; when specified, this parameter is used
2260                         for result publication in the study. Otherwise, if automatic
2261                         publication is switched on, default value is used for result name.
2262
2263             Returns:
2264                 New GEOM.GEOM_Object, containing the created polyline.
2265             """
2266             # Example: see GEOM_TestAll.py
2267             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2268             RaiseIfFailed("MakePolyline", self.CurvesOp)
2269             self._autoPublish(anObj, theName, "polyline")
2270             return anObj
2271
2272         ## Create bezier curve on the set of points.
2273         #  @param thePoints Sequence of points for the bezier curve.
2274         #  @param theIsClosed If True, build a closed curve.
2275         #  @param theName Object name; when specified, this parameter is used
2276         #         for result publication in the study. Otherwise, if automatic
2277         #         publication is switched on, default value is used for result name.
2278         #
2279         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2280         #
2281         #  @ref tui_creation_curve "Example"
2282         @ManageTransactions("CurvesOp")
2283         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2284             """
2285             Create bezier curve on the set of points.
2286
2287             Parameters:
2288                 thePoints Sequence of points for the bezier curve.
2289                 theIsClosed If True, build a closed curve.
2290                 theName Object name; when specified, this parameter is used
2291                         for result publication in the study. Otherwise, if automatic
2292                         publication is switched on, default value is used for result name.
2293
2294             Returns:
2295                 New GEOM.GEOM_Object, containing the created bezier curve.
2296             """
2297             # Example: see GEOM_TestAll.py
2298             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2299             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2300             self._autoPublish(anObj, theName, "bezier")
2301             return anObj
2302
2303         ## Create B-Spline curve on the set of points.
2304         #  @param thePoints Sequence of points for the B-Spline curve.
2305         #  @param theIsClosed If True, build a closed curve.
2306         #  @param theDoReordering If TRUE, the algo does not follow the order of
2307         #                         \a thePoints but searches for the closest vertex.
2308         #  @param theName Object name; when specified, this parameter is used
2309         #         for result publication in the study. Otherwise, if automatic
2310         #         publication is switched on, default value is used for result name.
2311         #
2312         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2313         #
2314         #  @ref tui_creation_curve "Example"
2315         @ManageTransactions("CurvesOp")
2316         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2317             """
2318             Create B-Spline curve on the set of points.
2319
2320             Parameters:
2321                 thePoints Sequence of points for the B-Spline curve.
2322                 theIsClosed If True, build a closed curve.
2323                 theDoReordering If True, the algo does not follow the order of
2324                                 thePoints but searches for the closest vertex.
2325                 theName Object name; when specified, this parameter is used
2326                         for result publication in the study. Otherwise, if automatic
2327                         publication is switched on, default value is used for result name.
2328
2329             Returns:
2330                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2331             """
2332             # Example: see GEOM_TestAll.py
2333             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2334             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2335             self._autoPublish(anObj, theName, "bspline")
2336             return anObj
2337
2338         ## Create B-Spline curve on the set of points.
2339         #  @param thePoints Sequence of points for the B-Spline curve.
2340         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2341         #  @param theLastVec Vector object, defining the curve direction at its last point.
2342         #  @param theName Object name; when specified, this parameter is used
2343         #         for result publication in the study. Otherwise, if automatic
2344         #         publication is switched on, default value is used for result name.
2345         #
2346         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2347         #
2348         #  @ref tui_creation_curve "Example"
2349         @ManageTransactions("CurvesOp")
2350         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2351             """
2352             Create B-Spline curve on the set of points.
2353
2354             Parameters:
2355                 thePoints Sequence of points for the B-Spline curve.
2356                 theFirstVec Vector object, defining the curve direction at its first point.
2357                 theLastVec Vector object, defining the curve direction at its last point.
2358                 theName Object name; when specified, this parameter is used
2359                         for result publication in the study. Otherwise, if automatic
2360                         publication is switched on, default value is used for result name.
2361
2362             Returns:
2363                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2364             """
2365             # Example: see GEOM_TestAll.py
2366             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2367             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2368             self._autoPublish(anObj, theName, "bspline")
2369             return anObj
2370
2371         ## Creates a curve using the parametric definition of the basic points.
2372         #  @param thexExpr parametric equation of the coordinates X.
2373         #  @param theyExpr parametric equation of the coordinates Y.
2374         #  @param thezExpr parametric equation of the coordinates Z.
2375         #  @param theParamMin the minimal value of the parameter.
2376         #  @param theParamMax the maximum value of the parameter.
2377         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2378         #  @param theCurveType the type of the curve,
2379         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2380         #  @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.
2381         #  @param theName Object name; when specified, this parameter is used
2382         #         for result publication in the study. Otherwise, if automatic
2383         #         publication is switched on, default value is used for result name.
2384         #
2385         #  @return New GEOM.GEOM_Object, containing the created curve.
2386         #
2387         #  @ref tui_creation_curve "Example"
2388         @ManageTransactions("CurvesOp")
2389         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2390                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2391             """
2392             Creates a curve using the parametric definition of the basic points.
2393
2394             Parameters:
2395                 thexExpr parametric equation of the coordinates X.
2396                 theyExpr parametric equation of the coordinates Y.
2397                 thezExpr parametric equation of the coordinates Z.
2398                 theParamMin the minimal value of the parameter.
2399                 theParamMax the maximum value of the parameter.
2400                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2401                 theCurveType the type of the curve,
2402                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2403                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2404                              method is used which can lead to a bug.
2405                 theName Object name; when specified, this parameter is used
2406                         for result publication in the study. Otherwise, if automatic
2407                         publication is switched on, default value is used for result name.
2408
2409             Returns:
2410                 New GEOM.GEOM_Object, containing the created curve.
2411             """
2412             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2413             if theNewMethod:
2414               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2415             else:
2416               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2417             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2418             anObj.SetParameters(Parameters)
2419             self._autoPublish(anObj, theName, "curve")
2420             return anObj
2421
2422         ## Create an isoline curve on a face.
2423         #  @param theFace the face for which an isoline is created.
2424         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2425         #         creation.
2426         #  @param theParameter the U parameter for U-isoline or V parameter
2427         #         for V-isoline.
2428         #  @param theName Object name; when specified, this parameter is used
2429         #         for result publication in the study. Otherwise, if automatic
2430         #         publication is switched on, default value is used for result name.
2431         #
2432         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2433         #          a compound of edges.
2434         #
2435         #  @ref tui_creation_curve "Example"
2436         @ManageTransactions("CurvesOp")
2437         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2438             """
2439             Create an isoline curve on a face.
2440
2441             Parameters:
2442                 theFace the face for which an isoline is created.
2443                 IsUIsoline True for U-isoline creation; False for V-isoline
2444                            creation.
2445                 theParameter the U parameter for U-isoline or V parameter
2446                              for V-isoline.
2447                 theName Object name; when specified, this parameter is used
2448                         for result publication in the study. Otherwise, if automatic
2449                         publication is switched on, default value is used for result name.
2450
2451             Returns:
2452                 New GEOM.GEOM_Object, containing the created isoline edge or a
2453                 compound of edges.
2454             """
2455             # Example: see GEOM_TestAll.py
2456             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2457             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2458             if IsUIsoline:
2459                 self._autoPublish(anObj, theName, "U-Isoline")
2460             else:
2461                 self._autoPublish(anObj, theName, "V-Isoline")
2462             return anObj
2463
2464         # end of l4_curves
2465         ## @}
2466
2467         ## @addtogroup l3_sketcher
2468         ## @{
2469
2470         ## Create a sketcher (wire or face), following the textual description,
2471         #  passed through <VAR>theCommand</VAR> argument. \n
2472         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2473         #  Format of the description string have to be the following:
2474         #
2475         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2476         #
2477         #  Where:
2478         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2479         #  - CMD is one of
2480         #     - "R angle" : Set the direction by angle
2481         #     - "D dx dy" : Set the direction by DX & DY
2482         #     .
2483         #       \n
2484         #     - "TT x y" : Create segment by point at X & Y
2485         #     - "T dx dy" : Create segment by point with DX & DY
2486         #     - "L length" : Create segment by direction & Length
2487         #     - "IX x" : Create segment by direction & Intersect. X
2488         #     - "IY y" : Create segment by direction & Intersect. Y
2489         #     .
2490         #       \n
2491         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2492         #     - "AA x y": Create arc by point at X & Y
2493         #     - "A dx dy" : Create arc by point with DX & DY
2494         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2495         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2496         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2497         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2498         #     .
2499         #       \n
2500         #     - "WW" : Close Wire (to finish)
2501         #     - "WF" : Close Wire and build face (to finish)
2502         #     .
2503         #        \n
2504         #  - Flag1 (= reverse) is 0 or 2 ...
2505         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2506         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2507         #     .
2508         #        \n
2509         #  - Flag2 (= control tolerance) is 0 or 1 ...
2510         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2511         #     - if 1 the wire is built only if the end point is on the arc
2512         #       with a tolerance of 10^-7 on the distance else the creation fails
2513         #
2514         #  @param theCommand String, defining the sketcher in local
2515         #                    coordinates of the working plane.
2516         #  @param theWorkingPlane Nine double values, defining origin,
2517         #                         OZ and OX directions of the working plane.
2518         #  @param theName Object name; when specified, this parameter is used
2519         #         for result publication in the study. Otherwise, if automatic
2520         #         publication is switched on, default value is used for result name.
2521         #
2522         #  @return New GEOM.GEOM_Object, containing the created wire.
2523         #
2524         #  @ref tui_sketcher_page "Example"
2525         @ManageTransactions("CurvesOp")
2526         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2527             """
2528             Create a sketcher (wire or face), following the textual description, passed
2529             through theCommand argument.
2530             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2531             Format of the description string have to be the following:
2532                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2533             Where:
2534             - x1, y1 are coordinates of the first sketcher point (zero by default),
2535             - CMD is one of
2536                - "R angle" : Set the direction by angle
2537                - "D dx dy" : Set the direction by DX & DY
2538
2539                - "TT x y" : Create segment by point at X & Y
2540                - "T dx dy" : Create segment by point with DX & DY
2541                - "L length" : Create segment by direction & Length
2542                - "IX x" : Create segment by direction & Intersect. X
2543                - "IY y" : Create segment by direction & Intersect. Y
2544
2545                - "C radius length" : Create arc by direction, radius and length(in degree)
2546                - "AA x y": Create arc by point at X & Y
2547                - "A dx dy" : Create arc by point with DX & DY
2548                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2549                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2550                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2551                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2552
2553                - "WW" : Close Wire (to finish)
2554                - "WF" : Close Wire and build face (to finish)
2555
2556             - Flag1 (= reverse) is 0 or 2 ...
2557                - if 0 the drawn arc is the one of lower angle (< Pi)
2558                - if 2 the drawn arc ius the one of greater angle (> Pi)
2559
2560             - Flag2 (= control tolerance) is 0 or 1 ...
2561                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2562                - if 1 the wire is built only if the end point is on the arc
2563                  with a tolerance of 10^-7 on the distance else the creation fails
2564
2565             Parameters:
2566                 theCommand String, defining the sketcher in local
2567                            coordinates of the working plane.
2568                 theWorkingPlane Nine double values, defining origin,
2569                                 OZ and OX directions of the working plane.
2570                 theName Object name; when specified, this parameter is used
2571                         for result publication in the study. Otherwise, if automatic
2572                         publication is switched on, default value is used for result name.
2573
2574             Returns:
2575                 New GEOM.GEOM_Object, containing the created wire.
2576             """
2577             # Example: see GEOM_TestAll.py
2578             theCommand,Parameters = ParseSketcherCommand(theCommand)
2579             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2580             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2581             anObj.SetParameters(Parameters)
2582             self._autoPublish(anObj, theName, "wire")
2583             return anObj
2584
2585         ## Create a sketcher (wire or face), following the textual description,
2586         #  passed through <VAR>theCommand</VAR> argument. \n
2587         #  For format of the description string see MakeSketcher() method.\n
2588         #  @param theCommand String, defining the sketcher in local
2589         #                    coordinates of the working plane.
2590         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2591         #  @param theName Object name; when specified, this parameter is used
2592         #         for result publication in the study. Otherwise, if automatic
2593         #         publication is switched on, default value is used for result name.
2594         #
2595         #  @return New GEOM.GEOM_Object, containing the created wire.
2596         #
2597         #  @ref tui_sketcher_page "Example"
2598         @ManageTransactions("CurvesOp")
2599         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2600             """
2601             Create a sketcher (wire or face), following the textual description,
2602             passed through theCommand argument.
2603             For format of the description string see geompy.MakeSketcher() method.
2604
2605             Parameters:
2606                 theCommand String, defining the sketcher in local
2607                            coordinates of the working plane.
2608                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2609                 theName Object name; when specified, this parameter is used
2610                         for result publication in the study. Otherwise, if automatic
2611                         publication is switched on, default value is used for result name.
2612
2613             Returns:
2614                 New GEOM.GEOM_Object, containing the created wire.
2615             """
2616             theCommand,Parameters = ParseSketcherCommand(theCommand)
2617             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2618             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2619             anObj.SetParameters(Parameters)
2620             self._autoPublish(anObj, theName, "wire")
2621             return anObj
2622
2623         ## Obtain a 2D sketcher interface
2624         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2625         def Sketcher2D (self):
2626             """
2627             Obtain a 2D sketcher interface.
2628
2629             Example of usage:
2630                sk = geompy.Sketcher2D()
2631                sk.addPoint(20, 20)
2632                sk.addSegmentRelative(15, 70)
2633                sk.addSegmentPerpY(50)
2634                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2635                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2636                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2637                sk.close()
2638                Sketch_1 = sk.wire(geomObj_1)
2639             """
2640             sk = Sketcher2D (self)
2641             return sk
2642
2643         ## Create a sketcher wire, following the numerical description,
2644         #  passed through <VAR>theCoordinates</VAR> argument. \n
2645         #  @param theCoordinates double values, defining points to create a wire,
2646         #                                                      passing from it.
2647         #  @param theName Object name; when specified, this parameter is used
2648         #         for result publication in the study. Otherwise, if automatic
2649         #         publication is switched on, default value is used for result name.
2650         #
2651         #  @return New GEOM.GEOM_Object, containing the created wire.
2652         #
2653         #  @ref tui_3dsketcher_page "Example"
2654         @ManageTransactions("CurvesOp")
2655         def Make3DSketcher(self, theCoordinates, theName=None):
2656             """
2657             Create a sketcher wire, following the numerical description,
2658             passed through theCoordinates argument.
2659
2660             Parameters:
2661                 theCoordinates double values, defining points to create a wire,
2662                                passing from it.
2663                 theName Object name; when specified, this parameter is used
2664                         for result publication in the study. Otherwise, if automatic
2665                         publication is switched on, default value is used for result name.
2666
2667             Returns:
2668                 New GEOM_Object, containing the created wire.
2669             """
2670             theCoordinates,Parameters = ParseParameters(theCoordinates)
2671             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2672             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2673             anObj.SetParameters(Parameters)
2674             self._autoPublish(anObj, theName, "wire")
2675             return anObj
2676
2677         ## Obtain a 3D sketcher interface
2678         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2679         #
2680         #  @ref tui_3dsketcher_page "Example"
2681         def Sketcher3D (self):
2682             """
2683             Obtain a 3D sketcher interface.
2684
2685             Example of usage:
2686                 sk = geompy.Sketcher3D()
2687                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2688                 sk.addPointsRelative(0, 0, 130)
2689                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2690                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2691                 sk.close()
2692                 a3D_Sketcher_1 = sk.wire()
2693             """
2694             sk = Sketcher3D (self)
2695             return sk
2696
2697         ## Obtain a 2D polyline creation interface
2698         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2699         #
2700         #  @ref tui_3dsketcher_page "Example"
2701         def Polyline2D (self):
2702             """
2703             Obtain a 2D polyline creation interface.
2704
2705             Example of usage:
2706                 pl = geompy.Polyline2D()
2707                 pl.addSection("section 1", GEOM.Polyline, True)
2708                 pl.addPoints(0, 0, 10, 0, 10, 10)
2709                 pl.addSection("section 2", GEOM.Interpolation, False)
2710                 pl.addPoints(20, 0, 30, 0, 30, 10)
2711                 resultObj = pl.result(WorkingPlane)
2712             """
2713             pl = Polyline2D (self)
2714             return pl
2715
2716         # end of l3_sketcher
2717         ## @}
2718
2719         ## @addtogroup l3_3d_primitives
2720         ## @{
2721
2722         ## Create a box by coordinates of two opposite vertices.
2723         #
2724         #  @param x1,y1,z1 double values, defining first point it.
2725         #  @param x2,y2,z2 double values, defining first point it.
2726         #  @param theName Object name; when specified, this parameter is used
2727         #         for result publication in the study. Otherwise, if automatic
2728         #         publication is switched on, default value is used for result name.
2729         #
2730         #  @return New GEOM.GEOM_Object, containing the created box.
2731         #
2732         #  @ref tui_creation_box "Example"
2733         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2734             """
2735             Create a box by coordinates of two opposite vertices.
2736
2737             Parameters:
2738                 x1,y1,z1 double values, defining first point.
2739                 x2,y2,z2 double values, defining second point.
2740                 theName Object name; when specified, this parameter is used
2741                         for result publication in the study. Otherwise, if automatic
2742                         publication is switched on, default value is used for result name.
2743
2744             Returns:
2745                 New GEOM.GEOM_Object, containing the created box.
2746             """
2747             # Example: see GEOM_TestAll.py
2748             pnt1 = self.MakeVertex(x1,y1,z1)
2749             pnt2 = self.MakeVertex(x2,y2,z2)
2750             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2751             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2752
2753         ## Create a box with specified dimensions along the coordinate axes
2754         #  and with edges, parallel to the coordinate axes.
2755         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2756         #  @param theDX Length of Box edges, parallel to OX axis.
2757         #  @param theDY Length of Box edges, parallel to OY axis.
2758         #  @param theDZ Length of Box edges, parallel to OZ axis.
2759         #  @param theName Object name; when specified, this parameter is used
2760         #         for result publication in the study. Otherwise, if automatic
2761         #         publication is switched on, default value is used for result name.
2762         #
2763         #  @return New GEOM.GEOM_Object, containing the created box.
2764         #
2765         #  @ref tui_creation_box "Example"
2766         @ManageTransactions("PrimOp")
2767         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2768             """
2769             Create a box with specified dimensions along the coordinate axes
2770             and with edges, parallel to the coordinate axes.
2771             Center of the box will be at point (DX/2, DY/2, DZ/2).
2772
2773             Parameters:
2774                 theDX Length of Box edges, parallel to OX axis.
2775                 theDY Length of Box edges, parallel to OY axis.
2776                 theDZ Length of Box edges, parallel to OZ axis.
2777                 theName Object name; when specified, this parameter is used
2778                         for result publication in the study. Otherwise, if automatic
2779                         publication is switched on, default value is used for result name.
2780
2781             Returns:
2782                 New GEOM.GEOM_Object, containing the created box.
2783             """
2784             # Example: see GEOM_TestAll.py
2785             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2786             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2787             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2788             anObj.SetParameters(Parameters)
2789             self._autoPublish(anObj, theName, "box")
2790             return anObj
2791
2792         ## Create a box with two specified opposite vertices,
2793         #  and with edges, parallel to the coordinate axes
2794         #  @param thePnt1 First of two opposite vertices.
2795         #  @param thePnt2 Second of two opposite vertices.
2796         #  @param theName Object name; when specified, this parameter is used
2797         #         for result publication in the study. Otherwise, if automatic
2798         #         publication is switched on, default value is used for result name.
2799         #
2800         #  @return New GEOM.GEOM_Object, containing the created box.
2801         #
2802         #  @ref tui_creation_box "Example"
2803         @ManageTransactions("PrimOp")
2804         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2805             """
2806             Create a box with two specified opposite vertices,
2807             and with edges, parallel to the coordinate axes
2808
2809             Parameters:
2810                 thePnt1 First of two opposite vertices.
2811                 thePnt2 Second of two opposite vertices.
2812                 theName Object name; when specified, this parameter is used
2813                         for result publication in the study. Otherwise, if automatic
2814                         publication is switched on, default value is used for result name.
2815
2816             Returns:
2817                 New GEOM.GEOM_Object, containing the created box.
2818             """
2819             # Example: see GEOM_TestAll.py
2820             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2821             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2822             self._autoPublish(anObj, theName, "box")
2823             return anObj
2824
2825         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2826         #  @param theH height of Face.
2827         #  @param theW width of Face.
2828         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2829         #  @param theName Object name; when specified, this parameter is used
2830         #         for result publication in the study. Otherwise, if automatic
2831         #         publication is switched on, default value is used for result name.
2832         #
2833         #  @return New GEOM.GEOM_Object, containing the created face.
2834         #
2835         #  @ref tui_creation_face "Example"
2836         @ManageTransactions("PrimOp")
2837         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2838             """
2839             Create a face with specified dimensions with edges parallel to coordinate axes.
2840
2841             Parameters:
2842                 theH height of Face.
2843                 theW width of Face.
2844                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2845                 theName Object name; when specified, this parameter is used
2846                         for result publication in the study. Otherwise, if automatic
2847                         publication is switched on, default value is used for result name.
2848
2849             Returns:
2850                 New GEOM.GEOM_Object, containing the created face.
2851             """
2852             # Example: see GEOM_TestAll.py
2853             theH,theW,Parameters = ParseParameters(theH, theW)
2854             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2855             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2856             anObj.SetParameters(Parameters)
2857             self._autoPublish(anObj, theName, "rectangle")
2858             return anObj
2859
2860         ## Create a face from another plane and two sizes,
2861         #  vertical size and horisontal size.
2862         #  @param theObj   Normale vector to the creating face or
2863         #  the face object.
2864         #  @param theH     Height (vertical size).
2865         #  @param theW     Width (horisontal size).
2866         #  @param theName Object name; when specified, this parameter is used
2867         #         for result publication in the study. Otherwise, if automatic
2868         #         publication is switched on, default value is used for result name.
2869         #
2870         #  @return New GEOM.GEOM_Object, containing the created face.
2871         #
2872         #  @ref tui_creation_face "Example"
2873         @ManageTransactions("PrimOp")
2874         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2875             """
2876             Create a face from another plane and two sizes,
2877             vertical size and horisontal size.
2878
2879             Parameters:
2880                 theObj   Normale vector to the creating face or
2881                          the face object.
2882                 theH     Height (vertical size).
2883                 theW     Width (horisontal size).
2884                 theName Object name; when specified, this parameter is used
2885                         for result publication in the study. Otherwise, if automatic
2886                         publication is switched on, default value is used for result name.
2887
2888             Returns:
2889                 New GEOM_Object, containing the created face.
2890             """
2891             # Example: see GEOM_TestAll.py
2892             theH,theW,Parameters = ParseParameters(theH, theW)
2893             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2894             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2895             anObj.SetParameters(Parameters)
2896             self._autoPublish(anObj, theName, "rectangle")
2897             return anObj
2898
2899         ## Create a disk with given center, normal vector and radius.
2900         #  @param thePnt Disk center.
2901         #  @param theVec Vector, normal to the plane of the disk.
2902         #  @param theR Disk radius.
2903         #  @param theName Object name; when specified, this parameter is used
2904         #         for result publication in the study. Otherwise, if automatic
2905         #         publication is switched on, default value is used for result name.
2906         #
2907         #  @return New GEOM.GEOM_Object, containing the created disk.
2908         #
2909         #  @ref tui_creation_disk "Example"
2910         @ManageTransactions("PrimOp")
2911         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2912             """
2913             Create a disk with given center, normal vector and radius.
2914
2915             Parameters:
2916                 thePnt Disk center.
2917                 theVec Vector, normal to the plane of the disk.
2918                 theR Disk radius.
2919                 theName Object name; when specified, this parameter is used
2920                         for result publication in the study. Otherwise, if automatic
2921                         publication is switched on, default value is used for result name.
2922
2923             Returns:
2924                 New GEOM.GEOM_Object, containing the created disk.
2925             """
2926             # Example: see GEOM_TestAll.py
2927             theR,Parameters = ParseParameters(theR)
2928             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2929             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2930             anObj.SetParameters(Parameters)
2931             self._autoPublish(anObj, theName, "disk")
2932             return anObj
2933
2934         ## Create a disk, passing through three given points
2935         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2936         #  @param theName Object name; when specified, this parameter is used
2937         #         for result publication in the study. Otherwise, if automatic
2938         #         publication is switched on, default value is used for result name.
2939         #
2940         #  @return New GEOM.GEOM_Object, containing the created disk.
2941         #
2942         #  @ref tui_creation_disk "Example"
2943         @ManageTransactions("PrimOp")
2944         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2945             """
2946             Create a disk, passing through three given points
2947
2948             Parameters:
2949                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2950                 theName Object name; when specified, this parameter is used
2951                         for result publication in the study. Otherwise, if automatic
2952                         publication is switched on, default value is used for result name.
2953
2954             Returns:
2955                 New GEOM.GEOM_Object, containing the created disk.
2956             """
2957             # Example: see GEOM_TestAll.py
2958             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2959             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2960             self._autoPublish(anObj, theName, "disk")
2961             return anObj
2962
2963         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2964         #  @param theR Radius of Face.
2965         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2966         #  @param theName Object name; when specified, this parameter is used
2967         #         for result publication in the study. Otherwise, if automatic
2968         #         publication is switched on, default value is used for result name.
2969         #
2970         #  @return New GEOM.GEOM_Object, containing the created disk.
2971         #
2972         #  @ref tui_creation_face "Example"
2973         @ManageTransactions("PrimOp")
2974         def MakeDiskR(self, theR, theOrientation, theName=None):
2975             """
2976             Create a disk with specified dimensions along OX-OY coordinate axes.
2977
2978             Parameters:
2979                 theR Radius of Face.
2980                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2981                 theName Object name; when specified, this parameter is used
2982                         for result publication in the study. Otherwise, if automatic
2983                         publication is switched on, default value is used for result name.
2984
2985             Returns:
2986                 New GEOM.GEOM_Object, containing the created disk.
2987
2988             Example of usage:
2989                 Disk3 = geompy.MakeDiskR(100., 1)
2990             """
2991             # Example: see GEOM_TestAll.py
2992             theR,Parameters = ParseParameters(theR)
2993             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2994             RaiseIfFailed("MakeDiskR", self.PrimOp)
2995             anObj.SetParameters(Parameters)
2996             self._autoPublish(anObj, theName, "disk")
2997             return anObj
2998
2999         ## Create a cylinder with given base point, axis, radius and height.
3000         #  @param thePnt Central point of cylinder base.
3001         #  @param theAxis Cylinder axis.
3002         #  @param theR Cylinder radius.
3003         #  @param theH Cylinder height.
3004         #  @param theName Object name; when specified, this parameter is used
3005         #         for result publication in the study. Otherwise, if automatic
3006         #         publication is switched on, default value is used for result name.
3007         #
3008         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3009         #
3010         #  @ref tui_creation_cylinder "Example"
3011         @ManageTransactions("PrimOp")
3012         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3013             """
3014             Create a cylinder with given base point, axis, radius and height.
3015
3016             Parameters:
3017                 thePnt Central point of cylinder base.
3018                 theAxis Cylinder axis.
3019                 theR Cylinder radius.
3020                 theH Cylinder height.
3021                 theName Object name; when specified, this parameter is used
3022                         for result publication in the study. Otherwise, if automatic
3023                         publication is switched on, default value is used for result name.
3024
3025             Returns:
3026                 New GEOM.GEOM_Object, containing the created cylinder.
3027             """
3028             # Example: see GEOM_TestAll.py
3029             theR,theH,Parameters = ParseParameters(theR, theH)
3030             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3031             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3032             anObj.SetParameters(Parameters)
3033             self._autoPublish(anObj, theName, "cylinder")
3034             return anObj
3035             
3036         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3037         #  @param thePnt Central point of cylinder base.
3038         #  @param theAxis Cylinder axis.
3039         #  @param theR Cylinder radius.
3040         #  @param theH Cylinder height.
3041         #  @param theA Cylinder angle in radians.
3042         #  @param theName Object name; when specified, this parameter is used
3043         #         for result publication in the study. Otherwise, if automatic
3044         #         publication is switched on, default value is used for result name.
3045         #
3046         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3047         #
3048         #  @ref tui_creation_cylinder "Example"
3049         @ManageTransactions("PrimOp")
3050         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3051             """
3052             Create a portion of cylinder with given base point, axis, radius, height and angle.
3053
3054             Parameters:
3055                 thePnt Central point of cylinder base.
3056                 theAxis Cylinder axis.
3057                 theR Cylinder radius.
3058                 theH Cylinder height.
3059                 theA Cylinder angle in radians.
3060                 theName Object name; when specified, this parameter is used
3061                         for result publication in the study. Otherwise, if automatic
3062                         publication is switched on, default value is used for result name.
3063
3064             Returns:
3065                 New GEOM.GEOM_Object, containing the created cylinder.
3066             """
3067             # Example: see GEOM_TestAll.py
3068             flag = False
3069             if isinstance(theA,str):
3070                 flag = True
3071             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3072             if flag:
3073                 theA = theA*math.pi/180.
3074             if theA<=0. or theA>=2*math.pi:
3075               raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3076             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3077             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3078             anObj.SetParameters(Parameters)
3079             self._autoPublish(anObj, theName, "cylinder")
3080             return anObj
3081
3082         ## Create a cylinder with given radius and height at
3083         #  the origin of coordinate system. Axis of the cylinder
3084         #  will be collinear to the OZ axis of the coordinate system.
3085         #  @param theR Cylinder radius.
3086         #  @param theH Cylinder height.
3087         #  @param theName Object name; when specified, this parameter is used
3088         #         for result publication in the study. Otherwise, if automatic
3089         #         publication is switched on, default value is used for result name.
3090         #
3091         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3092         #
3093         #  @ref tui_creation_cylinder "Example"
3094         @ManageTransactions("PrimOp")
3095         def MakeCylinderRH(self, theR, theH, theName=None):
3096             """
3097             Create a cylinder with given radius and height at
3098             the origin of coordinate system. Axis of the cylinder
3099             will be collinear to the OZ axis of the coordinate system.
3100
3101             Parameters:
3102                 theR Cylinder radius.
3103                 theH Cylinder height.
3104                 theName Object name; when specified, this parameter is used
3105                         for result publication in the study. Otherwise, if automatic
3106                         publication is switched on, default value is used for result name.
3107
3108             Returns:
3109                 New GEOM.GEOM_Object, containing the created cylinder.
3110             """
3111             # Example: see GEOM_TestAll.py
3112             theR,theH,Parameters = ParseParameters(theR, theH)
3113             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3114             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3115             anObj.SetParameters(Parameters)
3116             self._autoPublish(anObj, theName, "cylinder")
3117             return anObj
3118             
3119         ## Create a portion of cylinder with given radius, height and angle at
3120         #  the origin of coordinate system. Axis of the cylinder
3121         #  will be collinear to the OZ axis of the coordinate system.
3122         #  @param theR Cylinder radius.
3123         #  @param theH Cylinder height.
3124         #  @param theA Cylinder angle in radians.
3125         #  @param theName Object name; when specified, this parameter is used
3126         #         for result publication in the study. Otherwise, if automatic
3127         #         publication is switched on, default value is used for result name.
3128         #
3129         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3130         #
3131         #  @ref tui_creation_cylinder "Example"
3132         @ManageTransactions("PrimOp")
3133         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3134             """
3135             Create a portion of cylinder with given radius, height and angle at
3136             the origin of coordinate system. Axis of the cylinder
3137             will be collinear to the OZ axis of the coordinate system.
3138
3139             Parameters:
3140                 theR Cylinder radius.
3141                 theH Cylinder height.
3142                 theA Cylinder angle in radians.
3143                 theName Object name; when specified, this parameter is used
3144                         for result publication in the study. Otherwise, if automatic
3145                         publication is switched on, default value is used for result name.
3146
3147             Returns:
3148                 New GEOM.GEOM_Object, containing the created cylinder.
3149             """
3150             # Example: see GEOM_TestAll.py
3151             flag = False
3152             if isinstance(theA,str):
3153                 flag = True
3154             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3155             if flag:
3156                 theA = theA*math.pi/180.
3157             if theA<=0. or theA>=2*math.pi:
3158               raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3159             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3160             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3161             anObj.SetParameters(Parameters)
3162             self._autoPublish(anObj, theName, "cylinder")
3163             return anObj
3164
3165         ## Create a sphere with given center and radius.
3166         #  @param thePnt Sphere center.
3167         #  @param theR Sphere radius.
3168         #  @param theName Object name; when specified, this parameter is used
3169         #         for result publication in the study. Otherwise, if automatic
3170         #         publication is switched on, default value is used for result name.
3171         #
3172         #  @return New GEOM.GEOM_Object, containing the created sphere.
3173         #
3174         #  @ref tui_creation_sphere "Example"
3175         @ManageTransactions("PrimOp")
3176         def MakeSpherePntR(self, thePnt, theR, theName=None):
3177             """
3178             Create a sphere with given center and radius.
3179
3180             Parameters:
3181                 thePnt Sphere center.
3182                 theR Sphere radius.
3183                 theName Object name; when specified, this parameter is used
3184                         for result publication in the study. Otherwise, if automatic
3185                         publication is switched on, default value is used for result name.
3186
3187             Returns:
3188                 New GEOM.GEOM_Object, containing the created sphere.
3189             """
3190             # Example: see GEOM_TestAll.py
3191             theR,Parameters = ParseParameters(theR)
3192             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3193             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3194             anObj.SetParameters(Parameters)
3195             self._autoPublish(anObj, theName, "sphere")
3196             return anObj
3197
3198         ## Create a sphere with given center and radius.
3199         #  @param x,y,z Coordinates of sphere center.
3200         #  @param theR Sphere radius.
3201         #  @param theName Object name; when specified, this parameter is used
3202         #         for result publication in the study. Otherwise, if automatic
3203         #         publication is switched on, default value is used for result name.
3204         #
3205         #  @return New GEOM.GEOM_Object, containing the created sphere.
3206         #
3207         #  @ref tui_creation_sphere "Example"
3208         def MakeSphere(self, x, y, z, theR, theName=None):
3209             """
3210             Create a sphere with given center and radius.
3211
3212             Parameters:
3213                 x,y,z Coordinates of sphere center.
3214                 theR Sphere radius.
3215                 theName Object name; when specified, this parameter is used
3216                         for result publication in the study. Otherwise, if automatic
3217                         publication is switched on, default value is used for result name.
3218
3219             Returns:
3220                 New GEOM.GEOM_Object, containing the created sphere.
3221             """
3222             # Example: see GEOM_TestAll.py
3223             point = self.MakeVertex(x, y, z)
3224             # note: auto-publishing is done in self.MakeSpherePntR()
3225             anObj = self.MakeSpherePntR(point, theR, theName)
3226             return anObj
3227
3228         ## Create a sphere with given radius at the origin of coordinate system.
3229         #  @param theR Sphere radius.
3230         #  @param theName Object name; when specified, this parameter is used
3231         #         for result publication in the study. Otherwise, if automatic
3232         #         publication is switched on, default value is used for result name.
3233         #
3234         #  @return New GEOM.GEOM_Object, containing the created sphere.
3235         #
3236         #  @ref tui_creation_sphere "Example"
3237         @ManageTransactions("PrimOp")
3238         def MakeSphereR(self, theR, theName=None):
3239             """
3240             Create a sphere with given radius at the origin of coordinate system.
3241
3242             Parameters:
3243                 theR Sphere radius.
3244                 theName Object name; when specified, this parameter is used
3245                         for result publication in the study. Otherwise, if automatic
3246                         publication is switched on, default value is used for result name.
3247
3248             Returns:
3249                 New GEOM.GEOM_Object, containing the created sphere.
3250             """
3251             # Example: see GEOM_TestAll.py
3252             theR,Parameters = ParseParameters(theR)
3253             anObj = self.PrimOp.MakeSphereR(theR)
3254             RaiseIfFailed("MakeSphereR", self.PrimOp)
3255             anObj.SetParameters(Parameters)
3256             self._autoPublish(anObj, theName, "sphere")
3257             return anObj
3258
3259         ## Create a cone with given base point, axis, height and radiuses.
3260         #  @param thePnt Central point of the first cone base.
3261         #  @param theAxis Cone axis.
3262         #  @param theR1 Radius of the first cone base.
3263         #  @param theR2 Radius of the second cone base.
3264         #    \note If both radiuses are non-zero, the cone will be truncated.
3265         #    \note If the radiuses are equal, a cylinder will be created instead.
3266         #  @param theH Cone height.
3267         #  @param theName Object name; when specified, this parameter is used
3268         #         for result publication in the study. Otherwise, if automatic
3269         #         publication is switched on, default value is used for result name.
3270         #
3271         #  @return New GEOM.GEOM_Object, containing the created cone.
3272         #
3273         #  @ref tui_creation_cone "Example"
3274         @ManageTransactions("PrimOp")
3275         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3276             """
3277             Create a cone with given base point, axis, height and radiuses.
3278
3279             Parameters:
3280                 thePnt Central point of the first cone base.
3281                 theAxis Cone axis.
3282                 theR1 Radius of the first cone base.
3283                 theR2 Radius of the second cone base.
3284                 theH Cone height.
3285                 theName Object name; when specified, this parameter is used
3286                         for result publication in the study. Otherwise, if automatic
3287                         publication is switched on, default value is used for result name.
3288
3289             Note:
3290                 If both radiuses are non-zero, the cone will be truncated.
3291                 If the radiuses are equal, a cylinder will be created instead.
3292
3293             Returns:
3294                 New GEOM.GEOM_Object, containing the created cone.
3295             """
3296             # Example: see GEOM_TestAll.py
3297             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3298             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3299             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3300             anObj.SetParameters(Parameters)
3301             self._autoPublish(anObj, theName, "cone")
3302             return anObj
3303
3304         ## Create a cone with given height and radiuses at
3305         #  the origin of coordinate system. Axis of the cone will
3306         #  be collinear to the OZ axis of the coordinate system.
3307         #  @param theR1 Radius of the first cone base.
3308         #  @param theR2 Radius of the second cone base.
3309         #    \note If both radiuses are non-zero, the cone will be truncated.
3310         #    \note If the radiuses are equal, a cylinder will be created instead.
3311         #  @param theH Cone height.
3312         #  @param theName Object name; when specified, this parameter is used
3313         #         for result publication in the study. Otherwise, if automatic
3314         #         publication is switched on, default value is used for result name.
3315         #
3316         #  @return New GEOM.GEOM_Object, containing the created cone.
3317         #
3318         #  @ref tui_creation_cone "Example"
3319         @ManageTransactions("PrimOp")
3320         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3321             """
3322             Create a cone with given height and radiuses at
3323             the origin of coordinate system. Axis of the cone will
3324             be collinear to the OZ axis of the coordinate system.
3325
3326             Parameters:
3327                 theR1 Radius of the first cone base.
3328                 theR2 Radius of the second cone base.
3329                 theH Cone height.
3330                 theName Object name; when specified, this parameter is used
3331                         for result publication in the study. Otherwise, if automatic
3332                         publication is switched on, default value is used for result name.
3333
3334             Note:
3335                 If both radiuses are non-zero, the cone will be truncated.
3336                 If the radiuses are equal, a cylinder will be created instead.
3337
3338             Returns:
3339                 New GEOM.GEOM_Object, containing the created cone.
3340             """
3341             # Example: see GEOM_TestAll.py
3342             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3343             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3344             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3345             anObj.SetParameters(Parameters)
3346             self._autoPublish(anObj, theName, "cone")
3347             return anObj
3348
3349         ## Create a torus with given center, normal vector and radiuses.
3350         #  @param thePnt Torus central point.
3351         #  @param theVec Torus axis of symmetry.
3352         #  @param theRMajor Torus major radius.
3353         #  @param theRMinor Torus minor radius.
3354         #  @param theName Object name; when specified, this parameter is used
3355         #         for result publication in the study. Otherwise, if automatic
3356         #         publication is switched on, default value is used for result name.
3357         #
3358         #  @return New GEOM.GEOM_Object, containing the created torus.
3359         #
3360         #  @ref tui_creation_torus "Example"
3361         @ManageTransactions("PrimOp")
3362         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3363             """
3364             Create a torus with given center, normal vector and radiuses.
3365
3366             Parameters:
3367                 thePnt Torus central point.
3368                 theVec Torus axis of symmetry.
3369                 theRMajor Torus major radius.
3370                 theRMinor Torus minor radius.
3371                 theName Object name; when specified, this parameter is used
3372                         for result publication in the study. Otherwise, if automatic
3373                         publication is switched on, default value is used for result name.
3374
3375            Returns:
3376                 New GEOM.GEOM_Object, containing the created torus.
3377             """
3378             # Example: see GEOM_TestAll.py
3379             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3380             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3381             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3382             anObj.SetParameters(Parameters)
3383             self._autoPublish(anObj, theName, "torus")
3384             return anObj
3385
3386         ## Create a torus with given radiuses at the origin of coordinate system.
3387         #  @param theRMajor Torus major radius.
3388         #  @param theRMinor Torus minor radius.
3389         #  @param theName Object name; when specified, this parameter is used
3390         #         for result publication in the study. Otherwise, if automatic
3391         #         publication is switched on, default value is used for result name.
3392         #
3393         #  @return New GEOM.GEOM_Object, containing the created torus.
3394         #
3395         #  @ref tui_creation_torus "Example"
3396         @ManageTransactions("PrimOp")
3397         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3398             """
3399            Create a torus with given radiuses at the origin of coordinate system.
3400
3401            Parameters:
3402                 theRMajor Torus major radius.
3403                 theRMinor Torus minor radius.
3404                 theName Object name; when specified, this parameter is used
3405                         for result publication in the study. Otherwise, if automatic
3406                         publication is switched on, default value is used for result name.
3407
3408            Returns:
3409                 New GEOM.GEOM_Object, containing the created torus.
3410             """
3411             # Example: see GEOM_TestAll.py
3412             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3413             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3414             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3415             anObj.SetParameters(Parameters)
3416             self._autoPublish(anObj, theName, "torus")
3417             return anObj
3418
3419         # end of l3_3d_primitives
3420         ## @}
3421
3422         ## @addtogroup l3_complex
3423         ## @{
3424
3425         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3426         #  @param theBase Base shape to be extruded.
3427         #  @param thePoint1 First end of extrusion vector.
3428         #  @param thePoint2 Second end of extrusion vector.
3429         #  @param theScaleFactor Use it to make prism with scaled second base.
3430         #                        Nagative value means not scaled second base.
3431         #  @param theName Object name; when specified, this parameter is used
3432         #         for result publication in the study. Otherwise, if automatic
3433         #         publication is switched on, default value is used for result name.
3434         #
3435         #  @return New GEOM.GEOM_Object, containing the created prism.
3436         #
3437         #  @ref tui_creation_prism "Example"
3438         @ManageTransactions("PrimOp")
3439         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3440             """
3441             Create a shape by extrusion of the base shape along a vector, defined by two points.
3442
3443             Parameters:
3444                 theBase Base shape to be extruded.
3445                 thePoint1 First end of extrusion vector.
3446                 thePoint2 Second end of extrusion vector.
3447                 theScaleFactor Use it to make prism with scaled second base.
3448                                Nagative value means not scaled second base.
3449                 theName Object name; when specified, this parameter is used
3450                         for result publication in the study. Otherwise, if automatic
3451                         publication is switched on, default value is used for result name.
3452
3453             Returns:
3454                 New GEOM.GEOM_Object, containing the created prism.
3455             """
3456             # Example: see GEOM_TestAll.py
3457             anObj = None
3458             Parameters = ""
3459             if theScaleFactor > 0:
3460                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3461                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3462             else:
3463                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3464             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3465             anObj.SetParameters(Parameters)
3466             self._autoPublish(anObj, theName, "prism")
3467             return anObj
3468
3469         ## Create a shape by extrusion of the base shape along a
3470         #  vector, defined by two points, in 2 Ways (forward/backward).
3471         #  @param theBase Base shape to be extruded.
3472         #  @param thePoint1 First end of extrusion vector.
3473         #  @param thePoint2 Second end of extrusion vector.
3474         #  @param theName Object name; when specified, this parameter is used
3475         #         for result publication in the study. Otherwise, if automatic
3476         #         publication is switched on, default value is used for result name.
3477         #
3478         #  @return New GEOM.GEOM_Object, containing the created prism.
3479         #
3480         #  @ref tui_creation_prism "Example"
3481         @ManageTransactions("PrimOp")
3482         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3483             """
3484             Create a shape by extrusion of the base shape along a
3485             vector, defined by two points, in 2 Ways (forward/backward).
3486
3487             Parameters:
3488                 theBase Base shape to be extruded.
3489                 thePoint1 First end of extrusion vector.
3490                 thePoint2 Second end of extrusion vector.
3491                 theName Object name; when specified, this parameter is used
3492                         for result publication in the study. Otherwise, if automatic
3493                         publication is switched on, default value is used for result name.
3494
3495             Returns:
3496                 New GEOM.GEOM_Object, containing the created prism.
3497             """
3498             # Example: see GEOM_TestAll.py
3499             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3500             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3501             self._autoPublish(anObj, theName, "prism")
3502             return anObj
3503
3504         ## Create a shape by extrusion of the base shape along the vector,
3505         #  i.e. all the space, transfixed by the base shape during its translation
3506         #  along the vector on the given distance.
3507         #  @param theBase Base shape to be extruded.
3508         #  @param theVec Direction of extrusion.
3509         #  @param theH Prism dimension along theVec.
3510         #  @param theScaleFactor Use it to make prism with scaled second base.
3511         #                        Negative value means not scaled second base.
3512         #  @param theName Object name; when specified, this parameter is used
3513         #         for result publication in the study. Otherwise, if automatic
3514         #         publication is switched on, default value is used for result name.
3515         #
3516         #  @return New GEOM.GEOM_Object, containing the created prism.
3517         #
3518         #  @ref tui_creation_prism "Example"
3519         @ManageTransactions("PrimOp")
3520         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3521             """
3522             Create a shape by extrusion of the base shape along the vector,
3523             i.e. all the space, transfixed by the base shape during its translation
3524             along the vector on the given distance.
3525
3526             Parameters:
3527                 theBase Base shape to be extruded.
3528                 theVec Direction of extrusion.
3529                 theH Prism dimension along theVec.
3530                 theScaleFactor Use it to make prism with scaled second base.
3531                                Negative value means not scaled second base.
3532                 theName Object name; when specified, this parameter is used
3533                         for result publication in the study. Otherwise, if automatic
3534                         publication is switched on, default value is used for result name.
3535
3536             Returns:
3537                 New GEOM.GEOM_Object, containing the created prism.
3538             """
3539             # Example: see GEOM_TestAll.py
3540             anObj = None
3541             Parameters = ""
3542             if theScaleFactor > 0:
3543                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3544                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3545             else:
3546                 theH,Parameters = ParseParameters(theH)
3547                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3548             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3549             anObj.SetParameters(Parameters)
3550             self._autoPublish(anObj, theName, "prism")
3551             return anObj
3552
3553         ## Create a shape by extrusion of the base shape along the vector,
3554         #  i.e. all the space, transfixed by the base shape during its translation
3555         #  along the vector on the given distance in 2 Ways (forward/backward).
3556         #  @param theBase Base shape to be extruded.
3557         #  @param theVec Direction of extrusion.
3558         #  @param theH Prism dimension along theVec in forward direction.
3559         #  @param theName Object name; when specified, this parameter is used
3560         #         for result publication in the study. Otherwise, if automatic
3561         #         publication is switched on, default value is used for result name.
3562         #
3563         #  @return New GEOM.GEOM_Object, containing the created prism.
3564         #
3565         #  @ref tui_creation_prism "Example"
3566         @ManageTransactions("PrimOp")
3567         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3568             """
3569             Create a shape by extrusion of the base shape along the vector,
3570             i.e. all the space, transfixed by the base shape during its translation
3571             along the vector on the given distance in 2 Ways (forward/backward).
3572
3573             Parameters:
3574                 theBase Base shape to be extruded.
3575                 theVec Direction of extrusion.
3576                 theH Prism dimension along theVec in forward direction.
3577                 theName Object name; when specified, this parameter is used
3578                         for result publication in the study. Otherwise, if automatic
3579                         publication is switched on, default value is used for result name.
3580
3581             Returns:
3582                 New GEOM.GEOM_Object, containing the created prism.
3583             """
3584             # Example: see GEOM_TestAll.py
3585             theH,Parameters = ParseParameters(theH)
3586             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3587             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3588             anObj.SetParameters(Parameters)
3589             self._autoPublish(anObj, theName, "prism")
3590             return anObj
3591
3592         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3593         #  @param theBase Base shape to be extruded.
3594         #  @param theDX, theDY, theDZ Directions of extrusion.
3595         #  @param theScaleFactor Use it to make prism with scaled second base.
3596         #                        Nagative value means not scaled second base.
3597         #  @param theName Object name; when specified, this parameter is used
3598         #         for result publication in the study. Otherwise, if automatic
3599         #         publication is switched on, default value is used for result name.
3600         #
3601         #  @return New GEOM.GEOM_Object, containing the created prism.
3602         #
3603         #  @ref tui_creation_prism "Example"
3604         @ManageTransactions("PrimOp")
3605         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3606             """
3607             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3608
3609             Parameters:
3610                 theBase Base shape to be extruded.
3611                 theDX, theDY, theDZ Directions of extrusion.
3612                 theScaleFactor Use it to make prism with scaled second base.
3613                                Nagative value means not scaled second base.
3614                 theName Object name; when specified, this parameter is used
3615                         for result publication in the study. Otherwise, if automatic
3616                         publication is switched on, default value is used for result name.
3617
3618             Returns:
3619                 New GEOM.GEOM_Object, containing the created prism.
3620             """
3621             # Example: see GEOM_TestAll.py
3622             anObj = None
3623             Parameters = ""
3624             if theScaleFactor > 0:
3625                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3626                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3627             else:
3628                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3629                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3630             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3631             anObj.SetParameters(Parameters)
3632             self._autoPublish(anObj, theName, "prism")
3633             return anObj
3634
3635         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3636         #  i.e. all the space, transfixed by the base shape during its translation
3637         #  along the vector on the given distance in 2 Ways (forward/backward).
3638         #  @param theBase Base shape to be extruded.
3639         #  @param theDX, theDY, theDZ Directions of extrusion.
3640         #  @param theName Object name; when specified, this parameter is used
3641         #         for result publication in the study. Otherwise, if automatic
3642         #         publication is switched on, default value is used for result name.
3643         #
3644         #  @return New GEOM.GEOM_Object, containing the created prism.
3645         #
3646         #  @ref tui_creation_prism "Example"
3647         @ManageTransactions("PrimOp")
3648         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3649             """
3650             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3651             i.e. all the space, transfixed by the base shape during its translation
3652             along the vector on the given distance in 2 Ways (forward/backward).
3653
3654             Parameters:
3655                 theBase Base shape to be extruded.
3656                 theDX, theDY, theDZ Directions of extrusion.
3657                 theName Object name; when specified, this parameter is used
3658                         for result publication in the study. Otherwise, if automatic
3659                         publication is switched on, default value is used for result name.
3660
3661             Returns:
3662                 New GEOM.GEOM_Object, containing the created prism.
3663             """
3664             # Example: see GEOM_TestAll.py
3665             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3666             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3667             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3668             anObj.SetParameters(Parameters)
3669             self._autoPublish(anObj, theName, "prism")
3670             return anObj
3671
3672         ## Create a shape by revolution of the base shape around the axis
3673         #  on the given angle, i.e. all the space, transfixed by the base
3674         #  shape during its rotation around the axis on the given angle.
3675         #  @param theBase Base shape to be rotated.
3676         #  @param theAxis Rotation axis.
3677         #  @param theAngle Rotation angle in radians.
3678         #  @param theName Object name; when specified, this parameter is used
3679         #         for result publication in the study. Otherwise, if automatic
3680         #         publication is switched on, default value is used for result name.
3681         #
3682         #  @return New GEOM.GEOM_Object, containing the created revolution.
3683         #
3684         #  @ref tui_creation_revolution "Example"
3685         @ManageTransactions("PrimOp")
3686         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3687             """
3688             Create a shape by revolution of the base shape around the axis
3689             on the given angle, i.e. all the space, transfixed by the base
3690             shape during its rotation around the axis on the given angle.
3691
3692             Parameters:
3693                 theBase Base shape to be rotated.
3694                 theAxis Rotation axis.
3695                 theAngle Rotation angle in radians.
3696                 theName Object name; when specified, this parameter is used
3697                         for result publication in the study. Otherwise, if automatic
3698                         publication is switched on, default value is used for result name.
3699
3700             Returns:
3701                 New GEOM.GEOM_Object, containing the created revolution.
3702             """
3703             # Example: see GEOM_TestAll.py
3704             theAngle,Parameters = ParseParameters(theAngle)
3705             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3706             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3707             anObj.SetParameters(Parameters)
3708             self._autoPublish(anObj, theName, "revolution")
3709             return anObj
3710
3711         ## Create a shape by revolution of the base shape around the axis
3712         #  on the given angle, i.e. all the space, transfixed by the base
3713         #  shape during its rotation around the axis on the given angle in
3714         #  both directions (forward/backward)
3715         #  @param theBase Base shape to be rotated.
3716         #  @param theAxis Rotation axis.
3717         #  @param theAngle Rotation angle in radians.
3718         #  @param theName Object name; when specified, this parameter is used
3719         #         for result publication in the study. Otherwise, if automatic
3720         #         publication is switched on, default value is used for result name.
3721         #
3722         #  @return New GEOM.GEOM_Object, containing the created revolution.
3723         #
3724         #  @ref tui_creation_revolution "Example"
3725         @ManageTransactions("PrimOp")
3726         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3727             """
3728             Create a shape by revolution of the base shape around the axis
3729             on the given angle, i.e. all the space, transfixed by the base
3730             shape during its rotation around the axis on the given angle in
3731             both directions (forward/backward).
3732
3733             Parameters:
3734                 theBase Base shape to be rotated.
3735                 theAxis Rotation axis.
3736                 theAngle Rotation angle in radians.
3737                 theName Object name; when specified, this parameter is used
3738                         for result publication in the study. Otherwise, if automatic
3739                         publication is switched on, default value is used for result name.
3740
3741             Returns:
3742                 New GEOM.GEOM_Object, containing the created revolution.
3743             """
3744             theAngle,Parameters = ParseParameters(theAngle)
3745             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3746             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3747             anObj.SetParameters(Parameters)
3748             self._autoPublish(anObj, theName, "revolution")
3749             return anObj
3750
3751         ## Create a face from a given set of contours.
3752         #  @param theContours either a list or a compound of edges/wires.
3753         #  @param theMinDeg a minimal degree of BSpline surface to create.
3754         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3755         #  @param theTol2D a 2d tolerance to be reached.
3756         #  @param theTol3D a 3d tolerance to be reached.
3757         #  @param theNbIter a number of iteration of approximation algorithm.
3758         #  @param theMethod Kind of method to perform filling operation
3759         #         (see GEOM.filling_oper_method enum).
3760         #  @param isApprox if True, BSpline curves are generated in the process
3761         #                  of surface construction. By default it is False, that means
3762         #                  the surface is created using given curves. The usage of
3763         #                  Approximation makes the algorithm work slower, but allows
3764         #                  building the surface for rather complex cases.
3765         #  @param theName Object name; when specified, this parameter is used
3766         #         for result publication in the study. Otherwise, if automatic
3767         #         publication is switched on, default value is used for result name.
3768         #
3769         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3770         #
3771         #  @ref tui_creation_filling "Example"
3772         @ManageTransactions("PrimOp")
3773         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3774                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3775             """
3776             Create a face from a given set of contours.
3777
3778             Parameters:
3779                 theContours either a list or a compound of edges/wires.
3780                 theMinDeg a minimal degree of BSpline surface to create.
3781                 theMaxDeg a maximal degree of BSpline surface to create.
3782                 theTol2D a 2d tolerance to be reached.
3783                 theTol3D a 3d tolerance to be reached.
3784                 theNbIter a number of iteration of approximation algorithm.
3785                 theMethod Kind of method to perform filling operation
3786                           (see GEOM.filling_oper_method enum).
3787                 isApprox if True, BSpline curves are generated in the process
3788                          of surface construction. By default it is False, that means
3789                          the surface is created using given curves. The usage of
3790                          Approximation makes the algorithm work slower, but allows
3791                          building the surface for rather complex cases.
3792                 theName Object name; when specified, this parameter is used
3793                         for result publication in the study. Otherwise, if automatic
3794                         publication is switched on, default value is used for result name.
3795
3796             Returns:
3797                 New GEOM.GEOM_Object (face), containing the created filling surface.
3798
3799             Example of usage:
3800                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3801             """
3802             # Example: see GEOM_TestAll.py
3803             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3804             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3805                                             theTol2D, theTol3D, theNbIter,
3806                                             theMethod, isApprox)
3807             RaiseIfFailed("MakeFilling", self.PrimOp)
3808             anObj.SetParameters(Parameters)
3809             self._autoPublish(anObj, theName, "filling")
3810             return anObj
3811
3812
3813         ## Create a face from a given set of contours.
3814         #  This method corresponds to MakeFilling() with isApprox=True.
3815         #  @param theContours either a list or a compound of edges/wires.
3816         #  @param theMinDeg a minimal degree of BSpline surface to create.
3817         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3818         #  @param theTol3D a 3d tolerance to be reached.
3819         #  @param theName Object name; when specified, this parameter is used
3820         #         for result publication in the study. Otherwise, if automatic
3821         #         publication is switched on, default value is used for result name.
3822         #
3823         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3824         #
3825         #  @ref tui_creation_filling "Example"
3826         @ManageTransactions("PrimOp")
3827         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3828             """
3829             Create a filling from the given compound of contours.
3830             This method corresponds to MakeFilling() with isApprox=True.
3831
3832             Parameters:
3833                 theContours either a list or a compound of edges/wires.
3834                 theMinDeg a minimal degree of BSpline surface to create.
3835                 theMaxDeg a maximal degree of BSpline surface to create.
3836                 theTol3D a 3d tolerance to be reached.
3837                 theName Object name; when specified, this parameter is used
3838                         for result publication in the study. Otherwise, if automatic
3839                         publication is switched on, default value is used for result name.
3840
3841             Returns:
3842                 New GEOM.GEOM_Object (face), containing the created filling surface.
3843
3844             Example of usage:
3845                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3846             """
3847             # Example: see GEOM_TestAll.py
3848             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3849             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3850                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3851             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3852             anObj.SetParameters(Parameters)
3853             self._autoPublish(anObj, theName, "filling")
3854             return anObj
3855
3856         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3857         #  @param theSeqSections - set of specified sections.
3858         #  @param theModeSolid - mode defining building solid or shell
3859         #  @param thePreci - precision 3D used for smoothing
3860         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3861         #  @param theName Object name; when specified, this parameter is used
3862         #         for result publication in the study. Otherwise, if automatic
3863         #         publication is switched on, default value is used for result name.
3864         #
3865         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3866         #
3867         #  @ref swig_todo "Example"
3868         @ManageTransactions("PrimOp")
3869         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3870             """
3871             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3872
3873             Parameters:
3874                 theSeqSections - set of specified sections.
3875                 theModeSolid - mode defining building solid or shell
3876                 thePreci - precision 3D used for smoothing
3877                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3878                 theName Object name; when specified, this parameter is used
3879                         for result publication in the study. Otherwise, if automatic
3880                         publication is switched on, default value is used for result name.
3881
3882             Returns:
3883                 New GEOM.GEOM_Object, containing the created shell or solid.
3884             """
3885             # Example: see GEOM_TestAll.py
3886             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3887             RaiseIfFailed("MakeThruSections", self.PrimOp)
3888             self._autoPublish(anObj, theName, "filling")
3889             return anObj
3890
3891         ## Create a shape by extrusion of the base shape along
3892         #  the path shape. The path shape can be a wire or an edge. It is
3893         #  possible to generate groups along with the result by means of
3894         #  setting the flag \a IsGenerateGroups.<BR>
3895         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3896         #  set, an error is occured. If \a thePath is not closed edge/wire,
3897         #  the following groups are returned:
3898         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3899         #    "Side2";
3900         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3901         #    "Other".
3902         #  .
3903         #  "Down" and "Up" groups contain:
3904         #  - Edges if \a theBase is edge or wire;
3905         #  - Faces if \a theBase is face or shell.<BR>
3906         #  .
3907         #  "Side1" and "Side2" groups contain edges generated from the first
3908         #  and last vertices of \a theBase. The first and last vertices are
3909         #  determined taking into account edge/wire orientation.<BR>
3910         #  "Other" group represents faces generated from the bounding edges of
3911         #  \a theBase.
3912         #
3913         #  @param theBase Base shape to be extruded.
3914         #  @param thePath Path shape to extrude the base shape along it.
3915         #  @param IsGenerateGroups flag that tells if it is necessary to
3916         #         create groups. It is equal to False by default.
3917         #  @param theName Object name; when specified, this parameter is used
3918         #         for result publication in the study. Otherwise, if automatic
3919         #         publication is switched on, default value is used for result name.
3920         #
3921         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3922         #          \a IsGenerateGroups is not set. Otherwise it returns new
3923         #          GEOM.ListOfGO. Its first element is the created pipe, the
3924         #          remaining ones are created groups.
3925         #
3926         #  @ref tui_creation_pipe "Example"
3927         @ManageTransactions("PrimOp")
3928         def MakePipe(self, theBase, thePath,
3929                      IsGenerateGroups=False, theName=None):
3930             """
3931             Create a shape by extrusion of the base shape along
3932             the path shape. The path shape can be a wire or an edge. It is
3933             possible to generate groups along with the result by means of
3934             setting the flag IsGenerateGroups.
3935             If thePath is a closed edge or wire and IsGenerateGroups is
3936             set, an error is occured. If thePath is not closed edge/wire,
3937             the following groups are returned:
3938             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
3939               "Side2";
3940             - If theBase is closed edge or wire, face or shell: "Down", "Up",
3941               "Other".
3942             "Down" and "Up" groups contain:
3943             - Edges if theBase is edge or wire;
3944             - Faces if theBase is face or shell.
3945             "Side1" and "Side2" groups contain edges generated from the first
3946             and last vertices of theBase. The first and last vertices are
3947             determined taking into account edge/wire orientation.
3948             "Other" group represents faces generated from the bounding edges of
3949             theBase.
3950
3951             Parameters:
3952                 theBase Base shape to be extruded.
3953                 thePath Path shape to extrude the base shape along it.
3954                 IsGenerateGroups flag that tells if it is necessary to
3955                         create groups. It is equal to False by default.
3956                 theName Object name; when specified, this parameter is used
3957                         for result publication in the study. Otherwise, if automatic
3958                         publication is switched on, default value is used for result name.
3959
3960             Returns:
3961                 New GEOM.GEOM_Object, containing the created pipe if 
3962                 IsGenerateGroups is not set. Otherwise it returns new
3963                 GEOM.ListOfGO. Its first element is the created pipe, the
3964                 remaining ones are created groups.
3965             """
3966             # Example: see GEOM_TestAll.py
3967             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
3968             RaiseIfFailed("MakePipe", self.PrimOp)
3969
3970             if IsGenerateGroups:
3971               self._autoPublish(aList, theName, "pipe")
3972               return aList
3973
3974             self._autoPublish(aList[0], theName, "pipe")
3975             return aList[0]
3976
3977         ## Create a shape by extrusion of the profile shape along
3978         #  the path shape. The path shape can be a wire or an edge.
3979         #  the several profiles can be specified in the several locations of path.
3980         #  It is possible to generate groups along with the result by means of
3981         #  setting the flag \a IsGenerateGroups. For detailed information on
3982         #  groups that can be created please see the method MakePipe().
3983         #  @param theSeqBases - list of  Bases shape to be extruded.
3984         #  @param theLocations - list of locations on the path corresponding
3985         #                        specified list of the Bases shapes. Number of locations
3986         #                        should be equal to number of bases or list of locations can be empty.
3987         #  @param thePath - Path shape to extrude the base shape along it.
3988         #  @param theWithContact - the mode defining that the section is translated to be in
3989         #                          contact with the spine.
3990         #  @param theWithCorrection - defining that the section is rotated to be
3991         #                             orthogonal to the spine tangent in the correspondent point
3992         #  @param IsGenerateGroups - flag that tells if it is necessary to
3993         #                          create groups. It is equal to False by default.
3994         #  @param theName Object name; when specified, this parameter is used
3995         #         for result publication in the study. Otherwise, if automatic
3996         #         publication is switched on, default value is used for result name.
3997         #
3998         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3999         #          \a IsGenerateGroups is not set. Otherwise it returns new
4000         #          GEOM.ListOfGO. Its first element is the created pipe, the
4001         #          remaining ones are created groups.
4002         #
4003         #  @ref tui_creation_pipe_with_diff_sec "Example"
4004         @ManageTransactions("PrimOp")
4005         def MakePipeWithDifferentSections(self, theSeqBases,
4006                                           theLocations, thePath,
4007                                           theWithContact, theWithCorrection,
4008                                           IsGenerateGroups=False, theName=None):
4009             """
4010             Create a shape by extrusion of the profile shape along
4011             the path shape. The path shape can be a wire or an edge.
4012             the several profiles can be specified in the several locations of path.
4013             It is possible to generate groups along with the result by means of
4014             setting the flag IsGenerateGroups. For detailed information on
4015             groups that can be created please see the method geompy.MakePipe().
4016
4017             Parameters:
4018                 theSeqBases - list of  Bases shape to be extruded.
4019                 theLocations - list of locations on the path corresponding
4020                                specified list of the Bases shapes. Number of locations
4021                                should be equal to number of bases or list of locations can be empty.
4022                 thePath - Path shape to extrude the base shape along it.
4023                 theWithContact - the mode defining that the section is translated to be in
4024                                  contact with the spine(0/1)
4025                 theWithCorrection - defining that the section is rotated to be
4026                                     orthogonal to the spine tangent in the correspondent point (0/1)
4027                 IsGenerateGroups - flag that tells if it is necessary to
4028                                  create groups. It is equal to False by default.
4029                 theName Object name; when specified, this parameter is used
4030                         for result publication in the study. Otherwise, if automatic
4031                         publication is switched on, default value is used for result name.
4032
4033             Returns:
4034                 New GEOM.GEOM_Object, containing the created pipe if 
4035                 IsGenerateGroups is not set. Otherwise it returns new
4036                 GEOM.ListOfGO. Its first element is the created pipe, the
4037                 remaining ones are created groups.
4038             """
4039             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4040                                                               theLocations, thePath,
4041                                                               theWithContact, theWithCorrection,
4042                                                               False, IsGenerateGroups)
4043             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4044
4045             if IsGenerateGroups:
4046               self._autoPublish(aList, theName, "pipe")
4047               return aList
4048
4049             self._autoPublish(aList[0], theName, "pipe")
4050             return aList[0]
4051
4052         ## Create a shape by extrusion of the profile shape along
4053         #  the path shape. This function is a version of
4054         #  MakePipeWithDifferentSections() with the same parameters, except
4055         #  eliminated theWithContact and theWithCorrection. So it is
4056         #  possible to find the description of all parameters is in this
4057         #  method. The difference is that this method performs the operation
4058         #  step by step, i.e. it creates pipes between each pair of neighbor
4059         #  sections and fuses them into a single shape.
4060         #
4061         #  @ref tui_creation_pipe_with_diff_sec "Example"
4062         @ManageTransactions("PrimOp")
4063         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4064                                                  theLocations, thePath,
4065                                                  IsGenerateGroups=False, theName=None):
4066             """
4067             Create a shape by extrusion of the profile shape along
4068             the path shape. This function is a version of
4069             MakePipeWithDifferentSections() with the same parameters, except
4070             eliminated theWithContact and theWithCorrection. So it is
4071             possible to find the description of all parameters is in this
4072             method. The difference is that this method performs the operation
4073             step by step, i.e. it creates pipes between each pair of neighbor
4074             sections and fuses them into a single shape.
4075             """
4076             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4077                                                               theLocations, thePath,
4078                                                               False, False,
4079                                                               True, IsGenerateGroups)
4080             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4081
4082             if IsGenerateGroups:
4083               self._autoPublish(aList, theName, "pipe")
4084               return aList
4085
4086             self._autoPublish(aList[0], theName, "pipe")
4087             return aList[0]
4088
4089         ## Create a shape by extrusion of the profile shape along
4090         #  the path shape. The path shape can be a wire or an edge.
4091         #  the several profiles can be specified in the several locations of path.
4092         #  It is possible to generate groups along with the result by means of
4093         #  setting the flag \a IsGenerateGroups. For detailed information on
4094         #  groups that can be created please see the method MakePipe().
4095         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4096         #                       shell or face. If number of faces in neighbour sections
4097         #                       aren't coincided result solid between such sections will
4098         #                       be created using external boundaries of this shells.
4099         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4100         #                          This list is used for searching correspondences between
4101         #                          faces in the sections. Size of this list must be equal
4102         #                          to size of list of base shapes.
4103         #  @param theLocations - list of locations on the path corresponding
4104         #                        specified list of the Bases shapes. Number of locations
4105         #                        should be equal to number of bases. First and last
4106         #                        locations must be coincided with first and last vertexes
4107         #                        of path correspondingly.
4108         #  @param thePath - Path shape to extrude the base shape along it.
4109         #  @param theWithContact - the mode defining that the section is translated to be in
4110         #                          contact with the spine.
4111         #  @param theWithCorrection - defining that the section is rotated to be
4112         #                             orthogonal to the spine tangent in the correspondent point
4113         #  @param IsGenerateGroups - flag that tells if it is necessary to
4114         #                          create groups. It is equal to False by default.
4115         #  @param theName Object name; when specified, this parameter is used
4116         #         for result publication in the study. Otherwise, if automatic
4117         #         publication is switched on, default value is used for result name.
4118         #
4119         #  @return New GEOM.GEOM_Object, containing the created solids if 
4120         #          \a IsGenerateGroups is not set. Otherwise it returns new
4121         #          GEOM.ListOfGO. Its first element is the created solids, the
4122         #          remaining ones are created groups.
4123         #
4124         #  @ref tui_creation_pipe_with_shell_sec "Example"
4125         @ManageTransactions("PrimOp")
4126         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4127                                       theLocations, thePath,
4128                                       theWithContact, theWithCorrection,
4129                                       IsGenerateGroups=False, theName=None):
4130             """
4131             Create a shape by extrusion of the profile shape along
4132             the path shape. The path shape can be a wire or an edge.
4133             the several profiles can be specified in the several locations of path.
4134             It is possible to generate groups along with the result by means of
4135             setting the flag IsGenerateGroups. For detailed information on
4136             groups that can be created please see the method geompy.MakePipe().
4137
4138             Parameters:
4139                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4140                               shell or face. If number of faces in neighbour sections
4141                               aren't coincided result solid between such sections will
4142                               be created using external boundaries of this shells.
4143                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4144                                  This list is used for searching correspondences between
4145                                  faces in the sections. Size of this list must be equal
4146                                  to size of list of base shapes.
4147                 theLocations - list of locations on the path corresponding
4148                                specified list of the Bases shapes. Number of locations
4149                                should be equal to number of bases. First and last
4150                                locations must be coincided with first and last vertexes
4151                                of path correspondingly.
4152                 thePath - Path shape to extrude the base shape along it.
4153                 theWithContact - the mode defining that the section is translated to be in
4154                                  contact with the spine (0/1)
4155                 theWithCorrection - defining that the section is rotated to be
4156                                     orthogonal to the spine tangent in the correspondent point (0/1)
4157                 IsGenerateGroups - flag that tells if it is necessary to
4158                                  create groups. It is equal to False by default.
4159                 theName Object name; when specified, this parameter is used
4160                         for result publication in the study. Otherwise, if automatic
4161                         publication is switched on, default value is used for result name.
4162
4163             Returns:
4164                 New GEOM.GEOM_Object, containing the created solids if 
4165                 IsGenerateGroups is not set. Otherwise it returns new
4166                 GEOM.ListOfGO. Its first element is the created solids, the
4167                 remaining ones are created groups.
4168             """
4169             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4170                                                           theLocations, thePath,
4171                                                           theWithContact, theWithCorrection,
4172                                                           IsGenerateGroups)
4173             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4174
4175             if IsGenerateGroups:
4176               self._autoPublish(aList, theName, "pipe")
4177               return aList
4178
4179             self._autoPublish(aList[0], theName, "pipe")
4180             return aList[0]
4181
4182         ## Create a shape by extrusion of the profile shape along
4183         #  the path shape. This function is used only for debug pipe
4184         #  functionality - it is a version of function MakePipeWithShellSections()
4185         #  which give a possibility to recieve information about
4186         #  creating pipe between each pair of sections step by step.
4187         @ManageTransactions("PrimOp")
4188         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4189                                              theLocations, thePath,
4190                                              theWithContact, theWithCorrection,
4191                                              IsGenerateGroups=False, theName=None):
4192             """
4193             Create a shape by extrusion of the profile shape along
4194             the path shape. This function is used only for debug pipe
4195             functionality - it is a version of previous function
4196             geompy.MakePipeWithShellSections() which give a possibility to
4197             recieve information about creating pipe between each pair of
4198             sections step by step.
4199             """
4200             res = []
4201             nbsect = len(theSeqBases)
4202             nbsubsect = len(theSeqSubBases)
4203             #print "nbsect = ",nbsect
4204             for i in range(1,nbsect):
4205                 #print "  i = ",i
4206                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4207                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4208                 tmpSeqSubBases = []
4209                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4210                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4211                                                               tmpLocations, thePath,
4212                                                               theWithContact, theWithCorrection,
4213                                                               IsGenerateGroups)
4214                 if self.PrimOp.IsDone() == 0:
4215                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4216                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4217                     break
4218                 else:
4219                     print "Pipe between ",i," and ",i+1," sections is OK"
4220                     res.append(aList[0])
4221                     pass
4222                 pass
4223
4224             resc = self.MakeCompound(res)
4225             #resc = self.MakeSewing(res, 0.001)
4226             #print "resc: ",resc
4227             self._autoPublish(resc, theName, "pipe")
4228             return resc
4229
4230         ## Create solids between given sections.
4231         #  It is possible to generate groups along with the result by means of
4232         #  setting the flag \a IsGenerateGroups. For detailed information on
4233         #  groups that can be created please see the method MakePipe().
4234         #  @param theSeqBases - list of sections (shell or face).
4235         #  @param theLocations - list of corresponding vertexes
4236         #  @param IsGenerateGroups - flag that tells if it is necessary to
4237         #         create groups. It is equal to False by default.
4238         #  @param theName Object name; when specified, this parameter is used
4239         #         for result publication in the study. Otherwise, if automatic
4240         #         publication is switched on, default value is used for result name.
4241         #
4242         #  @return New GEOM.GEOM_Object, containing the created solids if 
4243         #          \a IsGenerateGroups is not set. Otherwise it returns new
4244         #          GEOM.ListOfGO. Its first element is the created solids, the
4245         #          remaining ones are created groups.
4246         #
4247         #  @ref tui_creation_pipe_without_path "Example"
4248         @ManageTransactions("PrimOp")
4249         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4250                                       IsGenerateGroups=False, theName=None):
4251             """
4252             Create solids between given sections.
4253             It is possible to generate groups along with the result by means of
4254             setting the flag IsGenerateGroups. For detailed information on
4255             groups that can be created please see the method geompy.MakePipe().
4256
4257             Parameters:
4258                 theSeqBases - list of sections (shell or face).
4259                 theLocations - list of corresponding vertexes
4260                 IsGenerateGroups - flag that tells if it is necessary to
4261                                  create groups. It is equal to False by default.
4262                 theName Object name; when specified, this parameter is used
4263                         for result publication in the study. Otherwise, if automatic
4264                         publication is switched on, default value is used for result name.
4265
4266             Returns:
4267                 New GEOM.GEOM_Object, containing the created solids if 
4268                 IsGenerateGroups is not set. Otherwise it returns new
4269                 GEOM.ListOfGO. Its first element is the created solids, the
4270                 remaining ones are created groups.
4271             """
4272             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4273                                                           IsGenerateGroups)
4274             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4275
4276             if IsGenerateGroups:
4277               self._autoPublish(aList, theName, "pipe")
4278               return aList
4279
4280             self._autoPublish(aList[0], theName, "pipe")
4281             return aList[0]
4282
4283         ## Create a shape by extrusion of the base shape along
4284         #  the path shape with constant bi-normal direction along the given vector.
4285         #  The path shape can be a wire or an edge.
4286         #  It is possible to generate groups along with the result by means of
4287         #  setting the flag \a IsGenerateGroups. For detailed information on
4288         #  groups that can be created please see the method MakePipe().
4289         #  @param theBase Base shape to be extruded.
4290         #  @param thePath Path shape to extrude the base shape along it.
4291         #  @param theVec Vector defines a constant binormal direction to keep the
4292         #                same angle beetween the direction and the sections
4293         #                along the sweep surface.
4294         #  @param IsGenerateGroups flag that tells if it is necessary to
4295         #         create groups. It is equal to False by default.
4296         #  @param theName Object name; when specified, this parameter is used
4297         #         for result publication in the study. Otherwise, if automatic
4298         #         publication is switched on, default value is used for result name.
4299         #
4300         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4301         #          \a IsGenerateGroups is not set. Otherwise it returns new
4302         #          GEOM.ListOfGO. Its first element is the created pipe, the
4303         #          remaining ones are created groups.
4304         #
4305         #  @ref tui_creation_pipe "Example"
4306         @ManageTransactions("PrimOp")
4307         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4308                                         IsGenerateGroups=False, theName=None):
4309             """
4310             Create a shape by extrusion of the base shape along
4311             the path shape with constant bi-normal direction along the given vector.
4312             The path shape can be a wire or an edge.
4313             It is possible to generate groups along with the result by means of
4314             setting the flag IsGenerateGroups. For detailed information on
4315             groups that can be created please see the method geompy.MakePipe().
4316
4317             Parameters:
4318                 theBase Base shape to be extruded.
4319                 thePath Path shape to extrude the base shape along it.
4320                 theVec Vector defines a constant binormal direction to keep the
4321                        same angle beetween the direction and the sections
4322                        along the sweep surface.
4323                 IsGenerateGroups flag that tells if it is necessary to
4324                                  create groups. It is equal to False by default.
4325                 theName Object name; when specified, this parameter is used
4326                         for result publication in the study. Otherwise, if automatic
4327                         publication is switched on, default value is used for result name.
4328
4329             Returns:
4330                 New GEOM.GEOM_Object, containing the created pipe if 
4331                 IsGenerateGroups is not set. Otherwise it returns new
4332                 GEOM.ListOfGO. Its first element is the created pipe, the
4333                 remaining ones are created groups.
4334             """
4335             # Example: see GEOM_TestAll.py
4336             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4337                           theVec, IsGenerateGroups)
4338             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4339
4340             if IsGenerateGroups:
4341               self._autoPublish(aList, theName, "pipe")
4342               return aList
4343
4344             self._autoPublish(aList[0], theName, "pipe")
4345             return aList[0]
4346
4347         ## Makes a thick solid from a shape. If the input is a surface shape
4348         #  (face or shell) the result is a thick solid. If an input shape is
4349         #  a solid the result is a hollowed solid with removed faces.
4350         #  @param theShape Face or Shell to get thick solid or solid to get
4351         #         hollowed solid.
4352         #  @param theThickness Thickness of the resulting solid
4353         #  @param theFacesIDs the list of face IDs to be removed from the
4354         #         result. It is ignored if \a theShape is a face or a shell.
4355         #         It is empty by default. 
4356         #  @param theInside If true the thickness is applied towards inside
4357         #  @param theName Object name; when specified, this parameter is used
4358         #         for result publication in the study. Otherwise, if automatic
4359         #         publication is switched on, default value is used for result name.
4360         #
4361         #  @return New GEOM.GEOM_Object, containing the created solid
4362         #
4363         #  @ref tui_creation_thickness "Example"
4364         @ManageTransactions("PrimOp")
4365         def MakeThickSolid(self, theShape, theThickness,
4366                            theFacesIDs=[], theInside=False, theName=None):
4367             """
4368             Make a thick solid from a shape. If the input is a surface shape
4369             (face or shell) the result is a thick solid. If an input shape is
4370             a solid the result is a hollowed solid with removed faces.
4371
4372             Parameters:
4373                  theShape Face or Shell to get thick solid or solid to get
4374                           hollowed solid.
4375                  theThickness Thickness of the resulting solid
4376                  theFacesIDs the list of face IDs to be removed from the
4377                           result. It is ignored if theShape is a face or a
4378                           shell. It is empty by default. 
4379                  theInside If true the thickness is applied towards inside
4380                  theName Object name; when specified, this parameter is used
4381                          for result publication in the study. Otherwise, if automatic
4382                          publication is switched on, default value is used for result name.
4383
4384             Returns:
4385                 New GEOM.GEOM_Object, containing the created solid
4386             """
4387             # Example: see GEOM_TestAll.py
4388             theThickness,Parameters = ParseParameters(theThickness)
4389             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4390                                                theThickness, True, theInside)
4391             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4392             anObj.SetParameters(Parameters)
4393             self._autoPublish(anObj, theName, "thickSolid")
4394             return anObj
4395
4396
4397         ## Modifies a shape to make it a thick solid. If the input is a surface
4398         #  shape (face or shell) the result is a thick solid. If an input shape
4399         #  is a solid the result is a hollowed solid with removed faces.
4400         #  @param theShape Face or Shell to get thick solid or solid to get
4401         #         hollowed solid.
4402         #  @param theThickness Thickness of the resulting solid
4403         #  @param theFacesIDs the list of face IDs to be removed from the
4404         #         result. It is ignored if \a theShape is a face or a shell.
4405         #         It is empty by default. 
4406         #  @param theInside If true the thickness is applied towards inside
4407         #
4408         #  @return The modified shape
4409         #
4410         #  @ref tui_creation_thickness "Example"
4411         @ManageTransactions("PrimOp")
4412         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4413             """
4414             Modifies a shape to make it a thick solid. If the input is a
4415             surface shape (face or shell) the result is a thick solid. If
4416             an input shape is a solid the result is a hollowed solid with
4417             removed faces.
4418
4419             Parameters:
4420                 theShape Face or Shell to get thick solid or solid to get
4421                          hollowed solid.
4422                 theThickness Thickness of the resulting solid
4423                 theFacesIDs the list of face IDs to be removed from the
4424                          result. It is ignored if \a theShape is a face or
4425                          a shell. It is empty by default. 
4426                 theInside If true the thickness is applied towards inside
4427
4428             Returns:
4429                 The modified shape
4430             """
4431             # Example: see GEOM_TestAll.py
4432             theThickness,Parameters = ParseParameters(theThickness)
4433             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4434                                                theThickness, False, theInside)
4435             RaiseIfFailed("Thicken", self.PrimOp)
4436             anObj.SetParameters(Parameters)
4437             return anObj
4438
4439         ## Build a middle path of a pipe-like shape.
4440         #  The path shape can be a wire or an edge.
4441         #  @param theShape It can be closed or unclosed pipe-like shell
4442         #                  or a pipe-like solid.
4443         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4444         #                            should be wires or faces of theShape.
4445         #  @param theName Object name; when specified, this parameter is used
4446         #         for result publication in the study. Otherwise, if automatic
4447         #         publication is switched on, default value is used for result name.
4448         #
4449         #  @note It is not assumed that exact or approximate copy of theShape
4450         #        can be obtained by applying existing Pipe operation on the
4451         #        resulting "Path" wire taking theBase1 as the base - it is not
4452         #        always possible; though in some particular cases it might work
4453         #        it is not guaranteed. Thus, RestorePath function should not be
4454         #        considered as an exact reverse operation of the Pipe.
4455         #
4456         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4457         #                                source pipe's "path".
4458         #
4459         #  @ref tui_creation_pipe_path "Example"
4460         @ManageTransactions("PrimOp")
4461         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4462             """
4463             Build a middle path of a pipe-like shape.
4464             The path shape can be a wire or an edge.
4465
4466             Parameters:
4467                 theShape It can be closed or unclosed pipe-like shell
4468                          or a pipe-like solid.
4469                 theBase1, theBase2 Two bases of the supposed pipe. This
4470                                    should be wires or faces of theShape.
4471                 theName Object name; when specified, this parameter is used
4472                         for result publication in the study. Otherwise, if automatic
4473                         publication is switched on, default value is used for result name.
4474
4475             Returns:
4476                 New GEOM_Object, containing an edge or wire that represent
4477                                  source pipe's path.
4478             """
4479             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4480             RaiseIfFailed("RestorePath", self.PrimOp)
4481             self._autoPublish(anObj, theName, "path")
4482             return anObj
4483
4484         ## Build a middle path of a pipe-like shape.
4485         #  The path shape can be a wire or an edge.
4486         #  @param theShape It can be closed or unclosed pipe-like shell
4487         #                  or a pipe-like solid.
4488         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4489         #                                should be lists of edges of theShape.
4490         #  @param theName Object name; when specified, this parameter is used
4491         #         for result publication in the study. Otherwise, if automatic
4492         #         publication is switched on, default value is used for result name.
4493         #
4494         #  @note It is not assumed that exact or approximate copy of theShape
4495         #        can be obtained by applying existing Pipe operation on the
4496         #        resulting "Path" wire taking theBase1 as the base - it is not
4497         #        always possible; though in some particular cases it might work
4498         #        it is not guaranteed. Thus, RestorePath function should not be
4499         #        considered as an exact reverse operation of the Pipe.
4500         #
4501         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4502         #                                source pipe's "path".
4503         #
4504         #  @ref tui_creation_pipe_path "Example"
4505         @ManageTransactions("PrimOp")
4506         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4507             """
4508             Build a middle path of a pipe-like shape.
4509             The path shape can be a wire or an edge.
4510
4511             Parameters:
4512                 theShape It can be closed or unclosed pipe-like shell
4513                          or a pipe-like solid.
4514                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4515                                        should be lists of edges of theShape.
4516                 theName Object name; when specified, this parameter is used
4517                         for result publication in the study. Otherwise, if automatic
4518                         publication is switched on, default value is used for result name.
4519
4520             Returns:
4521                 New GEOM_Object, containing an edge or wire that represent
4522                                  source pipe's path.
4523             """
4524             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4525             RaiseIfFailed("RestorePath", self.PrimOp)
4526             self._autoPublish(anObj, theName, "path")
4527             return anObj
4528
4529         # end of l3_complex
4530         ## @}
4531
4532         ## @addtogroup l3_basic_go
4533         ## @{
4534
4535         ## Create a linear edge with specified ends.
4536         #  @param thePnt1 Point for the first end of edge.
4537         #  @param thePnt2 Point for the second end of edge.
4538         #  @param theName Object name; when specified, this parameter is used
4539         #         for result publication in the study. Otherwise, if automatic
4540         #         publication is switched on, default value is used for result name.
4541         #
4542         #  @return New GEOM.GEOM_Object, containing the created edge.
4543         #
4544         #  @ref tui_creation_edge "Example"
4545         @ManageTransactions("ShapesOp")
4546         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4547             """
4548             Create a linear edge with specified ends.
4549
4550             Parameters:
4551                 thePnt1 Point for the first end of edge.
4552                 thePnt2 Point for the second end of edge.
4553                 theName Object name; when specified, this parameter is used
4554                         for result publication in the study. Otherwise, if automatic
4555                         publication is switched on, default value is used for result name.
4556
4557             Returns:
4558                 New GEOM.GEOM_Object, containing the created edge.
4559             """
4560             # Example: see GEOM_TestAll.py
4561             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4562             RaiseIfFailed("MakeEdge", self.ShapesOp)
4563             self._autoPublish(anObj, theName, "edge")
4564             return anObj
4565
4566         ## Create a new edge, corresponding to the given length on the given curve.
4567         #  @param theRefCurve The referenced curve (edge).
4568         #  @param theLength Length on the referenced curve. It can be negative.
4569         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4570         #                       at the end of \a theRefCurve, close to the selected point.
4571         #                       If None, start from the first point of \a theRefCurve.
4572         #  @param theName Object name; when specified, this parameter is used
4573         #         for result publication in the study. Otherwise, if automatic
4574         #         publication is switched on, default value is used for result name.
4575         #
4576         #  @return New GEOM.GEOM_Object, containing the created edge.
4577         #
4578         #  @ref tui_creation_edge "Example"
4579         @ManageTransactions("ShapesOp")
4580         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4581             """
4582             Create a new edge, corresponding to the given length on the given curve.
4583
4584             Parameters:
4585                 theRefCurve The referenced curve (edge).
4586                 theLength Length on the referenced curve. It can be negative.
4587                 theStartPoint Any point can be selected for it, the new edge will begin
4588                               at the end of theRefCurve, close to the selected point.
4589                               If None, start from the first point of theRefCurve.
4590                 theName Object name; when specified, this parameter is used
4591                         for result publication in the study. Otherwise, if automatic
4592                         publication is switched on, default value is used for result name.
4593
4594             Returns:
4595                 New GEOM.GEOM_Object, containing the created edge.
4596             """
4597             # Example: see GEOM_TestAll.py
4598             theLength, Parameters = ParseParameters(theLength)
4599             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4600             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4601             anObj.SetParameters(Parameters)
4602             self._autoPublish(anObj, theName, "edge")
4603             return anObj
4604
4605         ## Create an edge from specified wire.
4606         #  @param theWire source Wire
4607         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4608         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4609         #  @param theName Object name; when specified, this parameter is used
4610         #         for result publication in the study. Otherwise, if automatic
4611         #         publication is switched on, default value is used for result name.
4612         #
4613         #  @return New GEOM.GEOM_Object, containing the created edge.
4614         #
4615         #  @ref tui_creation_edge "Example"
4616         @ManageTransactions("ShapesOp")
4617         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4618             """
4619             Create an edge from specified wire.
4620
4621             Parameters:
4622                 theWire source Wire
4623                 theLinearTolerance linear tolerance value (default = 1e-07)
4624                 theAngularTolerance angular tolerance value (default = 1e-12)
4625                 theName Object name; when specified, this parameter is used
4626                         for result publication in the study. Otherwise, if automatic
4627                         publication is switched on, default value is used for result name.
4628
4629             Returns:
4630                 New GEOM.GEOM_Object, containing the created edge.
4631             """
4632             # Example: see GEOM_TestAll.py
4633             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4634             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4635             self._autoPublish(anObj, theName, "edge")
4636             return anObj
4637
4638         ## Create a wire from the set of edges and wires.
4639         #  @param theEdgesAndWires List of edges and/or wires.
4640         #  @param theTolerance Maximum distance between vertices, that will be merged.
4641         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4642         #  @param theName Object name; when specified, this parameter is used
4643         #         for result publication in the study. Otherwise, if automatic
4644         #         publication is switched on, default value is used for result name.
4645         #
4646         #  @return New GEOM.GEOM_Object, containing the created wire.
4647         #
4648         #  @ref tui_creation_wire "Example"
4649         @ManageTransactions("ShapesOp")
4650         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4651             """
4652             Create a wire from the set of edges and wires.
4653
4654             Parameters:
4655                 theEdgesAndWires List of edges and/or wires.
4656                 theTolerance Maximum distance between vertices, that will be merged.
4657                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4658                 theName Object name; when specified, this parameter is used
4659                         for result publication in the study. Otherwise, if automatic
4660                         publication is switched on, default value is used for result name.
4661
4662             Returns:
4663                 New GEOM.GEOM_Object, containing the created wire.
4664             """
4665             # Example: see GEOM_TestAll.py
4666             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4667             RaiseIfFailed("MakeWire", self.ShapesOp)
4668             self._autoPublish(anObj, theName, "wire")
4669             return anObj
4670
4671         ## Create a face on the given wire.
4672         #  @param theWire closed Wire or Edge to build the face on.
4673         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4674         #                        If the tolerance of the obtained planar face is less
4675         #                        than 1e-06, this face will be returned, otherwise the
4676         #                        algorithm tries to build any suitable face on the given
4677         #                        wire and prints a warning message.
4678         #  @param theName Object name; when specified, this parameter is used
4679         #         for result publication in the study. Otherwise, if automatic
4680         #         publication is switched on, default value is used for result name.
4681         #
4682         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4683         #
4684         #  @ref tui_creation_face "Example"
4685         @ManageTransactions("ShapesOp")
4686         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4687             """
4688             Create a face on the given wire.
4689
4690             Parameters:
4691                 theWire closed Wire or Edge to build the face on.
4692                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4693                                If the tolerance of the obtained planar face is less
4694                                than 1e-06, this face will be returned, otherwise the
4695                                algorithm tries to build any suitable face on the given
4696                                wire and prints a warning message.
4697                 theName Object name; when specified, this parameter is used
4698                         for result publication in the study. Otherwise, if automatic
4699                         publication is switched on, default value is used for result name.
4700
4701             Returns:
4702                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4703             """
4704             # Example: see GEOM_TestAll.py
4705             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4706             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4707                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4708             else:
4709                 RaiseIfFailed("MakeFace", self.ShapesOp)
4710             self._autoPublish(anObj, theName, "face")
4711             return anObj
4712
4713         ## Create a face on the given wires set.
4714         #  @param theWires List of closed wires or edges to build the face on.
4715         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4716         #                        If the tolerance of the obtained planar face is less
4717         #                        than 1e-06, this face will be returned, otherwise the
4718         #                        algorithm tries to build any suitable face on the given
4719         #                        wire and prints a warning message.
4720         #  @param theName Object name; when specified, this parameter is used
4721         #         for result publication in the study. Otherwise, if automatic
4722         #         publication is switched on, default value is used for result name.
4723         #
4724         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4725         #
4726         #  @ref tui_creation_face "Example"
4727         @ManageTransactions("ShapesOp")
4728         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4729             """
4730             Create a face on the given wires set.
4731
4732             Parameters:
4733                 theWires List of closed wires or edges to build the face on.
4734                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4735                                If the tolerance of the obtained planar face is less
4736                                than 1e-06, this face will be returned, otherwise the
4737                                algorithm tries to build any suitable face on the given
4738                                wire and prints a warning message.
4739                 theName Object name; when specified, this parameter is used
4740                         for result publication in the study. Otherwise, if automatic
4741                         publication is switched on, default value is used for result name.
4742
4743             Returns:
4744                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4745             """
4746             # Example: see GEOM_TestAll.py
4747             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4748             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4749                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4750             else:
4751                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4752             self._autoPublish(anObj, theName, "face")
4753             return anObj
4754
4755         ## See MakeFaceWires() method for details.
4756         #
4757         #  @ref tui_creation_face "Example 1"
4758         #  \n @ref swig_MakeFaces  "Example 2"
4759         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4760             """
4761             See geompy.MakeFaceWires() method for details.
4762             """
4763             # Example: see GEOM_TestOthers.py
4764             # note: auto-publishing is done in self.MakeFaceWires()
4765             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4766             return anObj
4767
4768         ## Create a face based on a surface from given face bounded
4769         #  by given wire.
4770         #  @param theFace the face whose surface is used to create a new face.
4771         #  @param theWire the wire that will bound a new face.
4772         #  @param theName Object name; when specified, this parameter is used
4773         #         for result publication in the study. Otherwise, if automatic
4774         #         publication is switched on, default value is used for result name.
4775         #
4776         #  @return New GEOM.GEOM_Object, containing the created face.
4777         #
4778         #  @ref tui_creation_face "Example"
4779         @ManageTransactions("ShapesOp")
4780         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4781             """
4782             Create a face based on a surface from given face bounded
4783             by given wire.
4784
4785             Parameters:
4786                 theFace the face whose surface is used to create a new face.
4787                 theWire the wire that will bound a new face.
4788                 theName Object name; when specified, this parameter is used
4789                         for result publication in the study. Otherwise, if automatic
4790                         publication is switched on, default value is used for result name.
4791
4792             Returns:
4793                 New GEOM.GEOM_Object, containing the created face.
4794             """
4795             # Example: see GEOM_TestAll.py
4796             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4797             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4798             self._autoPublish(anObj, theName, "face")
4799             return anObj
4800           
4801         ## Create a face from a set of edges with the given constraints.
4802         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4803         #         - edges should form a closed wire;
4804         #         - for each edge, constraint face is optional: if a constraint face is missing
4805         #           for some edge, this means that there no constraint associated with this edge.
4806         #  @param theName Object name; when specified, this parameter is used
4807         #         for result publication in the study. Otherwise, if automatic
4808         #         publication is switched on, default value is used for result name.
4809         # 
4810         # @return New GEOM.GEOM_Object, containing the created face.
4811         # 
4812         # @ref tui_creation_face "Example"
4813         @ManageTransactions("ShapesOp")
4814         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4815             """
4816             Create a face from a set of edges with the given constraints.
4817
4818             Parameters:
4819                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4820                         - edges should form a closed wire;
4821                         - for each edge, constraint face is optional: if a constraint face is missing
4822                           for some edge, this means that there no constraint associated with this edge.
4823                 theName Object name; when specified, this parameter is used
4824                         for result publication in the study. Otherwise, if automatic
4825                         publication is switched on, default value is used for result name.
4826
4827             Returns:
4828                 New GEOM.GEOM_Object, containing the created face.
4829             """
4830             # Example: see GEOM_TestAll.py
4831             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4832             if anObj is None:
4833                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4834             self._autoPublish(anObj, theName, "face")
4835             return anObj
4836
4837         ## Create a shell from the set of faces, shells and/or compounds of faces.
4838         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4839         #  @param theName Object name; when specified, this parameter is used
4840         #         for result publication in the study. Otherwise, if automatic
4841         #         publication is switched on, default value is used for result name.
4842         #
4843         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4844         #
4845         #  @ref tui_creation_shell "Example"
4846         @ManageTransactions("ShapesOp")
4847         def MakeShell(self, theFacesAndShells, theName=None):
4848             """
4849             Create a shell from the set of faces and shells.
4850
4851             Parameters:
4852                 theFacesAndShells List of faces and/or shells.
4853                 theName Object name; when specified, this parameter is used
4854                         for result publication in the study. Otherwise, if automatic
4855                         publication is switched on, default value is used for result name.
4856
4857             Returns:
4858                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4859             """
4860             # Example: see GEOM_TestAll.py
4861             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4862             RaiseIfFailed("MakeShell", self.ShapesOp)
4863             self._autoPublish(anObj, theName, "shell")
4864             return anObj
4865
4866         ## Create a solid, bounded by the given shells.
4867         #  @param theShells Sequence of bounding shells.
4868         #  @param theName Object name; when specified, this parameter is used
4869         #         for result publication in the study. Otherwise, if automatic
4870         #         publication is switched on, default value is used for result name.
4871         #
4872         #  @return New GEOM.GEOM_Object, containing the created solid.
4873         #
4874         #  @ref tui_creation_solid "Example"
4875         @ManageTransactions("ShapesOp")
4876         def MakeSolid(self, theShells, theName=None):
4877             """
4878             Create a solid, bounded by the given shells.
4879
4880             Parameters:
4881                 theShells Sequence of bounding shells.
4882                 theName Object name; when specified, this parameter is used
4883                         for result publication in the study. Otherwise, if automatic
4884                         publication is switched on, default value is used for result name.
4885
4886             Returns:
4887                 New GEOM.GEOM_Object, containing the created solid.
4888             """
4889             # Example: see GEOM_TestAll.py
4890             theShells = ToList(theShells)
4891             if len(theShells) == 1:
4892                 descr = self._IsGoodForSolid(theShells[0])
4893                 #if len(descr) > 0:
4894                 #    raise RuntimeError, "MakeSolidShells : " + descr
4895                 if descr == "WRN_SHAPE_UNCLOSED":
4896                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4897             anObj = self.ShapesOp.MakeSolidShells(theShells)
4898             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4899             self._autoPublish(anObj, theName, "solid")
4900             return anObj
4901
4902         ## Create a compound of the given shapes.
4903         #  @param theShapes List of shapes to put in compound.
4904         #  @param theName Object name; when specified, this parameter is used
4905         #         for result publication in the study. Otherwise, if automatic
4906         #         publication is switched on, default value is used for result name.
4907         #
4908         #  @return New GEOM.GEOM_Object, containing the created compound.
4909         #
4910         #  @ref tui_creation_compound "Example"
4911         @ManageTransactions("ShapesOp")
4912         def MakeCompound(self, theShapes, theName=None):
4913             """
4914             Create a compound of the given shapes.
4915
4916             Parameters:
4917                 theShapes List of shapes to put in compound.
4918                 theName Object name; when specified, this parameter is used
4919                         for result publication in the study. Otherwise, if automatic
4920                         publication is switched on, default value is used for result name.
4921
4922             Returns:
4923                 New GEOM.GEOM_Object, containing the created compound.
4924             """
4925             # Example: see GEOM_TestAll.py
4926             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4927             RaiseIfFailed("MakeCompound", self.ShapesOp)
4928             self._autoPublish(anObj, theName, "compound")
4929             return anObj
4930         
4931         ## Create a solid (or solids) from the set of faces and/or shells.
4932         #  @param theFacesOrShells List of faces and/or shells.
4933         #  @param isIntersect If TRUE, forces performing intersections
4934         #         between arguments; otherwise (default) intersection is not performed.
4935         #  @param theName Object name; when specified, this parameter is used
4936         #         for result publication in the study. Otherwise, if automatic
4937         #         publication is switched on, default value is used for result name.
4938         #
4939         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4940         #
4941         #  @ref tui_creation_solid_from_faces "Example"
4942         @ManageTransactions("ShapesOp")
4943         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
4944             """
4945             Create a solid (or solids) from the set of connected faces and/or shells.
4946
4947             Parameters:
4948                 theFacesOrShells List of faces and/or shells.
4949                 isIntersect If TRUE, forces performing intersections
4950                         between arguments; otherwise (default) intersection is not performed
4951                 theName Object name; when specified, this parameter is used.
4952                         for result publication in the study. Otherwise, if automatic
4953                         publication is switched on, default value is used for result name.
4954
4955             Returns:
4956                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4957             """
4958             # Example: see GEOM_TestAll.py
4959             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
4960             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
4961             self._autoPublish(anObj, theName, "solid")
4962             return anObj
4963
4964         # end of l3_basic_go
4965         ## @}
4966
4967         ## @addtogroup l2_measure
4968         ## @{
4969
4970         ## Gives quantity of faces in the given shape.
4971         #  @param theShape Shape to count faces of.
4972         #  @return Quantity of faces.
4973         #
4974         #  @ref swig_NumberOf "Example"
4975         @ManageTransactions("ShapesOp")
4976         def NumberOfFaces(self, theShape):
4977             """
4978             Gives quantity of faces in the given shape.
4979
4980             Parameters:
4981                 theShape Shape to count faces of.
4982
4983             Returns:
4984                 Quantity of faces.
4985             """
4986             # Example: see GEOM_TestOthers.py
4987             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4988             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4989             return nb_faces
4990
4991         ## Gives quantity of edges in the given shape.
4992         #  @param theShape Shape to count edges of.
4993         #  @return Quantity of edges.
4994         #
4995         #  @ref swig_NumberOf "Example"
4996         @ManageTransactions("ShapesOp")
4997         def NumberOfEdges(self, theShape):
4998             """
4999             Gives quantity of edges in the given shape.
5000
5001             Parameters:
5002                 theShape Shape to count edges of.
5003
5004             Returns:
5005                 Quantity of edges.
5006             """
5007             # Example: see GEOM_TestOthers.py
5008             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5009             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5010             return nb_edges
5011
5012         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5013         #  @param theShape Shape to count sub-shapes of.
5014         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5015         #  @return Quantity of sub-shapes of given type.
5016         #
5017         #  @ref swig_NumberOf "Example"
5018         @ManageTransactions("ShapesOp")
5019         def NumberOfSubShapes(self, theShape, theShapeType):
5020             """
5021             Gives quantity of sub-shapes of type theShapeType in the given shape.
5022
5023             Parameters:
5024                 theShape Shape to count sub-shapes of.
5025                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5026
5027             Returns:
5028                 Quantity of sub-shapes of given type.
5029             """
5030             # Example: see GEOM_TestOthers.py
5031             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5032             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5033             return nb_ss
5034
5035         ## Gives quantity of solids in the given shape.
5036         #  @param theShape Shape to count solids in.
5037         #  @return Quantity of solids.
5038         #
5039         #  @ref swig_NumberOf "Example"
5040         @ManageTransactions("ShapesOp")
5041         def NumberOfSolids(self, theShape):
5042             """
5043             Gives quantity of solids in the given shape.
5044
5045             Parameters:
5046                 theShape Shape to count solids in.
5047
5048             Returns:
5049                 Quantity of solids.
5050             """
5051             # Example: see GEOM_TestOthers.py
5052             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5053             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5054             return nb_solids
5055
5056         # end of l2_measure
5057         ## @}
5058
5059         ## @addtogroup l3_healing
5060         ## @{
5061
5062         ## Reverses an orientation the given shape.
5063         #  @param theShape Shape to be reversed.
5064         #  @param theName Object name; when specified, this parameter is used
5065         #         for result publication in the study. Otherwise, if automatic
5066         #         publication is switched on, default value is used for result name.
5067         #
5068         #  @return The reversed copy of theShape.
5069         #
5070         #  @ref swig_ChangeOrientation "Example"
5071         @ManageTransactions("ShapesOp")
5072         def ChangeOrientation(self, theShape, theName=None):
5073             """
5074             Reverses an orientation the given shape.
5075
5076             Parameters:
5077                 theShape Shape to be reversed.
5078                 theName Object name; when specified, this parameter is used
5079                         for result publication in the study. Otherwise, if automatic
5080                         publication is switched on, default value is used for result name.
5081
5082             Returns:
5083                 The reversed copy of theShape.
5084             """
5085             # Example: see GEOM_TestAll.py
5086             anObj = self.ShapesOp.ChangeOrientation(theShape)
5087             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5088             self._autoPublish(anObj, theName, "reversed")
5089             return anObj
5090
5091         ## See ChangeOrientation() method for details.
5092         #
5093         #  @ref swig_OrientationChange "Example"
5094         def OrientationChange(self, theShape, theName=None):
5095             """
5096             See geompy.ChangeOrientation method for details.
5097             """
5098             # Example: see GEOM_TestOthers.py
5099             # note: auto-publishing is done in self.ChangeOrientation()
5100             anObj = self.ChangeOrientation(theShape, theName)
5101             return anObj
5102
5103         # end of l3_healing
5104         ## @}
5105
5106         ## @addtogroup l4_obtain
5107         ## @{
5108
5109         ## Retrieve all free faces from the given shape.
5110         #  Free face is a face, which is not shared between two shells of the shape.
5111         #  @param theShape Shape to find free faces in.
5112         #  @return List of IDs of all free faces, contained in theShape.
5113         #
5114         #  @ref tui_free_faces_page "Example"
5115         @ManageTransactions("ShapesOp")
5116         def GetFreeFacesIDs(self,theShape):
5117             """
5118             Retrieve all free faces from the given shape.
5119             Free face is a face, which is not shared between two shells of the shape.
5120
5121             Parameters:
5122                 theShape Shape to find free faces in.
5123
5124             Returns:
5125                 List of IDs of all free faces, contained in theShape.
5126             """
5127             # Example: see GEOM_TestOthers.py
5128             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5129             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5130             return anIDs
5131
5132         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5133         #  @param theShape1 Shape to find sub-shapes in.
5134         #  @param theShape2 Shape to find shared sub-shapes with.
5135         #  @param theShapeType Type of sub-shapes to be retrieved.
5136         #  @param theName Object name; when specified, this parameter is used
5137         #         for result publication in the study. Otherwise, if automatic
5138         #         publication is switched on, default value is used for result name.
5139         #
5140         #  @return List of sub-shapes of theShape1, shared with theShape2.
5141         #
5142         #  @ref swig_GetSharedShapes "Example"
5143         @ManageTransactions("ShapesOp")
5144         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5145             """
5146             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5147
5148             Parameters:
5149                 theShape1 Shape to find sub-shapes in.
5150                 theShape2 Shape to find shared sub-shapes with.
5151                 theShapeType Type of sub-shapes to be retrieved.
5152                 theName Object name; when specified, this parameter is used
5153                         for result publication in the study. Otherwise, if automatic
5154                         publication is switched on, default value is used for result name.
5155
5156             Returns:
5157                 List of sub-shapes of theShape1, shared with theShape2.
5158             """
5159             # Example: see GEOM_TestOthers.py
5160             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5161             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5162             self._autoPublish(aList, theName, "shared")
5163             return aList
5164
5165         ## Get sub-shapes, shared by input shapes.
5166         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5167         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5168         #  @param theMultiShare Specifies what type of shares should be checked:
5169         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5170         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5171         #  @param theName Object name; when specified, this parameter is used
5172         #         for result publication in the study. Otherwise, if automatic
5173         #         publication is switched on, default value is used for result name.
5174         #
5175         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5176         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5177         #        and all rest input shapes are returned.
5178         #
5179         #  @return List of all found sub-shapes.
5180         #
5181         #  Examples:
5182         #  - @ref tui_shared_shapes "Example 1"
5183         #  - @ref swig_GetSharedShapes "Example 2"
5184         @ManageTransactions("ShapesOp")
5185         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5186             """
5187             Get sub-shapes, shared by input shapes.
5188
5189             Parameters:
5190                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5191                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5192                 theMultiShare Specifies what type of shares should be checked:
5193                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5194                   - False: causes to search sub-shapes shared between couples of input shapes.
5195                 theName Object name; when specified, this parameter is used
5196                         for result publication in the study. Otherwise, if automatic
5197                         publication is switched on, default value is used for result name.
5198
5199             Note: if theShapes contains single compound, the shares between all possible couples of 
5200                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5201                   and all rest input shapes are returned.
5202
5203             Returns:
5204                 List of all found sub-shapes.
5205             """
5206             # Example: see GEOM_TestOthers.py
5207             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5208             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5209             self._autoPublish(aList, theName, "shared")
5210             return aList
5211
5212         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5213         #  situated relatively the specified plane by the certain way,
5214         #  defined through <VAR>theState</VAR> parameter.
5215         #  @param theShape Shape to find sub-shapes of.
5216         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5217         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5218         #                direction and location of the plane to find shapes on.
5219         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5220         #  @param theName Object name; when specified, this parameter is used
5221         #         for result publication in the study. Otherwise, if automatic
5222         #         publication is switched on, default value is used for result name.
5223         #
5224         #  @return List of all found sub-shapes.
5225         #
5226         #  @ref swig_GetShapesOnPlane "Example"
5227         @ManageTransactions("ShapesOp")
5228         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5229             """
5230             Find in theShape all sub-shapes of type theShapeType,
5231             situated relatively the specified plane by the certain way,
5232             defined through theState parameter.
5233
5234             Parameters:
5235                 theShape Shape to find sub-shapes of.
5236                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5237                 theAx1 Vector (or line, or linear edge), specifying normal
5238                        direction and location of the plane to find shapes on.
5239                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5240                 theName Object name; when specified, this parameter is used
5241                         for result publication in the study. Otherwise, if automatic
5242                         publication is switched on, default value is used for result name.
5243
5244             Returns:
5245                 List of all found sub-shapes.
5246             """
5247             # Example: see GEOM_TestOthers.py
5248             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5249             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5250             self._autoPublish(aList, theName, "shapeOnPlane")
5251             return aList
5252
5253         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5254         #  situated relatively the specified plane by the certain way,
5255         #  defined through <VAR>theState</VAR> parameter.
5256         #  @param theShape Shape to find sub-shapes of.
5257         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5258         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5259         #                direction and location of the plane to find shapes on.
5260         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5261         #
5262         #  @return List of all found sub-shapes indices.
5263         #
5264         #  @ref swig_GetShapesOnPlaneIDs "Example"
5265         @ManageTransactions("ShapesOp")
5266         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5267             """
5268             Find in theShape all sub-shapes of type theShapeType,
5269             situated relatively the specified plane by the certain way,
5270             defined through theState parameter.
5271
5272             Parameters:
5273                 theShape Shape to find sub-shapes of.
5274                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5275                 theAx1 Vector (or line, or linear edge), specifying normal
5276                        direction and location of the plane to find shapes on.
5277                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5278
5279             Returns:
5280                 List of all found sub-shapes indices.
5281             """
5282             # Example: see GEOM_TestOthers.py
5283             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5284             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5285             return aList
5286
5287         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5288         #  situated relatively the specified plane by the certain way,
5289         #  defined through <VAR>theState</VAR> parameter.
5290         #  @param theShape Shape to find sub-shapes of.
5291         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5292         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5293         #                direction of the plane to find shapes on.
5294         #  @param thePnt Point specifying location of the plane to find shapes on.
5295         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5296         #  @param theName Object name; when specified, this parameter is used
5297         #         for result publication in the study. Otherwise, if automatic
5298         #         publication is switched on, default value is used for result name.
5299         #
5300         #  @return List of all found sub-shapes.
5301         #
5302         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5303         @ManageTransactions("ShapesOp")
5304         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5305             """
5306             Find in theShape all sub-shapes of type theShapeType,
5307             situated relatively the specified plane by the certain way,
5308             defined through theState parameter.
5309
5310             Parameters:
5311                 theShape Shape to find sub-shapes of.
5312                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5313                 theAx1 Vector (or line, or linear edge), specifying normal
5314                        direction and location of the plane to find shapes on.
5315                 thePnt Point specifying location of the plane to find shapes on.
5316                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5317                 theName Object name; when specified, this parameter is used
5318                         for result publication in the study. Otherwise, if automatic
5319                         publication is switched on, default value is used for result name.
5320
5321             Returns:
5322                 List of all found sub-shapes.
5323             """
5324             # Example: see GEOM_TestOthers.py
5325             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5326                                                                theAx1, thePnt, theState)
5327             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5328             self._autoPublish(aList, theName, "shapeOnPlane")
5329             return aList
5330
5331         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5332         #  situated relatively the specified plane by the certain way,
5333         #  defined through <VAR>theState</VAR> parameter.
5334         #  @param theShape Shape to find sub-shapes of.
5335         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5336         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5337         #                direction of the plane to find shapes on.
5338         #  @param thePnt Point specifying location of the plane to find shapes on.
5339         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5340         #
5341         #  @return List of all found sub-shapes indices.
5342         #
5343         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5344         @ManageTransactions("ShapesOp")
5345         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5346             """
5347             Find in theShape all sub-shapes of type theShapeType,
5348             situated relatively the specified plane by the certain way,
5349             defined through theState parameter.
5350
5351             Parameters:
5352                 theShape Shape to find sub-shapes of.
5353                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5354                 theAx1 Vector (or line, or linear edge), specifying normal
5355                        direction and location of the plane to find shapes on.
5356                 thePnt Point specifying location of the plane to find shapes on.
5357                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5358
5359             Returns:
5360                 List of all found sub-shapes indices.
5361             """
5362             # Example: see GEOM_TestOthers.py
5363             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5364                                                                   theAx1, thePnt, theState)
5365             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5366             return aList
5367
5368         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5369         #  the specified cylinder by the certain way, defined through \a theState parameter.
5370         #  @param theShape Shape to find sub-shapes of.
5371         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5372         #  @param theAxis Vector (or line, or linear edge), specifying
5373         #                 axis of the cylinder to find shapes on.
5374         #  @param theRadius Radius of the cylinder to find shapes on.
5375         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5376         #  @param theName Object name; when specified, this parameter is used
5377         #         for result publication in the study. Otherwise, if automatic
5378         #         publication is switched on, default value is used for result name.
5379         #
5380         #  @return List of all found sub-shapes.
5381         #
5382         #  @ref swig_GetShapesOnCylinder "Example"
5383         @ManageTransactions("ShapesOp")
5384         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5385             """
5386             Find in theShape all sub-shapes of type theShapeType, situated relatively
5387             the specified cylinder by the certain way, defined through theState parameter.
5388
5389             Parameters:
5390                 theShape Shape to find sub-shapes of.
5391                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5392                 theAxis Vector (or line, or linear edge), specifying
5393                         axis of the cylinder to find shapes on.
5394                 theRadius Radius of the cylinder to find shapes on.
5395                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5396                 theName Object name; when specified, this parameter is used
5397                         for result publication in the study. Otherwise, if automatic
5398                         publication is switched on, default value is used for result name.
5399
5400             Returns:
5401                 List of all found sub-shapes.
5402             """
5403             # Example: see GEOM_TestOthers.py
5404             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5405             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5406             self._autoPublish(aList, theName, "shapeOnCylinder")
5407             return aList
5408
5409         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5410         #  the specified cylinder by the certain way, defined through \a theState parameter.
5411         #  @param theShape Shape to find sub-shapes of.
5412         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5413         #  @param theAxis Vector (or line, or linear edge), specifying
5414         #                 axis of the cylinder to find shapes on.
5415         #  @param theRadius Radius of the cylinder to find shapes on.
5416         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5417         #
5418         #  @return List of all found sub-shapes indices.
5419         #
5420         #  @ref swig_GetShapesOnCylinderIDs "Example"
5421         @ManageTransactions("ShapesOp")
5422         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5423             """
5424             Find in theShape all sub-shapes of type theShapeType, situated relatively
5425             the specified cylinder by the certain way, defined through theState parameter.
5426
5427             Parameters:
5428                 theShape Shape to find sub-shapes of.
5429                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5430                 theAxis Vector (or line, or linear edge), specifying
5431                         axis of the cylinder to find shapes on.
5432                 theRadius Radius of the cylinder to find shapes on.
5433                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5434
5435             Returns:
5436                 List of all found sub-shapes indices.
5437             """
5438             # Example: see GEOM_TestOthers.py
5439             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5440             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5441             return aList
5442
5443         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5444         #  the specified cylinder by the certain way, defined through \a theState parameter.
5445         #  @param theShape Shape to find sub-shapes of.
5446         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5447         #  @param theAxis Vector (or line, or linear edge), specifying
5448         #                 axis of the cylinder to find shapes on.
5449         #  @param thePnt Point specifying location of the bottom of the cylinder.
5450         #  @param theRadius Radius of the cylinder to find shapes on.
5451         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5452         #  @param theName Object name; when specified, this parameter is used
5453         #         for result publication in the study. Otherwise, if automatic
5454         #         publication is switched on, default value is used for result name.
5455         #
5456         #  @return List of all found sub-shapes.
5457         #
5458         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5459         @ManageTransactions("ShapesOp")
5460         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5461             """
5462             Find in theShape all sub-shapes of type theShapeType, situated relatively
5463             the specified cylinder by the certain way, defined through theState parameter.
5464
5465             Parameters:
5466                 theShape Shape to find sub-shapes of.
5467                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5468                 theAxis Vector (or line, or linear edge), specifying
5469                         axis of the cylinder to find shapes on.
5470                 theRadius Radius of the cylinder to find shapes on.
5471                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5472                 theName Object name; when specified, this parameter is used
5473                         for result publication in the study. Otherwise, if automatic
5474                         publication is switched on, default value is used for result name.
5475
5476             Returns:
5477                 List of all found sub-shapes.
5478             """
5479             # Example: see GEOM_TestOthers.py
5480             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5481             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5482             self._autoPublish(aList, theName, "shapeOnCylinder")
5483             return aList
5484
5485         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5486         #  the specified cylinder by the certain way, defined through \a theState parameter.
5487         #  @param theShape Shape to find sub-shapes of.
5488         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5489         #  @param theAxis Vector (or line, or linear edge), specifying
5490         #                 axis of the cylinder to find shapes on.
5491         #  @param thePnt Point specifying location of the bottom of the cylinder.
5492         #  @param theRadius Radius of the cylinder to find shapes on.
5493         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5494         #
5495         #  @return List of all found sub-shapes indices
5496         #
5497         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5498         @ManageTransactions("ShapesOp")
5499         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5500             """
5501             Find in theShape all sub-shapes of type theShapeType, situated relatively
5502             the specified cylinder by the certain way, defined through theState parameter.
5503
5504             Parameters:
5505                 theShape Shape to find sub-shapes of.
5506                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5507                 theAxis Vector (or line, or linear edge), specifying
5508                         axis of the cylinder to find shapes on.
5509                 theRadius Radius of the cylinder to find shapes on.
5510                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5511
5512             Returns:
5513                 List of all found sub-shapes indices.
5514             """
5515             # Example: see GEOM_TestOthers.py
5516             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5517             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5518             return aList
5519
5520         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5521         #  the specified sphere by the certain way, defined through \a theState parameter.
5522         #  @param theShape Shape to find sub-shapes of.
5523         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5524         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5525         #  @param theRadius Radius of the sphere to find shapes on.
5526         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5527         #  @param theName Object name; when specified, this parameter is used
5528         #         for result publication in the study. Otherwise, if automatic
5529         #         publication is switched on, default value is used for result name.
5530         #
5531         #  @return List of all found sub-shapes.
5532         #
5533         #  @ref swig_GetShapesOnSphere "Example"
5534         @ManageTransactions("ShapesOp")
5535         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5536             """
5537             Find in theShape all sub-shapes of type theShapeType, situated relatively
5538             the specified sphere by the certain way, defined through theState parameter.
5539
5540             Parameters:
5541                 theShape Shape to find sub-shapes of.
5542                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5543                 theCenter Point, specifying center of the sphere to find shapes on.
5544                 theRadius Radius of the sphere to find shapes on.
5545                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5546                 theName Object name; when specified, this parameter is used
5547                         for result publication in the study. Otherwise, if automatic
5548                         publication is switched on, default value is used for result name.
5549
5550             Returns:
5551                 List of all found sub-shapes.
5552             """
5553             # Example: see GEOM_TestOthers.py
5554             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5555             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5556             self._autoPublish(aList, theName, "shapeOnSphere")
5557             return aList
5558
5559         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5560         #  the specified sphere by the certain way, defined through \a theState parameter.
5561         #  @param theShape Shape to find sub-shapes of.
5562         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5563         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5564         #  @param theRadius Radius of the sphere to find shapes on.
5565         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5566         #
5567         #  @return List of all found sub-shapes indices.
5568         #
5569         #  @ref swig_GetShapesOnSphereIDs "Example"
5570         @ManageTransactions("ShapesOp")
5571         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5572             """
5573             Find in theShape all sub-shapes of type theShapeType, situated relatively
5574             the specified sphere by the certain way, defined through theState parameter.
5575
5576             Parameters:
5577                 theShape Shape to find sub-shapes of.
5578                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5579                 theCenter Point, specifying center of the sphere to find shapes on.
5580                 theRadius Radius of the sphere to find shapes on.
5581                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5582
5583             Returns:
5584                 List of all found sub-shapes indices.
5585             """
5586             # Example: see GEOM_TestOthers.py
5587             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5588             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5589             return aList
5590
5591         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5592         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5593         #  @param theShape Shape to find sub-shapes of.
5594         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5595         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5596         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5597         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5598         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5599         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5600         #  @param theName Object name; when specified, this parameter is used
5601         #         for result publication in the study. Otherwise, if automatic
5602         #         publication is switched on, default value is used for result name.
5603         #
5604         #  @return List of all found sub-shapes.
5605         #
5606         #  @ref swig_GetShapesOnQuadrangle "Example"
5607         @ManageTransactions("ShapesOp")
5608         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5609                                   theTopLeftPoint, theTopRigthPoint,
5610                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5611             """
5612             Find in theShape all sub-shapes of type theShapeType, situated relatively
5613             the specified quadrangle by the certain way, defined through theState parameter.
5614
5615             Parameters:
5616                 theShape Shape to find sub-shapes of.
5617                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5618                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5619                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5620                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5621                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5622                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5623                 theName Object name; when specified, this parameter is used
5624                         for result publication in the study. Otherwise, if automatic
5625                         publication is switched on, default value is used for result name.
5626
5627             Returns:
5628                 List of all found sub-shapes.
5629             """
5630             # Example: see GEOM_TestOthers.py
5631             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5632                                                         theTopLeftPoint, theTopRigthPoint,
5633                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5634             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5635             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5636             return aList
5637
5638         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5639         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5640         #  @param theShape Shape to find sub-shapes of.
5641         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5642         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5643         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5644         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5645         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5646         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5647         #
5648         #  @return List of all found sub-shapes indices.
5649         #
5650         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5651         @ManageTransactions("ShapesOp")
5652         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5653                                      theTopLeftPoint, theTopRigthPoint,
5654                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5655             """
5656             Find in theShape all sub-shapes of type theShapeType, situated relatively
5657             the specified quadrangle by the certain way, defined through theState parameter.
5658
5659             Parameters:
5660                 theShape Shape to find sub-shapes of.
5661                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5662                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5663                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5664                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5665                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5666                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5667
5668             Returns:
5669                 List of all found sub-shapes indices.
5670             """
5671
5672             # Example: see GEOM_TestOthers.py
5673             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5674                                                            theTopLeftPoint, theTopRigthPoint,
5675                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5676             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5677             return aList
5678
5679         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5680         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5681         #  @param theBox Shape for relative comparing.
5682         #  @param theShape Shape to find sub-shapes of.
5683         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5684         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5685         #  @param theName Object name; when specified, this parameter is used
5686         #         for result publication in the study. Otherwise, if automatic
5687         #         publication is switched on, default value is used for result name.
5688         #
5689         #  @return List of all found sub-shapes.
5690         #
5691         #  @ref swig_GetShapesOnBox "Example"
5692         @ManageTransactions("ShapesOp")
5693         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5694             """
5695             Find in theShape all sub-shapes of type theShapeType, situated relatively
5696             the specified theBox by the certain way, defined through theState parameter.
5697
5698             Parameters:
5699                 theBox Shape for relative comparing.
5700                 theShape Shape to find sub-shapes of.
5701                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5702                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5703                 theName Object name; when specified, this parameter is used
5704                         for result publication in the study. Otherwise, if automatic
5705                         publication is switched on, default value is used for result name.
5706
5707             Returns:
5708                 List of all found sub-shapes.
5709             """
5710             # Example: see GEOM_TestOthers.py
5711             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5712             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5713             self._autoPublish(aList, theName, "shapeOnBox")
5714             return aList
5715
5716         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5717         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5718         #  @param theBox Shape for relative comparing.
5719         #  @param theShape Shape to find sub-shapes of.
5720         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5721         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5722         #
5723         #  @return List of all found sub-shapes indices.
5724         #
5725         #  @ref swig_GetShapesOnBoxIDs "Example"
5726         @ManageTransactions("ShapesOp")
5727         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5728             """
5729             Find in theShape all sub-shapes of type theShapeType, situated relatively
5730             the specified theBox by the certain way, defined through theState parameter.
5731
5732             Parameters:
5733                 theBox Shape for relative comparing.
5734                 theShape Shape to find sub-shapes of.
5735                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5736                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5737
5738             Returns:
5739                 List of all found sub-shapes indices.
5740             """
5741             # Example: see GEOM_TestOthers.py
5742             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5743             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5744             return aList
5745
5746         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5747         #  situated relatively the specified \a theCheckShape by the
5748         #  certain way, defined through \a theState parameter.
5749         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5750         #  @param theShape Shape to find sub-shapes of.
5751         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5752         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5753         #  @param theName Object name; when specified, this parameter is used
5754         #         for result publication in the study. Otherwise, if automatic
5755         #         publication is switched on, default value is used for result name.
5756         #
5757         #  @return List of all found sub-shapes.
5758         #
5759         #  @ref swig_GetShapesOnShape "Example"
5760         @ManageTransactions("ShapesOp")
5761         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5762             """
5763             Find in theShape all sub-shapes of type theShapeType,
5764             situated relatively the specified theCheckShape by the
5765             certain way, defined through theState parameter.
5766
5767             Parameters:
5768                 theCheckShape Shape for relative comparing. It must be a solid.
5769                 theShape Shape to find sub-shapes of.
5770                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5771                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5772                 theName Object name; when specified, this parameter is used
5773                         for result publication in the study. Otherwise, if automatic
5774                         publication is switched on, default value is used for result name.
5775
5776             Returns:
5777                 List of all found sub-shapes.
5778             """
5779             # Example: see GEOM_TestOthers.py
5780             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5781                                                    theShapeType, theState)
5782             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5783             self._autoPublish(aList, theName, "shapeOnShape")
5784             return aList
5785
5786         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5787         #  situated relatively the specified \a theCheckShape by the
5788         #  certain way, defined through \a theState parameter.
5789         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5790         #  @param theShape Shape to find sub-shapes of.
5791         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5792         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5793         #  @param theName Object name; when specified, this parameter is used
5794         #         for result publication in the study. Otherwise, if automatic
5795         #         publication is switched on, default value is used for result name.
5796         #
5797         #  @return All found sub-shapes as compound.
5798         #
5799         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5800         @ManageTransactions("ShapesOp")
5801         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5802             """
5803             Find in theShape all sub-shapes of type theShapeType,
5804             situated relatively the specified theCheckShape by the
5805             certain way, defined through theState parameter.
5806
5807             Parameters:
5808                 theCheckShape Shape for relative comparing. It must be a solid.
5809                 theShape Shape to find sub-shapes of.
5810                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5811                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5812                 theName Object name; when specified, this parameter is used
5813                         for result publication in the study. Otherwise, if automatic
5814                         publication is switched on, default value is used for result name.
5815
5816             Returns:
5817                 All found sub-shapes as compound.
5818             """
5819             # Example: see GEOM_TestOthers.py
5820             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5821                                                              theShapeType, theState)
5822             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5823             self._autoPublish(anObj, theName, "shapeOnShape")
5824             return anObj
5825
5826         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5827         #  situated relatively the specified \a theCheckShape by the
5828         #  certain way, defined through \a theState parameter.
5829         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5830         #  @param theShape Shape to find sub-shapes of.
5831         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5832         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5833         #
5834         #  @return List of all found sub-shapes indices.
5835         #
5836         #  @ref swig_GetShapesOnShapeIDs "Example"
5837         @ManageTransactions("ShapesOp")
5838         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5839             """
5840             Find in theShape all sub-shapes of type theShapeType,
5841             situated relatively the specified theCheckShape by the
5842             certain way, defined through theState parameter.
5843
5844             Parameters:
5845                 theCheckShape Shape for relative comparing. It must be a solid.
5846                 theShape Shape to find sub-shapes of.
5847                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5848                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5849
5850             Returns:
5851                 List of all found sub-shapes indices.
5852             """
5853             # Example: see GEOM_TestOthers.py
5854             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5855                                                       theShapeType, theState)
5856             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5857             return aList
5858
5859         ## Get sub-shape(s) of theShapeWhere, which are
5860         #  coincident with \a theShapeWhat or could be a part of it.
5861         #  @param theShapeWhere Shape to find sub-shapes of.
5862         #  @param theShapeWhat Shape, specifying what to find.
5863         #  @param isNewImplementation implementation of GetInPlace functionality
5864         #             (default = False, old alghorithm based on shape properties)
5865         #  @param theName Object name; when specified, this parameter is used
5866         #         for result publication in the study. Otherwise, if automatic
5867         #         publication is switched on, default value is used for result name.
5868         #
5869         #  @return Compound which includes all found sub-shapes if they have different types; 
5870         #          or group of all found shapes of the equal type; or a single found sub-shape.
5871         #
5872         #  @note This function has a restriction on argument shapes.
5873         #        If \a theShapeWhere has curved parts with significantly
5874         #        outstanding centres (i.e. the mass centre of a part is closer to
5875         #        \a theShapeWhat than to the part), such parts will not be found.
5876         #        @image html get_in_place_lost_part.png
5877         #
5878         #  @ref swig_GetInPlace "Example"
5879         @ManageTransactions("ShapesOp")
5880         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5881             """
5882             Get sub-shape(s) of theShapeWhere, which are
5883             coincident with  theShapeWhat or could be a part of it.
5884
5885             Parameters:
5886                 theShapeWhere Shape to find sub-shapes of.
5887                 theShapeWhat Shape, specifying what to find.
5888                 isNewImplementation Implementation of GetInPlace functionality
5889                                     (default = False, old alghorithm based on shape properties)
5890                 theName Object name; when specified, this parameter is used
5891                         for result publication in the study. Otherwise, if automatic
5892                         publication is switched on, default value is used for result name.
5893
5894             Returns:
5895                 Compound which includes all found sub-shapes if they have different types; 
5896                 or group of all found shapes of the equal type; or a single found sub-shape.
5897
5898
5899             Note:
5900                 This function has a restriction on argument shapes.
5901                 If theShapeWhere has curved parts with significantly
5902                 outstanding centres (i.e. the mass centre of a part is closer to
5903                 theShapeWhat than to the part), such parts will not be found.
5904             """
5905             # Example: see GEOM_TestOthers.py
5906             anObj = None
5907             if isNewImplementation:
5908                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5909             else:
5910                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5911                 pass
5912             RaiseIfFailed("GetInPlace", self.ShapesOp)
5913             self._autoPublish(anObj, theName, "inplace")
5914             return anObj
5915
5916         ## Get sub-shape(s) of \a theShapeWhere, which are
5917         #  coincident with \a theShapeWhat or could be a part of it.
5918         #
5919         #  Implementation of this method is based on a saved history of an operation,
5920         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5921         #  arguments (an argument shape or a sub-shape of an argument shape).
5922         #  The operation could be the Partition or one of boolean operations,
5923         #  performed on simple shapes (not on compounds).
5924         #
5925         #  @param theShapeWhere Shape to find sub-shapes of.
5926         #  @param theShapeWhat Shape, specifying what to find (must be in the
5927         #                      building history of the ShapeWhere).
5928         #  @param theName Object name; when specified, this parameter is used
5929         #         for result publication in the study. Otherwise, if automatic
5930         #         publication is switched on, default value is used for result name.
5931         #
5932         #  @return Compound which includes all found sub-shapes if they have different types; 
5933         #          or group of all found shapes of the equal type; or a single found sub-shape.
5934         #
5935         #  @ref swig_GetInPlace "Example"
5936         @ManageTransactions("ShapesOp")
5937         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5938             """
5939             Implementation of this method is based on a saved history of an operation,
5940             produced theShapeWhere. The theShapeWhat must be among this operation's
5941             arguments (an argument shape or a sub-shape of an argument shape).
5942             The operation could be the Partition or one of boolean operations,
5943             performed on simple shapes (not on compounds).
5944
5945             Parameters:
5946                 theShapeWhere Shape to find sub-shapes of.
5947                 theShapeWhat Shape, specifying what to find (must be in the
5948                                 building history of the ShapeWhere).
5949                 theName Object name; when specified, this parameter is used
5950                         for result publication in the study. Otherwise, if automatic
5951                         publication is switched on, default value is used for result name.
5952
5953             Returns:
5954                 Compound which includes all found sub-shapes if they have different types; 
5955                 or group of all found shapes of the equal type; or a single found sub-shape.
5956             """
5957             # Example: see GEOM_TestOthers.py
5958             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5959             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5960             self._autoPublish(anObj, theName, "inplace")
5961             return anObj
5962
5963         ## Get sub-shape of theShapeWhere, which is
5964         #  equal to \a theShapeWhat.
5965         #  @param theShapeWhere Shape to find sub-shape of.
5966         #  @param theShapeWhat Shape, specifying what to find.
5967         #  @param theName Object name; when specified, this parameter is used
5968         #         for result publication in the study. Otherwise, if automatic
5969         #         publication is switched on, default value is used for result name.
5970         #
5971         #  @return New GEOM.GEOM_Object for found sub-shape.
5972         #
5973         #  @ref swig_GetSame "Example"
5974         @ManageTransactions("ShapesOp")
5975         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5976             """
5977             Get sub-shape of theShapeWhere, which is
5978             equal to theShapeWhat.
5979
5980             Parameters:
5981                 theShapeWhere Shape to find sub-shape of.
5982                 theShapeWhat Shape, specifying what to find.
5983                 theName Object name; when specified, this parameter is used
5984                         for result publication in the study. Otherwise, if automatic
5985                         publication is switched on, default value is used for result name.
5986
5987             Returns:
5988                 New GEOM.GEOM_Object for found sub-shape.
5989             """
5990             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5991             RaiseIfFailed("GetSame", self.ShapesOp)
5992             self._autoPublish(anObj, theName, "sameShape")
5993             return anObj
5994
5995
5996         ## Get sub-shape indices of theShapeWhere, which is
5997         #  equal to \a theShapeWhat.
5998         #  @param theShapeWhere Shape to find sub-shape of.
5999         #  @param theShapeWhat Shape, specifying what to find.
6000         #  @return List of all found sub-shapes indices.
6001         #
6002         #  @ref swig_GetSame "Example"
6003         @ManageTransactions("ShapesOp")
6004         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6005             """
6006             Get sub-shape indices of theShapeWhere, which is
6007             equal to theShapeWhat.
6008
6009             Parameters:
6010                 theShapeWhere Shape to find sub-shape of.
6011                 theShapeWhat Shape, specifying what to find.
6012
6013             Returns:
6014                 List of all found sub-shapes indices.
6015             """
6016             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6017             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6018             return anObj
6019
6020         ## Resize the input edge with the new Min and Max parameters.
6021         #  The input edge parameters range is [0, 1]. If theMin parameter is
6022         #  negative, the input edge is extended, otherwise it is shrinked by
6023         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6024         #  otherwise it is shrinked by theMax parameter.
6025         #  @param theEdge the input edge to be resized.
6026         #  @param theMin the minimal parameter value.
6027         #  @param theMax the maximal parameter value.
6028         #  @param theName Object name; when specified, this parameter is used
6029         #         for result publication in the study. Otherwise, if automatic
6030         #         publication is switched on, default value is used for result name.
6031         #  @return New GEOM.GEOM_Object, containing the created edge.
6032         #
6033         #  @ref tui_extend "Example"
6034         @ManageTransactions("ShapesOp")
6035         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6036             """
6037             Resize the input edge with the new Min and Max parameters.
6038             The input edge parameters range is [0, 1]. If theMin parameter is
6039             negative, the input edge is extended, otherwise it is shrinked by
6040             theMin parameter. If theMax is greater than 1, the edge is extended,
6041             otherwise it is shrinked by theMax parameter.
6042
6043             Parameters:
6044                 theEdge the input edge to be resized.
6045                 theMin the minimal parameter value.
6046                 theMax the maximal parameter value.
6047                 theName Object name; when specified, this parameter is used
6048                         for result publication in the study. Otherwise, if automatic
6049                         publication is switched on, default value is used for result name.
6050
6051             Returns:
6052                 New GEOM.GEOM_Object, containing the created edge.
6053             """
6054             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6055             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6056             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6057             anObj.SetParameters(Parameters)
6058             self._autoPublish(anObj, theName, "edge")
6059             return anObj
6060
6061         ## Resize the input face with the new UMin, UMax, VMin and VMax
6062         #  parameters. The input face U and V parameters range is [0, 1]. If
6063         #  theUMin parameter is negative, the input face is extended, otherwise
6064         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6065         #  greater than 1, the face is extended, otherwise it is shrinked along
6066         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6067         #  V direction of the input face.
6068         #  @param theFace the input face to be resized.
6069         #  @param theUMin the minimal U parameter value.
6070         #  @param theUMax the maximal U parameter value.
6071         #  @param theVMin the minimal V parameter value.
6072         #  @param theVMax the maximal V parameter value.
6073         #  @param theName Object name; when specified, this parameter is used
6074         #         for result publication in the study. Otherwise, if automatic
6075         #         publication is switched on, default value is used for result name.
6076         #  @return New GEOM.GEOM_Object, containing the created face.
6077         #
6078         #  @ref tui_extend "Example"
6079         @ManageTransactions("ShapesOp")
6080         def ExtendFace(self, theFace, theUMin, theUMax,
6081                        theVMin, theVMax, theName=None):
6082             """
6083             Resize the input face with the new UMin, UMax, VMin and VMax
6084             parameters. The input face U and V parameters range is [0, 1]. If
6085             theUMin parameter is negative, the input face is extended, otherwise
6086             it is shrinked along U direction by theUMin parameter. If theUMax is
6087             greater than 1, the face is extended, otherwise it is shrinked along
6088             U direction by theUMax parameter. So as for theVMin, theVMax and
6089             V direction of the input face.
6090
6091             Parameters:
6092                 theFace the input face to be resized.
6093                 theUMin the minimal U parameter value.
6094                 theUMax the maximal U parameter value.
6095                 theVMin the minimal V parameter value.
6096                 theVMax the maximal V parameter value.
6097                 theName Object name; when specified, this parameter is used
6098                         for result publication in the study. Otherwise, if automatic
6099                         publication is switched on, default value is used for result name.
6100
6101             Returns:
6102                 New GEOM.GEOM_Object, containing the created face.
6103             """
6104             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6105             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6106                                              theVMin, theVMax)
6107             RaiseIfFailed("ExtendFace", self.ShapesOp)
6108             anObj.SetParameters(Parameters)
6109             self._autoPublish(anObj, theName, "face")
6110             return anObj
6111
6112         ## This function takes some face as input parameter and creates new
6113         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6114         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6115         #  parameters of the source face (in the parametrical space).
6116         #  @param theFace the input face.
6117         #  @param theName Object name; when specified, this parameter is used
6118         #         for result publication in the study. Otherwise, if automatic
6119         #         publication is switched on, default value is used for result name.
6120         #  @return New GEOM.GEOM_Object, containing the created face.
6121         #
6122         #  @ref tui_creation_surface "Example"
6123         @ManageTransactions("ShapesOp")
6124         def MakeSurfaceFromFace(self, theFace, theName=None):
6125             """
6126             This function takes some face as input parameter and creates new
6127             GEOM_Object, i.e. topological shape by extracting underlying surface
6128             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6129             parameters of the source face (in the parametrical space).
6130
6131             Parameters:
6132                 theFace the input face.
6133                 theName Object name; when specified, this parameter is used
6134                         for result publication in the study. Otherwise, if automatic
6135                         publication is switched on, default value is used for result name.
6136
6137             Returns:
6138                 New GEOM.GEOM_Object, containing the created face.
6139             """
6140             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6141             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6142             self._autoPublish(anObj, theName, "surface")
6143             return anObj
6144
6145         # end of l4_obtain
6146         ## @}
6147
6148         ## @addtogroup l4_access
6149         ## @{
6150
6151         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6152         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6153         #  @param aShape Shape to get sub-shape of.
6154         #  @param ListOfID List of sub-shapes indices.
6155         #  @param theName Object name; when specified, this parameter is used
6156         #         for result publication in the study. Otherwise, if automatic
6157         #         publication is switched on, default value is used for result name.
6158         #
6159         #  @return Found sub-shape.
6160         #
6161         #  @ref swig_all_decompose "Example"
6162         def GetSubShape(self, aShape, ListOfID, theName=None):
6163             """
6164             Obtain a composite sub-shape of aShape, composed from sub-shapes
6165             of aShape, selected by their unique IDs inside aShape
6166
6167             Parameters:
6168                 aShape Shape to get sub-shape of.
6169                 ListOfID List of sub-shapes indices.
6170                 theName Object name; when specified, this parameter is used
6171                         for result publication in the study. Otherwise, if automatic
6172                         publication is switched on, default value is used for result name.
6173
6174             Returns:
6175                 Found sub-shape.
6176             """
6177             # Example: see GEOM_TestAll.py
6178             anObj = self.AddSubShape(aShape,ListOfID)
6179             self._autoPublish(anObj, theName, "subshape")
6180             return anObj
6181
6182         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6183         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6184         #  @param aShape Shape to get sub-shape of.
6185         #  @param aSubShape Sub-shapes of aShape.
6186         #  @return ID of found sub-shape.
6187         #
6188         #  @ref swig_all_decompose "Example"
6189         @ManageTransactions("LocalOp")
6190         def GetSubShapeID(self, aShape, aSubShape):
6191             """
6192             Obtain unique ID of sub-shape aSubShape inside aShape
6193             of aShape, selected by their unique IDs inside aShape
6194
6195             Parameters:
6196                aShape Shape to get sub-shape of.
6197                aSubShape Sub-shapes of aShape.
6198
6199             Returns:
6200                ID of found sub-shape.
6201             """
6202             # Example: see GEOM_TestAll.py
6203             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6204             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6205             return anID
6206
6207         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6208         #  This function is provided for performance purpose. The complexity is O(n) with n
6209         #  the number of subobjects of aShape
6210         #  @param aShape Shape to get sub-shape of.
6211         #  @param aSubShapes Sub-shapes of aShape.
6212         #  @return list of IDs of found sub-shapes.
6213         #
6214         #  @ref swig_all_decompose "Example"
6215         @ManageTransactions("ShapesOp")
6216         def GetSubShapesIDs(self, aShape, aSubShapes):
6217             """
6218             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6219             This function is provided for performance purpose. The complexity is O(n) with n
6220             the number of subobjects of aShape
6221
6222             Parameters:
6223                aShape Shape to get sub-shape of.
6224                aSubShapes Sub-shapes of aShape.
6225
6226             Returns:
6227                List of IDs of found sub-shape.
6228             """
6229             # Example: see GEOM_TestAll.py
6230             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6231             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6232             return anIDs
6233
6234         # end of l4_access
6235         ## @}
6236
6237         ## @addtogroup l4_decompose
6238         ## @{
6239
6240         ## Get all sub-shapes and groups of \a theShape,
6241         #  that were created already by any other methods.
6242         #  @param theShape Any shape.
6243         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6244         #                       returned, else all found sub-shapes and groups.
6245         #  @return List of existing sub-objects of \a theShape.
6246         #
6247         #  @ref swig_all_decompose "Example"
6248         @ManageTransactions("ShapesOp")
6249         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6250             """
6251             Get all sub-shapes and groups of theShape,
6252             that were created already by any other methods.
6253
6254             Parameters:
6255                 theShape Any shape.
6256                 theGroupsOnly If this parameter is TRUE, only groups will be
6257                                  returned, else all found sub-shapes and groups.
6258
6259             Returns:
6260                 List of existing sub-objects of theShape.
6261             """
6262             # Example: see GEOM_TestAll.py
6263             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6264             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6265             return ListObj
6266
6267         ## Get all groups of \a theShape,
6268         #  that were created already by any other methods.
6269         #  @param theShape Any shape.
6270         #  @return List of existing groups of \a theShape.
6271         #
6272         #  @ref swig_all_decompose "Example"
6273         @ManageTransactions("ShapesOp")
6274         def GetGroups(self, theShape):
6275             """
6276             Get all groups of theShape,
6277             that were created already by any other methods.
6278
6279             Parameters:
6280                 theShape Any shape.
6281
6282             Returns:
6283                 List of existing groups of theShape.
6284             """
6285             # Example: see GEOM_TestAll.py
6286             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6287             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6288             return ListObj
6289
6290         ## Explode a shape on sub-shapes of a given type.
6291         #  If the shape itself matches the type, it is also returned.
6292         #  @param aShape Shape to be exploded.
6293         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6294         #  @param theName Object name; when specified, this parameter is used
6295         #         for result publication in the study. Otherwise, if automatic
6296         #         publication is switched on, default value is used for result name.
6297         #
6298         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6299         #
6300         #  @ref swig_all_decompose "Example"
6301         @ManageTransactions("ShapesOp")
6302         def SubShapeAll(self, aShape, aType, theName=None):
6303             """
6304             Explode a shape on sub-shapes of a given type.
6305             If the shape itself matches the type, it is also returned.
6306
6307             Parameters:
6308                 aShape Shape to be exploded.
6309                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6310                 theName Object name; when specified, this parameter is used
6311                         for result publication in the study. Otherwise, if automatic
6312                         publication is switched on, default value is used for result name.
6313
6314             Returns:
6315                 List of sub-shapes of type theShapeType, contained in theShape.
6316             """
6317             # Example: see GEOM_TestAll.py
6318             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6319             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6320             self._autoPublish(ListObj, theName, "subshape")
6321             return ListObj
6322
6323         ## Explode a shape on sub-shapes of a given type.
6324         #  @param aShape Shape to be exploded.
6325         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6326         #  @return List of IDs of sub-shapes.
6327         #
6328         #  @ref swig_all_decompose "Example"
6329         @ManageTransactions("ShapesOp")
6330         def SubShapeAllIDs(self, aShape, aType):
6331             """
6332             Explode a shape on sub-shapes of a given type.
6333
6334             Parameters:
6335                 aShape Shape to be exploded (see geompy.ShapeType)
6336                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6337
6338             Returns:
6339                 List of IDs of sub-shapes.
6340             """
6341             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6342             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6343             return ListObj
6344
6345         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6346         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6347         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6348         #  @param aShape Shape to get sub-shape of.
6349         #  @param ListOfInd List of sub-shapes indices.
6350         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6351         #  @param theName Object name; when specified, this parameter is used
6352         #         for result publication in the study. Otherwise, if automatic
6353         #         publication is switched on, default value is used for result name.
6354         #
6355         #  @return A compound of sub-shapes of aShape.
6356         #
6357         #  @ref swig_all_decompose "Example"
6358         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6359             """
6360             Obtain a compound of sub-shapes of aShape,
6361             selected by their indices in list of all sub-shapes of type aType.
6362             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6363
6364             Parameters:
6365                 aShape Shape to get sub-shape of.
6366                 ListOfID List of sub-shapes indices.
6367                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6368                 theName Object name; when specified, this parameter is used
6369                         for result publication in the study. Otherwise, if automatic
6370                         publication is switched on, default value is used for result name.
6371
6372             Returns:
6373                 A compound of sub-shapes of aShape.
6374             """
6375             # Example: see GEOM_TestAll.py
6376             ListOfIDs = []
6377             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6378             for ind in ListOfInd:
6379                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6380             # note: auto-publishing is done in self.GetSubShape()
6381             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6382             return anObj
6383
6384         ## Explode a shape on sub-shapes of a given type.
6385         #  Sub-shapes will be sorted taking into account their gravity centers,
6386         #  to provide stable order of sub-shapes. Please see
6387         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6388         #  If the shape itself matches the type, it is also returned.
6389         #  @param aShape Shape to be exploded.
6390         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6391         #  @param theName Object name; when specified, this parameter is used
6392         #         for result publication in the study. Otherwise, if automatic
6393         #         publication is switched on, default value is used for result name.
6394         #
6395         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6396         #
6397         #  @ref swig_SubShapeAllSorted "Example"
6398         @ManageTransactions("ShapesOp")
6399         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6400             """
6401             Explode a shape on sub-shapes of a given type.
6402             Sub-shapes will be sorted taking into account their gravity centers,
6403             to provide stable order of sub-shapes.
6404             If the shape itself matches the type, it is also returned.
6405
6406             Parameters:
6407                 aShape Shape to be exploded.
6408                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6409                 theName Object name; when specified, this parameter is used
6410                         for result publication in the study. Otherwise, if automatic
6411                         publication is switched on, default value is used for result name.
6412
6413             Returns:
6414                 List of sub-shapes of type theShapeType, contained in theShape.
6415             """
6416             # Example: see GEOM_TestAll.py
6417             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6418             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6419             self._autoPublish(ListObj, theName, "subshape")
6420             return ListObj
6421
6422         ## Explode a shape on sub-shapes of a given type.
6423         #  Sub-shapes will be sorted taking into account their gravity centers,
6424         #  to provide stable order of sub-shapes. Please see
6425         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6426         #  @param aShape Shape to be exploded.
6427         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6428         #  @return List of IDs of sub-shapes.
6429         #
6430         #  @ref swig_all_decompose "Example"
6431         @ManageTransactions("ShapesOp")
6432         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6433             """
6434             Explode a shape on sub-shapes of a given type.
6435             Sub-shapes will be sorted taking into account their gravity centers,
6436             to provide stable order of sub-shapes.
6437
6438             Parameters:
6439                 aShape Shape to be exploded.
6440                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6441
6442             Returns:
6443                 List of IDs of sub-shapes.
6444             """
6445             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6446             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6447             return ListIDs
6448
6449         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6450         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6451         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6452         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6453         #  @param aShape Shape to get sub-shape of.
6454         #  @param ListOfInd List of sub-shapes indices.
6455         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6456         #  @param theName Object name; when specified, this parameter is used
6457         #         for result publication in the study. Otherwise, if automatic
6458         #         publication is switched on, default value is used for result name.
6459         #
6460         #  @return A compound of sub-shapes of aShape.
6461         #
6462         #  @ref swig_all_decompose "Example"
6463         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6464             """
6465             Obtain a compound of sub-shapes of aShape,
6466             selected by they indices in sorted list of all sub-shapes of type aType.
6467             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6468
6469             Parameters:
6470                 aShape Shape to get sub-shape of.
6471                 ListOfID List of sub-shapes indices.
6472                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6473                 theName Object name; when specified, this parameter is used
6474                         for result publication in the study. Otherwise, if automatic
6475                         publication is switched on, default value is used for result name.
6476
6477             Returns:
6478                 A compound of sub-shapes of aShape.
6479             """
6480             # Example: see GEOM_TestAll.py
6481             ListOfIDs = []
6482             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6483             for ind in ListOfInd:
6484                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6485             # note: auto-publishing is done in self.GetSubShape()
6486             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6487             return anObj
6488
6489         ## Extract shapes (excluding the main shape) of given type.
6490         #  @param aShape The shape.
6491         #  @param aType  The shape type (see ShapeType())
6492         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6493         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6494         #  @param theName Object name; when specified, this parameter is used
6495         #         for result publication in the study. Otherwise, if automatic
6496         #         publication is switched on, default value is used for result name.
6497         #
6498         #  @return List of sub-shapes of type aType, contained in aShape.
6499         #
6500         #  @ref swig_FilletChamfer "Example"
6501         @ManageTransactions("ShapesOp")
6502         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6503             """
6504             Extract shapes (excluding the main shape) of given type.
6505
6506             Parameters:
6507                 aShape The shape.
6508                 aType  The shape type (see geompy.ShapeType)
6509                 isSorted Boolean flag to switch sorting on/off.
6510                 theName Object name; when specified, this parameter is used
6511                         for result publication in the study. Otherwise, if automatic
6512                         publication is switched on, default value is used for result name.
6513
6514             Returns:
6515                 List of sub-shapes of type aType, contained in aShape.
6516             """
6517             # Example: see GEOM_TestAll.py
6518             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6519             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6520             self._autoPublish(ListObj, theName, "subshape")
6521             return ListObj
6522
6523         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6524         #  @param aShape Main shape.
6525         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6526         #  @param theName Object name; when specified, this parameter is used
6527         #         for result publication in the study. Otherwise, if automatic
6528         #         publication is switched on, default value is used for result name.
6529         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6530         #
6531         #  @ref swig_all_decompose "Example"
6532         @ManageTransactions("ShapesOp")
6533         def SubShapes(self, aShape, anIDs, theName=None):
6534             """
6535             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6536
6537             Parameters:
6538                 aShape Main shape.
6539                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6540                 theName Object name; when specified, this parameter is used
6541                         for result publication in the study. Otherwise, if automatic
6542                         publication is switched on, default value is used for result name.
6543
6544             Returns:
6545                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6546             """
6547             # Example: see GEOM_TestAll.py
6548             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6549             RaiseIfFailed("SubShapes", self.ShapesOp)
6550             self._autoPublish(ListObj, theName, "subshape")
6551             return ListObj
6552
6553         ## Explode a shape into edges sorted in a row from a starting point.
6554         #  @param theShape the shape to be exploded on edges.
6555         #  @param theStartPoint the starting point.
6556         #  @param theName Object name; when specified, this parameter is used
6557         #         for result publication in the study. Otherwise, if automatic
6558         #         publication is switched on, default value is used for result name.
6559         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6560         #          of edges sorted in a row from a starting point.
6561         #
6562         #  @ref swig_GetSubShapeEdgeSorted "Example"
6563         @ManageTransactions("ShapesOp")
6564         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6565             """
6566             Explode a shape into edges sorted in a row from a starting point.
6567
6568             Parameters:
6569                 theShape the shape to be exploded on edges.
6570                 theStartPoint the starting point.
6571                 theName Object name; when specified, this parameter is used
6572                         for result publication in the study. Otherwise, if automatic
6573                         publication is switched on, default value is used for result name.
6574
6575             Returns:
6576                 List of GEOM.GEOM_Object that is actually an ordered list
6577                 of edges sorted in a row from a starting point.
6578             """
6579             # Example: see GEOM_TestAll.py
6580             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6581             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6582             self._autoPublish(ListObj, theName, "SortedEdges")
6583             return ListObj
6584
6585         ##
6586         # Return the list of subshapes that satisfies a certain tolerance
6587         # criterion. The user defines the type of shapes to be returned, the
6588         # condition and the tolerance value. The operation is defined for
6589         # faces, edges and vertices only. E.g. for theShapeType FACE,
6590         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6591         # all faces of theShape that have tolerances greater then 1.e7.
6592         #
6593         #  @param theShape the shape to be exploded
6594         #  @param theShapeType the type of sub-shapes to be returned (see
6595         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6596         #  @param theCondition the condition type (see GEOM::comparison_condition).
6597         #  @param theTolerance the tolerance filter.
6598         #  @param theName Object name; when specified, this parameter is used
6599         #         for result publication in the study. Otherwise, if automatic
6600         #         publication is switched on, default value is used for result name.
6601         #  @return the list of shapes that satisfy the conditions.
6602         #
6603         #  @ref swig_GetSubShapesWithTolerance "Example"
6604         @ManageTransactions("ShapesOp")
6605         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6606                                       theCondition, theTolerance, theName=None):
6607             """
6608             Return the list of subshapes that satisfies a certain tolerance
6609             criterion. The user defines the type of shapes to be returned, the
6610             condition and the tolerance value. The operation is defined for
6611             faces, edges and vertices only. E.g. for theShapeType FACE,
6612             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6613             all faces of theShape that have tolerances greater then 1.e7.
6614             
6615             Parameters:
6616                 theShape the shape to be exploded
6617                 theShapeType the type of sub-shapes to be returned (see
6618                              ShapeType()). Can have the values FACE,
6619                              EDGE and VERTEX only.
6620                 theCondition the condition type (see GEOM::comparison_condition).
6621                 theTolerance the tolerance filter.
6622                 theName Object name; when specified, this parameter is used
6623                         for result publication in the study. Otherwise, if automatic
6624                         publication is switched on, default value is used for result name.
6625
6626             Returns:
6627                 The list of shapes that satisfy the conditions.
6628             """
6629             # Example: see GEOM_TestAll.py
6630             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6631                                                               theCondition, theTolerance)
6632             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6633             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6634             return ListObj
6635
6636         ## Check if the object is a sub-object of another GEOM object.
6637         #  @param aSubObject Checked sub-object (or its parent object, in case if
6638         #         \a theSubObjectIndex is non-zero).
6639         #  @param anObject An object that is checked for ownership (or its parent object,
6640         #         in case if \a theObjectIndex is non-zero).
6641         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6642         #         identifies a sub-object within its parent specified via \a theSubObject.
6643         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6644         #         identifies an object within its parent specified via \a theObject.
6645         #  @return TRUE, if the given object contains sub-object.
6646         @ManageTransactions("ShapesOp")
6647         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6648             """
6649             Check if the object is a sub-object of another GEOM object.
6650             
6651             Parameters:
6652                 aSubObject Checked sub-object (or its parent object, in case if
6653                     \a theSubObjectIndex is non-zero).
6654                 anObject An object that is checked for ownership (or its parent object,
6655                     in case if \a theObjectIndex is non-zero).
6656                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6657                     identifies a sub-object within its parent specified via \a theSubObject.
6658                 anObjectIndex When non-zero, specifies a sub-shape index that
6659                     identifies an object within its parent specified via \a theObject.
6660
6661             Returns
6662                 TRUE, if the given object contains sub-object.
6663             """
6664             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6665             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6666             return IsOk
6667
6668         ## Perform extraction of sub-shapes from the main shape.
6669         #
6670         #  @param theShape the main shape
6671         #  @param theListOfID the list of sub-shape IDs to be extracted from
6672         #         the main shape.
6673         #  @return New GEOM.GEOM_Object, containing the shape without
6674         #          extracted sub-shapes.
6675         #
6676         #  @ref swig_MakeExtraction "Example"
6677         @ManageTransactions("ShapesOp")
6678         def MakeExtraction(self, theShape, theListOfID, theName=None):
6679             """
6680             Perform extraction of sub-shapes from the main shape.
6681
6682             Parameters:
6683                 theShape the main shape
6684                 theListOfID the list of sub-shape IDs to be extracted from
6685                             the main shape.
6686
6687             Returns
6688                 New GEOM.GEOM_Object, containing the shape without
6689                 extracted sub-shapes.
6690             """
6691             # Example: see GEOM_TestAll.py
6692             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6693             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6694             self._autoPublish(anObj, theName, "Extraction")
6695             return anObj
6696
6697         # end of l4_decompose
6698         ## @}
6699
6700         ## @addtogroup l4_decompose_d
6701         ## @{
6702
6703         ## Deprecated method
6704         #  It works like SubShapeAllSortedCentres(), but wrongly
6705         #  defines centres of faces, shells and solids.
6706         @ManageTransactions("ShapesOp")
6707         def SubShapeAllSorted(self, aShape, aType, theName=None):
6708             """
6709             Deprecated method
6710             It works like geompy.SubShapeAllSortedCentres, but wrongly
6711             defines centres of faces, shells and solids.
6712             """
6713             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6714             RaiseIfFailed("MakeExplode", self.ShapesOp)
6715             self._autoPublish(ListObj, theName, "subshape")
6716             return ListObj
6717
6718         ## Deprecated method
6719         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6720         #  defines centres of faces, shells and solids.
6721         @ManageTransactions("ShapesOp")
6722         def SubShapeAllSortedIDs(self, aShape, aType):
6723             """
6724             Deprecated method
6725             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6726             defines centres of faces, shells and solids.
6727             """
6728             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6729             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6730             return ListIDs
6731
6732         ## Deprecated method
6733         #  It works like SubShapeSortedCentres(), but has a bug
6734         #  (wrongly defines centres of faces, shells and solids).
6735         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6736             """
6737             Deprecated method
6738             It works like geompy.SubShapeSortedCentres, but has a bug
6739             (wrongly defines centres of faces, shells and solids).
6740             """
6741             ListOfIDs = []
6742             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6743             for ind in ListOfInd:
6744                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6745             # note: auto-publishing is done in self.GetSubShape()
6746             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6747             return anObj
6748
6749         # end of l4_decompose_d
6750         ## @}
6751
6752         ## @addtogroup l3_healing
6753         ## @{
6754
6755         ## Apply a sequence of Shape Healing operators to the given object.
6756         #  @param theShape Shape to be processed.
6757         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6758         #  @param theParameters List of names of parameters
6759         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6760         #  @param theValues List of values of parameters, in the same order
6761         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6762         #  @param theName Object name; when specified, this parameter is used
6763         #         for result publication in the study. Otherwise, if automatic
6764         #         publication is switched on, default value is used for result name.
6765         #
6766         #  <b> Operators and Parameters: </b> \n
6767         #
6768         #  * \b FixShape - corrects invalid shapes. \n
6769         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6770         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6771         #
6772         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6773         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6774         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6775         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6776         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6777         #  - \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
6778         #  - \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
6779         #  - \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
6780         #
6781         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6782         #    surfaces in segments using a certain angle. \n
6783         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6784         #    if Angle=180, four if Angle=90, etc). \n
6785         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6786         #
6787         #  * \b SplitClosedFaces - splits closed faces in segments.
6788         #    The number of segments depends on the number of splitting points.\n
6789         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6790         #
6791         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6792         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6793         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6794         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6795         #   This and the previous parameters can take the following values:\n
6796         #   \b Parametric \b Continuity \n
6797         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6798         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6799         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6800         #    ruling out sharp edges).\n
6801         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6802         #       are of the same magnitude).\n
6803         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6804         #    or surfaces (d/du C(u)) are the same at junction. \n
6805         #   \b Geometric \b Continuity \n
6806         #   \b G1: first derivatives are proportional at junction.\n
6807         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6808         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6809         #   \b G2: first and second derivatives are proportional at junction.
6810         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6811         #    continuity requires that the underlying parameterization was continuous as well.
6812         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6813         #
6814         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6815         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6816         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6817         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6818         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6819         #       with the specified parameters.\n
6820         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6821         #       with the specified parameters.\n
6822         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6823         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6824         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6825         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6826         #
6827         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6828         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6829         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6830         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6831         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6832         #
6833         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6834         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6835         #
6836         #
6837         #  @return New GEOM.GEOM_Object, containing processed shape.
6838         #
6839         #  \n @ref tui_shape_processing "Example"
6840         @ManageTransactions("HealOp")
6841         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6842             """
6843             Apply a sequence of Shape Healing operators to the given object.
6844
6845             Parameters:
6846                 theShape Shape to be processed.
6847                 theValues List of values of parameters, in the same order
6848                           as parameters are listed in theParameters list.
6849                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6850                 theParameters List of names of parameters
6851                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6852                 theName Object name; when specified, this parameter is used
6853                         for result publication in the study. Otherwise, if automatic
6854                         publication is switched on, default value is used for result name.
6855
6856                 Operators and Parameters:
6857
6858                  * FixShape - corrects invalid shapes.
6859                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6860                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6861                  * FixFaceSize - removes small faces, such as spots and strips.
6862                      * FixFaceSize.Tolerance - defines minimum possible face size.
6863                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6864                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6865                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6866                      * 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.
6867                      * 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.
6868                      * 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.
6869
6870                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6871                                 in segments using a certain angle.
6872                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6873                                           if Angle=180, four if Angle=90, etc).
6874                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6875                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6876                                       splitting points.
6877                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6878                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6879                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6880                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6881                      * SplitContinuity.CurveContinuity - required continuity for curves.
6882                        This and the previous parameters can take the following values:
6883
6884                        Parametric Continuity:
6885                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6886                                                    coincidental. The curves or surfaces may still meet at an angle,
6887                                                    giving rise to a sharp corner or edge).
6888                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6889                                                    are parallel, ruling out sharp edges).
6890                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6891                                                   or surfaces are of the same magnitude).
6892                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6893                           curves or surfaces (d/du C(u)) are the same at junction.
6894
6895                        Geometric Continuity:
6896                        G1: first derivatives are proportional at junction.
6897                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6898                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6899                        G2: first and second derivatives are proportional at junction. As the names imply,
6900                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6901                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6902                            geometric continuity of order n, but not vice-versa.
6903                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6904                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6905                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6906                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6907                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6908                                                         the specified parameters.
6909                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6910                                                         the specified parameters.
6911                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6912                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6913                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6914                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6915                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6916                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6917                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6918                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6919                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6920                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6921                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6922
6923             Returns:
6924                 New GEOM.GEOM_Object, containing processed shape.
6925
6926             Note: For more information look through SALOME Geometry User's Guide->
6927                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6928             """
6929             # Example: see GEOM_TestHealing.py
6930             theValues,Parameters = ParseList(theValues)
6931             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6932             # To avoid script failure in case of good argument shape
6933             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6934                 return theShape
6935             RaiseIfFailed("ProcessShape", self.HealOp)
6936             for string in (theOperators + theParameters):
6937                 Parameters = ":" + Parameters
6938                 pass
6939             anObj.SetParameters(Parameters)
6940             self._autoPublish(anObj, theName, "healed")
6941             return anObj
6942
6943         ## Remove faces from the given object (shape).
6944         #  @param theObject Shape to be processed.
6945         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6946         #                  removes ALL faces of the given object.
6947         #  @param theName Object name; when specified, this parameter is used
6948         #         for result publication in the study. Otherwise, if automatic
6949         #         publication is switched on, default value is used for result name.
6950         #
6951         #  @return New GEOM.GEOM_Object, containing processed shape.
6952         #
6953         #  @ref tui_suppress_faces "Example"
6954         @ManageTransactions("HealOp")
6955         def SuppressFaces(self, theObject, theFaces, theName=None):
6956             """
6957             Remove faces from the given object (shape).
6958
6959             Parameters:
6960                 theObject Shape to be processed.
6961                 theFaces Indices of faces to be removed, if EMPTY then the method
6962                          removes ALL faces of the given object.
6963                 theName Object name; when specified, this parameter is used
6964                         for result publication in the study. Otherwise, if automatic
6965                         publication is switched on, default value is used for result name.
6966
6967             Returns:
6968                 New GEOM.GEOM_Object, containing processed shape.
6969             """
6970             # Example: see GEOM_TestHealing.py
6971             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6972             RaiseIfFailed("SuppressFaces", self.HealOp)
6973             self._autoPublish(anObj, theName, "suppressFaces")
6974             return anObj
6975
6976         ## Sewing of faces into a single shell.
6977         #  @param ListShape Shapes to be processed.
6978         #  @param theTolerance Required tolerance value.
6979         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6980         #  @param theName Object name; when specified, this parameter is used
6981         #         for result publication in the study. Otherwise, if automatic
6982         #         publication is switched on, default value is used for result name.
6983         #
6984         #  @return New GEOM.GEOM_Object, containing a result shell.
6985         #
6986         #  @ref tui_sewing "Example"
6987         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6988             """
6989             Sewing of faces into a single shell.
6990
6991             Parameters:
6992                 ListShape Shapes to be processed.
6993                 theTolerance Required tolerance value.
6994                 AllowNonManifold Flag that allows non-manifold sewing.
6995                 theName Object name; when specified, this parameter is used
6996                         for result publication in the study. Otherwise, if automatic
6997                         publication is switched on, default value is used for result name.
6998
6999             Returns:
7000                 New GEOM.GEOM_Object, containing containing a result shell.
7001             """
7002             # Example: see GEOM_TestHealing.py
7003             # note: auto-publishing is done in self.Sew()
7004             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7005             return anObj
7006
7007         ## Sewing of faces into a single shell.
7008         #  @param ListShape Shapes to be processed.
7009         #  @param theTolerance Required tolerance value.
7010         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7011         #  @param theName Object name; when specified, this parameter is used
7012         #         for result publication in the study. Otherwise, if automatic
7013         #         publication is switched on, default value is used for result name.
7014         #
7015         #  @return New GEOM.GEOM_Object, containing a result shell.
7016         @ManageTransactions("HealOp")
7017         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7018             """
7019             Sewing of faces into a single shell.
7020
7021             Parameters:
7022                 ListShape Shapes to be processed.
7023                 theTolerance Required tolerance value.
7024                 AllowNonManifold Flag that allows non-manifold sewing.
7025                 theName Object name; when specified, this parameter is used
7026                         for result publication in the study. Otherwise, if automatic
7027                         publication is switched on, default value is used for result name.
7028
7029             Returns:
7030                 New GEOM.GEOM_Object, containing a result shell.
7031             """
7032             # Example: see MakeSewing() above
7033             theTolerance,Parameters = ParseParameters(theTolerance)
7034             if AllowNonManifold:
7035                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7036             else:
7037                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7038             # To avoid script failure in case of good argument shape
7039             # (Fix of test cases geom/bugs11/L7,L8)
7040             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7041                 return anObj
7042             RaiseIfFailed("Sew", self.HealOp)
7043             anObj.SetParameters(Parameters)
7044             self._autoPublish(anObj, theName, "sewed")
7045             return anObj
7046
7047         ## Rebuild the topology of theSolids by removing
7048         #  the faces that are shared by several solids.
7049         #  @param theSolids A compound or a list of solids to be processed.
7050         #  @param theName Object name; when specified, this parameter is used
7051         #         for result publication in the study. Otherwise, if automatic
7052         #         publication is switched on, default value is used for result name.
7053         #
7054         #  @return New GEOM.GEOM_Object, containing processed shape.
7055         #
7056         #  @ref tui_remove_webs "Example"
7057         @ManageTransactions("HealOp")
7058         def RemoveInternalFaces (self, theSolids, theName=None):
7059             """
7060             Rebuild the topology of theSolids by removing
7061             the faces that are shared by several solids.
7062
7063             Parameters:
7064                 theSolids A compound or a list of solids to be processed.
7065                 theName Object name; when specified, this parameter is used
7066                         for result publication in the study. Otherwise, if automatic
7067                         publication is switched on, default value is used for result name.
7068
7069             Returns:
7070                 New GEOM.GEOM_Object, containing processed shape.
7071             """
7072             # Example: see GEOM_TestHealing.py
7073             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7074             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7075             self._autoPublish(anObj, theName, "removeWebs")
7076             return anObj
7077
7078         ## Remove internal wires and edges from the given object (face).
7079         #  @param theObject Shape to be processed.
7080         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7081         #                  removes ALL internal wires of the given object.
7082         #  @param theName Object name; when specified, this parameter is used
7083         #         for result publication in the study. Otherwise, if automatic
7084         #         publication is switched on, default value is used for result name.
7085         #
7086         #  @return New GEOM.GEOM_Object, containing processed shape.
7087         #
7088         #  @ref tui_suppress_internal_wires "Example"
7089         @ManageTransactions("HealOp")
7090         def SuppressInternalWires(self, theObject, theWires, theName=None):
7091             """
7092             Remove internal wires and edges from the given object (face).
7093
7094             Parameters:
7095                 theObject Shape to be processed.
7096                 theWires Indices of wires to be removed, if EMPTY then the method
7097                          removes ALL internal wires of the given object.
7098                 theName Object name; when specified, this parameter is used
7099                         for result publication in the study. Otherwise, if automatic
7100                         publication is switched on, default value is used for result name.
7101
7102             Returns:
7103                 New GEOM.GEOM_Object, containing processed shape.
7104             """
7105             # Example: see GEOM_TestHealing.py
7106             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7107             RaiseIfFailed("RemoveIntWires", self.HealOp)
7108             self._autoPublish(anObj, theName, "suppressWires")
7109             return anObj
7110
7111         ## Remove internal closed contours (holes) from the given object.
7112         #  @param theObject Shape to be processed.
7113         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7114         #                  removes ALL internal holes of the given object
7115         #  @param theName Object name; when specified, this parameter is used
7116         #         for result publication in the study. Otherwise, if automatic
7117         #         publication is switched on, default value is used for result name.
7118         #
7119         #  @return New GEOM.GEOM_Object, containing processed shape.
7120         #
7121         #  @ref tui_suppress_holes "Example"
7122         @ManageTransactions("HealOp")
7123         def SuppressHoles(self, theObject, theWires, theName=None):
7124             """
7125             Remove internal closed contours (holes) from the given object.
7126
7127             Parameters:
7128                 theObject Shape to be processed.
7129                 theWires Indices of wires to be removed, if EMPTY then the method
7130                          removes ALL internal holes of the given object
7131                 theName Object name; when specified, this parameter is used
7132                         for result publication in the study. Otherwise, if automatic
7133                         publication is switched on, default value is used for result name.
7134
7135             Returns:
7136                 New GEOM.GEOM_Object, containing processed shape.
7137             """
7138             # Example: see GEOM_TestHealing.py
7139             anObj = self.HealOp.FillHoles(theObject, theWires)
7140             RaiseIfFailed("FillHoles", self.HealOp)
7141             self._autoPublish(anObj, theName, "suppressHoles")
7142             return anObj
7143
7144         ## Close an open wire.
7145         #  @param theObject Shape to be processed.
7146         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7147         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7148         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7149         #                        If False : closure by creation of an edge between ends.
7150         #  @param theName Object name; when specified, this parameter is used
7151         #         for result publication in the study. Otherwise, if automatic
7152         #         publication is switched on, default value is used for result name.
7153         #
7154         #  @return New GEOM.GEOM_Object, containing processed shape.
7155         #
7156         #  @ref tui_close_contour "Example"
7157         @ManageTransactions("HealOp")
7158         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7159             """
7160             Close an open wire.
7161
7162             Parameters:
7163                 theObject Shape to be processed.
7164                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7165                          if [ ], then theObject itself is a wire.
7166                 isCommonVertex If True  : closure by creation of a common vertex,
7167                                If False : closure by creation of an edge between ends.
7168                 theName Object name; when specified, this parameter is used
7169                         for result publication in the study. Otherwise, if automatic
7170                         publication is switched on, default value is used for result name.
7171
7172             Returns:
7173                 New GEOM.GEOM_Object, containing processed shape.
7174             """
7175             # Example: see GEOM_TestHealing.py
7176             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7177             RaiseIfFailed("CloseContour", self.HealOp)
7178             self._autoPublish(anObj, theName, "closeContour")
7179             return anObj
7180
7181         ## Addition of a point to a given edge object.
7182         #  @param theObject Shape to be processed.
7183         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7184         #                      if -1, then theObject itself is the edge.
7185         #  @param theValue Value of parameter on edge or length parameter,
7186         #                  depending on \a isByParameter.
7187         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7188         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7189         #  @param theName Object name; when specified, this parameter is used
7190         #         for result publication in the study. Otherwise, if automatic
7191         #         publication is switched on, default value is used for result name.
7192         #
7193         #  @return New GEOM.GEOM_Object, containing processed shape.
7194         #
7195         #  @ref tui_add_point_on_edge "Example"
7196         @ManageTransactions("HealOp")
7197         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7198             """
7199             Addition of a point to a given edge object.
7200
7201             Parameters:
7202                 theObject Shape to be processed.
7203                 theEdgeIndex Index of edge to be divided within theObject's shape,
7204                              if -1, then theObject itself is the edge.
7205                 theValue Value of parameter on edge or length parameter,
7206                          depending on isByParameter.
7207                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7208                               if FALSE : theValue is treated as a length parameter [0..1]
7209                 theName Object name; when specified, this parameter is used
7210                         for result publication in the study. Otherwise, if automatic
7211                         publication is switched on, default value is used for result name.
7212
7213             Returns:
7214                 New GEOM.GEOM_Object, containing processed shape.
7215             """
7216             # Example: see GEOM_TestHealing.py
7217             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7218             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7219             RaiseIfFailed("DivideEdge", self.HealOp)
7220             anObj.SetParameters(Parameters)
7221             self._autoPublish(anObj, theName, "divideEdge")
7222             return anObj
7223
7224         ## Addition of points to a given edge of \a theObject by projecting
7225         #  other points to the given edge.
7226         #  @param theObject Shape to be processed.
7227         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7228         #                      if -1, then theObject itself is the edge.
7229         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7230         #  @param theName Object name; when specified, this parameter is used
7231         #         for result publication in the study. Otherwise, if automatic
7232         #         publication is switched on, default value is used for result name.
7233         #
7234         #  @return New GEOM.GEOM_Object, containing processed shape.
7235         #
7236         #  @ref tui_add_point_on_edge "Example"
7237         @ManageTransactions("HealOp")
7238         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7239             """
7240             Addition of points to a given edge of \a theObject by projecting
7241             other points to the given edge.
7242
7243             Parameters:
7244                 theObject Shape to be processed.
7245                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7246                              if -1, then theObject itself is the edge.
7247                 thePoints List of points to project to theEdgeIndex-th edge.
7248                 theName Object name; when specified, this parameter is used
7249                         for result publication in the study. Otherwise, if automatic
7250                         publication is switched on, default value is used for result name.
7251
7252             Returns:
7253                 New GEOM.GEOM_Object, containing processed shape.
7254             """
7255             # Example: see GEOM_TestHealing.py
7256             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7257                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7258             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7259             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7260             self._autoPublish(anObj, theName, "divideEdge")
7261             return anObj
7262
7263         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7264         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7265         #  @param theVertices A list of vertices to suppress. If the list
7266         #                     is empty, all vertices in a wire will be assumed.
7267         #  @param theName Object name; when specified, this parameter is used
7268         #         for result publication in the study. Otherwise, if automatic
7269         #         publication is switched on, default value is used for result name.
7270         #
7271         #  @return New GEOM.GEOM_Object with modified wire.
7272         #
7273         #  @ref tui_fuse_collinear_edges "Example"
7274         @ManageTransactions("HealOp")
7275         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7276             """
7277             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7278
7279             Parameters:
7280                 theWire Wire to minimize the number of C1 continuous edges in.
7281                 theVertices A list of vertices to suppress. If the list
7282                             is empty, all vertices in a wire will be assumed.
7283                 theName Object name; when specified, this parameter is used
7284                         for result publication in the study. Otherwise, if automatic
7285                         publication is switched on, default value is used for result name.
7286
7287             Returns:
7288                 New GEOM.GEOM_Object with modified wire.
7289             """
7290             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7291             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7292             self._autoPublish(anObj, theName, "fuseEdges")
7293             return anObj
7294
7295         ## Change orientation of the given object. Updates given shape.
7296         #  @param theObject Shape to be processed.
7297         #  @return Updated <var>theObject</var>
7298         #
7299         #  @ref swig_todo "Example"
7300         @ManageTransactions("HealOp")
7301         def ChangeOrientationShell(self,theObject):
7302             """
7303             Change orientation of the given object. Updates given shape.
7304
7305             Parameters:
7306                 theObject Shape to be processed.
7307
7308             Returns:
7309                 Updated theObject
7310             """
7311             theObject = self.HealOp.ChangeOrientation(theObject)
7312             RaiseIfFailed("ChangeOrientation", self.HealOp)
7313             pass
7314
7315         ## Change orientation of the given object.
7316         #  @param theObject Shape to be processed.
7317         #  @param theName Object name; when specified, this parameter is used
7318         #         for result publication in the study. Otherwise, if automatic
7319         #         publication is switched on, default value is used for result name.
7320         #
7321         #  @return New GEOM.GEOM_Object, containing processed shape.
7322         #
7323         #  @ref swig_todo "Example"
7324         @ManageTransactions("HealOp")
7325         def ChangeOrientationShellCopy(self, theObject, theName=None):
7326             """
7327             Change orientation of the given object.
7328
7329             Parameters:
7330                 theObject Shape to be processed.
7331                 theName Object name; when specified, this parameter is used
7332                         for result publication in the study. Otherwise, if automatic
7333                         publication is switched on, default value is used for result name.
7334
7335             Returns:
7336                 New GEOM.GEOM_Object, containing processed shape.
7337             """
7338             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7339             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7340             self._autoPublish(anObj, theName, "reversed")
7341             return anObj
7342
7343         ## Try to limit tolerance of the given object by value \a theTolerance.
7344         #  @param theObject Shape to be processed.
7345         #  @param theTolerance Required tolerance value.
7346         #  @param theName Object name; when specified, this parameter is used
7347         #         for result publication in the study. Otherwise, if automatic
7348         #         publication is switched on, default value is used for result name.
7349         #
7350         #  @return New GEOM.GEOM_Object, containing processed shape.
7351         #
7352         #  @ref tui_limit_tolerance "Example"
7353         @ManageTransactions("HealOp")
7354         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7355             """
7356             Try to limit tolerance of the given object by value theTolerance.
7357
7358             Parameters:
7359                 theObject Shape to be processed.
7360                 theTolerance Required tolerance value.
7361                 theName Object name; when specified, this parameter is used
7362                         for result publication in the study. Otherwise, if automatic
7363                         publication is switched on, default value is used for result name.
7364
7365             Returns:
7366                 New GEOM.GEOM_Object, containing processed shape.
7367             """
7368             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7369             RaiseIfFailed("LimitTolerance", self.HealOp)
7370             self._autoPublish(anObj, theName, "limitTolerance")
7371             return anObj
7372
7373         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7374         #  that constitute a free boundary of the given shape.
7375         #  @param theObject Shape to get free boundary of.
7376         #  @param theName Object name; when specified, this parameter is used
7377         #         for result publication in the study. Otherwise, if automatic
7378         #         publication is switched on, default value is used for result name.
7379         #
7380         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7381         #  \n \a status: FALSE, if an error(s) occured during the method execution.
7382         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7383         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7384         #
7385         #  @ref tui_free_boundaries_page "Example"
7386         @ManageTransactions("HealOp")
7387         def GetFreeBoundary(self, theObject, theName=None):
7388             """
7389             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7390             that constitute a free boundary of the given shape.
7391
7392             Parameters:
7393                 theObject Shape to get free boundary of.
7394                 theName Object name; when specified, this parameter is used
7395                         for result publication in the study. Otherwise, if automatic
7396                         publication is switched on, default value is used for result name.
7397
7398             Returns:
7399                 [status, theClosedWires, theOpenWires]
7400                  status: FALSE, if an error(s) occured during the method execution.
7401                  theClosedWires: Closed wires on the free boundary of the given shape.
7402                  theOpenWires: Open wires on the free boundary of the given shape.
7403             """
7404             # Example: see GEOM_TestHealing.py
7405             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7406             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7407             self._autoPublish(anObj[1], theName, "closedWire")
7408             self._autoPublish(anObj[2], theName, "openWire")
7409             return anObj
7410
7411         ## Replace coincident faces in \a theShapes by one face.
7412         #  @param theShapes Initial shapes, either a list or compound of shapes.
7413         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7414         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7415         #                         otherwise all initial shapes.
7416         #  @param theName Object name; when specified, this parameter is used
7417         #         for result publication in the study. Otherwise, if automatic
7418         #         publication is switched on, default value is used for result name.
7419         #
7420         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7421         #
7422         #  @ref tui_glue_faces "Example"
7423         @ManageTransactions("ShapesOp")
7424         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7425             """
7426             Replace coincident faces in theShapes by one face.
7427
7428             Parameters:
7429                 theShapes Initial shapes, either a list or compound of shapes.
7430                 theTolerance Maximum distance between faces, which can be considered as coincident.
7431                 doKeepNonSolids If FALSE, only solids will present in the result,
7432                                 otherwise all initial shapes.
7433                 theName Object name; when specified, this parameter is used
7434                         for result publication in the study. Otherwise, if automatic
7435                         publication is switched on, default value is used for result name.
7436
7437             Returns:
7438                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7439             """
7440             # Example: see GEOM_Spanner.py
7441             theTolerance,Parameters = ParseParameters(theTolerance)
7442             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7443             if anObj is None:
7444                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
7445             anObj.SetParameters(Parameters)
7446             self._autoPublish(anObj, theName, "glueFaces")
7447             return anObj
7448
7449         ## Find coincident faces in \a theShapes for possible gluing.
7450         #  @param theShapes Initial shapes, either a list or compound of shapes.
7451         #  @param theTolerance Maximum distance between faces,
7452         #                      which can be considered as coincident.
7453         #  @param theName Object name; when specified, this parameter is used
7454         #         for result publication in the study. Otherwise, if automatic
7455         #         publication is switched on, default value is used for result name.
7456         #
7457         #  @return GEOM.ListOfGO
7458         #
7459         #  @ref tui_glue_faces "Example"
7460         @ManageTransactions("ShapesOp")
7461         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7462             """
7463             Find coincident faces in theShapes for possible gluing.
7464
7465             Parameters:
7466                 theShapes Initial shapes, either a list or compound of shapes.
7467                 theTolerance Maximum distance between faces,
7468                              which can be considered as coincident.
7469                 theName Object name; when specified, this parameter is used
7470                         for result publication in the study. Otherwise, if automatic
7471                         publication is switched on, default value is used for result name.
7472
7473             Returns:
7474                 GEOM.ListOfGO
7475             """
7476             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7477             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7478             self._autoPublish(anObj, theName, "facesToGlue")
7479             return anObj
7480
7481         ## Replace coincident faces in \a theShapes by one face
7482         #  in compliance with given list of faces
7483         #  @param theShapes Initial shapes, either a list or compound of shapes.
7484         #  @param theTolerance Maximum distance between faces,
7485         #                      which can be considered as coincident.
7486         #  @param theFaces List of faces for gluing.
7487         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7488         #                         otherwise all initial shapes.
7489         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7490         #                        will be glued, otherwise only the edges,
7491         #                        belonging to <VAR>theFaces</VAR>.
7492         #  @param theName Object name; when specified, this parameter is used
7493         #         for result publication in the study. Otherwise, if automatic
7494         #         publication is switched on, default value is used for result name.
7495         #
7496         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7497         #
7498         #  @ref tui_glue_faces "Example"
7499         @ManageTransactions("ShapesOp")
7500         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7501                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7502             """
7503             Replace coincident faces in theShapes by one face
7504             in compliance with given list of faces
7505
7506             Parameters:
7507                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7508                 theTolerance Maximum distance between faces,
7509                              which can be considered as coincident.
7510                 theFaces List of faces for gluing.
7511                 doKeepNonSolids If FALSE, only solids will present in the result,
7512                                 otherwise all initial shapes.
7513                 doGlueAllEdges If TRUE, all coincident edges of theShape
7514                                will be glued, otherwise only the edges,
7515                                belonging to theFaces.
7516                 theName Object name; when specified, this parameter is used
7517                         for result publication in the study. Otherwise, if automatic
7518                         publication is switched on, default value is used for result name.
7519
7520             Returns:
7521                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7522             """
7523             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7524                                                       doKeepNonSolids, doGlueAllEdges)
7525             if anObj is None:
7526                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
7527             self._autoPublish(anObj, theName, "glueFaces")
7528             return anObj
7529
7530         ## Replace coincident edges in \a theShapes by one edge.
7531         #  @param theShapes Initial shapes, either a list or compound of shapes.
7532         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7533         #  @param theName Object name; when specified, this parameter is used
7534         #         for result publication in the study. Otherwise, if automatic
7535         #         publication is switched on, default value is used for result name.
7536         #
7537         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7538         #
7539         #  @ref tui_glue_edges "Example"
7540         @ManageTransactions("ShapesOp")
7541         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7542             """
7543             Replace coincident edges in theShapes by one edge.
7544
7545             Parameters:
7546                 theShapes Initial shapes, either a list or compound of shapes.
7547                 theTolerance Maximum distance between edges, which can be considered as coincident.
7548                 theName Object name; when specified, this parameter is used
7549                         for result publication in the study. Otherwise, if automatic
7550                         publication is switched on, default value is used for result name.
7551
7552             Returns:
7553                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7554             """
7555             theTolerance,Parameters = ParseParameters(theTolerance)
7556             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7557             if anObj is None:
7558                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
7559             anObj.SetParameters(Parameters)
7560             self._autoPublish(anObj, theName, "glueEdges")
7561             return anObj
7562
7563         ## Find coincident edges in \a theShapes for possible gluing.
7564         #  @param theShapes Initial shapes, either a list or compound of shapes.
7565         #  @param theTolerance Maximum distance between edges,
7566         #                      which can be considered as coincident.
7567         #  @param theName Object name; when specified, this parameter is used
7568         #         for result publication in the study. Otherwise, if automatic
7569         #         publication is switched on, default value is used for result name.
7570         #
7571         #  @return GEOM.ListOfGO
7572         #
7573         #  @ref tui_glue_edges "Example"
7574         @ManageTransactions("ShapesOp")
7575         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7576             """
7577             Find coincident edges in theShapes for possible gluing.
7578
7579             Parameters:
7580                 theShapes Initial shapes, either a list or compound of shapes.
7581                 theTolerance Maximum distance between edges,
7582                              which can be considered as coincident.
7583                 theName Object name; when specified, this parameter is used
7584                         for result publication in the study. Otherwise, if automatic
7585                         publication is switched on, default value is used for result name.
7586
7587             Returns:
7588                 GEOM.ListOfGO
7589             """
7590             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7591             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7592             self._autoPublish(anObj, theName, "edgesToGlue")
7593             return anObj
7594
7595         ## Replace coincident edges in theShapes by one edge
7596         #  in compliance with given list of edges.
7597         #  @param theShapes Initial shapes, either a list or compound of shapes.
7598         #  @param theTolerance Maximum distance between edges,
7599         #                      which can be considered as coincident.
7600         #  @param theEdges List of edges for gluing.
7601         #  @param theName Object name; when specified, this parameter is used
7602         #         for result publication in the study. Otherwise, if automatic
7603         #         publication is switched on, default value is used for result name.
7604         #
7605         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7606         #
7607         #  @ref tui_glue_edges "Example"
7608         @ManageTransactions("ShapesOp")
7609         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7610             """
7611             Replace coincident edges in theShapes by one edge
7612             in compliance with given list of edges.
7613
7614             Parameters:
7615                 theShapes Initial shapes, either a list or compound of shapes.
7616                 theTolerance Maximum distance between edges,
7617                              which can be considered as coincident.
7618                 theEdges List of edges for gluing.
7619                 theName Object name; when specified, this parameter is used
7620                         for result publication in the study. Otherwise, if automatic
7621                         publication is switched on, default value is used for result name.
7622
7623             Returns:
7624                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7625             """
7626             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7627             if anObj is None:
7628                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7629             self._autoPublish(anObj, theName, "glueEdges")
7630             return anObj
7631
7632         # end of l3_healing
7633         ## @}
7634
7635         ## @addtogroup l3_boolean Boolean Operations
7636         ## @{
7637
7638         # -----------------------------------------------------------------------------
7639         # Boolean (Common, Cut, Fuse, Section)
7640         # -----------------------------------------------------------------------------
7641
7642         ## Perform one of boolean operations on two given shapes.
7643         #  @param theShape1 First argument for boolean operation.
7644         #  @param theShape2 Second argument for boolean operation.
7645         #  @param theOperation Indicates the operation to be done:\n
7646         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7647         #  @param checkSelfInte The flag that tells if the arguments should
7648         #         be checked for self-intersection prior to the operation.
7649         #  @param theName Object name; when specified, this parameter is used
7650         #         for result publication in the study. Otherwise, if automatic
7651         #         publication is switched on, default value is used for result name.
7652         #
7653         #  @note This algorithm doesn't find all types of self-intersections.
7654         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7655         #        vertex/face and edge/face intersections. Face/face
7656         #        intersections detection is switched off as it is a
7657         #        time-consuming operation that gives an impact on performance.
7658         #        To find all self-intersections please use
7659         #        CheckSelfIntersections() method.
7660         #
7661         #  @return New GEOM.GEOM_Object, containing the result shape.
7662         #
7663         #  @ref tui_fuse "Example"
7664         @ManageTransactions("BoolOp")
7665         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7666             """
7667             Perform one of boolean operations on two given shapes.
7668
7669             Parameters:
7670                 theShape1 First argument for boolean operation.
7671                 theShape2 Second argument for boolean operation.
7672                 theOperation Indicates the operation to be done:
7673                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7674                 checkSelfInte The flag that tells if the arguments should
7675                               be checked for self-intersection prior to
7676                               the operation.
7677                 theName Object name; when specified, this parameter is used
7678                         for result publication in the study. Otherwise, if automatic
7679                         publication is switched on, default value is used for result name.
7680
7681             Note:
7682                     This algorithm doesn't find all types of self-intersections.
7683                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7684                     vertex/face and edge/face intersections. Face/face
7685                     intersections detection is switched off as it is a
7686                     time-consuming operation that gives an impact on performance.
7687                     To find all self-intersections please use
7688                     CheckSelfIntersections() method.
7689
7690             Returns:
7691                 New GEOM.GEOM_Object, containing the result shape.
7692             """
7693             # Example: see GEOM_TestAll.py
7694             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7695             RaiseIfFailed("MakeBoolean", self.BoolOp)
7696             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7697             self._autoPublish(anObj, theName, def_names[theOperation])
7698             return anObj
7699
7700         ## Perform Common boolean operation on two given shapes.
7701         #  @param theShape1 First argument for boolean operation.
7702         #  @param theShape2 Second argument for boolean operation.
7703         #  @param checkSelfInte The flag that tells if the arguments should
7704         #         be checked for self-intersection prior to the operation.
7705         #  @param theName Object name; when specified, this parameter is used
7706         #         for result publication in the study. Otherwise, if automatic
7707         #         publication is switched on, default value is used for result name.
7708         #
7709         #  @note This algorithm doesn't find all types of self-intersections.
7710         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7711         #        vertex/face and edge/face intersections. Face/face
7712         #        intersections detection is switched off as it is a
7713         #        time-consuming operation that gives an impact on performance.
7714         #        To find all self-intersections please use
7715         #        CheckSelfIntersections() method.
7716         #
7717         #  @return New GEOM.GEOM_Object, containing the result shape.
7718         #
7719         #  @ref tui_common "Example 1"
7720         #  \n @ref swig_MakeCommon "Example 2"
7721         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7722             """
7723             Perform Common boolean operation on two given shapes.
7724
7725             Parameters:
7726                 theShape1 First argument for boolean operation.
7727                 theShape2 Second argument for boolean operation.
7728                 checkSelfInte The flag that tells if the arguments should
7729                               be checked for self-intersection prior to
7730                               the operation.
7731                 theName Object name; when specified, this parameter is used
7732                         for result publication in the study. Otherwise, if automatic
7733                         publication is switched on, default value is used for result name.
7734
7735             Note:
7736                     This algorithm doesn't find all types of self-intersections.
7737                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7738                     vertex/face and edge/face intersections. Face/face
7739                     intersections detection is switched off as it is a
7740                     time-consuming operation that gives an impact on performance.
7741                     To find all self-intersections please use
7742                     CheckSelfIntersections() method.
7743
7744             Returns:
7745                 New GEOM.GEOM_Object, containing the result shape.
7746             """
7747             # Example: see GEOM_TestOthers.py
7748             # note: auto-publishing is done in self.MakeBoolean()
7749             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7750
7751         ## Perform Cut boolean operation on two given shapes.
7752         #  @param theShape1 First argument for boolean operation.
7753         #  @param theShape2 Second argument for boolean operation.
7754         #  @param checkSelfInte The flag that tells if the arguments should
7755         #         be checked for self-intersection prior to the operation.
7756         #  @param theName Object name; when specified, this parameter is used
7757         #         for result publication in the study. Otherwise, if automatic
7758         #         publication is switched on, default value is used for result name.
7759         #
7760         #  @note This algorithm doesn't find all types of self-intersections.
7761         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7762         #        vertex/face and edge/face intersections. Face/face
7763         #        intersections detection is switched off as it is a
7764         #        time-consuming operation that gives an impact on performance.
7765         #        To find all self-intersections please use
7766         #        CheckSelfIntersections() method.
7767         #
7768         #  @return New GEOM.GEOM_Object, containing the result shape.
7769         #
7770         #  @ref tui_cut "Example 1"
7771         #  \n @ref swig_MakeCommon "Example 2"
7772         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7773             """
7774             Perform Cut boolean operation on two given shapes.
7775
7776             Parameters:
7777                 theShape1 First argument for boolean operation.
7778                 theShape2 Second argument for boolean operation.
7779                 checkSelfInte The flag that tells if the arguments should
7780                               be checked for self-intersection prior to
7781                               the operation.
7782                 theName Object name; when specified, this parameter is used
7783                         for result publication in the study. Otherwise, if automatic
7784                         publication is switched on, default value is used for result name.
7785
7786             Note:
7787                     This algorithm doesn't find all types of self-intersections.
7788                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7789                     vertex/face and edge/face intersections. Face/face
7790                     intersections detection is switched off as it is a
7791                     time-consuming operation that gives an impact on performance.
7792                     To find all self-intersections please use
7793                     CheckSelfIntersections() method.
7794
7795             Returns:
7796                 New GEOM.GEOM_Object, containing the result shape.
7797
7798             """
7799             # Example: see GEOM_TestOthers.py
7800             # note: auto-publishing is done in self.MakeBoolean()
7801             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7802
7803         ## Perform Fuse boolean operation on two given shapes.
7804         #  @param theShape1 First argument for boolean operation.
7805         #  @param theShape2 Second argument for boolean operation.
7806         #  @param checkSelfInte The flag that tells if the arguments should
7807         #         be checked for self-intersection prior to the operation.
7808         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7809         #         operation should be performed during the operation.
7810         #  @param theName Object name; when specified, this parameter is used
7811         #         for result publication in the study. Otherwise, if automatic
7812         #         publication is switched on, default value is used for result name.
7813         #
7814         #  @note This algorithm doesn't find all types of self-intersections.
7815         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7816         #        vertex/face and edge/face intersections. Face/face
7817         #        intersections detection is switched off as it is a
7818         #        time-consuming operation that gives an impact on performance.
7819         #        To find all self-intersections please use
7820         #        CheckSelfIntersections() method.
7821         #
7822         #  @return New GEOM.GEOM_Object, containing the result shape.
7823         #
7824         #  @ref tui_fuse "Example 1"
7825         #  \n @ref swig_MakeCommon "Example 2"
7826         @ManageTransactions("BoolOp")
7827         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7828                      rmExtraEdges=False, theName=None):
7829             """
7830             Perform Fuse boolean operation on two given shapes.
7831
7832             Parameters:
7833                 theShape1 First argument for boolean operation.
7834                 theShape2 Second argument for boolean operation.
7835                 checkSelfInte The flag that tells if the arguments should
7836                               be checked for self-intersection prior to
7837                               the operation.
7838                 rmExtraEdges The flag that tells if Remove Extra Edges
7839                              operation should be performed during the operation.
7840                 theName Object name; when specified, this parameter is used
7841                         for result publication in the study. Otherwise, if automatic
7842                         publication is switched on, default value is used for result name.
7843
7844             Note:
7845                     This algorithm doesn't find all types of self-intersections.
7846                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7847                     vertex/face and edge/face intersections. Face/face
7848                     intersections detection is switched off as it is a
7849                     time-consuming operation that gives an impact on performance.
7850                     To find all self-intersections please use
7851                     CheckSelfIntersections() method.
7852
7853             Returns:
7854                 New GEOM.GEOM_Object, containing the result shape.
7855
7856             """
7857             # Example: see GEOM_TestOthers.py
7858             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7859                                          checkSelfInte, rmExtraEdges)
7860             RaiseIfFailed("MakeFuse", self.BoolOp)
7861             self._autoPublish(anObj, theName, "fuse")
7862             return anObj
7863
7864         ## Perform Section boolean operation on two given shapes.
7865         #  @param theShape1 First argument for boolean operation.
7866         #  @param theShape2 Second argument for boolean operation.
7867         #  @param checkSelfInte The flag that tells if the arguments should
7868         #         be checked for self-intersection prior to the operation.
7869         #         If a self-intersection detected the operation fails.
7870         #  @param theName Object name; when specified, this parameter is used
7871         #         for result publication in the study. Otherwise, if automatic
7872         #         publication is switched on, default value is used for result name.
7873         #  @return New GEOM.GEOM_Object, containing the result shape.
7874         #
7875         #  @ref tui_section "Example 1"
7876         #  \n @ref swig_MakeCommon "Example 2"
7877         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7878             """
7879             Perform Section boolean operation on two given shapes.
7880
7881             Parameters:
7882                 theShape1 First argument for boolean operation.
7883                 theShape2 Second argument for boolean operation.
7884                 checkSelfInte The flag that tells if the arguments should
7885                               be checked for self-intersection prior to the operation.
7886                               If a self-intersection detected the operation fails.
7887                 theName Object name; when specified, this parameter is used
7888                         for result publication in the study. Otherwise, if automatic
7889                         publication is switched on, default value is used for result name.
7890             Returns:
7891                 New GEOM.GEOM_Object, containing the result shape.
7892
7893             """
7894             # Example: see GEOM_TestOthers.py
7895             # note: auto-publishing is done in self.MakeBoolean()
7896             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7897
7898         ## Perform Fuse boolean operation on the list of shapes.
7899         #  @param theShapesList Shapes to be fused.
7900         #  @param checkSelfInte The flag that tells if the arguments should
7901         #         be checked for self-intersection prior to the operation.
7902         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7903         #         operation should be performed during the operation.
7904         #  @param theName Object name; when specified, this parameter is used
7905         #         for result publication in the study. Otherwise, if automatic
7906         #         publication is switched on, default value is used for result name.
7907         #
7908         #  @note This algorithm doesn't find all types of self-intersections.
7909         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7910         #        vertex/face and edge/face intersections. Face/face
7911         #        intersections detection is switched off as it is a
7912         #        time-consuming operation that gives an impact on performance.
7913         #        To find all self-intersections please use
7914         #        CheckSelfIntersections() method.
7915         #
7916         #  @return New GEOM.GEOM_Object, containing the result shape.
7917         #
7918         #  @ref tui_fuse "Example 1"
7919         #  \n @ref swig_MakeCommon "Example 2"
7920         @ManageTransactions("BoolOp")
7921         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7922                          rmExtraEdges=False, theName=None):
7923             """
7924             Perform Fuse boolean operation on the list of shapes.
7925
7926             Parameters:
7927                 theShapesList Shapes to be fused.
7928                 checkSelfInte The flag that tells if the arguments should
7929                               be checked for self-intersection prior to
7930                               the operation.
7931                 rmExtraEdges The flag that tells if Remove Extra Edges
7932                              operation should be performed during the operation.
7933                 theName Object name; when specified, this parameter is used
7934                         for result publication in the study. Otherwise, if automatic
7935                         publication is switched on, default value is used for result name.
7936
7937             Note:
7938                     This algorithm doesn't find all types of self-intersections.
7939                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7940                     vertex/face and edge/face intersections. Face/face
7941                     intersections detection is switched off as it is a
7942                     time-consuming operation that gives an impact on performance.
7943                     To find all self-intersections please use
7944                     CheckSelfIntersections() method.
7945
7946             Returns:
7947                 New GEOM.GEOM_Object, containing the result shape.
7948
7949             """
7950             # Example: see GEOM_TestOthers.py
7951             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7952                                              rmExtraEdges)
7953             RaiseIfFailed("MakeFuseList", self.BoolOp)
7954             self._autoPublish(anObj, theName, "fuse")
7955             return anObj
7956
7957         ## Perform Common boolean operation on the list of shapes.
7958         #  @param theShapesList Shapes for Common operation.
7959         #  @param checkSelfInte The flag that tells if the arguments should
7960         #         be checked for self-intersection prior to the operation.
7961         #  @param theName Object name; when specified, this parameter is used
7962         #         for result publication in the study. Otherwise, if automatic
7963         #         publication is switched on, default value is used for result name.
7964         #
7965         #  @note This algorithm doesn't find all types of self-intersections.
7966         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7967         #        vertex/face and edge/face intersections. Face/face
7968         #        intersections detection is switched off as it is a
7969         #        time-consuming operation that gives an impact on performance.
7970         #        To find all self-intersections please use
7971         #        CheckSelfIntersections() method.
7972         #
7973         #  @return New GEOM.GEOM_Object, containing the result shape.
7974         #
7975         #  @ref tui_common "Example 1"
7976         #  \n @ref swig_MakeCommon "Example 2"
7977         @ManageTransactions("BoolOp")
7978         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7979             """
7980             Perform Common boolean operation on the list of shapes.
7981
7982             Parameters:
7983                 theShapesList Shapes for Common operation.
7984                 checkSelfInte The flag that tells if the arguments should
7985                               be checked for self-intersection prior to
7986                               the operation.
7987                 theName Object name; when specified, this parameter is used
7988                         for result publication in the study. Otherwise, if automatic
7989                         publication is switched on, default value is used for result name.
7990
7991             Note:
7992                     This algorithm doesn't find all types of self-intersections.
7993                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7994                     vertex/face and edge/face intersections. Face/face
7995                     intersections detection is switched off as it is a
7996                     time-consuming operation that gives an impact on performance.
7997                     To find all self-intersections please use
7998                     CheckSelfIntersections() method.
7999
8000             Returns:
8001                 New GEOM.GEOM_Object, containing the result shape.
8002
8003             """
8004             # Example: see GEOM_TestOthers.py
8005             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8006             RaiseIfFailed("MakeCommonList", self.BoolOp)
8007             self._autoPublish(anObj, theName, "common")
8008             return anObj
8009
8010         ## Perform Cut boolean operation on one object and the list of tools.
8011         #  @param theMainShape The object of the operation.
8012         #  @param theShapesList The list of tools of the operation.
8013         #  @param checkSelfInte The flag that tells if the arguments should
8014         #         be checked for self-intersection prior to the operation.
8015         #  @param theName Object name; when specified, this parameter is used
8016         #         for result publication in the study. Otherwise, if automatic
8017         #         publication is switched on, default value is used for result name.
8018         #
8019         #  @note This algorithm doesn't find all types of self-intersections.
8020         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8021         #        vertex/face and edge/face intersections. Face/face
8022         #        intersections detection is switched off as it is a
8023         #        time-consuming operation that gives an impact on performance.
8024         #        To find all self-intersections please use
8025         #        CheckSelfIntersections() method.
8026         #
8027         #  @return New GEOM.GEOM_Object, containing the result shape.
8028         #
8029         #  @ref tui_cut "Example 1"
8030         #  \n @ref swig_MakeCommon "Example 2"
8031         @ManageTransactions("BoolOp")
8032         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8033             """
8034             Perform Cut boolean operation on one object and the list of tools.
8035
8036             Parameters:
8037                 theMainShape The object of the operation.
8038                 theShapesList The list of tools of the operation.
8039                 checkSelfInte The flag that tells if the arguments should
8040                               be checked for self-intersection prior to
8041                               the operation.
8042                 theName Object name; when specified, this parameter is used
8043                         for result publication in the study. Otherwise, if automatic
8044                         publication is switched on, default value is used for result name.
8045
8046             Note:
8047                     This algorithm doesn't find all types of self-intersections.
8048                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8049                     vertex/face and edge/face intersections. Face/face
8050                     intersections detection is switched off as it is a
8051                     time-consuming operation that gives an impact on performance.
8052                     To find all self-intersections please use
8053                     CheckSelfIntersections() method.
8054
8055             Returns:
8056                 New GEOM.GEOM_Object, containing the result shape.
8057
8058             """
8059             # Example: see GEOM_TestOthers.py
8060             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8061             RaiseIfFailed("MakeCutList", self.BoolOp)
8062             self._autoPublish(anObj, theName, "cut")
8063             return anObj
8064
8065         # end of l3_boolean
8066         ## @}
8067
8068         ## @addtogroup l3_basic_op
8069         ## @{
8070
8071         ## Perform partition operation.
8072         #  @param ListShapes Shapes to be intersected.
8073         #  @param ListTools Shapes to intersect theShapes.
8074         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8075         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8076         #         type will be detected automatically.
8077         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8078         #                             target type (equal to Limit) are kept in the result,
8079         #                             else standalone shapes of lower dimension
8080         #                             are kept also (if they exist).
8081         #
8082         #  @param theName Object name; when specified, this parameter is used
8083         #         for result publication in the study. Otherwise, if automatic
8084         #         publication is switched on, default value is used for result name.
8085         #
8086         #  @note Each compound from ListShapes and ListTools will be exploded
8087         #        in order to avoid possible intersection between shapes from this compound.
8088         #
8089         #  After implementation new version of PartitionAlgo (October 2006)
8090         #  other parameters are ignored by current functionality. They are kept
8091         #  in this function only for support old versions.
8092         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8093         #         Each shape from theKeepInside must belong to theShapes also.
8094         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8095         #         Each shape from theRemoveInside must belong to theShapes also.
8096         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8097         #      @param ListMaterials Material indices for each shape. Make sence,
8098         #         only if theRemoveWebs is TRUE.
8099         #
8100         #  @return New GEOM.GEOM_Object, containing the result shapes.
8101         #
8102         #  @ref tui_partition "Example"
8103         @ManageTransactions("BoolOp")
8104         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8105                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8106                           KeepNonlimitShapes=0, theName=None):
8107             """
8108             Perform partition operation.
8109
8110             Parameters:
8111                 ListShapes Shapes to be intersected.
8112                 ListTools Shapes to intersect theShapes.
8113                 Limit Type of resulting shapes (see geompy.ShapeType)
8114                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8115                       type will be detected automatically.
8116                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8117                                     target type (equal to Limit) are kept in the result,
8118                                     else standalone shapes of lower dimension
8119                                     are kept also (if they exist).
8120
8121                 theName Object name; when specified, this parameter is used
8122                         for result publication in the study. Otherwise, if automatic
8123                         publication is switched on, default value is used for result name.
8124             Note:
8125                     Each compound from ListShapes and ListTools will be exploded
8126                     in order to avoid possible intersection between shapes from
8127                     this compound.
8128
8129             After implementation new version of PartitionAlgo (October 2006) other
8130             parameters are ignored by current functionality. They are kept in this
8131             function only for support old versions.
8132
8133             Ignored parameters:
8134                 ListKeepInside Shapes, outside which the results will be deleted.
8135                                Each shape from theKeepInside must belong to theShapes also.
8136                 ListRemoveInside Shapes, inside which the results will be deleted.
8137                                  Each shape from theRemoveInside must belong to theShapes also.
8138                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8139                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
8140
8141             Returns:
8142                 New GEOM.GEOM_Object, containing the result shapes.
8143             """
8144             # Example: see GEOM_TestAll.py
8145             if Limit == self.ShapeType["AUTO"]:
8146                 # automatic detection of the most appropriate shape limit type
8147                 lim = GEOM.SHAPE
8148                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
8149                 Limit = EnumToLong(lim)
8150                 pass
8151             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8152                                               ListKeepInside, ListRemoveInside,
8153                                               Limit, RemoveWebs, ListMaterials,
8154                                               KeepNonlimitShapes);
8155             RaiseIfFailed("MakePartition", self.BoolOp)
8156             self._autoPublish(anObj, theName, "partition")
8157             return anObj
8158
8159         ## Perform partition operation.
8160         #  This method may be useful if it is needed to make a partition for
8161         #  compound contains nonintersected shapes. Performance will be better
8162         #  since intersection between shapes from compound is not performed.
8163         #
8164         #  Description of all parameters as in previous method MakePartition().
8165         #  One additional parameter is provided:
8166         #  @param checkSelfInte The flag that tells if the arguments should
8167         #         be checked for self-intersection prior to the operation.
8168         #
8169         #  @note This algorithm doesn't find all types of self-intersections.
8170         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8171         #        vertex/face and edge/face intersections. Face/face
8172         #        intersections detection is switched off as it is a
8173         #        time-consuming operation that gives an impact on performance.
8174         #        To find all self-intersections please use
8175         #        CheckSelfIntersections() method.
8176         #
8177         #  @note Passed compounds (via ListShapes or via ListTools)
8178         #           have to consist of nonintersecting shapes.
8179         #
8180         #  @return New GEOM.GEOM_Object, containing the result shapes.
8181         #
8182         #  @ref swig_todo "Example"
8183         @ManageTransactions("BoolOp")
8184         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8185                                                  ListKeepInside=[], ListRemoveInside=[],
8186                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8187                                                  ListMaterials=[], KeepNonlimitShapes=0,
8188                                                  checkSelfInte=False, theName=None):
8189             """
8190             Perform partition operation.
8191             This method may be useful if it is needed to make a partition for
8192             compound contains nonintersected shapes. Performance will be better
8193             since intersection between shapes from compound is not performed.
8194
8195             Parameters:
8196                 Description of all parameters as in method geompy.MakePartition.
8197                 One additional parameter is provided:
8198                 checkSelfInte The flag that tells if the arguments should
8199                               be checked for self-intersection prior to
8200                               the operation.
8201
8202             Note:
8203                     This algorithm doesn't find all types of self-intersections.
8204                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8205                     vertex/face and edge/face intersections. Face/face
8206                     intersections detection is switched off as it is a
8207                     time-consuming operation that gives an impact on performance.
8208                     To find all self-intersections please use
8209                     CheckSelfIntersections() method.
8210
8211             NOTE:
8212                 Passed compounds (via ListShapes or via ListTools)
8213                 have to consist of nonintersecting shapes.
8214
8215             Returns:
8216                 New GEOM.GEOM_Object, containing the result shapes.
8217             """
8218             if Limit == self.ShapeType["AUTO"]:
8219                 # automatic detection of the most appropriate shape limit type
8220                 lim = GEOM.SHAPE
8221                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
8222                 Limit = EnumToLong(lim)
8223                 pass
8224             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8225                                                                      ListKeepInside, ListRemoveInside,
8226                                                                      Limit, RemoveWebs, ListMaterials,
8227                                                                      KeepNonlimitShapes, checkSelfInte);
8228             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8229             self._autoPublish(anObj, theName, "partition")
8230             return anObj
8231
8232         ## See method MakePartition() for more information.
8233         #
8234         #  @ref tui_partition "Example 1"
8235         #  \n @ref swig_Partition "Example 2"
8236         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8237                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8238                       KeepNonlimitShapes=0, theName=None):
8239             """
8240             See method geompy.MakePartition for more information.
8241             """
8242             # Example: see GEOM_TestOthers.py
8243             # note: auto-publishing is done in self.MakePartition()
8244             anObj = self.MakePartition(ListShapes, ListTools,
8245                                        ListKeepInside, ListRemoveInside,
8246                                        Limit, RemoveWebs, ListMaterials,
8247                                        KeepNonlimitShapes, theName);
8248             return anObj
8249
8250         ## Perform partition of the Shape with the Plane
8251         #  @param theShape Shape to be intersected.
8252         #  @param thePlane Tool shape, to intersect theShape.
8253         #  @param theName Object name; when specified, this parameter is used
8254         #         for result publication in the study. Otherwise, if automatic
8255         #         publication is switched on, default value is used for result name.
8256         #
8257         #  @return New GEOM.GEOM_Object, containing the result shape.
8258         #
8259         #  @note This operation is a shortcut to the more general @ref MakePartition
8260         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8261         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8262         #  @ref MakePartition operation have default values:
8263         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8264         #  - @a KeepNonlimitShapes: 0
8265         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8266         #    @a Materials (obsolete parameters): empty
8267         #
8268         #  @note I.e. the following two operations are equivalent:
8269         #  @code
8270         #  Result = geompy.MakeHalfPartition(Object, Plane)
8271         #  Result = geompy.MakePartition([Object], [Plane])
8272         #  @endcode
8273         #
8274         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8275         #
8276         #  @ref tui_partition "Example"
8277         @ManageTransactions("BoolOp")
8278         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8279             """
8280             Perform partition of the Shape with the Plane
8281
8282             Parameters:
8283                 theShape Shape to be intersected.
8284                 thePlane Tool shape, to intersect theShape.
8285                 theName Object name; when specified, this parameter is used
8286                         for result publication in the study. Otherwise, if automatic
8287                         publication is switched on, default value is used for result name.
8288
8289             Returns:
8290                 New GEOM.GEOM_Object, containing the result shape.
8291          
8292             Note: This operation is a shortcut to the more general MakePartition
8293             operation, where theShape specifies single "object" (shape being partitioned)
8294             and thePlane specifies single "tool" (intersector shape). Other parameters of
8295             MakePartition operation have default values:
8296             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8297             - KeepNonlimitShapes: 0
8298             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8299          
8300             I.e. the following two operations are equivalent:
8301               Result = geompy.MakeHalfPartition(Object, Plane)
8302               Result = geompy.MakePartition([Object], [Plane])
8303             """
8304             # Example: see GEOM_TestAll.py
8305             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8306             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8307             self._autoPublish(anObj, theName, "partition")
8308             return anObj
8309
8310         # end of l3_basic_op
8311         ## @}
8312
8313         ## @addtogroup l3_transform
8314         ## @{
8315
8316         ## Translate the given object along the vector, specified
8317         #  by its end points.
8318         #  @param theObject The object to be translated.
8319         #  @param thePoint1 Start point of translation vector.
8320         #  @param thePoint2 End point of translation vector.
8321         #  @param theCopy Flag used to translate object itself or create a copy.
8322         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8323         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8324         @ManageTransactions("TrsfOp")
8325         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8326             """
8327             Translate the given object along the vector, specified by its end points.
8328
8329             Parameters:
8330                 theObject The object to be translated.
8331                 thePoint1 Start point of translation vector.
8332                 thePoint2 End point of translation vector.
8333                 theCopy Flag used to translate object itself or create a copy.
8334
8335             Returns:
8336                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8337                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8338             """
8339             if theCopy:
8340                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8341             else:
8342                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8343             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8344             return anObj
8345
8346         ## Translate the given object along the vector, specified
8347         #  by its end points, creating its copy before the translation.
8348         #  @param theObject The object to be translated.
8349         #  @param thePoint1 Start point of translation vector.
8350         #  @param thePoint2 End point of translation vector.
8351         #  @param theName Object name; when specified, this parameter is used
8352         #         for result publication in the study. Otherwise, if automatic
8353         #         publication is switched on, default value is used for result name.
8354         #
8355         #  @return New GEOM.GEOM_Object, containing the translated object.
8356         #
8357         #  @ref tui_translation "Example 1"
8358         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8359         @ManageTransactions("TrsfOp")
8360         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8361             """
8362             Translate the given object along the vector, specified
8363             by its end points, creating its copy before the translation.
8364
8365             Parameters:
8366                 theObject The object to be translated.
8367                 thePoint1 Start point of translation vector.
8368                 thePoint2 End point of translation vector.
8369                 theName Object name; when specified, this parameter is used
8370                         for result publication in the study. Otherwise, if automatic
8371                         publication is switched on, default value is used for result name.
8372
8373             Returns:
8374                 New GEOM.GEOM_Object, containing the translated object.
8375             """
8376             # Example: see GEOM_TestAll.py
8377             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8378             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8379             self._autoPublish(anObj, theName, "translated")
8380             return anObj
8381
8382         ## Translate the given object along the vector, specified by its components.
8383         #  @param theObject The object to be translated.
8384         #  @param theDX,theDY,theDZ Components of translation vector.
8385         #  @param theCopy Flag used to translate object itself or create a copy.
8386         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8387         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8388         #
8389         #  @ref tui_translation "Example"
8390         @ManageTransactions("TrsfOp")
8391         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8392             """
8393             Translate the given object along the vector, specified by its components.
8394
8395             Parameters:
8396                 theObject The object to be translated.
8397                 theDX,theDY,theDZ Components of translation vector.
8398                 theCopy Flag used to translate object itself or create a copy.
8399
8400             Returns:
8401                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8402                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8403             """
8404             # Example: see GEOM_TestAll.py
8405             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8406             if theCopy:
8407                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8408             else:
8409                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8410             anObj.SetParameters(Parameters)
8411             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8412             return anObj
8413
8414         ## Translate the given object along the vector, specified
8415         #  by its components, creating its copy before the translation.
8416         #  @param theObject The object to be translated.
8417         #  @param theDX,theDY,theDZ Components of translation vector.
8418         #  @param theName Object name; when specified, this parameter is used
8419         #         for result publication in the study. Otherwise, if automatic
8420         #         publication is switched on, default value is used for result name.
8421         #
8422         #  @return New GEOM.GEOM_Object, containing the translated object.
8423         #
8424         #  @ref tui_translation "Example"
8425         @ManageTransactions("TrsfOp")
8426         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8427             """
8428             Translate the given object along the vector, specified
8429             by its components, creating its copy before the translation.
8430
8431             Parameters:
8432                 theObject The object to be translated.
8433                 theDX,theDY,theDZ Components of translation vector.
8434                 theName Object name; when specified, this parameter is used
8435                         for result publication in the study. Otherwise, if automatic
8436                         publication is switched on, default value is used for result name.
8437
8438             Returns:
8439                 New GEOM.GEOM_Object, containing the translated object.
8440             """
8441             # Example: see GEOM_TestAll.py
8442             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8443             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8444             anObj.SetParameters(Parameters)
8445             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8446             self._autoPublish(anObj, theName, "translated")
8447             return anObj
8448
8449         ## Translate the given object along the given vector.
8450         #  @param theObject The object to be translated.
8451         #  @param theVector The translation vector.
8452         #  @param theCopy Flag used to translate object itself or create a copy.
8453         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8454         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8455         @ManageTransactions("TrsfOp")
8456         def TranslateVector(self, theObject, theVector, theCopy=False):
8457             """
8458             Translate the given object along the given vector.
8459
8460             Parameters:
8461                 theObject The object to be translated.
8462                 theVector The translation vector.
8463                 theCopy Flag used to translate object itself or create a copy.
8464
8465             Returns:
8466                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8467                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8468             """
8469             if theCopy:
8470                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8471             else:
8472                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8473             RaiseIfFailed("TranslateVector", self.TrsfOp)
8474             return anObj
8475
8476         ## Translate the given object along the given vector,
8477         #  creating its copy before the translation.
8478         #  @param theObject The object to be translated.
8479         #  @param theVector The translation vector.
8480         #  @param theName Object name; when specified, this parameter is used
8481         #         for result publication in the study. Otherwise, if automatic
8482         #         publication is switched on, default value is used for result name.
8483         #
8484         #  @return New GEOM.GEOM_Object, containing the translated object.
8485         #
8486         #  @ref tui_translation "Example"
8487         @ManageTransactions("TrsfOp")
8488         def MakeTranslationVector(self, theObject, theVector, theName=None):
8489             """
8490             Translate the given object along the given vector,
8491             creating its copy before the translation.
8492
8493             Parameters:
8494                 theObject The object to be translated.
8495                 theVector The translation vector.
8496                 theName Object name; when specified, this parameter is used
8497                         for result publication in the study. Otherwise, if automatic
8498                         publication is switched on, default value is used for result name.
8499
8500             Returns:
8501                 New GEOM.GEOM_Object, containing the translated object.
8502             """
8503             # Example: see GEOM_TestAll.py
8504             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8505             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8506             self._autoPublish(anObj, theName, "translated")
8507             return anObj
8508
8509         ## Translate the given object along the given vector on given distance.
8510         #  @param theObject The object to be translated.
8511         #  @param theVector The translation vector.
8512         #  @param theDistance The translation distance.
8513         #  @param theCopy Flag used to translate object itself or create a copy.
8514         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8515         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8516         #
8517         #  @ref tui_translation "Example"
8518         @ManageTransactions("TrsfOp")
8519         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8520             """
8521             Translate the given object along the given vector on given distance.
8522
8523             Parameters:
8524                 theObject The object to be translated.
8525                 theVector The translation vector.
8526                 theDistance The translation distance.
8527                 theCopy Flag used to translate object itself or create a copy.
8528
8529             Returns:
8530                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8531                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8532             """
8533             # Example: see GEOM_TestAll.py
8534             theDistance,Parameters = ParseParameters(theDistance)
8535             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8536             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8537             anObj.SetParameters(Parameters)
8538             return anObj
8539
8540         ## Translate the given object along the given vector on given distance,
8541         #  creating its copy before the translation.
8542         #  @param theObject The object to be translated.
8543         #  @param theVector The translation vector.
8544         #  @param theDistance The translation distance.
8545         #  @param theName Object name; when specified, this parameter is used
8546         #         for result publication in the study. Otherwise, if automatic
8547         #         publication is switched on, default value is used for result name.
8548         #
8549         #  @return New GEOM.GEOM_Object, containing the translated object.
8550         #
8551         #  @ref tui_translation "Example"
8552         @ManageTransactions("TrsfOp")
8553         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8554             """
8555             Translate the given object along the given vector on given distance,
8556             creating its copy before the translation.
8557
8558             Parameters:
8559                 theObject The object to be translated.
8560                 theVector The translation vector.
8561                 theDistance The translation distance.
8562                 theName Object name; when specified, this parameter is used
8563                         for result publication in the study. Otherwise, if automatic
8564                         publication is switched on, default value is used for result name.
8565
8566             Returns:
8567                 New GEOM.GEOM_Object, containing the translated object.
8568             """
8569             # Example: see GEOM_TestAll.py
8570             theDistance,Parameters = ParseParameters(theDistance)
8571             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8572             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8573             anObj.SetParameters(Parameters)
8574             self._autoPublish(anObj, theName, "translated")
8575             return anObj
8576
8577         ## Rotate the given object around the given axis on the given angle.
8578         #  @param theObject The object to be rotated.
8579         #  @param theAxis Rotation axis.
8580         #  @param theAngle Rotation angle in radians.
8581         #  @param theCopy Flag used to rotate object itself or create a copy.
8582         #
8583         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8584         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8585         #
8586         #  @ref tui_rotation "Example"
8587         @ManageTransactions("TrsfOp")
8588         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8589             """
8590             Rotate the given object around the given axis on the given angle.
8591
8592             Parameters:
8593                 theObject The object to be rotated.
8594                 theAxis Rotation axis.
8595                 theAngle Rotation angle in radians.
8596                 theCopy Flag used to rotate object itself or create a copy.
8597
8598             Returns:
8599                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8600                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8601             """
8602             # Example: see GEOM_TestAll.py
8603             flag = False
8604             if isinstance(theAngle,str):
8605                 flag = True
8606             theAngle, Parameters = ParseParameters(theAngle)
8607             if flag:
8608                 theAngle = theAngle*math.pi/180.0
8609             if theCopy:
8610                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8611             else:
8612                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8613             RaiseIfFailed("Rotate", self.TrsfOp)
8614             anObj.SetParameters(Parameters)
8615             return anObj
8616
8617         ## Rotate the given object around the given axis
8618         #  on the given angle, creating its copy before the rotation.
8619         #  @param theObject The object to be rotated.
8620         #  @param theAxis Rotation axis.
8621         #  @param theAngle Rotation angle in radians.
8622         #  @param theName Object name; when specified, this parameter is used
8623         #         for result publication in the study. Otherwise, if automatic
8624         #         publication is switched on, default value is used for result name.
8625         #
8626         #  @return New GEOM.GEOM_Object, containing the rotated object.
8627         #
8628         #  @ref tui_rotation "Example"
8629         @ManageTransactions("TrsfOp")
8630         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8631             """
8632             Rotate the given object around the given axis
8633             on the given angle, creating its copy before the rotatation.
8634
8635             Parameters:
8636                 theObject The object to be rotated.
8637                 theAxis Rotation axis.
8638                 theAngle Rotation angle in radians.
8639                 theName Object name; when specified, this parameter is used
8640                         for result publication in the study. Otherwise, if automatic
8641                         publication is switched on, default value is used for result name.
8642
8643             Returns:
8644                 New GEOM.GEOM_Object, containing the rotated object.
8645             """
8646             # Example: see GEOM_TestAll.py
8647             flag = False
8648             if isinstance(theAngle,str):
8649                 flag = True
8650             theAngle, Parameters = ParseParameters(theAngle)
8651             if flag:
8652                 theAngle = theAngle*math.pi/180.0
8653             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8654             RaiseIfFailed("RotateCopy", self.TrsfOp)
8655             anObj.SetParameters(Parameters)
8656             self._autoPublish(anObj, theName, "rotated")
8657             return anObj
8658
8659         ## Rotate given object around vector perpendicular to plane
8660         #  containing three points.
8661         #  @param theObject The object to be rotated.
8662         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8663         #  containing the three points.
8664         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8665         #  @param theCopy Flag used to rotate object itself or create a copy.
8666         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8667         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8668         @ManageTransactions("TrsfOp")
8669         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8670             """
8671             Rotate given object around vector perpendicular to plane
8672             containing three points.
8673
8674             Parameters:
8675                 theObject The object to be rotated.
8676                 theCentPoint central point  the axis is the vector perpendicular to the plane
8677                              containing the three points.
8678                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8679                 theCopy Flag used to rotate object itself or create a copy.
8680
8681             Returns:
8682                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8683                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8684             """
8685             if theCopy:
8686                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8687             else:
8688                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8689             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8690             return anObj
8691
8692         ## Rotate given object around vector perpendicular to plane
8693         #  containing three points, creating its copy before the rotatation.
8694         #  @param theObject The object to be rotated.
8695         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8696         #  containing the three points.
8697         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8698         #  @param theName Object name; when specified, this parameter is used
8699         #         for result publication in the study. Otherwise, if automatic
8700         #         publication is switched on, default value is used for result name.
8701         #
8702         #  @return New GEOM.GEOM_Object, containing the rotated object.
8703         #
8704         #  @ref tui_rotation "Example"
8705         @ManageTransactions("TrsfOp")
8706         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8707             """
8708             Rotate given object around vector perpendicular to plane
8709             containing three points, creating its copy before the rotatation.
8710
8711             Parameters:
8712                 theObject The object to be rotated.
8713                 theCentPoint central point  the axis is the vector perpendicular to the plane
8714                              containing the three points.
8715                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8716                 theName Object name; when specified, this parameter is used
8717                         for result publication in the study. Otherwise, if automatic
8718                         publication is switched on, default value is used for result name.
8719
8720             Returns:
8721                 New GEOM.GEOM_Object, containing the rotated object.
8722             """
8723             # Example: see GEOM_TestAll.py
8724             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8725             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8726             self._autoPublish(anObj, theName, "rotated")
8727             return anObj
8728
8729         ## Scale the given object by the specified factor.
8730         #  @param theObject The object to be scaled.
8731         #  @param thePoint Center point for scaling.
8732         #                  Passing None for it means scaling relatively the origin of global CS.
8733         #  @param theFactor Scaling factor value.
8734         #  @param theCopy Flag used to scale object itself or create a copy.
8735         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8736         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8737         @ManageTransactions("TrsfOp")
8738         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8739             """
8740             Scale the given object by the specified factor.
8741
8742             Parameters:
8743                 theObject The object to be scaled.
8744                 thePoint Center point for scaling.
8745                          Passing None for it means scaling relatively the origin of global CS.
8746                 theFactor Scaling factor value.
8747                 theCopy Flag used to scale object itself or create a copy.
8748
8749             Returns:
8750                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8751                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8752             """
8753             # Example: see GEOM_TestAll.py
8754             theFactor, Parameters = ParseParameters(theFactor)
8755             if theCopy:
8756                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8757             else:
8758                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8759             RaiseIfFailed("Scale", self.TrsfOp)
8760             anObj.SetParameters(Parameters)
8761             return anObj
8762
8763         ## Scale the given object by the factor, creating its copy before the scaling.
8764         #  @param theObject The object to be scaled.
8765         #  @param thePoint Center point for scaling.
8766         #                  Passing None for it means scaling relatively the origin of global CS.
8767         #  @param theFactor Scaling factor value.
8768         #  @param theName Object name; when specified, this parameter is used
8769         #         for result publication in the study. Otherwise, if automatic
8770         #         publication is switched on, default value is used for result name.
8771         #
8772         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8773         #
8774         #  @ref tui_scale "Example"
8775         @ManageTransactions("TrsfOp")
8776         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8777             """
8778             Scale the given object by the factor, creating its copy before the scaling.
8779
8780             Parameters:
8781                 theObject The object to be scaled.
8782                 thePoint Center point for scaling.
8783                          Passing None for it means scaling relatively the origin of global CS.
8784                 theFactor Scaling factor value.
8785                 theName Object name; when specified, this parameter is used
8786                         for result publication in the study. Otherwise, if automatic
8787                         publication is switched on, default value is used for result name.
8788
8789             Returns:
8790                 New GEOM.GEOM_Object, containing the scaled shape.
8791             """
8792             # Example: see GEOM_TestAll.py
8793             theFactor, Parameters = ParseParameters(theFactor)
8794             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8795             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8796             anObj.SetParameters(Parameters)
8797             self._autoPublish(anObj, theName, "scaled")
8798             return anObj
8799
8800         ## Scale the given object by different factors along coordinate axes.
8801         #  @param theObject The object to be scaled.
8802         #  @param thePoint Center point for scaling.
8803         #                  Passing None for it means scaling relatively the origin of global CS.
8804         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8805         #  @param theCopy Flag used to scale object itself or create a copy.
8806         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8807         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8808         @ManageTransactions("TrsfOp")
8809         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8810             """
8811             Scale the given object by different factors along coordinate axes.
8812
8813             Parameters:
8814                 theObject The object to be scaled.
8815                 thePoint Center point for scaling.
8816                             Passing None for it means scaling relatively the origin of global CS.
8817                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8818                 theCopy Flag used to scale object itself or create a copy.
8819
8820             Returns:
8821                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8822                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8823             """
8824             # Example: see GEOM_TestAll.py
8825             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8826             if theCopy:
8827                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8828                                                             theFactorX, theFactorY, theFactorZ)
8829             else:
8830                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8831                                                         theFactorX, theFactorY, theFactorZ)
8832             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8833             anObj.SetParameters(Parameters)
8834             return anObj
8835
8836         ## Scale the given object by different factors along coordinate axes,
8837         #  creating its copy before the scaling.
8838         #  @param theObject The object to be scaled.
8839         #  @param thePoint Center point for scaling.
8840         #                  Passing None for it means scaling relatively the origin of global CS.
8841         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8842         #  @param theName Object name; when specified, this parameter is used
8843         #         for result publication in the study. Otherwise, if automatic
8844         #         publication is switched on, default value is used for result name.
8845         #
8846         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8847         #
8848         #  @ref swig_scale "Example"
8849         @ManageTransactions("TrsfOp")
8850         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8851             """
8852             Scale the given object by different factors along coordinate axes,
8853             creating its copy before the scaling.
8854
8855             Parameters:
8856                 theObject The object to be scaled.
8857                 thePoint Center point for scaling.
8858                             Passing None for it means scaling relatively the origin of global CS.
8859                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8860                 theName Object name; when specified, this parameter is used
8861                         for result publication in the study. Otherwise, if automatic
8862                         publication is switched on, default value is used for result name.
8863
8864             Returns:
8865                 New GEOM.GEOM_Object, containing the scaled shape.
8866             """
8867             # Example: see GEOM_TestAll.py
8868             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8869             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8870                                                         theFactorX, theFactorY, theFactorZ)
8871             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8872             anObj.SetParameters(Parameters)
8873             self._autoPublish(anObj, theName, "scaled")
8874             return anObj
8875
8876         ## Mirror an object relatively the given plane.
8877         #  @param theObject The object to be mirrored.
8878         #  @param thePlane Plane of symmetry.
8879         #  @param theCopy Flag used to mirror object itself or create a copy.
8880         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8881         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8882         @ManageTransactions("TrsfOp")
8883         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8884             """
8885             Mirror an object relatively the given plane.
8886
8887             Parameters:
8888                 theObject The object to be mirrored.
8889                 thePlane Plane of symmetry.
8890                 theCopy Flag used to mirror object itself or create a copy.
8891
8892             Returns:
8893                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8894                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8895             """
8896             if theCopy:
8897                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8898             else:
8899                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8900             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8901             return anObj
8902
8903         ## Create an object, symmetrical
8904         #  to the given one relatively the given plane.
8905         #  @param theObject The object to be mirrored.
8906         #  @param thePlane Plane of symmetry.
8907         #  @param theName Object name; when specified, this parameter is used
8908         #         for result publication in the study. Otherwise, if automatic
8909         #         publication is switched on, default value is used for result name.
8910         #
8911         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8912         #
8913         #  @ref tui_mirror "Example"
8914         @ManageTransactions("TrsfOp")
8915         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8916             """
8917             Create an object, symmetrical to the given one relatively the given plane.
8918
8919             Parameters:
8920                 theObject The object to be mirrored.
8921                 thePlane Plane of symmetry.
8922                 theName Object name; when specified, this parameter is used
8923                         for result publication in the study. Otherwise, if automatic
8924                         publication is switched on, default value is used for result name.
8925
8926             Returns:
8927                 New GEOM.GEOM_Object, containing the mirrored shape.
8928             """
8929             # Example: see GEOM_TestAll.py
8930             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8931             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8932             self._autoPublish(anObj, theName, "mirrored")
8933             return anObj
8934
8935         ## Mirror an object relatively the given axis.
8936         #  @param theObject The object to be mirrored.
8937         #  @param theAxis Axis of symmetry.
8938         #  @param theCopy Flag used to mirror object itself or create a copy.
8939         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8940         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8941         @ManageTransactions("TrsfOp")
8942         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8943             """
8944             Mirror an object relatively the given axis.
8945
8946             Parameters:
8947                 theObject The object to be mirrored.
8948                 theAxis Axis of symmetry.
8949                 theCopy Flag used to mirror object itself or create a copy.
8950
8951             Returns:
8952                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8953                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8954             """
8955             if theCopy:
8956                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8957             else:
8958                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8959             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8960             return anObj
8961
8962         ## Create an object, symmetrical
8963         #  to the given one relatively the given axis.
8964         #  @param theObject The object to be mirrored.
8965         #  @param theAxis Axis of symmetry.
8966         #  @param theName Object name; when specified, this parameter is used
8967         #         for result publication in the study. Otherwise, if automatic
8968         #         publication is switched on, default value is used for result name.
8969         #
8970         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8971         #
8972         #  @ref tui_mirror "Example"
8973         @ManageTransactions("TrsfOp")
8974         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8975             """
8976             Create an object, symmetrical to the given one relatively the given axis.
8977
8978             Parameters:
8979                 theObject The object to be mirrored.
8980                 theAxis Axis of symmetry.
8981                 theName Object name; when specified, this parameter is used
8982                         for result publication in the study. Otherwise, if automatic
8983                         publication is switched on, default value is used for result name.
8984
8985             Returns:
8986                 New GEOM.GEOM_Object, containing the mirrored shape.
8987             """
8988             # Example: see GEOM_TestAll.py
8989             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8990             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8991             self._autoPublish(anObj, theName, "mirrored")
8992             return anObj
8993
8994         ## Mirror an object relatively the given point.
8995         #  @param theObject The object to be mirrored.
8996         #  @param thePoint Point of symmetry.
8997         #  @param theCopy Flag used to mirror object itself or create a copy.
8998         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8999         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9000         @ManageTransactions("TrsfOp")
9001         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9002             """
9003             Mirror an object relatively the given point.
9004
9005             Parameters:
9006                 theObject The object to be mirrored.
9007                 thePoint Point of symmetry.
9008                 theCopy Flag used to mirror object itself or create a copy.
9009
9010             Returns:
9011                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9012                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9013             """
9014             # Example: see GEOM_TestAll.py
9015             if theCopy:
9016                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9017             else:
9018                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9019             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9020             return anObj
9021
9022         ## Create an object, symmetrical
9023         #  to the given one relatively the given point.
9024         #  @param theObject The object to be mirrored.
9025         #  @param thePoint Point of symmetry.
9026         #  @param theName Object name; when specified, this parameter is used
9027         #         for result publication in the study. Otherwise, if automatic
9028         #         publication is switched on, default value is used for result name.
9029         #
9030         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9031         #
9032         #  @ref tui_mirror "Example"
9033         @ManageTransactions("TrsfOp")
9034         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9035             """
9036             Create an object, symmetrical
9037             to the given one relatively the given point.
9038
9039             Parameters:
9040                 theObject The object to be mirrored.
9041                 thePoint Point of symmetry.
9042                 theName Object name; when specified, this parameter is used
9043                         for result publication in the study. Otherwise, if automatic
9044                         publication is switched on, default value is used for result name.
9045
9046             Returns:
9047                 New GEOM.GEOM_Object, containing the mirrored shape.
9048             """
9049             # Example: see GEOM_TestAll.py
9050             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9051             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9052             self._autoPublish(anObj, theName, "mirrored")
9053             return anObj
9054
9055         ## Modify the location of the given object.
9056         #  @param theObject The object to be displaced.
9057         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9058         #                     If \a theStartLCS is NULL, displacement
9059         #                     will be performed from global CS.\n
9060         #                     If \a theObject itself is used as \a theStartLCS,
9061         #                     its location will be changed to \a theEndLCS.
9062         #  @param theEndLCS Coordinate system to perform displacement to it.
9063         #  @param theCopy Flag used to displace object itself or create a copy.
9064         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9065         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9066         @ManageTransactions("TrsfOp")
9067         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9068             """
9069             Modify the Location of the given object by LCS, creating its copy before the setting.
9070
9071             Parameters:
9072                 theObject The object to be displaced.
9073                 theStartLCS Coordinate system to perform displacement from it.
9074                             If theStartLCS is NULL, displacement
9075                             will be performed from global CS.
9076                             If theObject itself is used as theStartLCS,
9077                             its location will be changed to theEndLCS.
9078                 theEndLCS Coordinate system to perform displacement to it.
9079                 theCopy Flag used to displace object itself or create a copy.
9080
9081             Returns:
9082                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9083                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9084             """
9085             # Example: see GEOM_TestAll.py
9086             if theCopy:
9087                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9088             else:
9089                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9090             RaiseIfFailed("Displace", self.TrsfOp)
9091             return anObj
9092
9093         ## Modify the Location of the given object by LCS,
9094         #  creating its copy before the setting.
9095         #  @param theObject The object to be displaced.
9096         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9097         #                     If \a theStartLCS is NULL, displacement
9098         #                     will be performed from global CS.\n
9099         #                     If \a theObject itself is used as \a theStartLCS,
9100         #                     its location will be changed to \a theEndLCS.
9101         #  @param theEndLCS Coordinate system to perform displacement to it.
9102         #  @param theName Object name; when specified, this parameter is used
9103         #         for result publication in the study. Otherwise, if automatic
9104         #         publication is switched on, default value is used for result name.
9105         #
9106         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9107         #
9108         #  @ref tui_modify_location "Example"
9109         @ManageTransactions("TrsfOp")
9110         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9111             """
9112             Modify the Location of the given object by LCS, creating its copy before the setting.
9113
9114             Parameters:
9115                 theObject The object to be displaced.
9116                 theStartLCS Coordinate system to perform displacement from it.
9117                             If theStartLCS is NULL, displacement
9118                             will be performed from global CS.
9119                             If theObject itself is used as theStartLCS,
9120                             its location will be changed to theEndLCS.
9121                 theEndLCS Coordinate system to perform displacement to it.
9122                 theName Object name; when specified, this parameter is used
9123                         for result publication in the study. Otherwise, if automatic
9124                         publication is switched on, default value is used for result name.
9125
9126             Returns:
9127                 New GEOM.GEOM_Object, containing the displaced shape.
9128
9129             Example of usage:
9130                 # create local coordinate systems
9131                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9132                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9133                 # modify the location of the given object
9134                 position = geompy.MakePosition(cylinder, cs1, cs2)
9135             """
9136             # Example: see GEOM_TestAll.py
9137             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9138             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9139             self._autoPublish(anObj, theName, "displaced")
9140             return anObj
9141
9142         ## Modify the Location of the given object by Path.
9143         #  @param  theObject The object to be displaced.
9144         #  @param  thePath Wire or Edge along that the object will be translated.
9145         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9146         #  @param  theCopy is to create a copy objects if true.
9147         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9148         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9149         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9150         #
9151         #  @ref tui_modify_location "Example"
9152         @ManageTransactions("TrsfOp")
9153         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9154             """
9155             Modify the Location of the given object by Path.
9156
9157             Parameters:
9158                  theObject The object to be displaced.
9159                  thePath Wire or Edge along that the object will be translated.
9160                  theDistance progress of Path (0 = start location, 1 = end of path location).
9161                  theCopy is to create a copy objects if true.
9162                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9163
9164             Returns:
9165                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9166                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9167
9168             Example of usage:
9169                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9170             """
9171             # Example: see GEOM_TestAll.py
9172             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9173             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9174             return anObj
9175
9176         ## Modify the Location of the given object by Path, creating its copy before the operation.
9177         #  @param theObject The object to be displaced.
9178         #  @param thePath Wire or Edge along that the object will be translated.
9179         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9180         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9181         #  @param theName Object name; when specified, this parameter is used
9182         #         for result publication in the study. Otherwise, if automatic
9183         #         publication is switched on, default value is used for result name.
9184         #
9185         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9186         @ManageTransactions("TrsfOp")
9187         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9188             """
9189             Modify the Location of the given object by Path, creating its copy before the operation.
9190
9191             Parameters:
9192                  theObject The object to be displaced.
9193                  thePath Wire or Edge along that the object will be translated.
9194                  theDistance progress of Path (0 = start location, 1 = end of path location).
9195                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9196                  theName Object name; when specified, this parameter is used
9197                          for result publication in the study. Otherwise, if automatic
9198                          publication is switched on, default value is used for result name.
9199
9200             Returns:
9201                 New GEOM.GEOM_Object, containing the displaced shape.
9202             """
9203             # Example: see GEOM_TestAll.py
9204             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9205             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9206             self._autoPublish(anObj, theName, "displaced")
9207             return anObj
9208
9209         ## Offset given shape.
9210         #  @param theObject The base object for the offset.
9211         #  @param theOffset Offset value.
9212         #  @param theCopy Flag used to offset object itself or create a copy.
9213         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9214         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9215         @ManageTransactions("TrsfOp")
9216         def Offset(self, theObject, theOffset, theCopy=False):
9217             """
9218             Offset given shape.
9219
9220             Parameters:
9221                 theObject The base object for the offset.
9222                 theOffset Offset value.
9223                 theCopy Flag used to offset object itself or create a copy.
9224
9225             Returns:
9226                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9227                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9228             """
9229             theOffset, Parameters = ParseParameters(theOffset)
9230             if theCopy:
9231                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
9232             else:
9233                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
9234             RaiseIfFailed("Offset", self.TrsfOp)
9235             anObj.SetParameters(Parameters)
9236             return anObj
9237
9238         ## Create new object as offset of the given one.
9239         #  @param theObject The base object for the offset.
9240         #  @param theOffset Offset value.
9241         #  @param theName Object name; when specified, this parameter is used
9242         #         for result publication in the study. Otherwise, if automatic
9243         #         publication is switched on, default value is used for result name.
9244         #
9245         #  @return New GEOM.GEOM_Object, containing the offset object.
9246         #
9247         #  @ref tui_offset "Example"
9248         @ManageTransactions("TrsfOp")
9249         def MakeOffset(self, theObject, theOffset, theName=None):
9250             """
9251             Create new object as offset of the given one.
9252
9253             Parameters:
9254                 theObject The base object for the offset.
9255                 theOffset Offset value.
9256                 theName Object name; when specified, this parameter is used
9257                         for result publication in the study. Otherwise, if automatic
9258                         publication is switched on, default value is used for result name.
9259
9260             Returns:
9261                 New GEOM.GEOM_Object, containing the offset object.
9262
9263             Example of usage:
9264                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9265                  # create a new object as offset of the given object
9266                  offset = geompy.MakeOffset(box, 70.)
9267             """
9268             # Example: see GEOM_TestAll.py
9269             theOffset, Parameters = ParseParameters(theOffset)
9270             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
9271             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9272             anObj.SetParameters(Parameters)
9273             self._autoPublish(anObj, theName, "offset")
9274             return anObj
9275
9276         ## Create new object as projection of the given one on another.
9277         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9278         #         Edge and wire are acceptable if @a theTarget is a face.
9279         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9280         #  @param theName Object name; when specified, this parameter is used
9281         #         for result publication in the study. Otherwise, if automatic
9282         #         publication is switched on, default value is used for result name.
9283         #
9284         #  @return New GEOM.GEOM_Object, containing the projection.
9285         #
9286         #  @ref tui_projection "Example"
9287         @ManageTransactions("TrsfOp")
9288         def MakeProjection(self, theSource, theTarget, theName=None):
9289             """
9290             Create new object as projection of the given one on another.
9291
9292             Parameters:
9293                 theSource The source object for the projection. It can be a point, edge or wire.
9294                           Edge and wire are acceptable if theTarget is a face.
9295                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9296                 theName Object name; when specified, this parameter is used
9297                         for result publication in the study. Otherwise, if automatic
9298                         publication is switched on, default value is used for result name.
9299
9300             Returns:
9301                 New GEOM.GEOM_Object, containing the projection.
9302             """
9303             # Example: see GEOM_TestAll.py
9304             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9305             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9306             self._autoPublish(anObj, theName, "projection")
9307             return anObj
9308
9309         ## Create a projection of the given point on a wire or an edge.
9310         #  If there are no solutions or there are 2 or more solutions It throws an
9311         #  exception.
9312         #  @param thePoint the point to be projected.
9313         #  @param theWire the wire. The edge is accepted as well.
9314         #  @param theName Object name; when specified, this parameter is used
9315         #         for result publication in the study. Otherwise, if automatic
9316         #         publication is switched on, default value is used for result name.
9317         #
9318         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9319         #  \n \a u: The parameter of projection point on edge.
9320         #  \n \a PointOnEdge: The projection point.
9321         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9322         #
9323         #  @ref tui_projection "Example"
9324         @ManageTransactions("TrsfOp")
9325         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9326             """
9327             Create a projection of the given point on a wire or an edge.
9328             If there are no solutions or there are 2 or more solutions It throws an
9329             exception.
9330
9331             Parameters:
9332                 thePoint the point to be projected.
9333                 theWire the wire. The edge is accepted as well.
9334                 theName Object name; when specified, this parameter is used
9335                         for result publication in the study. Otherwise, if automatic
9336                         publication is switched on, default value is used for result name.
9337
9338             Returns:
9339                 [u, PointOnEdge, EdgeInWireIndex]
9340                  u: The parameter of projection point on edge.
9341                  PointOnEdge: The projection point.
9342                  EdgeInWireIndex: The index of an edge in a wire.
9343             """
9344             # Example: see GEOM_TestAll.py
9345             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9346             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9347             self._autoPublish(anObj[1], theName, "projection")
9348             return anObj
9349
9350         # -----------------------------------------------------------------------------
9351         # Patterns
9352         # -----------------------------------------------------------------------------
9353
9354         ## Translate the given object along the given vector a given number times
9355         #  @param theObject The object to be translated.
9356         #  @param theVector Direction of the translation. DX if None.
9357         #  @param theStep Distance to translate on.
9358         #  @param theNbTimes Quantity of translations to be done.
9359         #  @param theName Object name; when specified, this parameter is used
9360         #         for result publication in the study. Otherwise, if automatic
9361         #         publication is switched on, default value is used for result name.
9362         #
9363         #  @return New GEOM.GEOM_Object, containing compound of all
9364         #          the shapes, obtained after each translation.
9365         #
9366         #  @ref tui_multi_translation "Example"
9367         @ManageTransactions("TrsfOp")
9368         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9369             """
9370             Translate the given object along the given vector a given number times
9371
9372             Parameters:
9373                 theObject The object to be translated.
9374                 theVector Direction of the translation. DX if None.
9375                 theStep Distance to translate on.
9376                 theNbTimes Quantity of translations to be done.
9377                 theName Object name; when specified, this parameter is used
9378                         for result publication in the study. Otherwise, if automatic
9379                         publication is switched on, default value is used for result name.
9380
9381             Returns:
9382                 New GEOM.GEOM_Object, containing compound of all
9383                 the shapes, obtained after each translation.
9384
9385             Example of usage:
9386                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9387             """
9388             # Example: see GEOM_TestAll.py
9389             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9390             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9391             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9392             anObj.SetParameters(Parameters)
9393             self._autoPublish(anObj, theName, "multitranslation")
9394             return anObj
9395
9396         ## Conseqently apply two specified translations to theObject specified number of times.
9397         #  @param theObject The object to be translated.
9398         #  @param theVector1 Direction of the first translation. DX if None.
9399         #  @param theStep1 Step of the first translation.
9400         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9401         #  @param theVector2 Direction of the second translation. DY if None.
9402         #  @param theStep2 Step of the second translation.
9403         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9404         #  @param theName Object name; when specified, this parameter is used
9405         #         for result publication in the study. Otherwise, if automatic
9406         #         publication is switched on, default value is used for result name.
9407         #
9408         #  @return New GEOM.GEOM_Object, containing compound of all
9409         #          the shapes, obtained after each translation.
9410         #
9411         #  @ref tui_multi_translation "Example"
9412         @ManageTransactions("TrsfOp")
9413         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9414                                    theVector2, theStep2, theNbTimes2, theName=None):
9415             """
9416             Conseqently apply two specified translations to theObject specified number of times.
9417
9418             Parameters:
9419                 theObject The object to be translated.
9420                 theVector1 Direction of the first translation. DX if None.
9421                 theStep1 Step of the first translation.
9422                 theNbTimes1 Quantity of translations to be done along theVector1.
9423                 theVector2 Direction of the second translation. DY if None.
9424                 theStep2 Step of the second translation.
9425                 theNbTimes2 Quantity of translations to be done along theVector2.
9426                 theName Object name; when specified, this parameter is used
9427                         for result publication in the study. Otherwise, if automatic
9428                         publication is switched on, default value is used for result name.
9429
9430             Returns:
9431                 New GEOM.GEOM_Object, containing compound of all
9432                 the shapes, obtained after each translation.
9433
9434             Example of usage:
9435                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9436             """
9437             # Example: see GEOM_TestAll.py
9438             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9439             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9440                                                  theVector2, theStep2, theNbTimes2)
9441             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9442             anObj.SetParameters(Parameters)
9443             self._autoPublish(anObj, theName, "multitranslation")
9444             return anObj
9445
9446         ## Rotate the given object around the given axis a given number times.
9447         #  Rotation angle will be 2*PI/theNbTimes.
9448         #  @param theObject The object to be rotated.
9449         #  @param theAxis The rotation axis. DZ if None.
9450         #  @param theNbTimes Quantity of rotations to be done.
9451         #  @param theName Object name; when specified, this parameter is used
9452         #         for result publication in the study. Otherwise, if automatic
9453         #         publication is switched on, default value is used for result name.
9454         #
9455         #  @return New GEOM.GEOM_Object, containing compound of all the
9456         #          shapes, obtained after each rotation.
9457         #
9458         #  @ref tui_multi_rotation "Example"
9459         @ManageTransactions("TrsfOp")
9460         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9461             """
9462             Rotate the given object around the given axis a given number times.
9463             Rotation angle will be 2*PI/theNbTimes.
9464
9465             Parameters:
9466                 theObject The object to be rotated.
9467                 theAxis The rotation axis. DZ if None.
9468                 theNbTimes Quantity of rotations to be done.
9469                 theName Object name; when specified, this parameter is used
9470                         for result publication in the study. Otherwise, if automatic
9471                         publication is switched on, default value is used for result name.
9472
9473             Returns:
9474                 New GEOM.GEOM_Object, containing compound of all the
9475                 shapes, obtained after each rotation.
9476
9477             Example of usage:
9478                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9479             """
9480             # Example: see GEOM_TestAll.py
9481             theNbTimes, Parameters = ParseParameters(theNbTimes)
9482             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9483             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9484             anObj.SetParameters(Parameters)
9485             self._autoPublish(anObj, theName, "multirotation")
9486             return anObj
9487
9488         ## Rotate the given object around the given axis
9489         #  a given number times on the given angle.
9490         #  @param theObject The object to be rotated.
9491         #  @param theAxis The rotation axis. DZ if None.
9492         #  @param theAngleStep Rotation angle in radians.
9493         #  @param theNbTimes Quantity of rotations to be done.
9494         #  @param theName Object name; when specified, this parameter is used
9495         #         for result publication in the study. Otherwise, if automatic
9496         #         publication is switched on, default value is used for result name.
9497         #
9498         #  @return New GEOM.GEOM_Object, containing compound of all the
9499         #          shapes, obtained after each rotation.
9500         #
9501         #  @ref tui_multi_rotation "Example"
9502         @ManageTransactions("TrsfOp")
9503         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9504             """
9505             Rotate the given object around the given axis
9506             a given number times on the given angle.
9507
9508             Parameters:
9509                 theObject The object to be rotated.
9510                 theAxis The rotation axis. DZ if None.
9511                 theAngleStep Rotation angle in radians.
9512                 theNbTimes Quantity of rotations to be done.
9513                 theName Object name; when specified, this parameter is used
9514                         for result publication in the study. Otherwise, if automatic
9515                         publication is switched on, default value is used for result name.
9516
9517             Returns:
9518                 New GEOM.GEOM_Object, containing compound of all the
9519                 shapes, obtained after each rotation.
9520
9521             Example of usage:
9522                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9523             """
9524             # Example: see GEOM_TestAll.py
9525             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9526             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9527             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9528             anObj.SetParameters(Parameters)
9529             self._autoPublish(anObj, theName, "multirotation")
9530             return anObj
9531
9532         ## Rotate the given object around the given axis a given
9533         #  number times and multi-translate each rotation result.
9534         #  Rotation angle will be 2*PI/theNbTimes1.
9535         #  Translation direction passes through center of gravity
9536         #  of rotated shape and its projection on the rotation axis.
9537         #  @param theObject The object to be rotated.
9538         #  @param theAxis Rotation axis. DZ if None.
9539         #  @param theNbTimes1 Quantity of rotations to be done.
9540         #  @param theRadialStep Translation distance.
9541         #  @param theNbTimes2 Quantity of translations to be done.
9542         #  @param theName Object name; when specified, this parameter is used
9543         #         for result publication in the study. Otherwise, if automatic
9544         #         publication is switched on, default value is used for result name.
9545         #
9546         #  @return New GEOM.GEOM_Object, containing compound of all the
9547         #          shapes, obtained after each transformation.
9548         #
9549         #  @ref tui_multi_rotation "Example"
9550         @ManageTransactions("TrsfOp")
9551         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9552             """
9553             Rotate the given object around the
9554             given axis on the given angle a given number
9555             times and multi-translate each rotation result.
9556             Translation direction passes through center of gravity
9557             of rotated shape and its projection on the rotation axis.
9558
9559             Parameters:
9560                 theObject The object to be rotated.
9561                 theAxis Rotation axis. DZ if None.
9562                 theNbTimes1 Quantity of rotations to be done.
9563                 theRadialStep Translation distance.
9564                 theNbTimes2 Quantity of translations to be done.
9565                 theName Object name; when specified, this parameter is used
9566                         for result publication in the study. Otherwise, if automatic
9567                         publication is switched on, default value is used for result name.
9568
9569             Returns:
9570                 New GEOM.GEOM_Object, containing compound of all the
9571                 shapes, obtained after each transformation.
9572
9573             Example of usage:
9574                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9575             """
9576             # Example: see GEOM_TestAll.py
9577             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9578             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9579             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9580             anObj.SetParameters(Parameters)
9581             self._autoPublish(anObj, theName, "multirotation")
9582             return anObj
9583
9584         ## Rotate the given object around the
9585         #  given axis on the given angle a given number
9586         #  times and multi-translate each rotation result.
9587         #  Translation direction passes through center of gravity
9588         #  of rotated shape and its projection on the rotation axis.
9589         #  @param theObject The object to be rotated.
9590         #  @param theAxis Rotation axis. DZ if None.
9591         #  @param theAngleStep Rotation angle in radians.
9592         #  @param theNbTimes1 Quantity of rotations to be done.
9593         #  @param theRadialStep Translation distance.
9594         #  @param theNbTimes2 Quantity of translations to be done.
9595         #  @param theName Object name; when specified, this parameter is used
9596         #         for result publication in the study. Otherwise, if automatic
9597         #         publication is switched on, default value is used for result name.
9598         #
9599         #  @return New GEOM.GEOM_Object, containing compound of all the
9600         #          shapes, obtained after each transformation.
9601         #
9602         #  @ref tui_multi_rotation "Example"
9603         @ManageTransactions("TrsfOp")
9604         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9605             """
9606             Rotate the given object around the
9607             given axis on the given angle a given number
9608             times and multi-translate each rotation result.
9609             Translation direction passes through center of gravity
9610             of rotated shape and its projection on the rotation axis.
9611
9612             Parameters:
9613                 theObject The object to be rotated.
9614                 theAxis Rotation axis. DZ if None.
9615                 theAngleStep Rotation angle in radians.
9616                 theNbTimes1 Quantity of rotations to be done.
9617                 theRadialStep Translation distance.
9618                 theNbTimes2 Quantity of translations to be done.
9619                 theName Object name; when specified, this parameter is used
9620                         for result publication in the study. Otherwise, if automatic
9621                         publication is switched on, default value is used for result name.
9622
9623             Returns:
9624                 New GEOM.GEOM_Object, containing compound of all the
9625                 shapes, obtained after each transformation.
9626
9627             Example of usage:
9628                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9629             """
9630             # Example: see GEOM_TestAll.py
9631             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9632             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9633             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9634             anObj.SetParameters(Parameters)
9635             self._autoPublish(anObj, theName, "multirotation")
9636             return anObj
9637
9638         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9639         #
9640         #  @ref swig_MakeMultiRotation "Example"
9641         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9642             """
9643             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9644
9645             Example of usage:
9646                 pz = geompy.MakeVertex(0, 0, 100)
9647                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9648                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9649             """
9650             # Example: see GEOM_TestOthers.py
9651             aVec = self.MakeLine(aPoint,aDir)
9652             # note: auto-publishing is done in self.MultiRotate1D()
9653             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9654             return anObj
9655
9656         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9657         #
9658         #  @ref swig_MakeMultiRotation "Example"
9659         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9660             """
9661             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9662
9663             Example of usage:
9664                 pz = geompy.MakeVertex(0, 0, 100)
9665                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9666                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9667             """
9668             # Example: see GEOM_TestOthers.py
9669             aVec = self.MakeLine(aPoint,aDir)
9670             # note: auto-publishing is done in self.MultiRotate1D()
9671             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9672             return anObj
9673
9674         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9675         #
9676         #  @ref swig_MakeMultiRotation "Example"
9677         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9678             """
9679             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9680
9681             Example of usage:
9682                 pz = geompy.MakeVertex(0, 0, 100)
9683                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9684                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9685             """
9686             # Example: see GEOM_TestOthers.py
9687             aVec = self.MakeLine(aPoint,aDir)
9688             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9689             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9690             return anObj
9691
9692         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9693         #
9694         #  @ref swig_MakeMultiRotation "Example"
9695         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9696             """
9697             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9698
9699             Example of usage:
9700                 pz = geompy.MakeVertex(0, 0, 100)
9701                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9702                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9703             """
9704             # Example: see GEOM_TestOthers.py
9705             aVec = self.MakeLine(aPoint,aDir)
9706             # note: auto-publishing is done in self.MultiRotate2D()
9707             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9708             return anObj
9709
9710         ##
9711         #  Compute a wire or a face that represents a projection of the source
9712         #  shape onto cylinder. The cylinder's coordinate system is the same
9713         #  as the global coordinate system.
9714         #
9715         #  @param theObject The object to be projected. It can be either
9716         #         a planar wire or a face.
9717         #  @param theRadius The radius of the cylinder.
9718         #  @param theStartAngle The starting angle in radians from
9719         #         the cylinder's X axis around Z axis. The angle from which
9720         #         the projection is started.
9721         #  @param theAngleLength The projection length angle in radians.
9722         #         The angle in which to project the total length of the wire.
9723         #         If it is negative the projection is not scaled and natural
9724         #         wire length is kept for the projection.
9725         #  @param theAngleRotation The desired angle in radians between
9726         #         the tangent vector to the first curve at the first point of
9727         #         the theObject's projection in 2D space and U-direction of
9728         #         cylinder's 2D space.
9729         #  @param theName Object name; when specified, this parameter is used
9730         #         for result publication in the study. Otherwise, if automatic
9731         #         publication is switched on, default value is used for result name.
9732         #
9733         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9734         #         represents a wire or a face that represents a projection of
9735         #         the source shape onto a cylinder.
9736         #
9737         #  @ref tui_projection "Example"
9738         def MakeProjectionOnCylinder (self, theObject, theRadius,
9739                                       theStartAngle=0.0, theAngleLength=-1.0,
9740                                       theAngleRotation=0.0,
9741                                       theName=None):
9742             """
9743             Compute a wire or a face that represents a projection of the source
9744             shape onto cylinder. The cylinder's coordinate system is the same
9745             as the global coordinate system.
9746
9747             Parameters:
9748                 theObject The object to be projected. It can be either
9749                         a planar wire or a face.
9750                 theRadius The radius of the cylinder.
9751                 theStartAngle The starting angle in radians from the cylinder's X axis
9752                         around Z axis. The angle from which the projection is started.
9753                 theAngleLength The projection length angle in radians. The angle in which
9754                         to project the total length of the wire. If it is negative the
9755                         projection is not scaled and natural wire length is kept for
9756                         the projection.
9757                 theAngleRotation The desired angle in radians between
9758                         the tangent vector to the first curve at the first
9759                         point of the theObject's projection in 2D space and
9760                         U-direction of cylinder's 2D space.
9761                 theName Object name; when specified, this parameter is used
9762                         for result publication in the study. Otherwise, if automatic
9763                         publication is switched on, default value is used for result name.
9764
9765             Returns:
9766                 New GEOM.GEOM_Object, containing the result shape. The result
9767                 represents a wire or a face that represents a projection of
9768                 the source shape onto a cylinder.
9769             """
9770             # Example: see GEOM_TestAll.py
9771             flagStartAngle = False
9772             if isinstance(theStartAngle,str):
9773                 flagStartAngle = True
9774             flagAngleLength = False
9775             if isinstance(theAngleLength,str):
9776                 flagAngleLength = True
9777             flagAngleRotation = False
9778             if isinstance(theAngleRotation,str):
9779                 flagAngleRotation = True
9780             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9781               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9782             if flagStartAngle:
9783                 theStartAngle = theStartAngle*math.pi/180.
9784             if flagAngleLength:
9785                 theAngleLength = theAngleLength*math.pi/180.
9786             if flagAngleRotation:
9787                 theAngleRotation = theAngleRotation*math.pi/180.
9788             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9789                 theStartAngle, theAngleLength, theAngleRotation)
9790             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9791             anObj.SetParameters(Parameters)
9792             self._autoPublish(anObj, theName, "projection")
9793             return anObj
9794
9795         # end of l3_transform
9796         ## @}
9797
9798         ## @addtogroup l3_transform_d
9799         ## @{
9800
9801         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9802         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9803             """
9804             Deprecated method. Use MultiRotate1DNbTimes instead.
9805             """
9806             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9807             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9808
9809         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9810         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9811         @ManageTransactions("TrsfOp")
9812         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9813             """
9814             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9815             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9816
9817             Example of usage:
9818                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9819             """
9820             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9821             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9822             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9823             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9824             anObj.SetParameters(Parameters)
9825             self._autoPublish(anObj, theName, "multirotation")
9826             return anObj
9827
9828         ## The same, as MultiRotate1D(), but axis is given by direction and point
9829         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9830         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9831             """
9832             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9833             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9834
9835             Example of usage:
9836                 pz = geompy.MakeVertex(0, 0, 100)
9837                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9838                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9839             """
9840             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9841             aVec = self.MakeLine(aPoint,aDir)
9842             # note: auto-publishing is done in self.MultiRotate1D()
9843             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9844             return anObj
9845
9846         ## The same, as MultiRotate2D(), but axis is given by direction and point
9847         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9848         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9849             """
9850             The same, as MultiRotate2D(), but axis is given by direction and point
9851             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9852
9853             Example of usage:
9854                 pz = geompy.MakeVertex(0, 0, 100)
9855                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9856                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9857             """
9858             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9859             aVec = self.MakeLine(aPoint,aDir)
9860             # note: auto-publishing is done in self.MultiRotate2D()
9861             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9862             return anObj
9863
9864         # end of l3_transform_d
9865         ## @}
9866
9867         ## @addtogroup l3_local
9868         ## @{
9869
9870         ## Perform a fillet on all edges of the given shape.
9871         #  @param theShape Shape, to perform fillet on.
9872         #  @param theR Fillet radius.
9873         #  @param theName Object name; when specified, this parameter is used
9874         #         for result publication in the study. Otherwise, if automatic
9875         #         publication is switched on, default value is used for result name.
9876         #
9877         #  @return New GEOM.GEOM_Object, containing the result shape.
9878         #
9879         #  @ref tui_fillet "Example 1"
9880         #  \n @ref swig_MakeFilletAll "Example 2"
9881         @ManageTransactions("LocalOp")
9882         def MakeFilletAll(self, theShape, theR, theName=None):
9883             """
9884             Perform a fillet on all edges of the given shape.
9885
9886             Parameters:
9887                 theShape Shape, to perform fillet on.
9888                 theR Fillet radius.
9889                 theName Object name; when specified, this parameter is used
9890                         for result publication in the study. Otherwise, if automatic
9891                         publication is switched on, default value is used for result name.
9892
9893             Returns:
9894                 New GEOM.GEOM_Object, containing the result shape.
9895
9896             Example of usage:
9897                filletall = geompy.MakeFilletAll(prism, 10.)
9898             """
9899             # Example: see GEOM_TestOthers.py
9900             theR,Parameters = ParseParameters(theR)
9901             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9902             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9903             anObj.SetParameters(Parameters)
9904             self._autoPublish(anObj, theName, "fillet")
9905             return anObj
9906
9907         ## Perform a fillet on the specified edges/faces of the given shape
9908         #  @param theShape Shape, to perform fillet on.
9909         #  @param theR Fillet radius.
9910         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9911         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9912         #  @param theName Object name; when specified, this parameter is used
9913         #         for result publication in the study. Otherwise, if automatic
9914         #         publication is switched on, default value is used for result name.
9915         #
9916         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9917         #
9918         #  @return New GEOM.GEOM_Object, containing the result shape.
9919         #
9920         #  @ref tui_fillet "Example"
9921         @ManageTransactions("LocalOp")
9922         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9923             """
9924             Perform a fillet on the specified edges/faces of the given shape
9925
9926             Parameters:
9927                 theShape Shape, to perform fillet on.
9928                 theR Fillet radius.
9929                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9930                 theListShapes Global indices of edges/faces to perform fillet on.
9931                 theName Object name; when specified, this parameter is used
9932                         for result publication in the study. Otherwise, if automatic
9933                         publication is switched on, default value is used for result name.
9934
9935             Note:
9936                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9937
9938             Returns:
9939                 New GEOM.GEOM_Object, containing the result shape.
9940
9941             Example of usage:
9942                 # get the list of IDs (IDList) for the fillet
9943                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9944                 IDlist_e = []
9945                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9946                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9947                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9948                 # make a fillet on the specified edges of the given shape
9949                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9950             """
9951             # Example: see GEOM_TestAll.py
9952             theR,Parameters = ParseParameters(theR)
9953             anObj = None
9954             if theShapeType == self.ShapeType["EDGE"]:
9955                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9956                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9957             else:
9958                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9959                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9960             anObj.SetParameters(Parameters)
9961             self._autoPublish(anObj, theName, "fillet")
9962             return anObj
9963
9964         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9965         @ManageTransactions("LocalOp")
9966         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9967             """
9968             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9969
9970             Example of usage:
9971                 # get the list of IDs (IDList) for the fillet
9972                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9973                 IDlist_e = []
9974                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9975                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9976                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9977                 # make a fillet on the specified edges of the given shape
9978                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9979             """
9980             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9981             anObj = None
9982             if theShapeType == self.ShapeType["EDGE"]:
9983                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9984                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9985             else:
9986                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9987                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9988             anObj.SetParameters(Parameters)
9989             self._autoPublish(anObj, theName, "fillet")
9990             return anObj
9991
9992         ## Perform a fillet on the specified edges of the given shape
9993         #  @param theShape  Wire Shape to perform fillet on.
9994         #  @param theR  Fillet radius.
9995         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9996         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9997         #    \note The list of vertices could be empty,
9998         #          in this case fillet will done done at all vertices in wire
9999         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10000         #         by the length of the edges, nearest to the fillet vertex.
10001         #         But sometimes the next edge is C1 continuous with the one, nearest to
10002         #         the fillet point, and such two (or more) edges can be united to allow
10003         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10004         #         thus ignoring the secant vertex (vertices).
10005         #  @param theName Object name; when specified, this parameter is used
10006         #         for result publication in the study. Otherwise, if automatic
10007         #         publication is switched on, default value is used for result name.
10008         #
10009         #  @return New GEOM.GEOM_Object, containing the result shape.
10010         #
10011         #  @ref tui_fillet2d "Example"
10012         @ManageTransactions("LocalOp")
10013         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10014             """
10015             Perform a fillet on the specified edges of the given shape
10016
10017             Parameters:
10018                 theShape  Wire Shape to perform fillet on.
10019                 theR  Fillet radius.
10020                 theListOfVertexes Global indices of vertexes to perform fillet on.
10021                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10022                     by the length of the edges, nearest to the fillet vertex.
10023                     But sometimes the next edge is C1 continuous with the one, nearest to
10024                     the fillet point, and such two (or more) edges can be united to allow
10025                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10026                     thus ignoring the secant vertex (vertices).
10027                 theName Object name; when specified, this parameter is used
10028                         for result publication in the study. Otherwise, if automatic
10029                         publication is switched on, default value is used for result name.
10030             Note:
10031                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10032
10033                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10034
10035             Returns:
10036                 New GEOM.GEOM_Object, containing the result shape.
10037
10038             Example of usage:
10039                 # create wire
10040                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10041                 # make fillet at given wire vertices with giver radius
10042                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10043             """
10044             # Example: see GEOM_TestAll.py
10045             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10046             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10047             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10048             anObj.SetParameters(Parameters)
10049             self._autoPublish(anObj, theName, "fillet")
10050             return anObj
10051
10052         ## Perform a fillet at the specified vertices of the given face/shell.
10053         #  @param theShape Face or Shell shape to perform fillet on.
10054         #  @param theR Fillet radius.
10055         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10056         #  @param theName Object name; when specified, this parameter is used
10057         #         for result publication in the study. Otherwise, if automatic
10058         #         publication is switched on, default value is used for result name.
10059         #
10060         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10061         #
10062         #  @return New GEOM.GEOM_Object, containing the result shape.
10063         #
10064         #  @ref tui_fillet2d "Example"
10065         @ManageTransactions("LocalOp")
10066         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10067             """
10068             Perform a fillet at the specified vertices of the given face/shell.
10069
10070             Parameters:
10071                 theShape  Face or Shell shape to perform fillet on.
10072                 theR  Fillet radius.
10073                 theListOfVertexes Global indices of vertexes to perform fillet on.
10074                 theName Object name; when specified, this parameter is used
10075                         for result publication in the study. Otherwise, if automatic
10076                         publication is switched on, default value is used for result name.
10077             Note:
10078                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10079
10080             Returns:
10081                 New GEOM.GEOM_Object, containing the result shape.
10082
10083             Example of usage:
10084                 face = geompy.MakeFaceHW(100, 100, 1)
10085                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10086             """
10087             # Example: see GEOM_TestAll.py
10088             theR,Parameters = ParseParameters(theR)
10089             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10090             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10091             anObj.SetParameters(Parameters)
10092             self._autoPublish(anObj, theName, "fillet")
10093             return anObj
10094
10095         ## Perform a symmetric chamfer on all edges of the given shape.
10096         #  @param theShape Shape, to perform chamfer on.
10097         #  @param theD Chamfer size along each face.
10098         #  @param theName Object name; when specified, this parameter is used
10099         #         for result publication in the study. Otherwise, if automatic
10100         #         publication is switched on, default value is used for result name.
10101         #
10102         #  @return New GEOM.GEOM_Object, containing the result shape.
10103         #
10104         #  @ref tui_chamfer "Example 1"
10105         #  \n @ref swig_MakeChamferAll "Example 2"
10106         @ManageTransactions("LocalOp")
10107         def MakeChamferAll(self, theShape, theD, theName=None):
10108             """
10109             Perform a symmetric chamfer on all edges of the given shape.
10110
10111             Parameters:
10112                 theShape Shape, to perform chamfer on.
10113                 theD Chamfer size along each face.
10114                 theName Object name; when specified, this parameter is used
10115                         for result publication in the study. Otherwise, if automatic
10116                         publication is switched on, default value is used for result name.
10117
10118             Returns:
10119                 New GEOM.GEOM_Object, containing the result shape.
10120
10121             Example of usage:
10122                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10123             """
10124             # Example: see GEOM_TestOthers.py
10125             theD,Parameters = ParseParameters(theD)
10126             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10127             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10128             anObj.SetParameters(Parameters)
10129             self._autoPublish(anObj, theName, "chamfer")
10130             return anObj
10131
10132         ## Perform a chamfer on edges, common to the specified faces,
10133         #  with distance D1 on the Face1
10134         #  @param theShape Shape, to perform chamfer on.
10135         #  @param theD1 Chamfer size along \a theFace1.
10136         #  @param theD2 Chamfer size along \a theFace2.
10137         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10138         #  @param theName Object name; when specified, this parameter is used
10139         #         for result publication in the study. Otherwise, if automatic
10140         #         publication is switched on, default value is used for result name.
10141         #
10142         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10143         #
10144         #  @return New GEOM.GEOM_Object, containing the result shape.
10145         #
10146         #  @ref tui_chamfer "Example"
10147         @ManageTransactions("LocalOp")
10148         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10149             """
10150             Perform a chamfer on edges, common to the specified faces,
10151             with distance D1 on the Face1
10152
10153             Parameters:
10154                 theShape Shape, to perform chamfer on.
10155                 theD1 Chamfer size along theFace1.
10156                 theD2 Chamfer size along theFace2.
10157                 theFace1,theFace2 Global indices of two faces of theShape.
10158                 theName Object name; when specified, this parameter is used
10159                         for result publication in the study. Otherwise, if automatic
10160                         publication is switched on, default value is used for result name.
10161
10162             Note:
10163                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10164
10165             Returns:
10166                 New GEOM.GEOM_Object, containing the result shape.
10167
10168             Example of usage:
10169                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10170                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10171                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10172                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10173             """
10174             # Example: see GEOM_TestAll.py
10175             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10176             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10177             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10178             anObj.SetParameters(Parameters)
10179             self._autoPublish(anObj, theName, "chamfer")
10180             return anObj
10181
10182         ## Perform a chamfer on edges
10183         #  @param theShape Shape, to perform chamfer on.
10184         #  @param theD Chamfer length
10185         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10186         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10187         #  @param theName Object name; when specified, this parameter is used
10188         #         for result publication in the study. Otherwise, if automatic
10189         #         publication is switched on, default value is used for result name.
10190         #
10191         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10192         #
10193         #  @return New GEOM.GEOM_Object, containing the result shape.
10194         @ManageTransactions("LocalOp")
10195         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10196             """
10197             Perform a chamfer on edges
10198
10199             Parameters:
10200                 theShape Shape, to perform chamfer on.
10201                 theD1 Chamfer size along theFace1.
10202                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10203                 theFace1,theFace2 Global indices of two faces of theShape.
10204                 theName Object name; when specified, this parameter is used
10205                         for result publication in the study. Otherwise, if automatic
10206                         publication is switched on, default value is used for result name.
10207
10208             Note:
10209                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10210
10211             Returns:
10212                 New GEOM.GEOM_Object, containing the result shape.
10213
10214             Example of usage:
10215                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10216                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10217                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10218                 ang = 30
10219                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10220             """
10221             flag = False
10222             if isinstance(theAngle,str):
10223                 flag = True
10224             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10225             if flag:
10226                 theAngle = theAngle*math.pi/180.0
10227             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10228             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10229             anObj.SetParameters(Parameters)
10230             self._autoPublish(anObj, theName, "chamfer")
10231             return anObj
10232
10233         ## Perform a chamfer on all edges of the specified faces,
10234         #  with distance D1 on the first specified face (if several for one edge)
10235         #  @param theShape Shape, to perform chamfer on.
10236         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10237         #               connected to the edge, are in \a theFaces, \a theD1
10238         #               will be get along face, which is nearer to \a theFaces beginning.
10239         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10240         #  @param theFaces Sequence of global indices of faces of \a theShape.
10241         #  @param theName Object name; when specified, this parameter is used
10242         #         for result publication in the study. Otherwise, if automatic
10243         #         publication is switched on, default value is used for result name.
10244         #
10245         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10246         #
10247         #  @return New GEOM.GEOM_Object, containing the result shape.
10248         #
10249         #  @ref tui_chamfer "Example"
10250         @ManageTransactions("LocalOp")
10251         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10252             """
10253             Perform a chamfer on all edges of the specified faces,
10254             with distance D1 on the first specified face (if several for one edge)
10255
10256             Parameters:
10257                 theShape Shape, to perform chamfer on.
10258                 theD1 Chamfer size along face from  theFaces. If both faces,
10259                       connected to the edge, are in theFaces, theD1
10260                       will be get along face, which is nearer to theFaces beginning.
10261                 theD2 Chamfer size along another of two faces, connected to the edge.
10262                 theFaces Sequence of global indices of faces of theShape.
10263                 theName Object name; when specified, this parameter is used
10264                         for result publication in the study. Otherwise, if automatic
10265                         publication is switched on, default value is used for result name.
10266
10267             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10268
10269             Returns:
10270                 New GEOM.GEOM_Object, containing the result shape.
10271             """
10272             # Example: see GEOM_TestAll.py
10273             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10274             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10275             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10276             anObj.SetParameters(Parameters)
10277             self._autoPublish(anObj, theName, "chamfer")
10278             return anObj
10279
10280         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
10281         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10282         #
10283         #  @ref swig_FilletChamfer "Example"
10284         @ManageTransactions("LocalOp")
10285         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10286             """
10287             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
10288             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10289             """
10290             flag = False
10291             if isinstance(theAngle,str):
10292                 flag = True
10293             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10294             if flag:
10295                 theAngle = theAngle*math.pi/180.0
10296             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10297             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10298             anObj.SetParameters(Parameters)
10299             self._autoPublish(anObj, theName, "chamfer")
10300             return anObj
10301
10302         ## Perform a chamfer on edges,
10303         #  with distance D1 on the first specified face (if several for one edge)
10304         #  @param theShape Shape, to perform chamfer on.
10305         #  @param theD1,theD2 Chamfer size
10306         #  @param theEdges Sequence of edges of \a theShape.
10307         #  @param theName Object name; when specified, this parameter is used
10308         #         for result publication in the study. Otherwise, if automatic
10309         #         publication is switched on, default value is used for result name.
10310         #
10311         #  @return New GEOM.GEOM_Object, containing the result shape.
10312         #
10313         #  @ref swig_FilletChamfer "Example"
10314         @ManageTransactions("LocalOp")
10315         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10316             """
10317             Perform a chamfer on edges,
10318             with distance D1 on the first specified face (if several for one edge)
10319
10320             Parameters:
10321                 theShape Shape, to perform chamfer on.
10322                 theD1,theD2 Chamfer size
10323                 theEdges Sequence of edges of theShape.
10324                 theName Object name; when specified, this parameter is used
10325                         for result publication in the study. Otherwise, if automatic
10326                         publication is switched on, default value is used for result name.
10327
10328             Returns:
10329                 New GEOM.GEOM_Object, containing the result shape.
10330             """
10331             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10332             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10333             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10334             anObj.SetParameters(Parameters)
10335             self._autoPublish(anObj, theName, "chamfer")
10336             return anObj
10337
10338         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
10339         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10340         @ManageTransactions("LocalOp")
10341         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10342             """
10343             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
10344             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10345             """
10346             flag = False
10347             if isinstance(theAngle,str):
10348                 flag = True
10349             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10350             if flag:
10351                 theAngle = theAngle*math.pi/180.0
10352             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10353             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10354             anObj.SetParameters(Parameters)
10355             self._autoPublish(anObj, theName, "chamfer")
10356             return anObj
10357
10358         ## @sa MakeChamferEdge(), MakeChamferFaces()
10359         #
10360         #  @ref swig_MakeChamfer "Example"
10361         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10362             """
10363             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10364             """
10365             # Example: see GEOM_TestOthers.py
10366             anObj = None
10367             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10368             if aShapeType == self.ShapeType["EDGE"]:
10369                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10370             else:
10371                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10372             return anObj
10373
10374         ## Remove material from a solid by extrusion of the base shape on the given distance.
10375         #  @param theInit Shape to remove material from. It must be a solid or
10376         #  a compound made of a single solid.
10377         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10378         #  @param theH Prism dimension along the normal to theBase
10379         #  @param theAngle Draft angle in degrees.
10380         #  @param theInvert If true material changes the direction
10381         #  @param theName Object name; when specified, this parameter is used
10382         #         for result publication in the study. Otherwise, if automatic
10383         #         publication is switched on, default value is used for result name.
10384         #
10385         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10386         #
10387         #  @ref tui_creation_prism "Example"
10388         @ManageTransactions("PrimOp")
10389         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10390             """
10391             Add material to a solid by extrusion of the base shape on the given distance.
10392
10393             Parameters:
10394                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10395                 theBase Closed edge or wire defining the base shape to be extruded.
10396                 theH Prism dimension along the normal  to theBase
10397                 theAngle Draft angle in degrees.
10398                 theInvert If true material changes the direction.
10399                 theName Object name; when specified, this parameter is used
10400                         for result publication in the study. Otherwise, if automatic
10401                         publication is switched on, default value is used for result name.
10402
10403             Returns:
10404                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10405             """
10406             # Example: see GEOM_TestAll.py
10407             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10408             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10409             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10410             anObj.SetParameters(Parameters)
10411             self._autoPublish(anObj, theName, "extrudedCut")
10412             return anObj
10413
10414         ## Add material to a solid by extrusion of the base shape on the given distance.
10415         #  @param theInit Shape to add material to. It must be a solid or
10416         #  a compound made of a single solid.
10417         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10418         #  @param theH Prism dimension along the normal to theBase
10419         #  @param theAngle Draft angle in degrees.
10420         #  @param theInvert If true material changes the direction
10421         #  @param theName Object name; when specified, this parameter is used
10422         #         for result publication in the study. Otherwise, if automatic
10423         #         publication is switched on, default value is used for result name.
10424         #
10425         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10426         #
10427         #  @ref tui_creation_prism "Example"
10428         @ManageTransactions("PrimOp")
10429         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10430             """
10431             Add material to a solid by extrusion of the base shape on the given distance.
10432
10433             Parameters:
10434                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10435                 theBase Closed edge or wire defining the base shape to be extruded.
10436                 theH Prism dimension along the normal  to theBase
10437                 theAngle Draft angle in degrees.
10438                 theInvert If true material changes the direction.
10439                 theName Object name; when specified, this parameter is used
10440                         for result publication in the study. Otherwise, if automatic
10441                         publication is switched on, default value is used for result name.
10442
10443             Returns:
10444                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10445             """
10446             # Example: see GEOM_TestAll.py
10447             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10448             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10449             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10450             anObj.SetParameters(Parameters)
10451             self._autoPublish(anObj, theName, "extrudedBoss")
10452             return anObj
10453
10454         # end of l3_local
10455         ## @}
10456
10457         ## @addtogroup l3_basic_op
10458         ## @{
10459
10460         ## Perform an Archimde operation on the given shape with given parameters.
10461         #  The object presenting the resulting face is returned.
10462         #  @param theShape Shape to be put in water.
10463         #  @param theWeight Weight of the shape.
10464         #  @param theWaterDensity Density of the water.
10465         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10466         #  @param theName Object name; when specified, this parameter is used
10467         #         for result publication in the study. Otherwise, if automatic
10468         #         publication is switched on, default value is used for result name.
10469         #
10470         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10471         #          by a plane, corresponding to water level.
10472         #
10473         #  @ref tui_archimede "Example"
10474         @ManageTransactions("LocalOp")
10475         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10476             """
10477             Perform an Archimde operation on the given shape with given parameters.
10478             The object presenting the resulting face is returned.
10479
10480             Parameters:
10481                 theShape Shape to be put in water.
10482                 theWeight Weight of the shape.
10483                 theWaterDensity Density of the water.
10484                 theMeshDeflection Deflection of the mesh, using to compute the section.
10485                 theName Object name; when specified, this parameter is used
10486                         for result publication in the study. Otherwise, if automatic
10487                         publication is switched on, default value is used for result name.
10488
10489             Returns:
10490                 New GEOM.GEOM_Object, containing a section of theShape
10491                 by a plane, corresponding to water level.
10492             """
10493             # Example: see GEOM_TestAll.py
10494             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10495               theWeight,theWaterDensity,theMeshDeflection)
10496             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10497             RaiseIfFailed("MakeArchimede", self.LocalOp)
10498             anObj.SetParameters(Parameters)
10499             self._autoPublish(anObj, theName, "archimede")
10500             return anObj
10501
10502         # end of l3_basic_op
10503         ## @}
10504
10505         ## @addtogroup l2_measure
10506         ## @{
10507
10508         ## Get point coordinates
10509         #  @return [x, y, z]
10510         #
10511         #  @ref tui_point_coordinates_page "Example"
10512         @ManageTransactions("MeasuOp")
10513         def PointCoordinates(self,Point):
10514             """
10515             Get point coordinates
10516
10517             Returns:
10518                 [x, y, z]
10519             """
10520             # Example: see GEOM_TestMeasures.py
10521             aTuple = self.MeasuOp.PointCoordinates(Point)
10522             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10523             return aTuple
10524
10525         ## Get vector coordinates
10526         #  @return [x, y, z]
10527         #
10528         #  @ref tui_measurement_tools_page "Example"
10529         def VectorCoordinates(self,Vector):
10530             """
10531             Get vector coordinates
10532
10533             Returns:
10534                 [x, y, z]
10535             """
10536
10537             p1=self.GetFirstVertex(Vector)
10538             p2=self.GetLastVertex(Vector)
10539
10540             X1=self.PointCoordinates(p1)
10541             X2=self.PointCoordinates(p2)
10542
10543             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10544
10545
10546         ## Compute cross product
10547         #  @return vector w=u^v
10548         #
10549         #  @ref tui_measurement_tools_page "Example"
10550         def CrossProduct(self, Vector1, Vector2):
10551             """
10552             Compute cross product
10553
10554             Returns: vector w=u^v
10555             """
10556             u=self.VectorCoordinates(Vector1)
10557             v=self.VectorCoordinates(Vector2)
10558             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])
10559
10560             return w
10561
10562         ## Compute cross product
10563         #  @return dot product  p=u.v
10564         #
10565         #  @ref tui_measurement_tools_page "Example"
10566         def DotProduct(self, Vector1, Vector2):
10567             """
10568             Compute cross product
10569
10570             Returns: dot product  p=u.v
10571             """
10572             u=self.VectorCoordinates(Vector1)
10573             v=self.VectorCoordinates(Vector2)
10574             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10575
10576             return p
10577
10578
10579         ## Get summarized length of all wires,
10580         #  area of surface and volume of the given shape.
10581         #  @param theShape Shape to define properties of.
10582         #  @param theTolerance maximal relative error of area
10583         #         and volume computation.
10584         #  @return [theLength, theSurfArea, theVolume]\n
10585         #  theLength:   Summarized length of all wires of the given shape.\n
10586         #  theSurfArea: Area of surface of the given shape.\n
10587         #  theVolume:   Volume of the given shape.
10588         #
10589         #  @ref tui_basic_properties_page "Example"
10590         @ManageTransactions("MeasuOp")
10591         def BasicProperties(self,theShape, theTolerance=1.e-6):
10592             """
10593             Get summarized length of all wires,
10594             area of surface and volume of the given shape.
10595
10596             Parameters:
10597                 theShape Shape to define properties of.
10598                 theTolerance maximal relative error of area
10599                              and volume computation.
10600
10601             Returns:
10602                 [theLength, theSurfArea, theVolume]
10603                  theLength:   Summarized length of all wires of the given shape.
10604                  theSurfArea: Area of surface of the given shape.
10605                  theVolume:   Volume of the given shape.
10606             """
10607             # Example: see GEOM_TestMeasures.py
10608             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10609             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10610             return aTuple
10611
10612         ## Get parameters of bounding box of the given shape
10613         #  @param theShape Shape to obtain bounding box of.
10614         #  @param precise TRUE for precise computation; FALSE for fast one.
10615         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10616         #  Xmin,Xmax: Limits of shape along OX axis.
10617         #  Ymin,Ymax: Limits of shape along OY axis.
10618         #  Zmin,Zmax: Limits of shape along OZ axis.
10619         #
10620         #  @ref tui_bounding_box_page "Example"
10621         @ManageTransactions("MeasuOp")
10622         def BoundingBox (self, theShape, precise=False):
10623             """
10624             Get parameters of bounding box of the given shape
10625
10626             Parameters:
10627                 theShape Shape to obtain bounding box of.
10628                 precise TRUE for precise computation; FALSE for fast one.
10629
10630             Returns:
10631                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10632                  Xmin,Xmax: Limits of shape along OX axis.
10633                  Ymin,Ymax: Limits of shape along OY axis.
10634                  Zmin,Zmax: Limits of shape along OZ axis.
10635             """
10636             # Example: see GEOM_TestMeasures.py
10637             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10638             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10639             return aTuple
10640
10641         ## Get bounding box of the given shape
10642         #  @param theShape Shape to obtain bounding box of.
10643         #  @param precise TRUE for precise computation; FALSE for fast one.
10644         #  @param theName Object name; when specified, this parameter is used
10645         #         for result publication in the study. Otherwise, if automatic
10646         #         publication is switched on, default value is used for result name.
10647         #
10648         #  @return New GEOM.GEOM_Object, containing the created box.
10649         #
10650         #  @ref tui_bounding_box_page "Example"
10651         @ManageTransactions("MeasuOp")
10652         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10653             """
10654             Get bounding box of the given shape
10655
10656             Parameters:
10657                 theShape Shape to obtain bounding box of.
10658                 precise TRUE for precise computation; FALSE for fast one.
10659                 theName Object name; when specified, this parameter is used
10660                         for result publication in the study. Otherwise, if automatic
10661                         publication is switched on, default value is used for result name.
10662
10663             Returns:
10664                 New GEOM.GEOM_Object, containing the created box.
10665             """
10666             # Example: see GEOM_TestMeasures.py
10667             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10668             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10669             self._autoPublish(anObj, theName, "bndbox")
10670             return anObj
10671
10672         ## Get inertia matrix and moments of inertia of theShape.
10673         #  @param theShape Shape to calculate inertia of.
10674         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10675         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10676         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10677         #
10678         #  @ref tui_inertia_page "Example"
10679         @ManageTransactions("MeasuOp")
10680         def Inertia(self,theShape):
10681             """
10682             Get inertia matrix and moments of inertia of theShape.
10683
10684             Parameters:
10685                 theShape Shape to calculate inertia of.
10686
10687             Returns:
10688                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10689                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10690                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10691             """
10692             # Example: see GEOM_TestMeasures.py
10693             aTuple = self.MeasuOp.GetInertia(theShape)
10694             RaiseIfFailed("GetInertia", self.MeasuOp)
10695             return aTuple
10696
10697         ## Get if coords are included in the shape (ST_IN or ST_ON)
10698         #  @param theShape Shape
10699         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10700         #  @param tolerance to be used (default is 1.0e-7)
10701         #  @return list_of_boolean = [res1, res2, ...]
10702         @ManageTransactions("MeasuOp")
10703         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10704             """
10705             Get if coords are included in the shape (ST_IN or ST_ON)
10706
10707             Parameters:
10708                 theShape Shape
10709                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10710                 tolerance to be used (default is 1.0e-7)
10711
10712             Returns:
10713                 list_of_boolean = [res1, res2, ...]
10714             """
10715             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10716
10717         ## Get minimal distance between the given shapes.
10718         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10719         #  @return Value of the minimal distance between the given shapes.
10720         #
10721         #  @ref tui_min_distance_page "Example"
10722         @ManageTransactions("MeasuOp")
10723         def MinDistance(self, theShape1, theShape2):
10724             """
10725             Get minimal distance between the given shapes.
10726
10727             Parameters:
10728                 theShape1,theShape2 Shapes to find minimal distance between.
10729
10730             Returns:
10731                 Value of the minimal distance between the given shapes.
10732             """
10733             # Example: see GEOM_TestMeasures.py
10734             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10735             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10736             return aTuple[0]
10737
10738         ## Get minimal distance between the given shapes.
10739         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10740         #  @return Value of the minimal distance between the given shapes, in form of list
10741         #          [Distance, DX, DY, DZ].
10742         #
10743         #  @ref tui_min_distance_page "Example"
10744         @ManageTransactions("MeasuOp")
10745         def MinDistanceComponents(self, theShape1, theShape2):
10746             """
10747             Get minimal distance between the given shapes.
10748
10749             Parameters:
10750                 theShape1,theShape2 Shapes to find minimal distance between.
10751
10752             Returns:
10753                 Value of the minimal distance between the given shapes, in form of list
10754                 [Distance, DX, DY, DZ]
10755             """
10756             # Example: see GEOM_TestMeasures.py
10757             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10758             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10759             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10760             return aRes
10761
10762         ## Get closest points of the given shapes.
10763         #  @param theShape1,theShape2 Shapes to find closest points of.
10764         #  @return The number of found solutions (-1 in case of infinite number of
10765         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10766         #
10767         #  @ref tui_min_distance_page "Example"
10768         @ManageTransactions("MeasuOp")
10769         def ClosestPoints (self, theShape1, theShape2):
10770             """
10771             Get closest points of the given shapes.
10772
10773             Parameters:
10774                 theShape1,theShape2 Shapes to find closest points of.
10775
10776             Returns:
10777                 The number of found solutions (-1 in case of infinite number of
10778                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10779             """
10780             # Example: see GEOM_TestMeasures.py
10781             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10782             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10783             return aTuple
10784
10785         ## Get angle between the given shapes in degrees.
10786         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10787         #  @note If both arguments are vectors, the angle is computed in accordance
10788         #        with their orientations, otherwise the minimum angle is computed.
10789         #  @return Value of the angle between the given shapes in degrees.
10790         #
10791         #  @ref tui_angle_page "Example"
10792         @ManageTransactions("MeasuOp")
10793         def GetAngle(self, theShape1, theShape2):
10794             """
10795             Get angle between the given shapes in degrees.
10796
10797             Parameters:
10798                 theShape1,theShape2 Lines or linear edges to find angle between.
10799
10800             Note:
10801                 If both arguments are vectors, the angle is computed in accordance
10802                 with their orientations, otherwise the minimum angle is computed.
10803
10804             Returns:
10805                 Value of the angle between the given shapes in degrees.
10806             """
10807             # Example: see GEOM_TestMeasures.py
10808             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10809             RaiseIfFailed("GetAngle", self.MeasuOp)
10810             return anAngle
10811
10812         ## Get angle between the given shapes in radians.
10813         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10814         #  @note If both arguments are vectors, the angle is computed in accordance
10815         #        with their orientations, otherwise the minimum angle is computed.
10816         #  @return Value of the angle between the given shapes in radians.
10817         #
10818         #  @ref tui_angle_page "Example"
10819         @ManageTransactions("MeasuOp")
10820         def GetAngleRadians(self, theShape1, theShape2):
10821             """
10822             Get angle between the given shapes in radians.
10823
10824             Parameters:
10825                 theShape1,theShape2 Lines or linear edges to find angle between.
10826
10827
10828             Note:
10829                 If both arguments are vectors, the angle is computed in accordance
10830                 with their orientations, otherwise the minimum angle is computed.
10831
10832             Returns:
10833                 Value of the angle between the given shapes in radians.
10834             """
10835             # Example: see GEOM_TestMeasures.py
10836             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10837             RaiseIfFailed("GetAngle", self.MeasuOp)
10838             return anAngle
10839
10840         ## Get angle between the given vectors in degrees.
10841         #  @param theShape1,theShape2 Vectors to find angle between.
10842         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10843         #                 if False, the opposite vector to the normal vector is used.
10844         #  @return Value of the angle between the given vectors in degrees.
10845         #
10846         #  @ref tui_angle_page "Example"
10847         @ManageTransactions("MeasuOp")
10848         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10849             """
10850             Get angle between the given vectors in degrees.
10851
10852             Parameters:
10853                 theShape1,theShape2 Vectors to find angle between.
10854                 theFlag If True, the normal vector is defined by the two vectors cross,
10855                         if False, the opposite vector to the normal vector is used.
10856
10857             Returns:
10858                 Value of the angle between the given vectors in degrees.
10859             """
10860             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10861             if not theFlag:
10862                 anAngle = 360. - anAngle
10863             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10864             return anAngle
10865
10866         ## The same as GetAngleVectors, but the result is in radians.
10867         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10868             """
10869             Get angle between the given vectors in radians.
10870
10871             Parameters:
10872                 theShape1,theShape2 Vectors to find angle between.
10873                 theFlag If True, the normal vector is defined by the two vectors cross,
10874                         if False, the opposite vector to the normal vector is used.
10875
10876             Returns:
10877                 Value of the angle between the given vectors in radians.
10878             """
10879             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10880             return anAngle
10881
10882         ## @name Curve Curvature Measurement
10883         #  Methods for receiving radius of curvature of curves
10884         #  in the given point
10885         ## @{
10886
10887         ## Measure curvature of a curve at a point, set by parameter.
10888         #  @param theCurve a curve.
10889         #  @param theParam parameter.
10890         #  @return radius of curvature of \a theCurve.
10891         #
10892         #  @ref swig_todo "Example"
10893         @ManageTransactions("MeasuOp")
10894         def CurveCurvatureByParam(self, theCurve, theParam):
10895             """
10896             Measure curvature of a curve at a point, set by parameter.
10897
10898             Parameters:
10899                 theCurve a curve.
10900                 theParam parameter.
10901
10902             Returns:
10903                 radius of curvature of theCurve.
10904             """
10905             # Example: see GEOM_TestMeasures.py
10906             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10907             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10908             return aCurv
10909
10910         ## Measure curvature of a curve at a point.
10911         #  @param theCurve a curve.
10912         #  @param thePoint given point.
10913         #  @return radius of curvature of \a theCurve.
10914         #
10915         #  @ref swig_todo "Example"
10916         @ManageTransactions("MeasuOp")
10917         def CurveCurvatureByPoint(self, theCurve, thePoint):
10918             """
10919             Measure curvature of a curve at a point.
10920
10921             Parameters:
10922                 theCurve a curve.
10923                 thePoint given point.
10924
10925             Returns:
10926                 radius of curvature of theCurve.
10927             """
10928             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10929             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10930             return aCurv
10931         ## @}
10932
10933         ## @name Surface Curvature Measurement
10934         #  Methods for receiving max and min radius of curvature of surfaces
10935         #  in the given point
10936         ## @{
10937
10938         ## Measure max radius of curvature of surface.
10939         #  @param theSurf the given surface.
10940         #  @param theUParam Value of U-parameter on the referenced surface.
10941         #  @param theVParam Value of V-parameter on the referenced surface.
10942         #  @return max radius of curvature of theSurf.
10943         #
10944         ## @ref swig_todo "Example"
10945         @ManageTransactions("MeasuOp")
10946         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10947             """
10948             Measure max radius of curvature of surface.
10949
10950             Parameters:
10951                 theSurf the given surface.
10952                 theUParam Value of U-parameter on the referenced surface.
10953                 theVParam Value of V-parameter on the referenced surface.
10954
10955             Returns:
10956                 max radius of curvature of theSurf.
10957             """
10958             # Example: see GEOM_TestMeasures.py
10959             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10960             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10961             return aSurf
10962
10963         ## Measure max radius of curvature of surface in the given point
10964         #  @param theSurf the given surface.
10965         #  @param thePoint given point.
10966         #  @return max radius of curvature of theSurf.
10967         #
10968         ## @ref swig_todo "Example"
10969         @ManageTransactions("MeasuOp")
10970         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10971             """
10972             Measure max radius of curvature of surface in the given point.
10973
10974             Parameters:
10975                 theSurf the given surface.
10976                 thePoint given point.
10977
10978             Returns:
10979                 max radius of curvature of theSurf.
10980             """
10981             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10982             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10983             return aSurf
10984
10985         ## Measure min radius of curvature of surface.
10986         #  @param theSurf the given surface.
10987         #  @param theUParam Value of U-parameter on the referenced surface.
10988         #  @param theVParam Value of V-parameter on the referenced surface.
10989         #  @return min radius of curvature of theSurf.
10990         #
10991         ## @ref swig_todo "Example"
10992         @ManageTransactions("MeasuOp")
10993         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10994             """
10995             Measure min radius of curvature of surface.
10996
10997             Parameters:
10998                 theSurf the given surface.
10999                 theUParam Value of U-parameter on the referenced surface.
11000                 theVParam Value of V-parameter on the referenced surface.
11001
11002             Returns:
11003                 Min radius of curvature of theSurf.
11004             """
11005             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11006             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11007             return aSurf
11008
11009         ## Measure min radius of curvature of surface in the given point
11010         #  @param theSurf the given surface.
11011         #  @param thePoint given point.
11012         #  @return min radius of curvature of theSurf.
11013         #
11014         ## @ref swig_todo "Example"
11015         @ManageTransactions("MeasuOp")
11016         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11017             """
11018             Measure min radius of curvature of surface in the given point.
11019
11020             Parameters:
11021                 theSurf the given surface.
11022                 thePoint given point.
11023
11024             Returns:
11025                 Min radius of curvature of theSurf.
11026             """
11027             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11028             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11029             return aSurf
11030         ## @}
11031
11032         ## Get min and max tolerances of sub-shapes of theShape
11033         #  @param theShape Shape, to get tolerances of.
11034         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11035         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11036         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11037         #  VertMin,VertMax: Min and max tolerances of the vertices.
11038         #
11039         #  @ref tui_tolerance_page "Example"
11040         @ManageTransactions("MeasuOp")
11041         def Tolerance(self,theShape):
11042             """
11043             Get min and max tolerances of sub-shapes of theShape
11044
11045             Parameters:
11046                 theShape Shape, to get tolerances of.
11047
11048             Returns:
11049                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11050                  FaceMin,FaceMax: Min and max tolerances of the faces.
11051                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11052                  VertMin,VertMax: Min and max tolerances of the vertices.
11053             """
11054             # Example: see GEOM_TestMeasures.py
11055             aTuple = self.MeasuOp.GetTolerance(theShape)
11056             RaiseIfFailed("GetTolerance", self.MeasuOp)
11057             return aTuple
11058
11059         ## Obtain description of the given shape (number of sub-shapes of each type)
11060         #  @param theShape Shape to be described.
11061         #  @return Description of the given shape.
11062         #
11063         #  @ref tui_whatis_page "Example"
11064         @ManageTransactions("MeasuOp")
11065         def WhatIs(self,theShape):
11066             """
11067             Obtain description of the given shape (number of sub-shapes of each type)
11068
11069             Parameters:
11070                 theShape Shape to be described.
11071
11072             Returns:
11073                 Description of the given shape.
11074             """
11075             # Example: see GEOM_TestMeasures.py
11076             aDescr = self.MeasuOp.WhatIs(theShape)
11077             RaiseIfFailed("WhatIs", self.MeasuOp)
11078             return aDescr
11079
11080         ## Obtain quantity of shapes of the given type in \a theShape.
11081         #  If \a theShape is of type \a theType, it is also counted.
11082         #  @param theShape Shape to be described.
11083         #  @param theType the given ShapeType().
11084         #  @return Quantity of shapes of type \a theType in \a theShape.
11085         #
11086         #  @ref tui_measurement_tools_page "Example"
11087         def NbShapes (self, theShape, theType):
11088             """
11089             Obtain quantity of shapes of the given type in theShape.
11090             If theShape is of type theType, it is also counted.
11091
11092             Parameters:
11093                 theShape Shape to be described.
11094                 theType the given geompy.ShapeType
11095
11096             Returns:
11097                 Quantity of shapes of type theType in theShape.
11098             """
11099             # Example: see GEOM_TestMeasures.py
11100             listSh = self.SubShapeAllIDs(theShape, theType)
11101             Nb = len(listSh)
11102             return Nb
11103
11104         ## Obtain quantity of shapes of each type in \a theShape.
11105         #  The \a theShape is also counted.
11106         #  @param theShape Shape to be described.
11107         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11108         #
11109         #  @ref tui_measurement_tools_page "Example"
11110         def ShapeInfo (self, theShape):
11111             """
11112             Obtain quantity of shapes of each type in theShape.
11113             The theShape is also counted.
11114
11115             Parameters:
11116                 theShape Shape to be described.
11117
11118             Returns:
11119                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11120             """
11121             # Example: see GEOM_TestMeasures.py
11122             aDict = {}
11123             for typeSh in self.ShapeType:
11124                 if typeSh in ( "AUTO", "SHAPE" ): continue
11125                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11126                 Nb = len(listSh)
11127                 aDict[typeSh] = Nb
11128                 pass
11129             return aDict
11130
11131         def GetCreationInformation(self, theShape):
11132             res = ''
11133             infos = theShape.GetCreationInformation()
11134             for info in infos:
11135                 # operationName
11136                 opName = info.operationName
11137                 if not opName: opName = "no info available"
11138                 if res: res += "\n"
11139                 res += "Operation: " + opName
11140                 # parameters
11141                 for parVal in info.params:
11142                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11143             return res
11144
11145         ## Get a point, situated at the centre of mass of theShape.
11146         #  @param theShape Shape to define centre of mass of.
11147         #  @param theName Object name; when specified, this parameter is used
11148         #         for result publication in the study. Otherwise, if automatic
11149         #         publication is switched on, default value is used for result name.
11150         #
11151         #  @return New GEOM.GEOM_Object, containing the created point.
11152         #
11153         #  @ref tui_center_of_mass_page "Example"
11154         @ManageTransactions("MeasuOp")
11155         def MakeCDG(self, theShape, theName=None):
11156             """
11157             Get a point, situated at the centre of mass of theShape.
11158
11159             Parameters:
11160                 theShape Shape to define centre of mass of.
11161                 theName Object name; when specified, this parameter is used
11162                         for result publication in the study. Otherwise, if automatic
11163                         publication is switched on, default value is used for result name.
11164
11165             Returns:
11166                 New GEOM.GEOM_Object, containing the created point.
11167             """
11168             # Example: see GEOM_TestMeasures.py
11169             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11170             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11171             self._autoPublish(anObj, theName, "centerOfMass")
11172             return anObj
11173
11174         ## Get a vertex sub-shape by index depended with orientation.
11175         #  @param theShape Shape to find sub-shape.
11176         #  @param theIndex Index to find vertex by this index (starting from zero)
11177         #  @param theName Object name; when specified, this parameter is used
11178         #         for result publication in the study. Otherwise, if automatic
11179         #         publication is switched on, default value is used for result name.
11180         #
11181         #  @return New GEOM.GEOM_Object, containing the created vertex.
11182         #
11183         #  @ref tui_measurement_tools_page "Example"
11184         @ManageTransactions("MeasuOp")
11185         def GetVertexByIndex(self, theShape, theIndex, theName=None):
11186             """
11187             Get a vertex sub-shape by index depended with orientation.
11188
11189             Parameters:
11190                 theShape Shape to find sub-shape.
11191                 theIndex Index to find vertex by this index (starting from zero)
11192                 theName Object name; when specified, this parameter is used
11193                         for result publication in the study. Otherwise, if automatic
11194                         publication is switched on, default value is used for result name.
11195
11196             Returns:
11197                 New GEOM.GEOM_Object, containing the created vertex.
11198             """
11199             # Example: see GEOM_TestMeasures.py
11200             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
11201             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11202             self._autoPublish(anObj, theName, "vertex")
11203             return anObj
11204
11205         ## Get the first vertex of wire/edge depended orientation.
11206         #  @param theShape Shape to find first vertex.
11207         #  @param theName Object name; when specified, this parameter is used
11208         #         for result publication in the study. Otherwise, if automatic
11209         #         publication is switched on, default value is used for result name.
11210         #
11211         #  @return New GEOM.GEOM_Object, containing the created vertex.
11212         #
11213         #  @ref tui_measurement_tools_page "Example"
11214         def GetFirstVertex(self, theShape, theName=None):
11215             """
11216             Get the first vertex of wire/edge depended orientation.
11217
11218             Parameters:
11219                 theShape Shape to find first vertex.
11220                 theName Object name; when specified, this parameter is used
11221                         for result publication in the study. Otherwise, if automatic
11222                         publication is switched on, default value is used for result name.
11223
11224             Returns:
11225                 New GEOM.GEOM_Object, containing the created vertex.
11226             """
11227             # Example: see GEOM_TestMeasures.py
11228             # note: auto-publishing is done in self.GetVertexByIndex()
11229             return self.GetVertexByIndex(theShape, 0, theName)
11230
11231         ## Get the last vertex of wire/edge depended orientation.
11232         #  @param theShape Shape to find last vertex.
11233         #  @param theName Object name; when specified, this parameter is used
11234         #         for result publication in the study. Otherwise, if automatic
11235         #         publication is switched on, default value is used for result name.
11236         #
11237         #  @return New GEOM.GEOM_Object, containing the created vertex.
11238         #
11239         #  @ref tui_measurement_tools_page "Example"
11240         def GetLastVertex(self, theShape, theName=None):
11241             """
11242             Get the last vertex of wire/edge depended orientation.
11243
11244             Parameters:
11245                 theShape Shape to find last vertex.
11246                 theName Object name; when specified, this parameter is used
11247                         for result publication in the study. Otherwise, if automatic
11248                         publication is switched on, default value is used for result name.
11249
11250             Returns:
11251                 New GEOM.GEOM_Object, containing the created vertex.
11252             """
11253             # Example: see GEOM_TestMeasures.py
11254             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11255             # note: auto-publishing is done in self.GetVertexByIndex()
11256             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
11257
11258         ## Get a normale to the given face. If the point is not given,
11259         #  the normale is calculated at the center of mass.
11260         #  @param theFace Face to define normale of.
11261         #  @param theOptionalPoint Point to compute the normale at.
11262         #  @param theName Object name; when specified, this parameter is used
11263         #         for result publication in the study. Otherwise, if automatic
11264         #         publication is switched on, default value is used for result name.
11265         #
11266         #  @return New GEOM.GEOM_Object, containing the created vector.
11267         #
11268         #  @ref swig_todo "Example"
11269         @ManageTransactions("MeasuOp")
11270         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11271             """
11272             Get a normale to the given face. If the point is not given,
11273             the normale is calculated at the center of mass.
11274
11275             Parameters:
11276                 theFace Face to define normale of.
11277                 theOptionalPoint Point to compute the normale at.
11278                 theName Object name; when specified, this parameter is used
11279                         for result publication in the study. Otherwise, if automatic
11280                         publication is switched on, default value is used for result name.
11281
11282             Returns:
11283                 New GEOM.GEOM_Object, containing the created vector.
11284             """
11285             # Example: see GEOM_TestMeasures.py
11286             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11287             RaiseIfFailed("GetNormal", self.MeasuOp)
11288             self._autoPublish(anObj, theName, "normal")
11289             return anObj
11290
11291         ## Print shape errors obtained from CheckShape.
11292         #  @param theShape Shape that was checked.
11293         #  @param theShapeErrors the shape errors obtained by CheckShape.
11294         #  @param theReturnStatus If 0 the description of problem is printed.
11295         #                         If 1 the description of problem is returned.
11296         #  @return If theReturnStatus is equal to 1 the description is returned.
11297         #          Otherwise doesn't return anything.
11298         #
11299         #  @ref tui_check_shape_page "Example"
11300         @ManageTransactions("MeasuOp")
11301         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11302             """
11303             Print shape errors obtained from CheckShape.
11304
11305             Parameters:
11306                 theShape Shape that was checked.
11307                 theShapeErrors the shape errors obtained by CheckShape.
11308                 theReturnStatus If 0 the description of problem is printed.
11309                                 If 1 the description of problem is returned.
11310
11311             Returns:
11312                 If theReturnStatus is equal to 1 the description is returned.
11313                   Otherwise doesn't return anything.
11314             """
11315             # Example: see GEOM_TestMeasures.py
11316             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11317             if theReturnStatus == 1:
11318                 return Descr
11319             print Descr
11320             pass
11321
11322         ## Check a topology of the given shape.
11323         #  @param theShape Shape to check validity of.
11324         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11325         #                        if TRUE, the shape's geometry will be checked also.
11326         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11327         #                         of problem is printed.
11328         #                         If 1 isValid flag and the description of
11329         #                         problem is returned.
11330         #                         If 2 isValid flag and the list of error data
11331         #                         is returned.
11332         #  @return TRUE, if the shape "seems to be valid".
11333         #          If theShape is invalid, prints a description of problem.
11334         #          If theReturnStatus is equal to 1 the description is returned
11335         #          along with IsValid flag.
11336         #          If theReturnStatus is equal to 2 the list of error data is
11337         #          returned along with IsValid flag.
11338         #
11339         #  @ref tui_check_shape_page "Example"
11340         @ManageTransactions("MeasuOp")
11341         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11342             """
11343             Check a topology of the given shape.
11344
11345             Parameters:
11346                 theShape Shape to check validity of.
11347                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11348                                if TRUE, the shape's geometry will be checked also.
11349                 theReturnStatus If 0 and if theShape is invalid, a description
11350                                 of problem is printed.
11351                                 If 1 IsValid flag and the description of
11352                                 problem is returned.
11353                                 If 2 IsValid flag and the list of error data
11354                                 is returned.
11355
11356             Returns:
11357                 TRUE, if the shape "seems to be valid".
11358                 If theShape is invalid, prints a description of problem.
11359                 If theReturnStatus is equal to 1 the description is returned
11360                 along with IsValid flag.
11361                 If theReturnStatus is equal to 2 the list of error data is
11362                 returned along with IsValid flag.
11363             """
11364             # Example: see GEOM_TestMeasures.py
11365             if theIsCheckGeom:
11366                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11367                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11368             else:
11369                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11370                 RaiseIfFailed("CheckShape", self.MeasuOp)
11371             if IsValid == 0:
11372                 if theReturnStatus == 0:
11373                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11374                     print Descr
11375             if theReturnStatus == 1:
11376               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11377               return (IsValid, Descr)
11378             elif theReturnStatus == 2:
11379               return (IsValid, ShapeErrors)
11380             return IsValid
11381
11382         ## Detect self-intersections in the given shape.
11383         #  @param theShape Shape to check.
11384         #  @param theCheckLevel is the level of self-intersection check.
11385         #         Possible input values are:
11386         #         - GEOM.SI_V_V(0) - only V/V interferences
11387         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11388         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11389         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11390         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11391         #         - GEOM.SI_ALL(5) - all interferences.
11392         #  @return TRUE, if the shape contains no self-intersections.
11393         #
11394         #  @ref tui_check_self_intersections_page "Example"
11395         @ManageTransactions("MeasuOp")
11396         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11397             """
11398             Detect self-intersections in the given shape.
11399
11400             Parameters:
11401                 theShape Shape to check.
11402                 theCheckLevel is the level of self-intersection check.
11403                   Possible input values are:
11404                    - GEOM.SI_V_V(0) - only V/V interferences
11405                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11406                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11407                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11408                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11409                    - GEOM.SI_ALL(5) - all interferences.
11410  
11411             Returns:
11412                 TRUE, if the shape contains no self-intersections.
11413             """
11414             # Example: see GEOM_TestMeasures.py
11415             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11416             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11417             return IsValid
11418
11419         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11420         #  @param theShape Shape to check.
11421         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
11422         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11423         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11424         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11425         #         - if \a theTolerance > 0, algorithm detects gaps
11426         #  @return TRUE, if the shape contains no self-intersections.
11427         #
11428         #  @ref tui_check_self_intersections_fast_page "Example"
11429         @ManageTransactions("MeasuOp")
11430         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11431             """
11432             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11433
11434             Parameters:
11435                 theShape Shape to check.
11436                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11437                     - if theDeflection <= 0, default deflection 0.001 is used
11438                 theTolerance Specifies a distance between shapes used for detecting gaps:
11439                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11440                     - if theTolerance > 0, algorithm detects gaps
11441  
11442             Returns:
11443                 TRUE, if the shape contains no self-intersections.
11444             """
11445             # Example: see GEOM_TestMeasures.py
11446             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11447             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11448             return IsValid
11449
11450         ## Check boolean and partition operations agruments.
11451         #  @param theShape the agrument of an operation to be checked
11452         #  @return TRUE if the agrument is valid for a boolean or partition
11453         #          operation; FALSE otherwise.
11454         @ManageTransactions("MeasuOp")
11455         def CheckBOPArguments(self, theShape):
11456             """
11457             Check boolean and partition operations agruments.
11458
11459             Parameters:
11460                 theShape the agrument of an operation to be checked
11461
11462             Returns:
11463                 TRUE if the agrument is valid for a boolean or partition
11464                 operation; FALSE otherwise.
11465             """
11466             return self.MeasuOp.CheckBOPArguments(theShape)
11467
11468         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11469         #  @param theShape1 First source object
11470         #  @param theShape2 Second source object
11471         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11472         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11473         #         - if \a theTolerance > 0, algorithm detects gaps
11474         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
11475         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11476         #  @return TRUE, if there are intersections (gaps) between source shapes
11477         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11478         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11479         #
11480         #  @ref tui_fast_intersection_page "Example"
11481         @ManageTransactions("MeasuOp")
11482         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11483             """
11484             Detect intersections of the given shapes with algorithm based on mesh intersections.
11485
11486             Parameters:
11487                 theShape1 First source object
11488                 theShape2 Second source object
11489                 theTolerance Specifies a distance between shapes used for detecting gaps:
11490                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11491                     - if theTolerance > 0, algorithm detects gaps
11492                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11493                     - if theDeflection <= 0, default deflection 0.001 is used
11494  
11495             Returns:
11496                 TRUE, if there are intersections (gaps) between source shapes
11497                 List of sub-shapes IDs from 1st shape that localize intersection.
11498                 List of sub-shapes IDs from 2nd shape that localize intersection.
11499             """
11500             # Example: see GEOM_TestMeasures.py
11501             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11502             RaiseIfFailed("FastIntersect", self.MeasuOp)
11503             return IsOk, Res1, Res2
11504
11505         ## Get position (LCS) of theShape.
11506         #
11507         #  Origin of the LCS is situated at the shape's center of mass.
11508         #  Axes of the LCS are obtained from shape's location or,
11509         #  if the shape is a planar face, from position of its plane.
11510         #
11511         #  @param theShape Shape to calculate position of.
11512         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11513         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11514         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11515         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11516         #
11517         #  @ref swig_todo "Example"
11518         @ManageTransactions("MeasuOp")
11519         def GetPosition(self,theShape):
11520             """
11521             Get position (LCS) of theShape.
11522             Origin of the LCS is situated at the shape's center of mass.
11523             Axes of the LCS are obtained from shape's location or,
11524             if the shape is a planar face, from position of its plane.
11525
11526             Parameters:
11527                 theShape Shape to calculate position of.
11528
11529             Returns:
11530                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11531                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11532                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11533                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11534             """
11535             # Example: see GEOM_TestMeasures.py
11536             aTuple = self.MeasuOp.GetPosition(theShape)
11537             RaiseIfFailed("GetPosition", self.MeasuOp)
11538             return aTuple
11539
11540         ## Get kind of theShape.
11541         #
11542         #  @param theShape Shape to get a kind of.
11543         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11544         #          and a list of parameters, describing the shape.
11545         #  @note  Concrete meaning of each value, returned via \a theIntegers
11546         #         or \a theDoubles list depends on the kind() of the shape.
11547         #
11548         #  @ref swig_todo "Example"
11549         @ManageTransactions("MeasuOp")
11550         def KindOfShape(self,theShape):
11551             """
11552             Get kind of theShape.
11553
11554             Parameters:
11555                 theShape Shape to get a kind of.
11556
11557             Returns:
11558                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11559                     and a list of parameters, describing the shape.
11560             Note:
11561                 Concrete meaning of each value, returned via theIntegers
11562                 or theDoubles list depends on the geompy.kind of the shape
11563             """
11564             # Example: see GEOM_TestMeasures.py
11565             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11566             RaiseIfFailed("KindOfShape", self.MeasuOp)
11567
11568             aKind  = aRoughTuple[0]
11569             anInts = aRoughTuple[1]
11570             aDbls  = aRoughTuple[2]
11571
11572             # Now there is no exception from this rule:
11573             aKindTuple = [aKind] + aDbls + anInts
11574
11575             # If they are we will regroup parameters for such kind of shape.
11576             # For example:
11577             #if aKind == kind.SOME_KIND:
11578             #    #  SOME_KIND     int int double int double double
11579             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11580
11581             return aKindTuple
11582
11583         ## Returns the string that describes if the shell is good for solid.
11584         #  This is a support method for MakeSolid.
11585         #
11586         #  @param theShell the shell to be checked.
11587         #  @return Returns a string that describes the shell validity for
11588         #          solid construction.
11589         @ManageTransactions("MeasuOp")
11590         def _IsGoodForSolid(self, theShell):
11591             """
11592             Returns the string that describes if the shell is good for solid.
11593             This is a support method for MakeSolid.
11594
11595             Parameter:
11596                 theShell the shell to be checked.
11597
11598             Returns:
11599                 Returns a string that describes the shell validity for
11600                 solid construction.
11601             """
11602             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11603             return aDescr
11604
11605         # end of l2_measure
11606         ## @}
11607
11608         ## @addtogroup l2_import_export
11609         ## @{
11610
11611         ## Import a shape from the BREP, IGES, STEP or other file
11612         #  (depends on given format) with given name.
11613         #
11614         #  Note: this function is deprecated, it is kept for backward compatibility only
11615         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11616         #
11617         #  @param theFileName The file, containing the shape.
11618         #  @param theFormatName Specify format for the file reading.
11619         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11620         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11621         #            format 'STEP_SCALE' is used instead of 'STEP',
11622         #            length unit will be set to 'meter' and result model will be scaled.
11623         #  @param theName Object name; when specified, this parameter is used
11624         #         for result publication in the study. Otherwise, if automatic
11625         #         publication is switched on, default value is used for result name.
11626         #
11627         #  @return New GEOM.GEOM_Object, containing the imported shape.
11628         #          If material names are imported it returns the list of
11629         #          objects. The first one is the imported object followed by
11630         #          material groups.
11631         #  @note Auto publishing is allowed for the shape itself. Imported
11632         #        material groups are not automatically published.
11633         #
11634         #  @ref swig_Import_Export "Example"
11635         @ManageTransactions("InsertOp")
11636         def ImportFile(self, theFileName, theFormatName, theName=None):
11637             """
11638             Import a shape from the BREP, IGES, STEP or other file
11639             (depends on given format) with given name.
11640
11641             Note: this function is deprecated, it is kept for backward compatibility only
11642             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11643
11644             Parameters: 
11645                 theFileName The file, containing the shape.
11646                 theFormatName Specify format for the file reading.
11647                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11648                     If format 'IGES_SCALE' is used instead of 'IGES' or
11649                        format 'STEP_SCALE' is used instead of 'STEP',
11650                        length unit will be set to 'meter' and result model will be scaled.
11651                 theName Object name; when specified, this parameter is used
11652                         for result publication in the study. Otherwise, if automatic
11653                         publication is switched on, default value is used for result name.
11654
11655             Returns:
11656                 New GEOM.GEOM_Object, containing the imported shape.
11657                 If material names are imported it returns the list of
11658                 objects. The first one is the imported object followed by
11659                 material groups.
11660             Note:
11661                 Auto publishing is allowed for the shape itself. Imported
11662                 material groups are not automatically published.
11663             """
11664             # Example: see GEOM_TestOthers.py
11665             print """
11666             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11667             where <FormatName> is a name of desirable format for importing.
11668             """
11669             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11670             RaiseIfFailed("ImportFile", self.InsertOp)
11671             aNbObj = len(aListObj)
11672             if aNbObj > 0:
11673                 self._autoPublish(aListObj[0], theName, "imported")
11674             if aNbObj == 1:
11675                 return aListObj[0]
11676             return aListObj
11677
11678         ## Deprecated analog of ImportFile()
11679         def Import(self, theFileName, theFormatName, theName=None):
11680             """
11681             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11682             """
11683             # note: auto-publishing is done in self.ImportFile()
11684             return self.ImportFile(theFileName, theFormatName, theName)
11685
11686         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11687         #  @note This method will not be dumped to the python script by DumpStudy functionality.
11688         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
11689         #  @param theStream The BRep binary stream.
11690         #  @param theName Object name; when specified, this parameter is used
11691         #         for result publication in the study. Otherwise, if automatic
11692         #         publication is switched on, default value is used for result name.
11693         #
11694         #  @return New GEOM_Object, containing the shape, read from theStream.
11695         #
11696         #  @ref swig_Import_Export "Example"
11697         @ManageTransactions("InsertOp")
11698         def RestoreShape (self, theStream, theName=None):
11699             """
11700             Read a shape from the binary stream, containing its bounding representation (BRep).
11701
11702             Note:
11703                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11704
11705             Parameters:
11706                 theStream The BRep binary stream.
11707                 theName Object name; when specified, this parameter is used
11708                         for result publication in the study. Otherwise, if automatic
11709                         publication is switched on, default value is used for result name.
11710
11711             Returns:
11712                 New GEOM_Object, containing the shape, read from theStream.
11713             """
11714             # Example: see GEOM_TestOthers.py
11715             anObj = self.InsertOp.RestoreShape(theStream)
11716             RaiseIfFailed("RestoreShape", self.InsertOp)
11717             self._autoPublish(anObj, theName, "restored")
11718             return anObj
11719
11720         ## Export the given shape into a file with given name.
11721         #
11722         #  Note: this function is deprecated, it is kept for backward compatibility only
11723         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11724         #
11725         #  @param theObject Shape to be stored in the file.
11726         #  @param theFileName Name of the file to store the given shape in.
11727         #  @param theFormatName Specify format for the shape storage.
11728         #         Available formats can be obtained with
11729         #         geompy.InsertOp.ExportTranslators()[0] method.
11730         #
11731         #  @ref swig_Import_Export "Example"
11732         @ManageTransactions("InsertOp")
11733         def Export(self, theObject, theFileName, theFormatName):
11734             """
11735             Export the given shape into a file with given name.
11736
11737             Note: this function is deprecated, it is kept for backward compatibility only
11738             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11739             
11740             Parameters: 
11741                 theObject Shape to be stored in the file.
11742                 theFileName Name of the file to store the given shape in.
11743                 theFormatName Specify format for the shape storage.
11744                               Available formats can be obtained with
11745                               geompy.InsertOp.ExportTranslators()[0] method.
11746             """
11747             # Example: see GEOM_TestOthers.py
11748             print """
11749             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11750             where <FormatName> is a name of desirable format for exporting.
11751             """
11752             self.InsertOp.Export(theObject, theFileName, theFormatName)
11753             if self.InsertOp.IsDone() == 0:
11754                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11755                 pass
11756             pass
11757
11758         # end of l2_import_export
11759         ## @}
11760
11761         ## @addtogroup l3_blocks
11762         ## @{
11763
11764         ## Create a quadrangle face from four edges. Order of Edges is not
11765         #  important. It is  not necessary that edges share the same vertex.
11766         #  @param E1,E2,E3,E4 Edges for the face bound.
11767         #  @param theName Object name; when specified, this parameter is used
11768         #         for result publication in the study. Otherwise, if automatic
11769         #         publication is switched on, default value is used for result name.
11770         #
11771         #  @return New GEOM.GEOM_Object, containing the created face.
11772         #
11773         #  @ref tui_building_by_blocks_page "Example"
11774         @ManageTransactions("BlocksOp")
11775         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11776             """
11777             Create a quadrangle face from four edges. Order of Edges is not
11778             important. It is  not necessary that edges share the same vertex.
11779
11780             Parameters:
11781                 E1,E2,E3,E4 Edges for the face bound.
11782                 theName Object name; when specified, this parameter is used
11783                         for result publication in the study. Otherwise, if automatic
11784                         publication is switched on, default value is used for result name.
11785
11786             Returns:
11787                 New GEOM.GEOM_Object, containing the created face.
11788
11789             Example of usage:
11790                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11791             """
11792             # Example: see GEOM_Spanner.py
11793             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11794             RaiseIfFailed("MakeQuad", self.BlocksOp)
11795             self._autoPublish(anObj, theName, "quad")
11796             return anObj
11797
11798         ## Create a quadrangle face on two edges.
11799         #  The missing edges will be built by creating the shortest ones.
11800         #  @param E1,E2 Two opposite edges for the face.
11801         #  @param theName Object name; when specified, this parameter is used
11802         #         for result publication in the study. Otherwise, if automatic
11803         #         publication is switched on, default value is used for result name.
11804         #
11805         #  @return New GEOM.GEOM_Object, containing the created face.
11806         #
11807         #  @ref tui_building_by_blocks_page "Example"
11808         @ManageTransactions("BlocksOp")
11809         def MakeQuad2Edges(self, E1, E2, theName=None):
11810             """
11811             Create a quadrangle face on two edges.
11812             The missing edges will be built by creating the shortest ones.
11813
11814             Parameters:
11815                 E1,E2 Two opposite edges for the face.
11816                 theName Object name; when specified, this parameter is used
11817                         for result publication in the study. Otherwise, if automatic
11818                         publication is switched on, default value is used for result name.
11819
11820             Returns:
11821                 New GEOM.GEOM_Object, containing the created face.
11822
11823             Example of usage:
11824                 # create vertices
11825                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11826                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11827                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11828                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11829                 # create edges
11830                 edge1 = geompy.MakeEdge(p1, p2)
11831                 edge2 = geompy.MakeEdge(p3, p4)
11832                 # create a quadrangle face from two edges
11833                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11834             """
11835             # Example: see GEOM_Spanner.py
11836             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11837             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11838             self._autoPublish(anObj, theName, "quad")
11839             return anObj
11840
11841         ## Create a quadrangle face with specified corners.
11842         #  The missing edges will be built by creating the shortest ones.
11843         #  @param V1,V2,V3,V4 Corner vertices for the face.
11844         #  @param theName Object name; when specified, this parameter is used
11845         #         for result publication in the study. Otherwise, if automatic
11846         #         publication is switched on, default value is used for result name.
11847         #
11848         #  @return New GEOM.GEOM_Object, containing the created face.
11849         #
11850         #  @ref tui_building_by_blocks_page "Example 1"
11851         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11852         @ManageTransactions("BlocksOp")
11853         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11854             """
11855             Create a quadrangle face with specified corners.
11856             The missing edges will be built by creating the shortest ones.
11857
11858             Parameters:
11859                 V1,V2,V3,V4 Corner vertices for the face.
11860                 theName Object name; when specified, this parameter is used
11861                         for result publication in the study. Otherwise, if automatic
11862                         publication is switched on, default value is used for result name.
11863
11864             Returns:
11865                 New GEOM.GEOM_Object, containing the created face.
11866
11867             Example of usage:
11868                 # create vertices
11869                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11870                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11871                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11872                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11873                 # create a quadrangle from four points in its corners
11874                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11875             """
11876             # Example: see GEOM_Spanner.py
11877             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11878             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11879             self._autoPublish(anObj, theName, "quad")
11880             return anObj
11881
11882         ## Create a hexahedral solid, bounded by the six given faces. Order of
11883         #  faces is not important. It is  not necessary that Faces share the same edge.
11884         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11885         #  @param theName Object name; when specified, this parameter is used
11886         #         for result publication in the study. Otherwise, if automatic
11887         #         publication is switched on, default value is used for result name.
11888         #
11889         #  @return New GEOM.GEOM_Object, containing the created solid.
11890         #
11891         #  @ref tui_building_by_blocks_page "Example 1"
11892         #  \n @ref swig_MakeHexa "Example 2"
11893         @ManageTransactions("BlocksOp")
11894         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11895             """
11896             Create a hexahedral solid, bounded by the six given faces. Order of
11897             faces is not important. It is  not necessary that Faces share the same edge.
11898
11899             Parameters:
11900                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11901                 theName Object name; when specified, this parameter is used
11902                         for result publication in the study. Otherwise, if automatic
11903                         publication is switched on, default value is used for result name.
11904
11905             Returns:
11906                 New GEOM.GEOM_Object, containing the created solid.
11907
11908             Example of usage:
11909                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11910             """
11911             # Example: see GEOM_Spanner.py
11912             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11913             RaiseIfFailed("MakeHexa", self.BlocksOp)
11914             self._autoPublish(anObj, theName, "hexa")
11915             return anObj
11916
11917         ## Create a hexahedral solid between two given faces.
11918         #  The missing faces will be built by creating the smallest ones.
11919         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11920         #  @param theName Object name; when specified, this parameter is used
11921         #         for result publication in the study. Otherwise, if automatic
11922         #         publication is switched on, default value is used for result name.
11923         #
11924         #  @return New GEOM.GEOM_Object, containing the created solid.
11925         #
11926         #  @ref tui_building_by_blocks_page "Example 1"
11927         #  \n @ref swig_MakeHexa2Faces "Example 2"
11928         @ManageTransactions("BlocksOp")
11929         def MakeHexa2Faces(self, F1, F2, theName=None):
11930             """
11931             Create a hexahedral solid between two given faces.
11932             The missing faces will be built by creating the smallest ones.
11933
11934             Parameters:
11935                 F1,F2 Two opposite faces for the hexahedral solid.
11936                 theName Object name; when specified, this parameter is used
11937                         for result publication in the study. Otherwise, if automatic
11938                         publication is switched on, default value is used for result name.
11939
11940             Returns:
11941                 New GEOM.GEOM_Object, containing the created solid.
11942
11943             Example of usage:
11944                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11945             """
11946             # Example: see GEOM_Spanner.py
11947             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11948             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11949             self._autoPublish(anObj, theName, "hexa")
11950             return anObj
11951
11952         # end of l3_blocks
11953         ## @}
11954
11955         ## @addtogroup l3_blocks_op
11956         ## @{
11957
11958         ## Get a vertex, found in the given shape by its coordinates.
11959         #  @param theShape Block or a compound of blocks.
11960         #  @param theX,theY,theZ Coordinates of the sought vertex.
11961         #  @param theEpsilon Maximum allowed distance between the resulting
11962         #                    vertex and point with the given coordinates.
11963         #  @param theName Object name; when specified, this parameter is used
11964         #         for result publication in the study. Otherwise, if automatic
11965         #         publication is switched on, default value is used for result name.
11966         #
11967         #  @return New GEOM.GEOM_Object, containing the found vertex.
11968         #
11969         #  @ref swig_GetPoint "Example"
11970         @ManageTransactions("BlocksOp")
11971         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11972             """
11973             Get a vertex, found in the given shape by its coordinates.
11974
11975             Parameters:
11976                 theShape Block or a compound of blocks.
11977                 theX,theY,theZ Coordinates of the sought vertex.
11978                 theEpsilon Maximum allowed distance between the resulting
11979                            vertex and point with the given coordinates.
11980                 theName Object name; when specified, this parameter is used
11981                         for result publication in the study. Otherwise, if automatic
11982                         publication is switched on, default value is used for result name.
11983
11984             Returns:
11985                 New GEOM.GEOM_Object, containing the found vertex.
11986
11987             Example of usage:
11988                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11989             """
11990             # Example: see GEOM_TestOthers.py
11991             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11992             RaiseIfFailed("GetPoint", self.BlocksOp)
11993             self._autoPublish(anObj, theName, "vertex")
11994             return anObj
11995
11996         ## Find a vertex of the given shape, which has minimal distance to the given point.
11997         #  @param theShape Any shape.
11998         #  @param thePoint Point, close to the desired vertex.
11999         #  @param theName Object name; when specified, this parameter is used
12000         #         for result publication in the study. Otherwise, if automatic
12001         #         publication is switched on, default value is used for result name.
12002         #
12003         #  @return New GEOM.GEOM_Object, containing the found vertex.
12004         #
12005         #  @ref swig_GetVertexNearPoint "Example"
12006         @ManageTransactions("BlocksOp")
12007         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12008             """
12009             Find a vertex of the given shape, which has minimal distance to the given point.
12010
12011             Parameters:
12012                 theShape Any shape.
12013                 thePoint Point, close to the desired vertex.
12014                 theName Object name; when specified, this parameter is used
12015                         for result publication in the study. Otherwise, if automatic
12016                         publication is switched on, default value is used for result name.
12017
12018             Returns:
12019                 New GEOM.GEOM_Object, containing the found vertex.
12020
12021             Example of usage:
12022                 pmidle = geompy.MakeVertex(50, 0, 50)
12023                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12024             """
12025             # Example: see GEOM_TestOthers.py
12026             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12027             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12028             self._autoPublish(anObj, theName, "vertex")
12029             return anObj
12030
12031         ## Get an edge, found in the given shape by two given vertices.
12032         #  @param theShape Block or a compound of blocks.
12033         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12034         #  @param theName Object name; when specified, this parameter is used
12035         #         for result publication in the study. Otherwise, if automatic
12036         #         publication is switched on, default value is used for result name.
12037         #
12038         #  @return New GEOM.GEOM_Object, containing the found edge.
12039         #
12040         #  @ref swig_GetEdge "Example"
12041         @ManageTransactions("BlocksOp")
12042         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12043             """
12044             Get an edge, found in the given shape by two given vertices.
12045
12046             Parameters:
12047                 theShape Block or a compound of blocks.
12048                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12049                 theName Object name; when specified, this parameter is used
12050                         for result publication in the study. Otherwise, if automatic
12051                         publication is switched on, default value is used for result name.
12052
12053             Returns:
12054                 New GEOM.GEOM_Object, containing the found edge.
12055             """
12056             # Example: see GEOM_Spanner.py
12057             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12058             RaiseIfFailed("GetEdge", self.BlocksOp)
12059             self._autoPublish(anObj, theName, "edge")
12060             return anObj
12061
12062         ## Find an edge of the given shape, which has minimal distance to the given point.
12063         #  @param theShape Block or a compound of blocks.
12064         #  @param thePoint Point, close to the desired edge.
12065         #  @param theName Object name; when specified, this parameter is used
12066         #         for result publication in the study. Otherwise, if automatic
12067         #         publication is switched on, default value is used for result name.
12068         #
12069         #  @return New GEOM.GEOM_Object, containing the found edge.
12070         #
12071         #  @ref swig_GetEdgeNearPoint "Example"
12072         @ManageTransactions("BlocksOp")
12073         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12074             """
12075             Find an edge of the given shape, which has minimal distance to the given point.
12076
12077             Parameters:
12078                 theShape Block or a compound of blocks.
12079                 thePoint Point, close to the desired edge.
12080                 theName Object name; when specified, this parameter is used
12081                         for result publication in the study. Otherwise, if automatic
12082                         publication is switched on, default value is used for result name.
12083
12084             Returns:
12085                 New GEOM.GEOM_Object, containing the found edge.
12086             """
12087             # Example: see GEOM_TestOthers.py
12088             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12089             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12090             self._autoPublish(anObj, theName, "edge")
12091             return anObj
12092
12093         ## Returns a face, found in the given shape by four given corner vertices.
12094         #  @param theShape Block or a compound of blocks.
12095         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12096         #  @param theName Object name; when specified, this parameter is used
12097         #         for result publication in the study. Otherwise, if automatic
12098         #         publication is switched on, default value is used for result name.
12099         #
12100         #  @return New GEOM.GEOM_Object, containing the found face.
12101         #
12102         #  @ref swig_todo "Example"
12103         @ManageTransactions("BlocksOp")
12104         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12105             """
12106             Returns a face, found in the given shape by four given corner vertices.
12107
12108             Parameters:
12109                 theShape Block or a compound of blocks.
12110                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12111                 theName Object name; when specified, this parameter is used
12112                         for result publication in the study. Otherwise, if automatic
12113                         publication is switched on, default value is used for result name.
12114
12115             Returns:
12116                 New GEOM.GEOM_Object, containing the found face.
12117             """
12118             # Example: see GEOM_Spanner.py
12119             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12120             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12121             self._autoPublish(anObj, theName, "face")
12122             return anObj
12123
12124         ## Get a face of block, found in the given shape by two given edges.
12125         #  @param theShape Block or a compound of blocks.
12126         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12127         #  @param theName Object name; when specified, this parameter is used
12128         #         for result publication in the study. Otherwise, if automatic
12129         #         publication is switched on, default value is used for result name.
12130         #
12131         #  @return New GEOM.GEOM_Object, containing the found face.
12132         #
12133         #  @ref swig_todo "Example"
12134         @ManageTransactions("BlocksOp")
12135         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12136             """
12137             Get a face of block, found in the given shape by two given edges.
12138
12139             Parameters:
12140                 theShape Block or a compound of blocks.
12141                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12142                 theName Object name; when specified, this parameter is used
12143                         for result publication in the study. Otherwise, if automatic
12144                         publication is switched on, default value is used for result name.
12145
12146             Returns:
12147                 New GEOM.GEOM_Object, containing the found face.
12148             """
12149             # Example: see GEOM_Spanner.py
12150             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12151             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12152             self._autoPublish(anObj, theName, "face")
12153             return anObj
12154
12155         ## Find a face, opposite to the given one in the given block.
12156         #  @param theBlock Must be a hexahedral solid.
12157         #  @param theFace Face of \a theBlock, opposite to the desired face.
12158         #  @param theName Object name; when specified, this parameter is used
12159         #         for result publication in the study. Otherwise, if automatic
12160         #         publication is switched on, default value is used for result name.
12161         #
12162         #  @return New GEOM.GEOM_Object, containing the found face.
12163         #
12164         #  @ref swig_GetOppositeFace "Example"
12165         @ManageTransactions("BlocksOp")
12166         def GetOppositeFace(self, theBlock, theFace, theName=None):
12167             """
12168             Find a face, opposite to the given one in the given block.
12169
12170             Parameters:
12171                 theBlock Must be a hexahedral solid.
12172                 theFace Face of theBlock, opposite to the desired face.
12173                 theName Object name; when specified, this parameter is used
12174                         for result publication in the study. Otherwise, if automatic
12175                         publication is switched on, default value is used for result name.
12176
12177             Returns:
12178                 New GEOM.GEOM_Object, containing the found face.
12179             """
12180             # Example: see GEOM_Spanner.py
12181             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12182             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12183             self._autoPublish(anObj, theName, "face")
12184             return anObj
12185
12186         ## Find a face of the given shape, which has minimal distance to the given point.
12187         #  @param theShape Block or a compound of blocks.
12188         #  @param thePoint Point, close to the desired face.
12189         #  @param theName Object name; when specified, this parameter is used
12190         #         for result publication in the study. Otherwise, if automatic
12191         #         publication is switched on, default value is used for result name.
12192         #
12193         #  @return New GEOM.GEOM_Object, containing the found face.
12194         #
12195         #  @ref swig_GetFaceNearPoint "Example"
12196         @ManageTransactions("BlocksOp")
12197         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12198             """
12199             Find a face of the given shape, which has minimal distance to the given point.
12200
12201             Parameters:
12202                 theShape Block or a compound of blocks.
12203                 thePoint Point, close to the desired face.
12204                 theName Object name; when specified, this parameter is used
12205                         for result publication in the study. Otherwise, if automatic
12206                         publication is switched on, default value is used for result name.
12207
12208             Returns:
12209                 New GEOM.GEOM_Object, containing the found face.
12210             """
12211             # Example: see GEOM_Spanner.py
12212             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12213             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12214             self._autoPublish(anObj, theName, "face")
12215             return anObj
12216
12217         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12218         #  @param theBlock Block or a compound of blocks.
12219         #  @param theVector Vector, close to the normale of the desired face.
12220         #  @param theName Object name; when specified, this parameter is used
12221         #         for result publication in the study. Otherwise, if automatic
12222         #         publication is switched on, default value is used for result name.
12223         #
12224         #  @return New GEOM.GEOM_Object, containing the found face.
12225         #
12226         #  @ref swig_todo "Example"
12227         @ManageTransactions("BlocksOp")
12228         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12229             """
12230             Find a face of block, whose outside normale has minimal angle with the given vector.
12231
12232             Parameters:
12233                 theBlock Block or a compound of blocks.
12234                 theVector Vector, close to the normale of the desired face.
12235                 theName Object name; when specified, this parameter is used
12236                         for result publication in the study. Otherwise, if automatic
12237                         publication is switched on, default value is used for result name.
12238
12239             Returns:
12240                 New GEOM.GEOM_Object, containing the found face.
12241             """
12242             # Example: see GEOM_Spanner.py
12243             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12244             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12245             self._autoPublish(anObj, theName, "face")
12246             return anObj
12247
12248         ## Find all sub-shapes of type \a theShapeType of the given shape,
12249         #  which have minimal distance to the given point.
12250         #  @param theShape Any shape.
12251         #  @param thePoint Point, close to the desired shape.
12252         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12253         #  @param theTolerance The tolerance for distances comparison. All shapes
12254         #                      with distances to the given point in interval
12255         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12256         #  @param theName Object name; when specified, this parameter is used
12257         #         for result publication in the study. Otherwise, if automatic
12258         #         publication is switched on, default value is used for result name.
12259         #
12260         #  @return New GEOM_Object, containing a group of all found shapes.
12261         #
12262         #  @ref swig_GetShapesNearPoint "Example"
12263         @ManageTransactions("BlocksOp")
12264         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12265             """
12266             Find all sub-shapes of type theShapeType of the given shape,
12267             which have minimal distance to the given point.
12268
12269             Parameters:
12270                 theShape Any shape.
12271                 thePoint Point, close to the desired shape.
12272                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12273                 theTolerance The tolerance for distances comparison. All shapes
12274                                 with distances to the given point in interval
12275                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12276                 theName Object name; when specified, this parameter is used
12277                         for result publication in the study. Otherwise, if automatic
12278                         publication is switched on, default value is used for result name.
12279
12280             Returns:
12281                 New GEOM_Object, containing a group of all found shapes.
12282             """
12283             # Example: see GEOM_TestOthers.py
12284             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12285             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12286             self._autoPublish(anObj, theName, "group")
12287             return anObj
12288
12289         # end of l3_blocks_op
12290         ## @}
12291
12292         ## @addtogroup l4_blocks_measure
12293         ## @{
12294
12295         ## Check, if the compound of blocks is given.
12296         #  To be considered as a compound of blocks, the
12297         #  given shape must satisfy the following conditions:
12298         #  - Each element of the compound should be a Block (6 faces).
12299         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12300         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12301         #       there are more than 4 edges in the only wire of a face,
12302         #       this face is considered to be quadrangle if it has 4 bounds
12303         #       (1 or more edge) of C1 continuity.
12304         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12305         #  - The compound should be connexe.
12306         #  - The glue between two quadrangle faces should be applied.
12307         #  @param theCompound The compound to check.
12308         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12309         #         taking into account C1 continuity.
12310         #  @param theAngTolerance the angular tolerance to check if two neighbor
12311         #         edges are codirectional in the common vertex with this
12312         #         tolerance. This parameter is used only if
12313         #         <VAR>theIsUseC1</VAR> is set to True.
12314         #  @return TRUE, if the given shape is a compound of blocks.
12315         #  If theCompound is not valid, prints all discovered errors.
12316         #
12317         #  @ref tui_check_compound_of_blocks_page "Example 1"
12318         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12319         @ManageTransactions("BlocksOp")
12320         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12321                                   theAngTolerance = 1.e-12):
12322             """
12323             Check, if the compound of blocks is given.
12324             To be considered as a compound of blocks, the
12325             given shape must satisfy the following conditions:
12326             - Each element of the compound should be a Block (6 faces).
12327             - Each face should be a quadrangle, i.e. it should have only 1 wire
12328                  with 4 edges. If theIsUseC1 is set to True and
12329                  there are more than 4 edges in the only wire of a face,
12330                  this face is considered to be quadrangle if it has 4 bounds
12331                  (1 or more edge) of C1 continuity.
12332             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12333             - The compound should be connexe.
12334             - The glue between two quadrangle faces should be applied.
12335
12336             Parameters:
12337                 theCompound The compound to check.
12338                 theIsUseC1 Flag to check if there are 4 bounds on a face
12339                            taking into account C1 continuity.
12340                 theAngTolerance the angular tolerance to check if two neighbor
12341                            edges are codirectional in the common vertex with this
12342                            tolerance. This parameter is used only if
12343                            theIsUseC1 is set to True.
12344
12345             Returns:
12346                 TRUE, if the given shape is a compound of blocks.
12347                 If theCompound is not valid, prints all discovered errors.
12348             """
12349             # Example: see GEOM_Spanner.py
12350             aTolerance = -1.0
12351             if theIsUseC1:
12352                 aTolerance = theAngTolerance
12353             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12354             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12355             if IsValid == 0:
12356                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12357                 print Descr
12358             return IsValid
12359
12360         ## Retrieve all non blocks solids and faces from \a theShape.
12361         #  @param theShape The shape to explore.
12362         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12363         #         taking into account C1 continuity.
12364         #  @param theAngTolerance the angular tolerance to check if two neighbor
12365         #         edges are codirectional in the common vertex with this
12366         #         tolerance. This parameter is used only if
12367         #         <VAR>theIsUseC1</VAR> is set to True.
12368         #  @param theName Object name; when specified, this parameter is used
12369         #         for result publication in the study. Otherwise, if automatic
12370         #         publication is switched on, default value is used for result name.
12371         #
12372         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12373         #          non block solids (= not 6 faces, or with 6 faces, but with the
12374         #          presence of non-quadrangular faces). The second object is a
12375         #          group of all non quadrangular faces (= faces with more then
12376         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12377         #          with 1 wire with not 4 edges that do not form 4 bounds of
12378         #          C1 continuity).
12379         #
12380         #  @ref tui_get_non_blocks_page "Example 1"
12381         #  \n @ref swig_GetNonBlocks "Example 2"
12382         @ManageTransactions("BlocksOp")
12383         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12384                           theAngTolerance = 1.e-12, theName=None):
12385             """
12386             Retrieve all non blocks solids and faces from theShape.
12387
12388             Parameters:
12389                 theShape The shape to explore.
12390                 theIsUseC1 Flag to check if there are 4 bounds on a face
12391                            taking into account C1 continuity.
12392                 theAngTolerance the angular tolerance to check if two neighbor
12393                            edges are codirectional in the common vertex with this
12394                            tolerance. This parameter is used only if
12395                            theIsUseC1 is set to True.
12396                 theName Object name; when specified, this parameter is used
12397                         for result publication in the study. Otherwise, if automatic
12398                         publication is switched on, default value is used for result name.
12399
12400             Returns:
12401                 A tuple of two GEOM_Objects. The first object is a group of all
12402                 non block solids (= not 6 faces, or with 6 faces, but with the
12403                 presence of non-quadrangular faces). The second object is a
12404                 group of all non quadrangular faces (= faces with more then
12405                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12406                 with 1 wire with not 4 edges that do not form 4 bounds of
12407                 C1 continuity).
12408
12409             Usage:
12410                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12411             """
12412             # Example: see GEOM_Spanner.py
12413             aTolerance = -1.0
12414             if theIsUseC1:
12415                 aTolerance = theAngTolerance
12416             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12417             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12418             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12419             return aTuple
12420
12421         ## Remove all seam and degenerated edges from \a theShape.
12422         #  Unite faces and edges, sharing one surface. It means that
12423         #  this faces must have references to one C++ surface object (handle).
12424         #  @param theShape The compound or single solid to remove irregular edges from.
12425         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12426         #         do not unite faces.
12427         #  @param theName Object name; when specified, this parameter is used
12428         #         for result publication in the study. Otherwise, if automatic
12429         #         publication is switched on, default value is used for result name.
12430         #
12431         #  @return Improved shape.
12432         #
12433         #  @ref swig_RemoveExtraEdges "Example"
12434         @ManageTransactions("BlocksOp")
12435         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12436             """
12437             Remove all seam and degenerated edges from theShape.
12438             Unite faces and edges, sharing one surface. It means that
12439             this faces must have references to one C++ surface object (handle).
12440
12441             Parameters:
12442                 theShape The compound or single solid to remove irregular edges from.
12443                 doUnionFaces If True, then unite faces. If False (the default value),
12444                              do not unite faces.
12445                 theName Object name; when specified, this parameter is used
12446                         for result publication in the study. Otherwise, if automatic
12447                         publication is switched on, default value is used for result name.
12448
12449             Returns:
12450                 Improved shape.
12451             """
12452             # Example: see GEOM_TestOthers.py
12453             nbFacesOptimum = -1 # -1 means do not unite faces
12454             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12455             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12456             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12457             self._autoPublish(anObj, theName, "removeExtraEdges")
12458             return anObj
12459
12460         ## Performs union faces of \a theShape
12461         #  Unite faces sharing one surface. It means that
12462         #  these faces must have references to one C++ surface object (handle).
12463         #  @param theShape The compound or single solid that contains faces
12464         #         to perform union.
12465         #  @param theName Object name; when specified, this parameter is used
12466         #         for result publication in the study. Otherwise, if automatic
12467         #         publication is switched on, default value is used for result name.
12468         #
12469         #  @return Improved shape.
12470         #
12471         #  @ref swig_UnionFaces "Example"
12472         @ManageTransactions("BlocksOp")
12473         def UnionFaces(self, theShape, theName=None):
12474             """
12475             Performs union faces of theShape.
12476             Unite faces sharing one surface. It means that
12477             these faces must have references to one C++ surface object (handle).
12478
12479             Parameters:
12480                 theShape The compound or single solid that contains faces
12481                          to perform union.
12482                 theName Object name; when specified, this parameter is used
12483                         for result publication in the study. Otherwise, if automatic
12484                         publication is switched on, default value is used for result name.
12485
12486             Returns:
12487                 Improved shape.
12488             """
12489             # Example: see GEOM_TestOthers.py
12490             anObj = self.BlocksOp.UnionFaces(theShape)
12491             RaiseIfFailed("UnionFaces", self.BlocksOp)
12492             self._autoPublish(anObj, theName, "unionFaces")
12493             return anObj
12494
12495         ## Check, if the given shape is a blocks compound.
12496         #  Fix all detected errors.
12497         #    \note Single block can be also fixed by this method.
12498         #  @param theShape The compound to check and improve.
12499         #  @param theName Object name; when specified, this parameter is used
12500         #         for result publication in the study. Otherwise, if automatic
12501         #         publication is switched on, default value is used for result name.
12502         #
12503         #  @return Improved compound.
12504         #
12505         #  @ref swig_CheckAndImprove "Example"
12506         @ManageTransactions("BlocksOp")
12507         def CheckAndImprove(self, theShape, theName=None):
12508             """
12509             Check, if the given shape is a blocks compound.
12510             Fix all detected errors.
12511
12512             Note:
12513                 Single block can be also fixed by this method.
12514
12515             Parameters:
12516                 theShape The compound to check and improve.
12517                 theName Object name; when specified, this parameter is used
12518                         for result publication in the study. Otherwise, if automatic
12519                         publication is switched on, default value is used for result name.
12520
12521             Returns:
12522                 Improved compound.
12523             """
12524             # Example: see GEOM_TestOthers.py
12525             anObj = self.BlocksOp.CheckAndImprove(theShape)
12526             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12527             self._autoPublish(anObj, theName, "improved")
12528             return anObj
12529
12530         # end of l4_blocks_measure
12531         ## @}
12532
12533         ## @addtogroup l3_blocks_op
12534         ## @{
12535
12536         ## Get all the blocks, contained in the given compound.
12537         #  @param theCompound The compound to explode.
12538         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12539         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12540         #  @param theName Object name; when specified, this parameter is used
12541         #         for result publication in the study. Otherwise, if automatic
12542         #         publication is switched on, default value is used for result name.
12543         #
12544         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12545         #
12546         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12547         #
12548         #  @ref tui_explode_on_blocks "Example 1"
12549         #  \n @ref swig_MakeBlockExplode "Example 2"
12550         @ManageTransactions("BlocksOp")
12551         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12552             """
12553             Get all the blocks, contained in the given compound.
12554
12555             Parameters:
12556                 theCompound The compound to explode.
12557                 theMinNbFaces If solid has lower number of faces, it is not a block.
12558                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12559                 theName Object name; when specified, this parameter is used
12560                         for result publication in the study. Otherwise, if automatic
12561                         publication is switched on, default value is used for result name.
12562
12563             Note:
12564                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12565
12566             Returns:
12567                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12568             """
12569             # Example: see GEOM_TestOthers.py
12570             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12571             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12572             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12573             for anObj in aList:
12574                 anObj.SetParameters(Parameters)
12575                 pass
12576             self._autoPublish(aList, theName, "block")
12577             return aList
12578
12579         ## Find block, containing the given point inside its volume or on boundary.
12580         #  @param theCompound Compound, to find block in.
12581         #  @param thePoint Point, close to the desired block. If the point lays on
12582         #         boundary between some blocks, we return block with nearest center.
12583         #  @param theName Object name; when specified, this parameter is used
12584         #         for result publication in the study. Otherwise, if automatic
12585         #         publication is switched on, default value is used for result name.
12586         #
12587         #  @return New GEOM.GEOM_Object, containing the found block.
12588         #
12589         #  @ref swig_todo "Example"
12590         @ManageTransactions("BlocksOp")
12591         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12592             """
12593             Find block, containing the given point inside its volume or on boundary.
12594
12595             Parameters:
12596                 theCompound Compound, to find block in.
12597                 thePoint Point, close to the desired block. If the point lays on
12598                          boundary between some blocks, we return block with nearest center.
12599                 theName Object name; when specified, this parameter is used
12600                         for result publication in the study. Otherwise, if automatic
12601                         publication is switched on, default value is used for result name.
12602
12603             Returns:
12604                 New GEOM.GEOM_Object, containing the found block.
12605             """
12606             # Example: see GEOM_Spanner.py
12607             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12608             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12609             self._autoPublish(anObj, theName, "block")
12610             return anObj
12611
12612         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12613         #  @param theCompound Compound, to find block in.
12614         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12615         #  @param theName Object name; when specified, this parameter is used
12616         #         for result publication in the study. Otherwise, if automatic
12617         #         publication is switched on, default value is used for result name.
12618         #
12619         #  @return New GEOM.GEOM_Object, containing the found block.
12620         #
12621         #  @ref swig_GetBlockByParts "Example"
12622         @ManageTransactions("BlocksOp")
12623         def GetBlockByParts(self, theCompound, theParts, theName=None):
12624             """
12625              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12626
12627              Parameters:
12628                 theCompound Compound, to find block in.
12629                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12630                 theName Object name; when specified, this parameter is used
12631                         for result publication in the study. Otherwise, if automatic
12632                         publication is switched on, default value is used for result name.
12633
12634             Returns:
12635                 New GEOM_Object, containing the found block.
12636             """
12637             # Example: see GEOM_TestOthers.py
12638             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12639             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12640             self._autoPublish(anObj, theName, "block")
12641             return anObj
12642
12643         ## Return all blocks, containing all the elements, passed as the parts.
12644         #  @param theCompound Compound, to find blocks in.
12645         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12646         #  @param theName Object name; when specified, this parameter is used
12647         #         for result publication in the study. Otherwise, if automatic
12648         #         publication is switched on, default value is used for result name.
12649         #
12650         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12651         #
12652         #  @ref swig_todo "Example"
12653         @ManageTransactions("BlocksOp")
12654         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12655             """
12656             Return all blocks, containing all the elements, passed as the parts.
12657
12658             Parameters:
12659                 theCompound Compound, to find blocks in.
12660                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12661                 theName Object name; when specified, this parameter is used
12662                         for result publication in the study. Otherwise, if automatic
12663                         publication is switched on, default value is used for result name.
12664
12665             Returns:
12666                 List of GEOM.GEOM_Object, containing the found blocks.
12667             """
12668             # Example: see GEOM_Spanner.py
12669             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12670             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12671             self._autoPublish(aList, theName, "block")
12672             return aList
12673
12674         ## Multi-transformate block and glue the result.
12675         #  Transformation is defined so, as to superpose direction faces.
12676         #  @param Block Hexahedral solid to be multi-transformed.
12677         #  @param DirFace1 ID of First direction face.
12678         #  @param DirFace2 ID of Second direction face.
12679         #  @param NbTimes Quantity of transformations to be done.
12680         #  @param theName Object name; when specified, this parameter is used
12681         #         for result publication in the study. Otherwise, if automatic
12682         #         publication is switched on, default value is used for result name.
12683         #
12684         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12685         #
12686         #  @return New GEOM.GEOM_Object, containing the result shape.
12687         #
12688         #  @ref tui_multi_transformation "Example"
12689         @ManageTransactions("BlocksOp")
12690         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12691             """
12692             Multi-transformate block and glue the result.
12693             Transformation is defined so, as to superpose direction faces.
12694
12695             Parameters:
12696                 Block Hexahedral solid to be multi-transformed.
12697                 DirFace1 ID of First direction face.
12698                 DirFace2 ID of Second direction face.
12699                 NbTimes Quantity of transformations to be done.
12700                 theName Object name; when specified, this parameter is used
12701                         for result publication in the study. Otherwise, if automatic
12702                         publication is switched on, default value is used for result name.
12703
12704             Note:
12705                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12706
12707             Returns:
12708                 New GEOM.GEOM_Object, containing the result shape.
12709             """
12710             # Example: see GEOM_Spanner.py
12711             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12712             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12713             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12714             anObj.SetParameters(Parameters)
12715             self._autoPublish(anObj, theName, "transformed")
12716             return anObj
12717
12718         ## Multi-transformate block and glue the result.
12719         #  @param Block Hexahedral solid to be multi-transformed.
12720         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12721         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12722         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12723         #  @param theName Object name; when specified, this parameter is used
12724         #         for result publication in the study. Otherwise, if automatic
12725         #         publication is switched on, default value is used for result name.
12726         #
12727         #  @return New GEOM.GEOM_Object, containing the result shape.
12728         #
12729         #  @ref tui_multi_transformation "Example"
12730         @ManageTransactions("BlocksOp")
12731         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12732                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12733             """
12734             Multi-transformate block and glue the result.
12735
12736             Parameters:
12737                 Block Hexahedral solid to be multi-transformed.
12738                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12739                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12740                 NbTimesU,NbTimesV Quantity of transformations to be done.
12741                 theName Object name; when specified, this parameter is used
12742                         for result publication in the study. Otherwise, if automatic
12743                         publication is switched on, default value is used for result name.
12744
12745             Returns:
12746                 New GEOM.GEOM_Object, containing the result shape.
12747             """
12748             # Example: see GEOM_Spanner.py
12749             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12750               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12751             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12752                                                             DirFace1V, DirFace2V, NbTimesV)
12753             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12754             anObj.SetParameters(Parameters)
12755             self._autoPublish(anObj, theName, "transformed")
12756             return anObj
12757
12758         ## Build all possible propagation groups.
12759         #  Propagation group is a set of all edges, opposite to one (main)
12760         #  edge of this group directly or through other opposite edges.
12761         #  Notion of Opposite Edge make sence only on quadrangle face.
12762         #  @param theShape Shape to build propagation groups on.
12763         #  @param theName Object name; when specified, this parameter is used
12764         #         for result publication in the study. Otherwise, if automatic
12765         #         publication is switched on, default value is used for result name.
12766         #
12767         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12768         #
12769         #  @ref swig_Propagate "Example"
12770         @ManageTransactions("BlocksOp")
12771         def Propagate(self, theShape, theName=None):
12772             """
12773             Build all possible propagation groups.
12774             Propagation group is a set of all edges, opposite to one (main)
12775             edge of this group directly or through other opposite edges.
12776             Notion of Opposite Edge make sence only on quadrangle face.
12777
12778             Parameters:
12779                 theShape Shape to build propagation groups on.
12780                 theName Object name; when specified, this parameter is used
12781                         for result publication in the study. Otherwise, if automatic
12782                         publication is switched on, default value is used for result name.
12783
12784             Returns:
12785                 List of GEOM.GEOM_Object, each of them is a propagation group.
12786             """
12787             # Example: see GEOM_TestOthers.py
12788             listChains = self.BlocksOp.Propagate(theShape)
12789             RaiseIfFailed("Propagate", self.BlocksOp)
12790             self._autoPublish(listChains, theName, "propagate")
12791             return listChains
12792
12793         # end of l3_blocks_op
12794         ## @}
12795
12796         ## @addtogroup l3_groups
12797         ## @{
12798
12799         ## Creates a new group which will store sub-shapes of theMainShape
12800         #  @param theMainShape is a GEOM object on which the group is selected
12801         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12802         #  @param theName Object name; when specified, this parameter is used
12803         #         for result publication in the study. Otherwise, if automatic
12804         #         publication is switched on, default value is used for result name.
12805         #
12806         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12807         #
12808         #  @ref tui_working_with_groups_page "Example 1"
12809         #  \n @ref swig_CreateGroup "Example 2"
12810         @ManageTransactions("GroupOp")
12811         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12812             """
12813             Creates a new group which will store sub-shapes of theMainShape
12814
12815             Parameters:
12816                theMainShape is a GEOM object on which the group is selected
12817                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12818                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12819                 theName Object name; when specified, this parameter is used
12820                         for result publication in the study. Otherwise, if automatic
12821                         publication is switched on, default value is used for result name.
12822
12823             Returns:
12824                a newly created GEOM group
12825
12826             Example of usage:
12827                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12828
12829             """
12830             # Example: see GEOM_TestOthers.py
12831             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12832             RaiseIfFailed("CreateGroup", self.GroupOp)
12833             self._autoPublish(anObj, theName, "group")
12834             return anObj
12835
12836         ## Adds a sub-object with ID theSubShapeId to the group
12837         #  @param theGroup is a GEOM group to which the new sub-shape is added
12838         #  @param theSubShapeID is a sub-shape ID in the main object.
12839         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12840         #
12841         #  @ref tui_working_with_groups_page "Example"
12842         @ManageTransactions("GroupOp")
12843         def AddObject(self,theGroup, theSubShapeID):
12844             """
12845             Adds a sub-object with ID theSubShapeId to the group
12846
12847             Parameters:
12848                 theGroup       is a GEOM group to which the new sub-shape is added
12849                 theSubShapeID  is a sub-shape ID in the main object.
12850
12851             Note:
12852                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12853             """
12854             # Example: see GEOM_TestOthers.py
12855             self.GroupOp.AddObject(theGroup, theSubShapeID)
12856             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12857                 RaiseIfFailed("AddObject", self.GroupOp)
12858                 pass
12859             pass
12860
12861         ## Removes a sub-object with ID \a theSubShapeId from the group
12862         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12863         #  @param theSubShapeID is a sub-shape ID in the main object.
12864         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12865         #
12866         #  @ref tui_working_with_groups_page "Example"
12867         @ManageTransactions("GroupOp")
12868         def RemoveObject(self,theGroup, theSubShapeID):
12869             """
12870             Removes a sub-object with ID theSubShapeId from the group
12871
12872             Parameters:
12873                 theGroup is a GEOM group from which the new sub-shape is removed
12874                 theSubShapeID is a sub-shape ID in the main object.
12875
12876             Note:
12877                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12878             """
12879             # Example: see GEOM_TestOthers.py
12880             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12881             RaiseIfFailed("RemoveObject", self.GroupOp)
12882             pass
12883
12884         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12885         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12886         #  @param theSubShapes is a list of sub-shapes to be added.
12887         #
12888         #  @ref tui_working_with_groups_page "Example"
12889         @ManageTransactions("GroupOp")
12890         def UnionList (self,theGroup, theSubShapes):
12891             """
12892             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12893
12894             Parameters:
12895                 theGroup is a GEOM group to which the new sub-shapes are added.
12896                 theSubShapes is a list of sub-shapes to be added.
12897             """
12898             # Example: see GEOM_TestOthers.py
12899             self.GroupOp.UnionList(theGroup, theSubShapes)
12900             RaiseIfFailed("UnionList", self.GroupOp)
12901             pass
12902
12903         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12904         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12905         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12906         #
12907         #  @ref swig_UnionIDs "Example"
12908         @ManageTransactions("GroupOp")
12909         def UnionIDs(self,theGroup, theSubShapes):
12910             """
12911             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12912
12913             Parameters:
12914                 theGroup is a GEOM group to which the new sub-shapes are added.
12915                 theSubShapes is a list of indices of sub-shapes to be added.
12916             """
12917             # Example: see GEOM_TestOthers.py
12918             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12919             RaiseIfFailed("UnionIDs", self.GroupOp)
12920             pass
12921
12922         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12923         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12924         #  @param theSubShapes is a list of sub-shapes to be removed.
12925         #
12926         #  @ref tui_working_with_groups_page "Example"
12927         @ManageTransactions("GroupOp")
12928         def DifferenceList (self,theGroup, theSubShapes):
12929             """
12930             Removes from the group all the given shapes. No errors, if some shapes are not included.
12931
12932             Parameters:
12933                 theGroup is a GEOM group from which the sub-shapes are removed.
12934                 theSubShapes is a list of sub-shapes to be removed.
12935             """
12936             # Example: see GEOM_TestOthers.py
12937             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12938             RaiseIfFailed("DifferenceList", self.GroupOp)
12939             pass
12940
12941         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12942         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12943         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12944         #
12945         #  @ref swig_DifferenceIDs "Example"
12946         @ManageTransactions("GroupOp")
12947         def DifferenceIDs(self,theGroup, theSubShapes):
12948             """
12949             Removes from the group all the given shapes. No errors, if some shapes are not included.
12950
12951             Parameters:
12952                 theGroup is a GEOM group from which the sub-shapes are removed.
12953                 theSubShapes is a list of indices of sub-shapes to be removed.
12954             """
12955             # Example: see GEOM_TestOthers.py
12956             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12957             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12958             pass
12959
12960         ## Union of two groups.
12961         #  New group is created. It will contain all entities
12962         #  which are present in groups theGroup1 and theGroup2.
12963         #  @param theGroup1, theGroup2 are the initial GEOM groups
12964         #                              to create the united group from.
12965         #  @param theName Object name; when specified, this parameter is used
12966         #         for result publication in the study. Otherwise, if automatic
12967         #         publication is switched on, default value is used for result name.
12968         #
12969         #  @return a newly created GEOM group.
12970         #
12971         #  @ref tui_union_groups_anchor "Example"
12972         @ManageTransactions("GroupOp")
12973         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12974             """
12975             Union of two groups.
12976             New group is created. It will contain all entities
12977             which are present in groups theGroup1 and theGroup2.
12978
12979             Parameters:
12980                 theGroup1, theGroup2 are the initial GEOM groups
12981                                      to create the united group from.
12982                 theName Object name; when specified, this parameter is used
12983                         for result publication in the study. Otherwise, if automatic
12984                         publication is switched on, default value is used for result name.
12985
12986             Returns:
12987                 a newly created GEOM group.
12988             """
12989             # Example: see GEOM_TestOthers.py
12990             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12991             RaiseIfFailed("UnionGroups", self.GroupOp)
12992             self._autoPublish(aGroup, theName, "group")
12993             return aGroup
12994
12995         ## Intersection of two groups.
12996         #  New group is created. It will contain only those entities
12997         #  which are present in both groups theGroup1 and theGroup2.
12998         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12999         #  @param theName Object name; when specified, this parameter is used
13000         #         for result publication in the study. Otherwise, if automatic
13001         #         publication is switched on, default value is used for result name.
13002         #
13003         #  @return a newly created GEOM group.
13004         #
13005         #  @ref tui_intersect_groups_anchor "Example"
13006         @ManageTransactions("GroupOp")
13007         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13008             """
13009             Intersection of two groups.
13010             New group is created. It will contain only those entities
13011             which are present in both groups theGroup1 and theGroup2.
13012
13013             Parameters:
13014                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13015                 theName Object name; when specified, this parameter is used
13016                         for result publication in the study. Otherwise, if automatic
13017                         publication is switched on, default value is used for result name.
13018
13019             Returns:
13020                 a newly created GEOM group.
13021             """
13022             # Example: see GEOM_TestOthers.py
13023             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13024             RaiseIfFailed("IntersectGroups", self.GroupOp)
13025             self._autoPublish(aGroup, theName, "group")
13026             return aGroup
13027
13028         ## Cut of two groups.
13029         #  New group is created. It will contain entities which are
13030         #  present in group theGroup1 but are not present in group theGroup2.
13031         #  @param theGroup1 is a GEOM group to include elements of.
13032         #  @param theGroup2 is a GEOM group to exclude elements of.
13033         #  @param theName Object name; when specified, this parameter is used
13034         #         for result publication in the study. Otherwise, if automatic
13035         #         publication is switched on, default value is used for result name.
13036         #
13037         #  @return a newly created GEOM group.
13038         #
13039         #  @ref tui_cut_groups_anchor "Example"
13040         @ManageTransactions("GroupOp")
13041         def CutGroups (self, theGroup1, theGroup2, theName=None):
13042             """
13043             Cut of two groups.
13044             New group is created. It will contain entities which are
13045             present in group theGroup1 but are not present in group theGroup2.
13046
13047             Parameters:
13048                 theGroup1 is a GEOM group to include elements of.
13049                 theGroup2 is a GEOM group to exclude elements of.
13050                 theName Object name; when specified, this parameter is used
13051                         for result publication in the study. Otherwise, if automatic
13052                         publication is switched on, default value is used for result name.
13053
13054             Returns:
13055                 a newly created GEOM group.
13056             """
13057             # Example: see GEOM_TestOthers.py
13058             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13059             RaiseIfFailed("CutGroups", self.GroupOp)
13060             self._autoPublish(aGroup, theName, "group")
13061             return aGroup
13062
13063         ## Union of list of groups.
13064         #  New group is created. It will contain all entities that are
13065         #  present in groups listed in theGList.
13066         #  @param theGList is a list of GEOM groups to create the united group from.
13067         #  @param theName Object name; when specified, this parameter is used
13068         #         for result publication in the study. Otherwise, if automatic
13069         #         publication is switched on, default value is used for result name.
13070         #
13071         #  @return a newly created GEOM group.
13072         #
13073         #  @ref tui_union_groups_anchor "Example"
13074         @ManageTransactions("GroupOp")
13075         def UnionListOfGroups (self, theGList, theName=None):
13076             """
13077             Union of list of groups.
13078             New group is created. It will contain all entities that are
13079             present in groups listed in theGList.
13080
13081             Parameters:
13082                 theGList is a list of GEOM groups to create the united group from.
13083                 theName Object name; when specified, this parameter is used
13084                         for result publication in the study. Otherwise, if automatic
13085                         publication is switched on, default value is used for result name.
13086
13087             Returns:
13088                 a newly created GEOM group.
13089             """
13090             # Example: see GEOM_TestOthers.py
13091             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13092             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13093             self._autoPublish(aGroup, theName, "group")
13094             return aGroup
13095
13096         ## Cut of lists of groups.
13097         #  New group is created. It will contain only entities
13098         #  which are present in groups listed in theGList.
13099         #  @param theGList is a list of GEOM groups to include elements of.
13100         #  @param theName Object name; when specified, this parameter is used
13101         #         for result publication in the study. Otherwise, if automatic
13102         #         publication is switched on, default value is used for result name.
13103         #
13104         #  @return a newly created GEOM group.
13105         #
13106         #  @ref tui_intersect_groups_anchor "Example"
13107         @ManageTransactions("GroupOp")
13108         def IntersectListOfGroups (self, theGList, theName=None):
13109             """
13110             Cut of lists of groups.
13111             New group is created. It will contain only entities
13112             which are present in groups listed in theGList.
13113
13114             Parameters:
13115                 theGList is a list of GEOM groups to include elements of.
13116                 theName Object name; when specified, this parameter is used
13117                         for result publication in the study. Otherwise, if automatic
13118                         publication is switched on, default value is used for result name.
13119
13120             Returns:
13121                 a newly created GEOM group.
13122             """
13123             # Example: see GEOM_TestOthers.py
13124             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13125             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13126             self._autoPublish(aGroup, theName, "group")
13127             return aGroup
13128
13129         ## Cut of lists of groups.
13130         #  New group is created. It will contain only entities
13131         #  which are present in groups listed in theGList1 but
13132         #  are not present in groups from theGList2.
13133         #  @param theGList1 is a list of GEOM groups to include elements of.
13134         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13135         #  @param theName Object name; when specified, this parameter is used
13136         #         for result publication in the study. Otherwise, if automatic
13137         #         publication is switched on, default value is used for result name.
13138         #
13139         #  @return a newly created GEOM group.
13140         #
13141         #  @ref tui_cut_groups_anchor "Example"
13142         @ManageTransactions("GroupOp")
13143         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13144             """
13145             Cut of lists of groups.
13146             New group is created. It will contain only entities
13147             which are present in groups listed in theGList1 but
13148             are not present in groups from theGList2.
13149
13150             Parameters:
13151                 theGList1 is a list of GEOM groups to include elements of.
13152                 theGList2 is a list of GEOM groups to exclude elements of.
13153                 theName Object name; when specified, this parameter is used
13154                         for result publication in the study. Otherwise, if automatic
13155                         publication is switched on, default value is used for result name.
13156
13157             Returns:
13158                 a newly created GEOM group.
13159             """
13160             # Example: see GEOM_TestOthers.py
13161             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13162             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13163             self._autoPublish(aGroup, theName, "group")
13164             return aGroup
13165
13166         ## Returns a list of sub-objects ID stored in the group
13167         #  @param theGroup is a GEOM group for which a list of IDs is requested
13168         #
13169         #  @ref swig_GetObjectIDs "Example"
13170         @ManageTransactions("GroupOp")
13171         def GetObjectIDs(self,theGroup):
13172             """
13173             Returns a list of sub-objects ID stored in the group
13174
13175             Parameters:
13176                 theGroup is a GEOM group for which a list of IDs is requested
13177             """
13178             # Example: see GEOM_TestOthers.py
13179             ListIDs = self.GroupOp.GetObjects(theGroup)
13180             RaiseIfFailed("GetObjects", self.GroupOp)
13181             return ListIDs
13182
13183         ## Returns a type of sub-objects stored in the group
13184         #  @param theGroup is a GEOM group which type is returned.
13185         #
13186         #  @ref swig_GetType "Example"
13187         @ManageTransactions("GroupOp")
13188         def GetType(self,theGroup):
13189             """
13190             Returns a type of sub-objects stored in the group
13191
13192             Parameters:
13193                 theGroup is a GEOM group which type is returned.
13194             """
13195             # Example: see GEOM_TestOthers.py
13196             aType = self.GroupOp.GetType(theGroup)
13197             RaiseIfFailed("GetType", self.GroupOp)
13198             return aType
13199
13200         ## Convert a type of geom object from id to string value
13201         #  @param theId is a GEOM obect type id.
13202         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13203         #  @ref swig_GetType "Example"
13204         def ShapeIdToType(self, theId):
13205             """
13206             Convert a type of geom object from id to string value
13207
13208             Parameters:
13209                 theId is a GEOM obect type id.
13210
13211             Returns:
13212                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13213             """
13214             if theId == 0:
13215                 return "COPY"
13216             if theId == 1:
13217                 return "IMPORT"
13218             if theId == 2:
13219                 return "POINT"
13220             if theId == 3:
13221                 return "VECTOR"
13222             if theId == 4:
13223                 return "PLANE"
13224             if theId == 5:
13225                 return "LINE"
13226             if theId == 6:
13227                 return "TORUS"
13228             if theId == 7:
13229                 return "BOX"
13230             if theId == 8:
13231                 return "CYLINDER"
13232             if theId == 9:
13233                 return "CONE"
13234             if theId == 10:
13235                 return "SPHERE"
13236             if theId == 11:
13237                 return "PRISM"
13238             if theId == 12:
13239                 return "REVOLUTION"
13240             if theId == 13:
13241                 return "BOOLEAN"
13242             if theId == 14:
13243                 return "PARTITION"
13244             if theId == 15:
13245                 return "POLYLINE"
13246             if theId == 16:
13247                 return "CIRCLE"
13248             if theId == 17:
13249                 return "SPLINE"
13250             if theId == 18:
13251                 return "ELLIPSE"
13252             if theId == 19:
13253                 return "CIRC_ARC"
13254             if theId == 20:
13255                 return "FILLET"
13256             if theId == 21:
13257                 return "CHAMFER"
13258             if theId == 22:
13259                 return "EDGE"
13260             if theId == 23:
13261                 return "WIRE"
13262             if theId == 24:
13263                 return "FACE"
13264             if theId == 25:
13265                 return "SHELL"
13266             if theId == 26:
13267                 return "SOLID"
13268             if theId == 27:
13269                 return "COMPOUND"
13270             if theId == 28:
13271                 return "SUBSHAPE"
13272             if theId == 29:
13273                 return "PIPE"
13274             if theId == 30:
13275                 return "ARCHIMEDE"
13276             if theId == 31:
13277                 return "FILLING"
13278             if theId == 32:
13279                 return "EXPLODE"
13280             if theId == 33:
13281                 return "GLUED"
13282             if theId == 34:
13283                 return "SKETCHER"
13284             if theId == 35:
13285                 return "CDG"
13286             if theId == 36:
13287                 return "FREE_BOUNDS"
13288             if theId == 37:
13289                 return "GROUP"
13290             if theId == 38:
13291                 return "BLOCK"
13292             if theId == 39:
13293                 return "MARKER"
13294             if theId == 40:
13295                 return "THRUSECTIONS"
13296             if theId == 41:
13297                 return "COMPOUNDFILTER"
13298             if theId == 42:
13299                 return "SHAPES_ON_SHAPE"
13300             if theId == 43:
13301                 return "ELLIPSE_ARC"
13302             if theId == 44:
13303                 return "3DSKETCHER"
13304             if theId == 45:
13305                 return "FILLET_2D"
13306             if theId == 46:
13307                 return "FILLET_1D"
13308             if theId == 201:
13309                 return "PIPETSHAPE"
13310             return "Shape Id not exist."
13311
13312         ## Returns a main shape associated with the group
13313         #  @param theGroup is a GEOM group for which a main shape object is requested
13314         #  @return a GEOM object which is a main shape for theGroup
13315         #
13316         #  @ref swig_GetMainShape "Example"
13317         @ManageTransactions("GroupOp")
13318         def GetMainShape(self,theGroup):
13319             """
13320             Returns a main shape associated with the group
13321
13322             Parameters:
13323                 theGroup is a GEOM group for which a main shape object is requested
13324
13325             Returns:
13326                 a GEOM object which is a main shape for theGroup
13327
13328             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13329             """
13330             # Example: see GEOM_TestOthers.py
13331             anObj = self.GroupOp.GetMainShape(theGroup)
13332             RaiseIfFailed("GetMainShape", self.GroupOp)
13333             return anObj
13334
13335         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13336         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13337         #  @param theShape given shape (see GEOM.GEOM_Object)
13338         #  @param min_length minimum length of edges of theShape
13339         #  @param max_length maximum length of edges of theShape
13340         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13341         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13342         #  @param theName Object name; when specified, this parameter is used
13343         #         for result publication in the study. Otherwise, if automatic
13344         #         publication is switched on, default value is used for result name.
13345         #
13346         #  @return a newly created GEOM group of edges
13347         #
13348         #  @@ref swig_todo "Example"
13349         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13350             """
13351             Create group of edges of theShape, whose length is in range [min_length, max_length].
13352             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13353
13354             Parameters:
13355                 theShape given shape
13356                 min_length minimum length of edges of theShape
13357                 max_length maximum length of edges of theShape
13358                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13359                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13360                 theName Object name; when specified, this parameter is used
13361                         for result publication in the study. Otherwise, if automatic
13362                         publication is switched on, default value is used for result name.
13363
13364              Returns:
13365                 a newly created GEOM group of edges.
13366             """
13367             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13368             edges_in_range = []
13369             for edge in edges:
13370                 Props = self.BasicProperties(edge)
13371                 if min_length <= Props[0] and Props[0] <= max_length:
13372                     if (not include_min) and (min_length == Props[0]):
13373                         skip = 1
13374                     else:
13375                         if (not include_max) and (Props[0] == max_length):
13376                             skip = 1
13377                         else:
13378                             edges_in_range.append(edge)
13379
13380             if len(edges_in_range) <= 0:
13381                 print "No edges found by given criteria"
13382                 return None
13383
13384             # note: auto-publishing is done in self.CreateGroup()
13385             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13386             self.UnionList(group_edges, edges_in_range)
13387
13388             return group_edges
13389
13390         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13391         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13392         #  @param min_length minimum length of edges of selected shape
13393         #  @param max_length maximum length of edges of selected shape
13394         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13395         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13396         #  @return a newly created GEOM group of edges
13397         #  @ref swig_todo "Example"
13398         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13399             """
13400             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13401             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13402
13403             Parameters:
13404                 min_length minimum length of edges of selected shape
13405                 max_length maximum length of edges of selected shape
13406                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13407                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13408
13409              Returns:
13410                 a newly created GEOM group of edges.
13411             """
13412             nb_selected = sg.SelectedCount()
13413             if nb_selected < 1:
13414                 print "Select a shape before calling this function, please."
13415                 return 0
13416             if nb_selected > 1:
13417                 print "Only one shape must be selected"
13418                 return 0
13419
13420             id_shape = sg.getSelected(0)
13421             shape = IDToObject( id_shape )
13422
13423             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13424
13425             left_str  = " < "
13426             right_str = " < "
13427             if include_min: left_str  = " <= "
13428             if include_max: right_str  = " <= "
13429
13430             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
13431                                     + left_str + "length" + right_str + `max_length`)
13432
13433             sg.updateObjBrowser(True)
13434
13435             return group_edges
13436
13437         # end of l3_groups
13438         ## @}
13439
13440         #@@ insert new functions before this line @@ do not remove this line @@#
13441
13442         ## Create a copy of the given object
13443         #
13444         #  @param theOriginal geometry object for copy
13445         #  @param theName Object name; when specified, this parameter is used
13446         #         for result publication in the study. Otherwise, if automatic
13447         #         publication is switched on, default value is used for result name.
13448         #
13449         #  @return New GEOM_Object, containing the copied shape.
13450         #
13451         #  @ingroup l1_geomBuilder_auxiliary
13452         #  @ref swig_MakeCopy "Example"
13453         @ManageTransactions("InsertOp")
13454         def MakeCopy(self, theOriginal, theName=None):
13455             """
13456             Create a copy of the given object
13457
13458             Parameters:
13459                 theOriginal geometry object for copy
13460                 theName Object name; when specified, this parameter is used
13461                         for result publication in the study. Otherwise, if automatic
13462                         publication is switched on, default value is used for result name.
13463
13464             Returns:
13465                 New GEOM_Object, containing the copied shape.
13466
13467             Example of usage: Copy = geompy.MakeCopy(Box)
13468             """
13469             # Example: see GEOM_TestAll.py
13470             anObj = self.InsertOp.MakeCopy(theOriginal)
13471             RaiseIfFailed("MakeCopy", self.InsertOp)
13472             self._autoPublish(anObj, theName, "copy")
13473             return anObj
13474
13475         ## Add Path to load python scripts from
13476         #  @param Path a path to load python scripts from
13477         #  @ingroup l1_geomBuilder_auxiliary
13478         def addPath(self,Path):
13479             """
13480             Add Path to load python scripts from
13481
13482             Parameters:
13483                 Path a path to load python scripts from
13484             """
13485             if (sys.path.count(Path) < 1):
13486                 sys.path.append(Path)
13487                 pass
13488             pass
13489
13490         ## Load marker texture from the file
13491         #  @param Path a path to the texture file
13492         #  @return unique texture identifier
13493         #  @ingroup l1_geomBuilder_auxiliary
13494         @ManageTransactions("InsertOp")
13495         def LoadTexture(self, Path):
13496             """
13497             Load marker texture from the file
13498
13499             Parameters:
13500                 Path a path to the texture file
13501
13502             Returns:
13503                 unique texture identifier
13504             """
13505             # Example: see GEOM_TestAll.py
13506             ID = self.InsertOp.LoadTexture(Path)
13507             RaiseIfFailed("LoadTexture", self.InsertOp)
13508             return ID
13509
13510         ## Get internal name of the object based on its study entry
13511         #  @note This method does not provide an unique identifier of the geometry object.
13512         #  @note This is internal function of GEOM component, though it can be used outside it for
13513         #  appropriate reason (e.g. for identification of geometry object).
13514         #  @param obj geometry object
13515         #  @return unique object identifier
13516         #  @ingroup l1_geomBuilder_auxiliary
13517         def getObjectID(self, obj):
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             It is an internal function of GEOM component, though it can be used outside GEOM for
13522             appropriate reason (e.g. for identification of geometry object).
13523
13524             Parameters:
13525                 obj geometry object
13526
13527             Returns:
13528                 unique object identifier
13529             """
13530             ID = ""
13531             entry = salome.ObjectToID(obj)
13532             if entry is not None:
13533                 lst = entry.split(":")
13534                 if len(lst) > 0:
13535                     ID = lst[-1] # -1 means last item in the list
13536                     return "GEOM_" + ID
13537             return ID
13538
13539
13540
13541         ## Add marker texture. @a Width and @a Height parameters
13542         #  specify width and height of the texture in pixels.
13543         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13544         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13545         #  parameter should be unpacked string, in which '1' symbols represent opaque
13546         #  pixels and '0' represent transparent pixels of the texture bitmap.
13547         #
13548         #  @param Width texture width in pixels
13549         #  @param Height texture height in pixels
13550         #  @param Texture texture data
13551         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13552         #  @return unique texture identifier
13553         #  @ingroup l1_geomBuilder_auxiliary
13554         @ManageTransactions("InsertOp")
13555         def AddTexture(self, Width, Height, Texture, RowData=False):
13556             """
13557             Add marker texture. Width and Height parameters
13558             specify width and height of the texture in pixels.
13559             If RowData is True, Texture parameter should represent texture data
13560             packed into the byte array. If RowData is False (default), Texture
13561             parameter should be unpacked string, in which '1' symbols represent opaque
13562             pixels and '0' represent transparent pixels of the texture bitmap.
13563
13564             Parameters:
13565                 Width texture width in pixels
13566                 Height texture height in pixels
13567                 Texture texture data
13568                 RowData if True, Texture data are packed in the byte stream
13569
13570             Returns:
13571                 return unique texture identifier
13572             """
13573             if not RowData: Texture = PackData(Texture)
13574             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13575             RaiseIfFailed("AddTexture", self.InsertOp)
13576             return ID
13577
13578         ## Transfer not topological data from one GEOM object to another.
13579         #
13580         #  @param theObjectFrom the source object of non-topological data
13581         #  @param theObjectTo the destination object of non-topological data
13582         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13583         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13584         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13585         #         Other values of GEOM.find_shape_method are not supported.
13586         #
13587         #  @return True in case of success; False otherwise.
13588         #
13589         #  @ingroup l1_geomBuilder_auxiliary
13590         #
13591         #  @ref swig_TransferData "Example"
13592         @ManageTransactions("InsertOp")
13593         def TransferData(self, theObjectFrom, theObjectTo,
13594                          theFindMethod=GEOM.FSM_GetInPlace):
13595             """
13596             Transfer not topological data from one GEOM object to another.
13597
13598             Parameters:
13599                 theObjectFrom the source object of non-topological data
13600                 theObjectTo the destination object of non-topological data
13601                 theFindMethod method to search sub-shapes of theObjectFrom
13602                               in shape theObjectTo. Possible values are:
13603                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13604                               and GEOM.FSM_GetInPlace_Old. Other values of
13605                               GEOM.find_shape_method are not supported.
13606
13607             Returns:
13608                 True in case of success; False otherwise.
13609
13610             # Example: see GEOM_TestOthers.py
13611             """
13612             # Example: see GEOM_TestAll.py
13613             isOk = self.InsertOp.TransferData(theObjectFrom,
13614                                                theObjectTo, theFindMethod)
13615             RaiseIfFailed("TransferData", self.InsertOp)
13616             return isOk
13617
13618         ## Creates a new folder object. It is a container for any GEOM objects.
13619         #  @param Name name of the container
13620         #  @param Father parent object. If None,
13621         #         folder under 'Geometry' root object will be created.
13622         #  @return a new created folder
13623         #  @ingroup l1_publish_data
13624         def NewFolder(self, Name, Father=None):
13625             """
13626             Create a new folder object. It is an auxiliary container for any GEOM objects.
13627
13628             Parameters:
13629                 Name name of the container
13630                 Father parent object. If None,
13631                 folder under 'Geometry' root object will be created.
13632
13633             Returns:
13634                 a new created folder
13635             """
13636             if not Father: Father = self.father
13637             return self.CreateFolder(Name, Father)
13638
13639         ## Move object to the specified folder
13640         #  @param Object object to move
13641         #  @param Folder target folder
13642         #  @ingroup l1_publish_data
13643         def PutToFolder(self, Object, Folder):
13644             """
13645             Move object to the specified folder
13646
13647             Parameters:
13648                 Object object to move
13649                 Folder target folder
13650             """
13651             self.MoveToFolder(Object, Folder)
13652             pass
13653
13654         ## Move list of objects to the specified folder
13655         #  @param ListOfSO list of objects to move
13656         #  @param Folder target folder
13657         #  @ingroup l1_publish_data
13658         def PutListToFolder(self, ListOfSO, Folder):
13659             """
13660             Move list of objects to the specified folder
13661
13662             Parameters:
13663                 ListOfSO list of objects to move
13664                 Folder target folder
13665             """
13666             self.MoveListToFolder(ListOfSO, Folder)
13667             pass
13668
13669         ## @addtogroup l2_field
13670         ## @{
13671
13672         ## Creates a field
13673         #  @param shape the shape the field lies on
13674         #  @param name the field name
13675         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13676         #  @param dimension dimension of the shape the field lies on
13677         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13678         #  @param componentNames names of components
13679         #  @return a created field
13680         @ManageTransactions("FieldOp")
13681         def CreateField(self, shape, name, type, dimension, componentNames):
13682             """
13683             Creates a field
13684
13685             Parameters:
13686                 shape the shape the field lies on
13687                 name  the field name
13688                 type  type of field data
13689                 dimension dimension of the shape the field lies on
13690                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13691                 componentNames names of components
13692
13693             Returns:
13694                 a created field
13695             """
13696             if isinstance( type, int ):
13697                 if type < 0 or type > 3:
13698                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13699                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13700
13701             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13702             RaiseIfFailed("CreateField", self.FieldOp)
13703             global geom
13704             geom._autoPublish( f, "", name)
13705             return f
13706
13707         ## Removes a field from the GEOM component
13708         #  @param field the field to remove
13709         def RemoveField(self, field):
13710             "Removes a field from the GEOM component"
13711             global geom
13712             if isinstance( field, GEOM._objref_GEOM_Field ):
13713                 geom.RemoveObject( field )
13714             elif isinstance( field, geomField ):
13715                 geom.RemoveObject( field.field )
13716             else:
13717                 raise RuntimeError, "RemoveField() : the object is not a field"
13718             return
13719
13720         ## Returns number of fields on a shape
13721         @ManageTransactions("FieldOp")
13722         def CountFields(self, shape):
13723             "Returns number of fields on a shape"
13724             nb = self.FieldOp.CountFields( shape )
13725             RaiseIfFailed("CountFields", self.FieldOp)
13726             return nb
13727
13728         ## Returns all fields on a shape
13729         @ManageTransactions("FieldOp")
13730         def GetFields(self, shape):
13731             "Returns all fields on a shape"
13732             ff = self.FieldOp.GetFields( shape )
13733             RaiseIfFailed("GetFields", self.FieldOp)
13734             return ff
13735
13736         ## Returns a field on a shape by its name
13737         @ManageTransactions("FieldOp")
13738         def GetField(self, shape, name):
13739             "Returns a field on a shape by its name"
13740             f = self.FieldOp.GetField( shape, name )
13741             RaiseIfFailed("GetField", self.FieldOp)
13742             return f
13743
13744         # end of l2_field
13745         ## @}
13746
13747
13748 import omniORB
13749 # Register the new proxy for GEOM_Gen
13750 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13751
13752
13753 ## Field on Geometry
13754 #  @ingroup l2_field
13755 class geomField( GEOM._objref_GEOM_Field ):
13756
13757     def __init__(self):
13758         GEOM._objref_GEOM_Field.__init__(self)
13759         self.field = GEOM._objref_GEOM_Field
13760         return
13761
13762     ## Returns the shape the field lies on
13763     def getShape(self):
13764         "Returns the shape the field lies on"
13765         return self.field.GetShape(self)
13766
13767     ## Returns the field name
13768     def getName(self):
13769         "Returns the field name"
13770         return self.field.GetName(self)
13771
13772     ## Returns type of field data as integer [0-3]
13773     def getType(self):
13774         "Returns type of field data"
13775         return self.field.GetDataType(self)._v
13776
13777     ## Returns type of field data:
13778     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13779     def getTypeEnum(self):
13780         "Returns type of field data"
13781         return self.field.GetDataType(self)
13782
13783     ## Returns dimension of the shape the field lies on:
13784     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13785     def getDimension(self):
13786         """Returns dimension of the shape the field lies on:
13787         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13788         return self.field.GetDimension(self)
13789
13790     ## Returns names of components
13791     def getComponents(self):
13792         "Returns names of components"
13793         return self.field.GetComponents(self)
13794
13795     ## Adds a time step to the field
13796     #  @param step the time step number further used as the step identifier
13797     #  @param stamp the time step time
13798     #  @param values the values of the time step
13799     def addStep(self, step, stamp, values):
13800         "Adds a time step to the field"
13801         stp = self.field.AddStep( self, step, stamp )
13802         if not stp:
13803             raise RuntimeError, \
13804                   "Field.addStep() : Error: step %s already exists in this field"%step
13805         global geom
13806         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13807         self.setValues( step, values )
13808         return stp
13809
13810     ## Remove a time step from the field
13811     def removeStep(self,step):
13812         "Remove a time step from the field"
13813         stepSO = None
13814         try:
13815             stepObj = self.field.GetStep( self, step )
13816             if stepObj:
13817                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13818         except:
13819             #import traceback
13820             #traceback.print_exc()
13821             pass
13822         self.field.RemoveStep( self, step )
13823         if stepSO:
13824             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13825         return
13826
13827     ## Returns number of time steps in the field
13828     def countSteps(self):
13829         "Returns number of time steps in the field"
13830         return self.field.CountSteps(self)
13831
13832     ## Returns a list of time step IDs in the field
13833     def getSteps(self):
13834         "Returns a list of time step IDs in the field"
13835         return self.field.GetSteps(self)
13836
13837     ## Returns a time step by its ID
13838     def getStep(self,step):
13839         "Returns a time step by its ID"
13840         stp = self.field.GetStep(self, step)
13841         if not stp:
13842             raise RuntimeError, "Step %s is missing from this field"%step
13843         return stp
13844
13845     ## Returns the time of the field step
13846     def getStamp(self,step):
13847         "Returns the time of the field step"
13848         return self.getStep(step).GetStamp()
13849
13850     ## Changes the time of the field step
13851     def setStamp(self, step, stamp):
13852         "Changes the time of the field step"
13853         return self.getStep(step).SetStamp(stamp)
13854
13855     ## Returns values of the field step
13856     def getValues(self, step):
13857         "Returns values of the field step"
13858         return self.getStep(step).GetValues()
13859
13860     ## Changes values of the field step
13861     def setValues(self, step, values):
13862         "Changes values of the field step"
13863         stp = self.getStep(step)
13864         errBeg = "Field.setValues(values) : Error: "
13865         try:
13866             ok = stp.SetValues( values )
13867         except Exception, e:
13868             excStr = str(e)
13869             if excStr.find("WrongPythonType") > 0:
13870                 raise RuntimeError, errBeg +\
13871                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13872             raise RuntimeError, errBeg + str(e)
13873         if not ok:
13874             nbOK = self.field.GetArraySize(self)
13875             nbKO = len(values)
13876             if nbOK != nbKO:
13877                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13878             else:
13879                 raise RuntimeError, errBeg + "failed"
13880         return
13881
13882     pass # end of class geomField
13883
13884 # Register the new proxy for GEOM_Field
13885 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13886
13887
13888 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13889 #  interface to GEOM operations.
13890 #
13891 #  Typical use is:
13892 #  \code
13893 #    import salome
13894 #    salome.salome_init()
13895 #    from salome.geom import geomBuilder
13896 #    geompy = geomBuilder.New(salome.myStudy)
13897 #  \endcode
13898 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13899 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13900 #  @return geomBuilder instance
13901 def New( study, instance=None):
13902     """
13903     Create a new geomBuilder instance.The geomBuilder class provides the Python
13904     interface to GEOM operations.
13905
13906     Typical use is:
13907         import salome
13908         salome.salome_init()
13909         from salome.geom import geomBuilder
13910         geompy = geomBuilder.New(salome.myStudy)
13911
13912     Parameters:
13913         study     SALOME study, generally obtained by salome.myStudy.
13914         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13915     Returns:
13916         geomBuilder instance
13917     """
13918     #print "New geomBuilder ", study, instance
13919     global engine
13920     global geom
13921     global doLcc
13922     engine = instance
13923     if engine is None:
13924       doLcc = True
13925     geom = geomBuilder()
13926     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13927     geom.init_geom(study)
13928     return geom
13929
13930
13931 # Register methods from the plug-ins in the geomBuilder class 
13932 plugins_var = os.environ.get( "GEOM_PluginsList" )
13933
13934 plugins = None
13935 if plugins_var is not None:
13936     plugins = plugins_var.split( ":" )
13937     plugins=filter(lambda x: len(x)>0, plugins)
13938 if plugins is not None:
13939     for pluginName in plugins:
13940         pluginBuilderName = pluginName + "Builder"
13941         try:
13942             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13943         except Exception, e:
13944             from salome_utils import verbose
13945             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13946             continue
13947         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13948         plugin = eval( pluginBuilderName )
13949         
13950         # add methods from plugin module to the geomBuilder class
13951         for k in dir( plugin ):
13952             if k[0] == '_': continue
13953             method = getattr( plugin, k )
13954             if type( method ).__name__ == 'function':
13955                 if not hasattr( geomBuilder, k ):
13956                     setattr( geomBuilder, k, method )
13957                 pass
13958             pass
13959         del pluginName
13960         pass
13961     pass